models

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2023 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

package realm/wdb/models Contains models for game data, type enums, and conversion functions

Index

Constants

View Source
const (
	// InventoryTypes
	IT_Empty        = -1
	IT_Unequippable = 0
	IT_Head         = 1
	IT_Neck         = 2
	IT_Shoulder     = 3
	IT_Shirt        = 4
	IT_Chest        = 5
	IT_Waist        = 6
	IT_Legs         = 7
	IT_Feet         = 8
	IT_Wrists       = 9
	IT_Hands        = 10
	IT_Finger       = 11
	IT_Trinket      = 12
	IT_Weapon       = 13
	IT_Shield       = 14
	IT_Ranged       = 15
	IT_Back         = 16
	IT_TwoHand      = 17
	IT_Bag          = 18
	IT_Tabard       = 19
	IT_Robe         = 20
	IT_MainHand     = 21
	IT_OffHand      = 22
	IT_Holdable     = 23
	IT_Ammo         = 24
	IT_Thrown       = 25
	IT_Gun          = 26
	IT_Quiver       = 27
	IT_Relic        = 28
)

Variables

View Source
var (
	InventoryType_names = map[InventoryType]string{

		IT_Empty:        "Empty",
		IT_Unequippable: "Unequippable",
		IT_Head:         "Head",
		IT_Neck:         "Neck",
		IT_Shoulder:     "Shoulder",
		IT_Shirt:        "Shirt",
		IT_Chest:        "Chest",
		IT_Waist:        "Waist",
		IT_Legs:         "Legs",
		IT_Feet:         "Feet",
		IT_Wrists:       "Wrists",
		IT_Hands:        "Hands",
		IT_Finger:       "Finger",
		IT_Trinket:      "Trinket",
		IT_Weapon:       "Weapon",
		IT_Shield:       "Shield",
		IT_Ranged:       "Ranged",
		IT_Back:         "Back",
		IT_TwoHand:      "TwoHand",
		IT_Bag:          "Bag",
		IT_Tabard:       "Tabard",
		IT_Robe:         "Robe",
		IT_MainHand:     "MainHand",
		IT_OffHand:      "OffHand",
		IT_Holdable:     "Holdable",
		IT_Ammo:         "Ammo",
		IT_Thrown:       "Thrown",
		IT_Gun:          "Gun",
		IT_Quiver:       "Quiver",
		IT_Relic:        "Relic",
	}

	InventoryType_lookup map[string]InventoryType

	ItemDisplaySlots = map[InventoryType]ItemSlot{
		IT_Shield:   PaperDoll_OffHand,
		IT_Robe:     PaperDoll_Chest,
		IT_Head:     PaperDoll_Head,
		IT_Neck:     PaperDoll_Neck,
		IT_Shoulder: PaperDoll_Shoulder,
		IT_Shirt:    PaperDoll_Shirt,
		IT_Chest:    PaperDoll_Chest,
		IT_Waist:    PaperDoll_Waist,
		IT_Legs:     PaperDoll_Legs,
		IT_Feet:     PaperDoll_Feet,
		IT_Wrists:   PaperDoll_Wrist,
		IT_Hands:    PaperDoll_Hands,
		IT_Finger:   PaperDoll_Finger1,
		IT_Trinket:  PaperDoll_Trinket1,
		IT_Back:     PaperDoll_Back,
		IT_TwoHand:  PaperDoll_MainHand,
		IT_MainHand: PaperDoll_MainHand,
		IT_Holdable: PaperDoll_OffHand,
		IT_OffHand:  PaperDoll_OffHand,
		IT_Ranged:   PaperDoll_Ranged,
		IT_Gun:      PaperDoll_Ranged,
		IT_Tabard:   PaperDoll_Tabard,
		IT_Quiver:   PaperDoll_Bag1,
		IT_Bag:      PaperDoll_Bag1,
		IT_Thrown:   PaperDoll_Ranged,
		IT_Ammo:     PaperDoll_Ammo,
	}
)
View Source
var (
	ItemModNames = map[ItemMod]string{
		ItemModMana:                   "Mana",
		ItemModHealth:                 "Health",
		ItemModAgility:                "Agility",
		ItemModStrength:               "Strength",
		ItemModIntellect:              "Intellect",
		ItemModSpirit:                 "Spirit",
		ItemModStamina:                "Stamina",
		ItemModDefenseSkillRating:     "DefenseSkillRating",
		ItemModDodgeRating:            "DodgeRating",
		ItemModParryRating:            "ParryRating",
		ItemModBlockRating:            "BlockRating",
		ItemModHitMeleeRating:         "HitMeleeRating",
		ItemModHitRangedRating:        "HitRangedRating",
		ItemModHitSpellRating:         "HitSpellRating",
		ItemModCritMeleeRating:        "CritMeleeRating",
		ItemModCritRangedRating:       "CritRangedRating",
		ItemModCritSpellRating:        "CritSpellRating",
		ItemModHitTakenMeleeRating:    "HitTakenMeleeRating",
		ItemModHitTakenRangedRating:   "HitTakenRangedRating",
		ItemModHitTakenSpellRating:    "HitTakenSpellRating",
		ItemModCritTakenMeleeRating:   "CritTakenMeleeRating",
		ItemModCritTakenRangedRating:  "CritTakenRangedRating",
		ItemModCritTakenSpellRating:   "CritTakenSpellRating",
		ItemModHasteMeleeRating:       "HasteMeleeRating",
		ItemModHasteRangedRating:      "HasteRangedRating",
		ItemModHasteSpellRating:       "HasteSpellRating",
		ItemModHitRating:              "HitRating",
		ItemModCritRating:             "CritRating",
		ItemModHitTakenRating:         "HitTakenRating",
		ItemModCritTakenRating:        "CritTakenRating",
		ItemModResilienceRating:       "ResilienceRating",
		ItemModHasteRating:            "HasteRating",
		ItemModExpertiseRating:        "ExpertiseRating",
		ItemModAttackPower:            "AttackPower",
		ItemModRangedAttackPower:      "RangedAttackPower",
		ItemModFeralAttackPower:       "FeralAttackPower",
		ItemModSpellHealingDone:       "SpellHealingDone",
		ItemModSpellDamageDone:        "SpellDamageDone",
		ItemModManaRegeneration:       "ManaRegeneration",
		ItemModArmorPenetrationRating: "ArmorPenetrationRating",
		ItemModSpellPower:             "SpellPower",
		ItemModHealthRegen:            "HealthRegen",
		ItemModSpellPenetration:       "SpellPenetration",
		ItemModBlockValue:             "BlockValue",
	}

	ItemModLookup map[string]ItemMod
)
View Source
var ClassNames = map[Class]string{}

Load with info from game database on startup

View Source
var RaceNames = map[Race]string{}

Load with info from game database on startup

