Guest User

Untitled

a guest
Nov 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. creatureAddon.path_id = fields[1].GetUInt32();
  2. creatureAddon.mount = fields[2].GetUInt32();
  3. creatureAddon.bytes1 = fields[3].GetUInt32();
  4. creatureAddon.bytes2 = fields[4].GetUInt32();
  5. creatureAddon.emote = fields[5].GetUInt32();
  6.  
  7. Tokens tokens(fields[6].GetString(), ' ');
  8. uint8 i = 0;
  9. creatureAddon.auras.resize(tokens.size());
  10. for (Tokens::iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
  11. {
  12. SpellInfo const *AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
  13. if (!AdditionalSpellInfo)
  14. {
  15. sLog->outErrorDb("Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", entry, uint32(atol(*itr)));
  16. continue;
  17. }
  18. creatureAddon.auras[i++] = uint32(atol(*itr));
  19. }
  20.  
  21. if (creatureAddon.mount)
  22. {
  23. if (!sCreatureDisplayInfoStore.LookupEntry(creatureAddon.mount))
  24. {
  25. sLog->outErrorDb("Creature (GUID: %u) has invalid displayInfoId (%u) for mount defined in `creature_addon`", entry, creatureAddon.mount);
  26. creatureAddon.mount = 0;
  27. }
  28. }
Add Comment
Please, Sign In to add comment