aboutsummaryrefslogtreecommitdiff
path: root/src/game/Creature.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/Creature.h')
-rw-r--r--src/game/Creature.h38
1 files changed, 31 insertions, 7 deletions
diff --git a/src/game/Creature.h b/src/game/Creature.h
index dcbe6a47b29..0ccc1ca3f9d 100644
--- a/src/game/Creature.h
+++ b/src/game/Creature.h
@@ -112,7 +112,10 @@ struct GossipOption
uint32 NpcFlag;
uint32 Icon;
uint32 Action;
- std::string Option;
+ uint32 BoxMoney;
+ bool Coded;
+ std::string OptionText;
+ std::string BoxText;
};
enum CreatureFlagsExtra
@@ -166,9 +169,9 @@ struct CreatureInfo
uint32 attackpower;
uint32 baseattacktime;
uint32 rangeattacktime;
- uint32 Flags;
+ uint32 unit_flags; // enum UnitFlags mask values
uint32 dynamicflags;
- uint32 family;
+ uint32 family; // enum CreatureFamily values for type==CREATURE_TYPE_BEAST, or 0 in another cases
uint32 trainer_type;
uint32 trainer_spell;
uint32 classNum;
@@ -176,8 +179,8 @@ struct CreatureInfo
float minrangedmg;
float maxrangedmg;
uint32 rangedattackpower;
- uint32 type;
- uint32 flag1;
+ uint32 type; // enum CreatureType values
+ uint32 type_flags; // enum CreatureTypeFlags mask values
uint32 lootid;
uint32 pickpocketLootId;
uint32 SkinLootId;
@@ -205,6 +208,21 @@ struct CreatureInfo
char const* ScriptName;
uint32 GetRandomValidModelId() const;
uint32 GetFirstValidModelId() const;
+
+ SkillType GetRequiredLootSkill() const
+ {
+ if(type_flags & CREATURE_TYPEFLAGS_HERBLOOT)
+ return SKILL_HERBALISM;
+ else if(type_flags & CREATURE_TYPEFLAGS_MININGLOOT)
+ return SKILL_MINING;
+ else
+ return SKILL_SKINNING; // normal case
+ }
+
+ bool isTameable() const
+ {
+ return type == CREATURE_TYPE_BEAST && family != 0 && (type_flags & CREATURE_TYPEFLAGS_TAMEBLE);
+ }
};
struct CreatureLocale
@@ -213,6 +231,12 @@ struct CreatureLocale
std::vector<std::string> SubName;
};
+struct NpcOptionLocale
+{
+ std::vector<std::string> OptionText;
+ std::vector<std::string> BoxText;
+};
+
struct EquipmentInfo
{
uint32 entry;
@@ -473,8 +497,8 @@ class TRINITY_DLL_SPEC Creature : public Unit
CreatureDataAddon const* GetCreatureAddon() const;
char const* GetScriptName() const;
- void prepareGossipMenu( Player *pPlayer,uint32 gossipid );
- void sendPreparedGossip( Player* player);
+ void prepareGossipMenu( Player *pPlayer, uint32 gossipid = 0 );
+ void sendPreparedGossip( Player* player );
void OnGossipSelect(Player* player, uint32 option);
void OnPoiSelect(Player* player, GossipOption const *gossip);