View Source
var StatLookup = map[string]ModStat{}
View Source
var StatNames = map[ModStat]string{
	WalkSpeed:                 "WalkSpeed",
	RunSpeed:                  "RunSpeed",
	SwimSpeed:                 "SwimSpeed",
	MountSpeed:                "MountSpeed",
	BaseHealth:                "BaseHealth",
	BaseMana:                  "BaseMana",
	Stamina:                   "Stamina",
	Strength:                  "Strength",
	Agility:                   "Agility",
	Intellect:                 "Intellect",
	Spirit:                    "Spirit",
	CriticalStrike:            "CriticalStrike",
	PhysicalDamageDealt:       "PhysicalDamageDealt",
	HolyDamageDealt:           "HolyDamageDealt",
	FireDamageDealt:           "FireDamageDealt",
	NatureDamageDealt:         "NatureDamageDealt",
	FrostDamageDealt:          "FrostDamageDealt",
	ShadowDamageDealt:         "ShadowDamageDealt",
	ArcaneDamageDealt:         "ArcaneDamageDealt",
	PhysicalDamageTaken:       "PhysicalDamageTaken",
	HolyDamageTaken:           "HolyDamageTaken",
	FireDamageTaken:           "FireDamageTaken",
	NatureDamageTaken:         "NatureDamageTaken",
	FrostDamageTaken:          "FrostDamageTaken",
	ShadowDamageTaken:         "ShadowDamageTaken",
	ArcaneDamageTaken:         "ArcaneDamageTaken",
	ResistPhysicalDamage:      "ResistPhysicalDamage",
	ResistHolyDamage:          "ResistHolyDamage",
	ResistFireDamage:          "ResistFireDamage",
	ResistNatureDamage:        "ResistNatureDamage",
	ResistFrostDamage:         "ResistFrostDamage",
	ResistShadowDamage:        "ResistShadowDamage",
	ResistArcaneDamage:        "ResistArcaneDamage",
	Health:                    "Health",
	DefenseRating:             "DefenseRating",
	DodgeRating:               "DodgeRating",
	ParryRating:               "ParryRating",
	BlockRating:               "BlockRating",
	MeleeHitRating:            "MeleeHitRating",
	RangedHitRating:           "RangedHitRating",
	SpellHitRating:            "SpellHitRating",
	MeleeCriticalRating:       "MeleeCriticalRating",
	RangedCriticalRating:      "RangedCriticalRating",
	SpellCriticalRating:       "SpellCriticalRating",
	MeleeHitTakenRating:       "MeleeHitTakenRating",
	RangedHitTakenRating:      "RangedHitTakenRating",
	SpellHitTakenRating:       "SpellHitTakenRating",
	MeleeCriticalTakenRating:  "MeleeCriticalTakenRating",
	RangedCriticalTakenRating: "RangedCriticalTakenRating",
	SpellCriticalTakenRating:  "SpellCriticalTakenRating",
	MeleeHasteRating:          "MeleeHasteRating",
	RangedHasteRating:         "RangedHasteRating",
	HasteSpellRating:          "HasteSpellRating",
	HitRating:                 "HitRating",
	CritRating:                "CritRating",
	HitTakenRating:            "HitTakenRating",
	CritTakenRating:           "CritTakenRating",
	ResilienceRating:          "ResilienceRating",
	HasteRating:               "HasteRating",
	ExpertiseRating:           "ExpertiseRating",
	AttackPower:               "AttackPower",
	RangedAttackPower:         "RangedAttackPower",
	FeralAttackPower:          "FeralAttackPower",
	SpellHealingDone:          "SpellHealingDone",
	SpellDamageDone:           "SpellDamageDone",
	ManaRegeneration:          "ManaRegeneration",
	ArmorPenetrationRating:    "ArmorPenetrationRating",
	SpellPower:                "SpellPower",
	HealthRegen:               "HealthRegen",
	SpellPenetration:          "SpellPenetration",
	BlockValue:                "BlockValue",
}

Functions

func ResistIndex

func ResistIndex(build vsn.Build, resist Resistance) int

func TestFlags

func TestFlags(t *testing.T)

Types

type ActionButton

type ActionButton struct {
	Player uint64 `xorm:"'player' index"`
	Button uint8
	Action uint32
	Type   ActionType
	Misc   uint8
}

ActionButton stores all the buttons a player has in their action bars.

type ActionType

type ActionType uint8
const (
	ActionSpell ActionType = iota
	ActionMacro
	ActionItem
)

func (*ActionType) DecodeWord

func (at *ActionType) DecodeWord(data string) error

func (*ActionType) EncodeWord

func (at *ActionType) EncodeWord() (string, error)

func (ActionType) String

func (at ActionType) String() string

type Broadcast

type Broadcast struct {
	Message i18n.Text
	Weight  int
}

type Character

type Character struct {
	ID              uint64 `json:"id" xorm:"'id' pk autoincr"`
	GameAccount     uint64 `json:"gameAccount"`
	Name            string `json:"name"`
	Faction         uint32 `json:"faction"`
	FirstLogin      bool
	Level           uint32 `json:"level"`
	XP              uint32
	RealmID         uint64  `json:"realmID" xorm:"'realm_id'"`
	Race            Race    `json:"race"`
	Class           Class   `json:"class"`
	BodyType        uint8   `json:"gender"`
	Skin            uint8   `json:"skin"`
	Face            uint8   `json:"face"`
	HairStyle       uint8   `json:"hairStyle"`
	HairColor       uint8   `json:"hairColor"`
	FacialHair      uint8   `json:"facialHair"`
	Coinage         Money   `json:"coinage"`
	Zone            uint32  `json:"zone"`
	Map             uint32  `json:"map"`
	X               float32 `json:"x"`
	Y               float32 `json:"y"`
	Z               float32 `json:"z"`
	O               float32 `json:"o"`
	Leader          uint64
	Guild           uint64
	HideHelm        bool
	HideCloak       bool
	Health          uint32
	Mana            uint32
	Ghost           bool
	TotalPlayedTime time.Duration `xorm:"'playtime_total'"`
	LevelPlayedTime time.Duration `xorm:"'playtime_level'"`
}

Character describes a Player/Session's character attributes.

type CharacterAchievement

type CharacterAchievement struct {
	ID            uint64
	AchievementID uint32
}

type CharacterProp

type CharacterProp struct {
	ID     uint64
	PropID PropID
	Value  string
}

type Class

type Class uint8

func (Class) String

func (r Class) String() string

type ClassLevelStats

type ClassLevelStats struct {
	Class Class
	Level uint32

	BaseStats map[ModStat]float64
}

type ClassMask

type ClassMask uint64
const (
	AllClasses ClassMask = 0xFFFFFFFFFFFFFFFF
)

func (*ClassMask) All

func (c *ClassMask) All() bool

