Changeset 168 for trunk/src/game/Creature.h
- Timestamp:
- 11/19/08 13:42:33 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Creature.h
r135 r168 113 113 uint32 Icon; 114 114 uint32 Action; 115 std::string Option; 115 uint32 BoxMoney; 116 bool Coded; 117 std::string OptionText; 118 std::string BoxText; 116 119 }; 117 120 … … 167 170 uint32 baseattacktime; 168 171 uint32 rangeattacktime; 169 uint32 Flags;172 uint32 unit_flags; // enum UnitFlags mask values 170 173 uint32 dynamicflags; 171 uint32 family; 174 uint32 family; // enum CreatureFamily values for type==CREATURE_TYPE_BEAST, or 0 in another cases 172 175 uint32 trainer_type; 173 176 uint32 trainer_spell; … … 177 180 float maxrangedmg; 178 181 uint32 rangedattackpower; 179 uint32 type; 180 uint32 flag1;182 uint32 type; // enum CreatureType values 183 uint32 type_flags; // enum CreatureTypeFlags mask values 181 184 uint32 lootid; 182 185 uint32 pickpocketLootId; … … 206 209 uint32 GetRandomValidModelId() const; 207 210 uint32 GetFirstValidModelId() const; 211 212 SkillType GetRequiredLootSkill() const 213 { 214 if(type_flags & CREATURE_TYPEFLAGS_HERBLOOT) 215 return SKILL_HERBALISM; 216 else if(type_flags & CREATURE_TYPEFLAGS_MININGLOOT) 217 return SKILL_MINING; 218 else 219 return SKILL_SKINNING; // normal case 220 } 221 222 bool isTameable() const 223 { 224 return type == CREATURE_TYPE_BEAST && family != 0 && (type_flags & CREATURE_TYPEFLAGS_TAMEBLE); 225 } 208 226 }; 209 227 … … 212 230 std::vector<std::string> Name; 213 231 std::vector<std::string> SubName; 232 }; 233 234 struct NpcOptionLocale 235 { 236 std::vector<std::string> OptionText; 237 std::vector<std::string> BoxText; 214 238 }; 215 239 … … 474 498 char const* GetScriptName() const; 475 499 476 void prepareGossipMenu( Player *pPlayer, uint32 gossipid);477 void sendPreparedGossip( Player* player );500 void prepareGossipMenu( Player *pPlayer, uint32 gossipid = 0 ); 501 void sendPreparedGossip( Player* player ); 478 502 void OnGossipSelect(Player* player, uint32 option); 479 503 void OnPoiSelect(Player* player, GossipOption const *gossip);