diff options
Diffstat (limited to 'src/game/Creature.h')
| -rw-r--r-- | src/game/Creature.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/game/Creature.h b/src/game/Creature.h index 563a9ddb80c..6ba3c9178e3 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -174,7 +174,7 @@ struct CreatureInfo uint32 rangeattacktime; uint32 unit_flags; // enum UnitFlags mask values uint32 dynamicflags; - uint32 family; // enum CreatureFamily values for type==CREATURE_TYPE_BEAST, or 0 in another cases + uint32 family; // enum CreatureFamily values (optional) uint32 trainer_type; uint32 trainer_spell; uint32 classNum; @@ -219,6 +219,8 @@ struct CreatureInfo return SKILL_HERBALISM; else if(type_flags & CREATURE_TYPEFLAGS_MININGLOOT) return SKILL_MINING; + else if(type_flags & CREATURE_TYPEFLAGS_ENGINEERLOOT) + return SKILL_ENGINERING; else return SKILL_SKINNING; // normal case } @@ -244,9 +246,7 @@ struct NpcOptionLocale struct EquipmentInfo { uint32 entry; - uint32 equipmodel[3]; - uint32 equipinfo[3]; - uint32 equipslot[3]; + uint32 equipentry[3]; }; // from `creature` table @@ -372,6 +372,10 @@ struct TrainerSpell uint32 reqskill; uint32 reqskillvalue; uint32 reqlevel; + uint32 learned_spell; + + // helpers + bool IsCastable() const { return learned_spell != spell; } }; typedef std::vector<TrainerSpell*> TrainerSpellList; @@ -423,6 +427,7 @@ class TRINITY_DLL_SPEC Creature : public Unit uint32 GetEquipmentId() const { return m_equipmentId; } bool isPet() const { return m_isPet; } + bool isVehicle() const { return m_isVehicle; } void SetCorpseDelay(uint32 delay) { m_corpseDelay = delay; } bool isTotem() const { return m_isTotem; } bool isRacialLeader() const { return GetCreatureInfo()->RacialLeader; } @@ -439,9 +444,9 @@ class TRINITY_DLL_SPEC Creature : public Unit bool isCanInteractWithBattleMaster(Player* player, bool msg) const; bool isCanTrainingAndResetTalentsOf(Player* pPlayer) const; bool IsOutOfThreatArea(Unit* pVictim) const; - bool IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges = false); + bool IsImmunedToSpell(SpellEntry const* spellInfo); // redefine Unit::IsImmunedToSpell - bool IsImmunedToSpellEffect(uint32 effect, uint32 mechanic) const; + bool IsImmunedToSpellEffect(SpellEntry const* spellInfo, uint32 index) const; // redefine Unit::IsImmunedToSpellEffect bool isElite() const { @@ -658,11 +663,11 @@ class TRINITY_DLL_SPEC Creature : public Unit uint8 m_emoteState; bool m_isPet; // set only in Pet::Pet + bool m_isVehicle; // set only in Vehicle::Vehicle bool m_isTotem; // set only in Totem::Totem ReactStates m_reactState; // for AI, not charmInfo void RegenerateMana(); void RegenerateHealth(); - uint32 m_regenTimer; MovementGeneratorType m_defaultMovementType; Cell m_currentCell; // store current cell where creature listed uint32 m_DBTableGuid; ///< For new or temporary creatures is 0 for saved it is lowguid |