func (*ClassMask) DecodeWord

func (c *ClassMask) DecodeWord(data string) error

func (*ClassMask) EncodeWord

func (c *ClassMask) EncodeWord() (string, error)

func (ClassMask) Has

func (c ClassMask) Has(class Class) bool

func (*ClassMask) Set

func (c *ClassMask) Set(class Class, t bool)

type ClientStat

type ClientStat uint8
const (
	ClientStatStrength ClientStat = iota
	ClientStatAgility
	ClientStatStamina
	ClientStatIntellect
	ClientStatSpirit
)

type Contact

type Contact struct {
	Player   uint64 `xorm:"'player' index"`
	Friend   uint64 `xorm:"'friend'"`
	Friended bool   `xorm:"'friended'"`
	Ignored  bool   `xorm:"'ignored'"`
	Muted    bool   `xorm:"'muted'"`
	Note     string `xorm:"'note'"`
}

Contact describes the friend and ignore statuses of a Player in relation to another Player.

type CreatureTemplate

type CreatureTemplate struct {
	ID              string
	Entry           uint32    `xorm:"'entry'"`
	Name            i18n.Text `xorm:"'name'"`
	SubName         i18n.Text `xorm:"'sub_name'"`
	MinLevel        uint32    `xorm:"'min_level'"`
	MaxLevel        uint32    `xorm:"'max_level'"`
	DisplayIDs      []uint32  `xorm:"'display_ids'"`
	Faction         uint32    `xorm:"'faction'"`
	Scale           float32   `xorm:"'scale'"`
	Family          string    `xorm:"'family'"`
	CreatureType    uint32    `xorm:"'creature_type'"`
	InhabitType     uint32    `xorm:"'inhabit_type'"`
	RegenerateStats uint32    `xorm:"'regenerateStats'"`
	RacialLeader    bool      `xorm:"'racialLeader'"`
	// NpcFlags: should not tied to any particular version.
	Gossip         bool
	QuestGiver     bool
	Vendor         bool
	FlightMaster   bool
	Trainer        bool
	SpiritHealer   bool
	SpiritGuide    bool
	Innkeeper      bool
	Banker         bool
	Petitioner     bool
	TabardDesigner bool
	BattleMaster   bool
	Auctioneer     bool
	StableMaster   bool
	Repairer       bool
	OutdoorPVP     bool

	// UnitFlags: should not tied to any particular version.
	ServerControlled    bool // 0x1
	NonAttackable       bool // 0x2
	RemoveClientControl bool // 0x4
	PlayerControlled    bool // 0x8
	Rename              bool // 0x10
	PetAbandon          bool // 0x20
	OOCNotAttackable    bool // 0x100
	Passive             bool // 0x200
	PVP                 bool // 0x1000
	IsSilenced          bool // 0x2000
	IsPersuaded         bool // 0x4000
	Swimming            bool // 0x8000
	RemoveAttackIcon    bool // 0x10000
	IsPacified          bool // 0x20000
	IsStunned           bool // 0x40000
	InCombat            bool // 0x80000
	InTaxiFlight        bool // 0x100000
	Disarmed            bool // 0x200000
	Confused            bool // 0x400000
	Fleeing             bool // 0x800000
	Possessed           bool // 0x1000000
	NotSelectable       bool // 0x2000000
	Skinnable           bool // 0x4000000
	AurasVisible        bool // 0x8000000
	Sheathe             bool // 0x40000000
	NoKillReward        bool // 0x80000000

	// DynamicFlags: should not tied to any particular version.
	Lootable              bool
	TrackUnit             bool
	Tapped                bool
	TappedByPlayer        bool
	SpecialInfo           bool
	VisuallyDead          bool
	TappedByAllThreatList bool

	// Extra flags
	InstanceBind             bool // creature kill bind instance with killer and killer’s group
	NoAggroOnSight           bool // no aggro (ignore faction/reputation hostility)
	NoParry                  bool // creature can’t parry
	NoParryHasten            bool // creature can’t counter-attack at parry
	NoBlock                  bool //	creature can’t block
	NoCrush                  bool // creature can’t do crush attacks
	NoXPAtKill               bool // creature kill not provide XP
	Invisible                bool // creature is always invisible for player (mostly trigger creatures)
	NotTauntable             bool // creature is immune to taunt auras and effect attack me
	AggroZone                bool // creature sets itself in combat with zone on aggro
	Guard                    bool // creature is a guard
	NoCallAssist             bool // creature shouldn’t call for assistance on aggro
	Active                   bool //creature is active object. Grid of this creature will be loaded and creature set as active
	ForceEnableMMap          bool // creature is forced to use MMaps
	ForceDisableMMap         bool // creature is forced to NOT use MMaps
	WalkInWater              bool // creature is forced to walk in water even it can swim
	Civilian                 bool // CreatureInfo→civilian substitute (for expansions as Civilian Colum was removed)
	NoMelee                  bool // creature can’t melee
	FarView                  bool // creature with far view
	ForceAttackingCapability bool // SetForceAttackingCapability(true); for nonattackable, nontargetable creatures that should be able to attack nontheless
	IgnoreUsedPosition       bool // ignore creature when checking used positions around target
	CountSpawns              bool // count creature spawns in Map*
	HasteSpellImmunity       bool // immunity to COT or Mind Numbing Poison – very common in instances

	// CreatureTypeFlags    uint32     `xorm:"'creatureTypeFlags'"`
	Tameable                bool // Makes the mob tameable (must also be a beast and have family set)
	VisibleToGhosts         bool // Sets Creatures that can ALSO be seen when player is a ghost. Used in CanInteract function by client, can’t be attacked
	BossLevel               bool
	DontPlayWoundParryAnim  bool
	HideFactionTooltip      bool // Controls something in client tooltip related to creature faction
	SpellAttackable         bool
	DeadInteract            bool // Player can interact with the creature if its dead (not player dead)
	HerbLoot                bool // Uses Skinning Loot Field
	MiningLoot              bool // Makes Mob Corpse Mineable – Uses Skinning Loot Field
	DontLogDeath            bool // Does not combatlog death.
	MountedCombat           bool
	CanAssist               bool // Can aid any player or group in combat. Typically seen for escorting NPC’s
	PetHasActionBar         bool // checked from calls in Lua_PetHasActionBar
	MaskUID                 bool
	EngineerLoot            bool // Makes Mob Corpse Engineer Lootable – Uses Skinning Loot Field
	ExoticPet               bool // Tamable as an exotic pet. Normal tamable flag must also be set.
	UseDefaultCollisionBox  bool
	IsSiegeWeapon           bool
	ProjectileCollision     bool
	HideNameplate           bool
	DontPlayMountedAnim     bool
	IsLinkAll               bool
	InteractOnlyWithCreator bool
	ForceGossip             bool

	SpeedWalk            float32 `xorm:"'speedWalk'"`
	SpeedRun             float32 `xorm:"'speedRun'"`
	UnitClass            uint32  `xorm:"'unitClass'"`
	Rank                 uint32  `xorm:"'rank'"`
	HealthMultiplier     float32 `xorm:"'healthMultiplier'"`
	PowerMultiplier      float32 `xorm:"'powerMultiplier'"`
	DamageMultiplier     float32 `xorm:"'damageMultiplier'"`
	DamageVariance       float32 `xorm:"'damageVariance'"`
	ArmorMultiplier      float32 `xorm:"'armorMultiplier'"`
	ExperienceMultiplier float32 `xorm:"'experienceMultiplier'"`
	MinLevelHealth       uint32  `xorm:"'minLevelHealth'"`
	MaxLevelHealth       uint32  `xorm:"'maxLevelHealth'"`
	MinLevelMana         uint32  `xorm:"'minLevelMana'"`
	MaxLevelMana         uint32  `xorm:"'maxLevelMana'"`
	MinMeleeDmg          float32 `xorm:"'minMeleeDmg'"`
	MaxMeleeDmg          float32 `xorm:"'maxMeleeDmg'"`
	MinRangedDmg         float32 `xorm:"'minRangedDmg'"`
	MaxRangedDmg         float32 `xorm:"'maxRangedDmg'"`
	Armor                uint32  `xorm:"'armor'"`
	MeleeAttackPower     uint32  `xorm:"'meleeAttackPower'"`
	RangedAttackPower    uint32  `xorm:"'rangedAttackPower'"`
	MeleeBaseAttackTime  uint32  `xorm:"'meleeBaseAttackTime'"`
	RangedBaseAttackTime uint32  `xorm:"'mangedBaseAttackTime'"`
	DamageSchool         int32   `xorm:"'damageSchool'"`
	MinLootGold          Money   `xorm:"'minLootGold'"`
	MaxLootGold          Money   `xorm:"'maxLootGold'"`
	LootId               uint32  `xorm:"'lootId'"`
	PickpocketLootId     uint32  `xorm:"'pickpocketLootId'"`
	SkinningLootId       uint32  `xorm:"'skinningLootId'"`
	KillCredit1          uint32  `xorm:"'killCredit1'"`
	KillCredit2          uint32  `xorm:"'killCredit2'"`
	MechanicImmuneMask   uint32  `xorm:"'mechanicImmuneMask'"`
	SchoolImmuneMask     uint32  `xorm:"'schoolImmuneMask'"`
	ResistanceHoly       int32   `xorm:"'resistanceHoly'"`
	ResistanceFire       int32   `xorm:"'resistanceFire'"`
	ResistanceNature     int32   `xorm:"'resistanceNature'"`
	ResistanceFrost      int32   `xorm:"'resistanceFrost'"`
	ResistanceShadow     int32   `xorm:"'resistanceShadow'"`
	ResistanceArcane     int32   `xorm:"'resistanceArcane'"`
	PetSpellDataId       uint32  `xorm:"'petSpellDataId'"`
	MovementType         uint32  `xorm:"'movementType'"`
	TrainerType          int32   `xorm:"'trainerType'"`
	TrainerSpell         uint32  `xorm:"'trainerSpell'"`
	TrainerClass         uint32  `xorm:"'trainerClass'"`
	TrainerRace          uint32  `xorm:"'trainerRace'"`
	TrainerTemplateId    uint32  `xorm:"'trainerTemplateId'"`
	VendorTemplateId     uint32  `xorm:"'vendorTemplateId'"`
	GossipMenuId         string  `xorm:"'gossipMenuId'"`
	EquipmentTemplateId  uint32  `xorm:"'equipmentTemplateId'"`
	DishonourableKill    bool    `xorm:"'dishonourable_kill'"`
	AIName               string  `xorm:"'aIName'"`
	ScriptName           string  `xorm:"'script_name'"`
}

