Changeset 6 for trunk/src/game/Creature.h
- Timestamp:
- 11/19/08 13:22:12 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/Creature.h
r2 r6 124 124 uint32 lastincr; 125 125 uint32 ExtendedCost; 126 };127 128 struct TrainerSpell129 {130 SpellEntry const* spell;131 uint32 spellcost;132 uint32 reqskill;133 uint32 reqskillvalue;134 uint32 reqlevel;135 126 }; 136 127 … … 301 292 #endif 302 293 294 struct TrainerSpell 295 { 296 uint32 spell; 297 uint32 spellcost; 298 uint32 reqskill; 299 uint32 reqskillvalue; 300 uint32 reqlevel; 301 }; 302 303 typedef std::vector<TrainerSpell*> TrainerSpellList; 304 305 struct TrainerSpellData 306 { 307 TrainerSpellData() : trainerType(0) {} 308 309 TrainerSpellList spellList; 310 uint32 trainerType; // trainer type based at trainer spells, can be different from creature_template value. 311 // req. for correct show non-prof. trainers like weaponmaster, allowed values 0 and 2. 312 313 void Clear(); 314 TrainerSpell const* Find(uint32 spell_id) const; 315 }; 316 303 317 typedef std::list<GossipOption> GossipOptionList; 304 318 … … 441 455 } 442 456 443 /*********************************************************/ 444 /*** TRAINER SYSTEM ***/ 445 /*********************************************************/ 446 typedef std::list<TrainerSpell> SpellsList; 447 void LoadTrainerSpells(); // must be called before access to trainer spells, lazy loading at first call 448 void ReloadTrainerSpells() { m_trainerSpellsLoaded = false; LoadTrainerSpells(); } 449 SpellsList const& GetTrainerSpells() const { return m_trainer_spells; } 450 uint32 GetTrainerType() const { return m_trainer_type; } 457 TrainerSpellData const* GetTrainerSpells() const; 451 458 452 459 CreatureInfo const *GetCreatureInfo() const { return m_creatureInfo; } … … 559 566 bool m_itemsLoaded; // vendor items loading state 560 567 561 // trainer spells562 bool m_trainerSpellsLoaded; // trainer spells loading state563 SpellsList m_trainer_spells;564 uint32 m_trainer_type; // trainer type based at trainer spells, can be different from creature_template value.565 // req. for correct show non-prof. trainers like weaponmaster.566 568 void _RealtimeSetCreatureInfo(); 567 569 … … 581 583 bool m_gossipOptionLoaded; 582 584 GossipOptionList m_goptions; 583 uint32 m_NPCTextId; // cached value584 585 585 586 uint8 m_emoteState;