type EquipType

type EquipType uint8
const (
	// Not encoded
	EquipNone EquipType = iota
	// Equip in the next free available inventory slot
	EquipInventory
	// Item is a bag. Put this bag in the next free bag slot.
	EquipContainer
	// Item is to be equipped in the paper doll based on its inventory type
	EquipPaperDoll
)

func (*EquipType) DecodeWord

func (et *EquipType) DecodeWord(data string) (e error)

func (*EquipType) EncodeWord

func (et *EquipType) EncodeWord() (s string, e error)

type ExploredZone

type ExploredZone struct {
	Player uint64 `xorm:"'player' index"`
	ZoneID uint32 `xorm:"'zone_id'"` // The actual zone ID, not the flag.
}

ExploredZone lists a player, and the zones which that player has explored in their map.

type FactionStanding

type FactionStanding struct {
	Player  uint64
	Faction uint32
	Value   float32
	AtWar   bool
}

type GameMode

type GameMode uint8
const (
	GameMode_Survival GameMode = iota
	GameMode_Normal
	GameMode_Creative
	GameMode_God
	NumGameModes
)

func (*GameMode) DecodeWord

func (gm *GameMode) DecodeWord(str string) error

func (*GameMode) EncodeWord

func (gm *GameMode) EncodeWord() (string, error)

func (GameMode) String

func (gm GameMode) String() string

type GameObjectFlags

type GameObjectFlags uint32
const (
	GOInUse GameObjectFlags = 1 << iota
	GOLocked
	GOUntargetable
	GOTransport
	GOUnselectable
	GONoDespawn
	GOTriggered
	GODamaged
	GODestroyed
)

func ParseGameObjectFlags

func ParseGameObjectFlags(str string) (GameObjectFlags, error)

func (*GameObjectFlags) DecodeWord

func (gof *GameObjectFlags) DecodeWord(word string) error

func (*GameObjectFlags) EncodeWord

func (gof *GameObjectFlags) EncodeWord() (string, error)

func (GameObjectFlags) String

func (gof GameObjectFlags) String() string

type GameObjectTemplate

type GameObjectTemplate struct {
	ID             string `xorm:"'id' index"`
	Entry          uint32 `csv:"-" xorm:"'entry' bigint pk"`
	Type           uint32
	DisplayID      uint32 `xorm:"'display_id'"`
	Name           i18n.Text
	IconName       string
	CastBarCaption string
	Faction        uint32
	Flags          GameObjectFlags
	HasCustomAnim  bool
	Size           float32
	Data           []uint32
	MinGold        Money
	MaxGold        Money
}

type ImplictTarget

type ImplictTarget uint8
const (
	TargetUnitNone ImplictTarget = iota
	TargetUnitCaster
	TargetUnitNearbyEnemy
	TargetUnitNearbyAlly
	TargetUnitNearbyParty
	TargetUnitPet
	TargetUnitTargetEnemy
	TargetUnitSrcAreaEntry
	TargetUnitDestAreaEntry
	TargetDestHome
	TargetUnk10
	TargetUnitSrcAreaUnk11
	TargetUnitSrcAreaUnk12
	TargetUnitSrcAreaUnk13
	TargetUnitSrcAreaUnk14
	TargetUnitSrcAreaEnemy
	TargetUnitDestAreaEnemy
	TargetDestDb
	TargetDestCaster
	TargetUnk19
	TargetUnitCasterAreaParty
	TargetUnitTargetAlly
	TargetSrcCaster
	TargetGameobjectTarget
	TargetUnitConeEnemy24
	TargetUnitTargetAny
	TargetGameobjectItemTarget
	TargetUnitMaster
	TargetDestDynobjEnemy
	TargetDestDynobjAlly
	TargetUnitSrcAreaAlly
	TargetUnitDestAreaAlly
	TargetDestCasterSummon
	TargetUnitSrcAreaParty
	TargetUnitDestAreaParty
	TargetUnitTargetParty
	TargetDestCasterUnk36
	TargetUnitLasttargetAreaParty
	TargetUnitNearbyEntry
	TargetDestCasterFishing
	TargetGameobjectNearbyEntry
	TargetDestCasterFrontRight
	TargetDestCasterBackRight
	TargetDestCasterBackLeft
	TargetDestCasterFrontLeft
	TargetUnitTargetChainhealAlly
	TargetDestNearbyEntry
	TargetDestCasterFront
	TargetDestCasterBack
	TargetDestCasterRight
	TargetDestCasterLeft
	TargetGameobjectSrcArea
	TargetGameobjectDestArea
	TargetDestTargetEnemy
	TargetUnitCone180DegEnemy
	TargetDestCasterFront_LEAP
	TargetUnitCasterAreaRaid
	TargetUnitTargetRaid
	TargetUnitNearbyRaid
	TargetUnitConeAlly
	TargetUnitConeEntry
	TargetUnitTargetAreaRaidClass
	TargetDestCasterGround
	TargetDestTargetAny
	TargetDestTargetFront
	TargetDestTargetBack
	TargetDestTargetRight
	TargetDestTargetLeft
	TargetDestTargetFrontRight
	TargetDestTargetBack_RIGHT
	TargetDestTargetBack_LEFT
	TargetDestTargetFrontLeft
	TargetDestCasterRandom
	TargetDestCasterRadius
	TargetDestTargetRandom
	TargetDestTargetRadius
	TargetDestChannelTarget
	TargetUnitChannelTarget
	TargetDestDestFront
	TargetDestDestBack
	TargetDestDestRight
	TargetDestDestLeft
	TargetDestDestFront_RIGHT
	TargetDestDestBack_RIGHT
	TargetDestDestBack_LEFT
	TargetDestDestFrontLeft
	TargetDestDestRandom
	TargetDestDest
	TargetDestDynobjNone
	TargetDestTraj
	TargetUnitTargetMinipet
	TargetDestDestRadius
	TargetUnitSummoner
	TargetCorpseSrcAreaEnemy
	TargetUnitVehicle
	TargetUnitTargetPassenger
	TargetUnitPassenger0
	TargetUnitPassenger1
	TargetUnitPassenger2
	TargetUnitPassenger3
	TargetUnitPassenger4
	TargetUnitPassenger5
	TargetUnitPassenger6
	TargetUnitPassenger7
	TargetUnitConeCasterToDestEnemy
	TargetUnitCasterAndPassengers
	TargetDestChannelCaster
	TargetDestNearbyEntry_2
	TargetGameobjectConeCasterToDestEnemy
	TargetGameobjectConeCasterToDestAlly
	TargetUnitConeCasterToDestEntry
	TargetUnk111
	TargetUnk112
	TargetUnk113
	TargetUnk114
	TargetUnitSrcAreaFurthestEnemy
	TargetUnitAndDestLastEnemy
	TargetUnk117
	TargetUnitTargetAllyOrRaid
	TargetCorpseSrcAreaRaid
	TargetUnitCaster_AND_SUMMONS
	TargetCorpseTargetAlly
	TargetUnitAreaThreatList
	TargetUnitAreaTapList
	TargetUnitTargetTapList
	TargetDestCasterGround_2
	TargetUnitCaster_AREA_ENEMY_CLUMP
	TargetDestCasterEnemyClumpCentroid
	TargetUnitRectCaster_ALLY
	TargetUnitRectCasterEnemy
	TargetUnitRectCaster
	TargetDestSummoner
	TargetDestTargetAlly
	TargetUnitLineCasterToDest_ALLY
	TargetUnitLineCasterToDestEnemy
	TargetUnitLineCasterToDest
	TargetUnitConeCasterToDestAlly
	TargetDestCasterMovementDirection
	TargetDestDestGround
	TargetUnk139
	TargetDestCasterClumpCentroid
	TargetUnk141
	TargetUnk142
	TargetUnk143
	TargetUnk144
	TargetUnk145
	TargetUnk146
	TargetUnk147
	TargetUnk148
	TargetUnk149
	TargetUnitOwnCritter
	TargetUnk151
	TargetUnk152
	TotalSpellTargets
)

type Inventory

type Inventory struct {
	ItemID uint64   `xorm:"'item_id' pk"`
	Player uint64   `xorm:"'player' index"`
	Bag    ItemSlot `xorm:"'bag'"`
	Slot   ItemSlot `xorm:"'slot'"`
}

Inventory describes the positions of items/item stacks in a player's inventory.

type InventoryType

type InventoryType int8

func (*InventoryType) DecodeWord

func (it *InventoryType) DecodeWord(dat string) (err error)

func (*InventoryType) EncodeWord

func (it *InventoryType) EncodeWord() (string, error)

func (*InventoryType) PaperDollSlot

func (it *InventoryType) PaperDollSlot() (ItemSlot, error)

func (InventoryType) String

func (it InventoryType) String() string

type Item

type Item struct {
	ID           uint64        `xorm:"'id' pk autoincr"`
	Creator      uint64        `xorm:"'creator'"` // player UID
	ItemType     InventoryType `xorm:"'item_type'"`
	ItemID       string        `xorm:"'item_id'"`
	DisplayID    uint32        `xorm:"'display_id'"`
	StackCount   uint32        `xorm:"'stack_count'"`
	Enchantments []uint32
	Charges      []int32 `xorm:"'charges'"`
}

Item describes a *spawned* item. For the item's constant attributes, refer to ItemTemplate.

type ItemBind

type ItemBind uint8
const (
	ItemUnbound ItemBind = iota
	ItemBindOnPickup
	ItemBindOnEquip
	ItemBindOnUse
	ItemQuestItem
	ItemQuestItem2
)

type ItemDamage

type ItemDamage struct {
	Type uint8
	Min  float32
	Max  float32
}

type ItemMod

type ItemMod uint8
const (
	ItemModMana ItemMod = iota
	ItemModHealth
	ItemModAgility
	ItemModStrength
	ItemModIntellect
	ItemModSpirit
	ItemModStamina
	ItemModDefenseSkillRating
	ItemModDodgeRating
	ItemModParryRating
	ItemModBlockRating
	ItemModHitMeleeRating
	ItemModHitRangedRating
	ItemModHitSpellRating
	ItemModCritMeleeRating
	ItemModCritRangedRating
	ItemModCritSpellRating
	ItemModHitTakenMeleeRating
	ItemModHitTakenRangedRating
	ItemModHitTakenSpellRating
	ItemModCritTakenMeleeRating
	ItemModCritTakenRangedRating
	ItemModCritTakenSpellRating
	ItemModHasteMeleeRating
	ItemModHasteRangedRating
	ItemModHasteSpellRating
	ItemModHitRating
	ItemModCritRating
	ItemModHitTakenRating
	ItemModCritTakenRating
	ItemModResilienceRating
	ItemModHasteRating
	ItemModExpertiseRating
	ItemModAttackPower
	ItemModRangedAttackPower
	ItemModFeralAttackPower
	ItemModSpellHealingDone
	ItemModSpellDamageDone
	ItemModManaRegeneration
	ItemModArmorPenetrationRating
	ItemModSpellPower
	ItemModHealthRegen
	ItemModSpellPenetration
	ItemModBlockValue
)

func (*ItemMod) DecodeWord

func (i *ItemMod) DecodeWord(data string) (err error)

func (*ItemMod) EncodeWord

func (i *ItemMod) EncodeWord() (str string, err error)

func (*ItemMod) Resolve

func (i *ItemMod) Resolve(build vsn.Build, u32 uint32) error

func (*ItemMod) Uint32

func (i *ItemMod) Uint32(build vsn.Build) (uint32, error)

type ItemQuality

type ItemQuality uint8
const (
	Poor ItemQuality = iota
	Normal
	Uncommon
	Rare
	Epic
	Legendary
	Artifact
	Heirloom
	WowToken
)

func (ItemQuality) Color

func (i ItemQuality) Color() string

type ItemSlot

type ItemSlot int
const (
	Backpack ItemSlot = -1
	Bag1     ItemSlot = 0
	Bag2     ItemSlot = 1
	Bag3     ItemSlot = 2
	Bag4     ItemSlot = 3
)
const (
	PaperDoll_Ammo     ItemSlot = -1
	PaperDoll_Head     ItemSlot = 0
	PaperDoll_Neck     ItemSlot = 1
	PaperDoll_Shoulder ItemSlot = 2
	PaperDoll_Shirt    ItemSlot = 3
	PaperDoll_Chest    ItemSlot = 4
	PaperDoll_Waist    ItemSlot = 5
	PaperDoll_Legs     ItemSlot = 6
	PaperDoll_Feet     ItemSlot = 7
	PaperDoll_Wrist    ItemSlot = 8
	PaperDoll_Hands    ItemSlot = 9
	PaperDoll_Finger1  ItemSlot = 10
	PaperDoll_Finger2  ItemSlot = 11
	PaperDoll_Trinket1 ItemSlot = 12
	PaperDoll_Trinket2 ItemSlot = 13
	PaperDoll_Back     ItemSlot = 14
	PaperDoll_MainHand ItemSlot = 15
	PaperDoll_OffHand  ItemSlot = 16
	PaperDoll_Ranged   ItemSlot = 17
	PaperDoll_Tabard   ItemSlot = 18
	PaperDoll_Bag1     ItemSlot = 19
	PaperDoll_Bag2     ItemSlot = 20
	PaperDoll_Bag3     ItemSlot = 21
	PaperDoll_Bag4     ItemSlot = 22
)

func GetStartItemSlot

func GetStartItemSlot(build vsn.Build) ItemSlot

func (ItemSlot) String

func (slot ItemSlot) String() string

type ItemSocket

type ItemSocket struct {
	Color   SocketColor
	Content int32
}

type ItemSpell

type ItemSpell struct {
	ID               uint32
	Trigger          uint32
	Charges          int32
	PPMRate          float32
	Cooldown         int64
	Category         uint32
	CategoryCooldown int64
}

type ItemStat

type ItemStat struct {
	Type  ItemMod
	Value int32
}

type ItemTemplate

type ItemTemplate struct {
	Entry                     uint32    `json:",omitempty" xorm:"'entry' bigint pk" csv:"-"`
	ID                        string    `json:",omitempty" xorm:"'id' index"`
	Name                      i18n.Text `json:",omitempty" xorm:"'name' index"`
	Class                     uint32    `json:",omitempty" xorm:"'class'"`
	Subclass                  uint32    `json:",omitempty" xorm:"'subclass'"`
	SoundOverrideSubclass     uint32
	DisplayID                 uint32           `json:",omitempty" xorm:"'PaperDoll_id'"`
	Quality                   ItemQuality      `json:",omitempty" xorm:"'quality'"`
	Flags                     update.ItemFlags `json:",omitempty" xorm:"'flags'"`
	BuyCount                  uint8            `json:",omitempty" xorm:"'buy_count'"`
	BuyPrice                  Money            `json:",omitempty" xorm:"'buy_price'"`
	SellPrice                 Money            `json:",omitempty" xorm:"'sell_price'"`
	InventoryType             InventoryType    `json:",omitempty" xorm:"'inv_type'"`
	AllowableClass            ClassMask        `json:",omitempty" xorm:"'allowable_class'"`
	AllowableRace             RaceMask         `json:",omitempty" xorm:"'allowable_race'"`
	ItemLevel                 uint32           `json:",omitempty" xorm:"'item_level'"`
	RequiredLevel             uint8            `json:",omitempty" xorm:"'required_level'"`
	RequiredSkill             uint32           `json:",omitempty" xorm:"'required_skill'"`
	RequiredSkillRank         uint32           `json:",omitempty" xorm:"'required_skill_rank'"`
	RequiredSpell             uint32           `json:",omitempty" xorm:"'required_spell'"`
	RequiredHonorRank         uint32           `json:",omitempty" xorm:"'required_honor_rank'"`
	RequiredCityRank          uint32           `json:",omitempty" xorm:"'required_city_rank'"`
	RequiredReputationFaction uint32           `json:",omitempty" xorm:"'required_reputation_faction'"`
	RequiredReputationRank    uint32           `json:",omitempty" xorm:"'required_reputation_rank'"`
	MaxCount                  uint32           `json:",omitempty" xorm:"'max_count'"`
	Stackable                 uint32           `json:",omitempty" xorm:"'stackable'"`
	ContainerSlots            uint8            `json:",omitempty" xorm:"'container_slots'"`
	Stats                     []ItemStat       `json:",omitempty" xorm:"'stats'"`
	Damage                    []ItemDamage     `json:",omitempty" xorm:"'dmg'"`
	Armor                     uint32           `json:",omitempty" xorm:"'armor'"`
	HolyRes                   uint32           `json:",omitempty" xorm:"'holy_res'"`
	FireRes                   uint32           `json:",omitempty" xorm:"'fire_res'"`
	NatureRes                 uint32           `json:",omitempty" xorm:"'nature_res'"`
	FrostRes                  uint32           `json:",omitempty" xorm:"'frost_res'"`
	ShadowRes                 uint32           `json:",omitempty" xorm:"'shadow_res'"`
	ArcaneRes                 uint32           `json:",omitempty" xorm:"'arcane_res'"`
	Delay                     uint32           `json:",omitempty" xorm:"'delay'"`
	AmmoType                  uint32           `json:",omitempty" xorm:"'ammo_type'"`
	RangedModRange            float32          `json:",omitempty" xorm:"'ranged_mod_range'"`
	Spells                    []ItemSpell      `json:",omitempty" xorm:"'spells'"`
	Bonding                   ItemBind         `json:",omitempty" xorm:"'bonding'"`
	Description               i18n.Text        `json:",omitempty" xorm:"'description' longtext"`
	PageText                  uint32           `json:",omitempty" xorm:"'page_text"`
	LanguageID                uint32           `json:",omitempty" xorm:"'language_id'"`
	PageMaterial              uint32           `json:",omitempty" xorm:"'page_material'"`
	StartQuest                uint32           `json:",omitempty" xorm:"'start_quest'"`
	LockID                    uint32           `json:",omitempty" xorm:"'lock_id'"`
	Material                  int32            `json:",omitempty" xorm:"'material'"`
	Sheath                    uint32           `json:",omitempty" xorm:"'sheath'"`
	RandomProperty            uint32           `json:",omitempty" xorm:"'random_property'"`
	RandomSuffix              uint32           `json:",omitempty" xorm:"'random_suffix'"`
	Block                     uint32           `json:",omitempty" xorm:"'block'"`
	Itemset                   uint32           `json:",omitempty" xorm:"'itemset'"`
	MaxDurability             uint32           `json:",omitempty" xorm:"'max_durability'"`
	Area                      uint32           `json:",omitempty" xorm:"'area'"`
	Map                       int32            `json:",omitempty" xorm:"'map'"`
	BagFamily                 int32            `json:",omitempty" xorm:"'bag_family'"`
	TotemCategory             int32            `json:",omitempty" xorm:"'totem_category'"`
	Socket                    []ItemSocket     `json:",omitempty" xorm:"'sockets'"`
	SocketBonus               uint32
	GemProperties             int32   `json:",omitempty" xorm:"'gem_properties'"`
	RequiredDisenchantSkill   int32   `json:",omitempty" xorm:"'required_disenchant_skill'"`
	ArmorDamageModifier       float32 `json:",omitempty" xorm:"'armor_damage_modifier'"`
	ItemLimitCategory         uint32  `json:",omitempty" xorm:"'item_limit_category'"`
	HolidayID                 uint32
	ScriptName                string `json:",omitempty" xorm:"'script_name'"`
	DisenchantID              uint32 `json:",omitempty" xorm:"'disenchant_id'"`
	FoodType                  uint8  `json:",omitempty" xorm:"'food_type'"`
	MinMoneyLoot              Money  `json:",omitempty" xorm:"'min_money_loot'"`
	MaxMoneyLoot              Money  `json:",omitempty" xorm:"'max_money_loot'"`
	Duration                  int32  `json:",omitempty" xorm:"'duration'"`
	ExtraFlags                uint8  `json:",omitempty" xorm:"'extra_flags'"`
}

type LearnedAbility

type LearnedAbility struct {
	Player uint64 `xorm:"'player' index"`
	Spell  uint32 `xorm:"'spell'"`
	Active bool   `xorm:"'active'"`
	Slot   int    `xorm:"'slot'"`
}

LearnedAbility lists all the abilities/spells a player has learned.

type LevelExperience

type LevelExperience map[uint32]uint32

type LocString

type LocString struct {
	ID   string
	Text i18n.Text
}

type Map

type Map struct {
	ID           uint32
	Directory    string
	InstanceType uint32
	MapType      uint32
	Name         string
	MinLevel     uint32
	MaxLevel     uint32
	MaxPlayers   uint32
	Descriptions []string
}

type ModOp

type ModOp uint8
const (
	// Mod by adding a value
	ModMult ModOp = 1 << iota
	// Mod with multiplication
	ModPlus
)

type ModStat

type ModStat uint8

ModStat enumerates a list of attributes, that can be multiplied and added to by spell effects. Note that these stats are for internal Gophercraft server logic. These values have no bearing on any protocol.

const (
	WalkSpeed ModStat = iota
	RunSpeed
	SwimSpeed
	MountSpeed
	BaseHealth
	BaseMana
	Strength
	Agility
	Stamina
	Intellect
	Spirit
	CriticalStrike
	PhysicalDamageDealt // note: dealt to enemies,
	HolyDamageDealt
	FireDamageDealt
	NatureDamageDealt
	FrostDamageDealt
	ShadowDamageDealt
	ArcaneDamageDealt
	PhysicalDamageTaken // note: this is the damage taken from enemiess
	HolyDamageTaken
	FireDamageTaken
	NatureDamageTaken
	FrostDamageTaken
	ShadowDamageTaken
	ArcaneDamageTaken
	ResistPhysicalDamage
	ResistHolyDamage
	ResistFireDamage
	ResistNatureDamage
	ResistFrostDamage
	ResistShadowDamage
	ResistArcaneDamage
	Health
	DefenseRating
	DodgeRating
	ParryRating
	BlockRating
	MeleeHitRating
	RangedHitRating
	SpellHitRating
	MeleeCriticalRating
	RangedCriticalRating
	SpellCriticalRating
	MeleeHitTakenRating
	RangedHitTakenRating
	SpellHitTakenRating
	MeleeCriticalTakenRating
	RangedCriticalTakenRating
	SpellCriticalTakenRating
	MeleeHasteRating
	RangedHasteRating
	HasteSpellRating
	HitRating
	CritRating
	HitTakenRating
	CritTakenRating
	ResilienceRating
	HasteRating
	ExpertiseRating
	AttackPower
	RangedAttackPower
	FeralAttackPower
	SpellHealingDone
	SpellDamageDone
	ManaRegeneration
	ArmorPenetrationRating
	SpellPower
	HealthRegen
	SpellPenetration
	BlockValue
	NumModStats
)

func (ModStat) ClientStat

func (ms ModStat) ClientStat() ClientStat

func (*ModStat) DecodeWord

func (ms *ModStat) DecodeWord(in string) error

func (*ModStat) EncodeWord

func (ms *ModStat) EncodeWord() (string, error)

func (ModStat) IsClientStat

func (ms ModStat) IsClientStat() bool

type ModStatMask

type ModStatMask uint64

func (*ModStatMask) Add

func (mm *ModStatMask) Add(ms ModStat)

func (*ModStatMask) Has

func (mm *ModStatMask) Has(ms ModStat) bool

func (*ModStatMask) Set

func (mm *ModStatMask) Set(ms ModStat, v bool)

type Money

type Money int64

Money represents a number of coppers in your inventory. Though this type is signed, you can not have a negative balance in-game

const (
	Copper Money = 1
	Silver Money = 100 * Copper
	Gold   Money = 100 * Silver
)

func ParseMoney

func ParseMoney(in string) (Money, error)

func ParseMoneyShort

func ParseMoneyShort(input string) (Money, error)

func (Money) Coins

func (mn Money) Coins() []int64

func (*Money) DecodeWord

func (g *Money) DecodeWord(in string) (err error)

func (*Money) EncodeWord

func (g *Money) EncodeWord() (string, error)

func (Money) Int32

func (m Money) Int32() int32

func (Money) ShortString

func (m Money) ShortString() string

func (Money) String

func (m Money) String() string

type NPCText

type NPCText struct {
	ID    string
	Entry uint32
	Opts  []NPCTextOption
}

type NPCTextOption

type NPCTextOption struct {
	Text  i18n.Text
	Lang  uint32
	Prob  float32
	Emote []NPCTextOptionEmote
}

type NPCTextOptionEmote

type NPCTextOptionEmote struct {
	Delay uint32
	ID    uint32
}

type ObjectPath

type ObjectPath struct {
	Steps []ObjectPathStep
}

type ObjectPathStep

type ObjectPathStep struct {
	Position tempest.C4Vector
}

type ObjectTemplateRegistry

type ObjectTemplateRegistry struct {
	ID    string      `xorm:"'id' pk"`
	Type  guid.TypeID `xorm:"'type'"`
	Entry uint32
}

ObjectTemplateRegistry contains the resolved IDs of a custom object template (think custom items and creatures) It allows you to add and remove new content and (hopefully) avoid conflicts between the client's WDB cache and the server's in-memory database.

type PlayerCreateAbility

type PlayerCreateAbility struct {
	Race   RaceMask
	Class  ClassMask
	Spell  uint32
	Note   string
	Active bool
}

type PlayerCreateActionButton

type PlayerCreateActionButton struct {
	Race   Race
	Class  Class
	Button uint8
	Action uint32
	Type   ActionType
	Misc   uint8
}

type PlayerCreateInfo

type PlayerCreateInfo struct {
	Race     Race
	Class    Class
	Position tempest.C4Vector
	Map      uint32
	Zone     uint32
}

PlayerCreateInfo determines where a character is spawned at upon their first login, using their race and class.

type PlayerCreateItem

type PlayerCreateItem struct {
	Equip EquipType
	// Slot   ItemSlot
	Race   RaceMask
	Class  ClassMask
	Item   string
	Amount uint32
}

type PortLocation

type PortLocation struct {
	ID       string `xorm:"'port_id' pk" csv:"name"`
	Location tempest.C4Vector
	Map      uint32 `xorm:"'map'" csv:"mapID"`
}

type PossibleSpawnPosition

type PossibleSpawnPosition struct {
	Weight   int
	Position tempest.C4Vector
}

type Power

type Power byte
const (
	PowerMana Power = iota
	PowerRage
	PowerFocus
	PowerEnergy
	PowerComboPoints
	PowerRunes
	PowerRunicPower
	PowerSoulShards
	PowerLunarPower
	PowerHolyPower
	PowerAlternatePower
	PowerMaelstrom
	PowerChi
	PowerInsanity
	PowerBurningEmbers
	PowerDemonicFury
	PowerArcaneCharges
	PowerFury
	PowerPain
	NumPowers
	PowerAll
)

type PropID

type PropID string

type Race

type Race uint8

func (Race) String

func (r Race) String() string

type RaceClassLevelStats

type RaceClassLevelStats struct {
	Race      Race
	Class     Class
	Level     uint32
	BaseStats map[ModStat]float64
}

type RaceMask

type RaceMask uint64
const (
	AllRaces RaceMask = 0xFFFFFFFFFFFFFFFF
)

func (*RaceMask) All

func (c *RaceMask) All() bool

func (*RaceMask) DecodeWord

func (c *RaceMask) DecodeWord(data string) error

func (*RaceMask) EncodeWord

func (c *RaceMask) EncodeWord() (string, error)

func (RaceMask) Has

func (c RaceMask) Has(race Race) bool

func (*RaceMask) Set

func (c *RaceMask) Set(race Race, t bool)

type Resistance

type Resistance uint8
const (
	ResistPhysical Resistance = iota
	ResistHoly
	ResistFire
	ResistNature
	ResistFrost
	ResistShadow
	ResistArcane
	NumResists
)

type ResistanceDescriptor

type ResistanceDescriptor map[Resistance]int

type SchedEvent

type SchedEvent struct {
	ID       string
	Trigger  string
	Duration time.Duration
}

type SchedTrigger

type SchedTrigger struct {
}

type SocketColor

type SocketColor uint8
const (
	SocketMeta SocketColor = 1 << iota
	SocketRed
	SocketYellow
	SocketBlue
)

func (*SocketColor) DecodeWord

func (sc *SocketColor) DecodeWord(data string) error

func (*SocketColor) EncodeWord

func (sc *SocketColor) EncodeWord() (string, error)

type SpawnGroup

type SpawnGroup struct {
	ID      string
	Phase   []string
	Map     uint32
	Respawn time.Duration // if zero, treat as default

	Chance float32 // 0 - 100.0

	Positions []PossibleSpawnPosition

	Objects []SpawnObject

	Path ObjectPath

	// TODO: Quartz expressions for encoding seasonal NPCs, NPCs that only come out at night etc.
	Start, End string
}

type SpawnKind

type SpawnKind uint8
const (
	SpawnKindCreature SpawnKind = iota
	SpawnKindGameObject
)

func (*SpawnKind) DecodeWord

func (ok *SpawnKind) DecodeWord(str string) error

func (*SpawnKind) EncodeWord

func (ok *SpawnKind) EncodeWord() (string, error)

type SpawnObject

type SpawnObject struct {
	Kind        SpawnKind
	RelPosition tempest.C4Vector
	Rotation    tempest.C4Quaternion
	Chance      float32
	ID          string
}

type VisualClass

type VisualClass uint8
const (
	VisualPrecast VisualClass = iota
	VisualCast
	VisualImpact
	VisualState
	VisualStateDone
	VisualChannel
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL