Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- creatureAddon.path_id = fields[1].GetUInt32();
- creatureAddon.mount = fields[2].GetUInt32();
- creatureAddon.bytes1 = fields[3].GetUInt32();
- creatureAddon.bytes2 = fields[4].GetUInt32();
- creatureAddon.emote = fields[5].GetUInt32();
- Tokens tokens(fields[6].GetString(), ' ');
- uint8 i = 0;
- creatureAddon.auras.resize(tokens.size());
- for (Tokens::iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
- {
- SpellInfo const *AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
- if (!AdditionalSpellInfo)
- {
- sLog->outErrorDb("Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", entry, uint32(atol(*itr)));
- continue;
- }
- creatureAddon.auras[i++] = uint32(atol(*itr));
- }
- if (creatureAddon.mount)
- {
- if (!sCreatureDisplayInfoStore.LookupEntry(creatureAddon.mount))
- {
- sLog->outErrorDb("Creature (GUID: %u) has invalid displayInfoId (%u) for mount defined in `creature_addon`", entry, creatureAddon.mount);
- creatureAddon.mount = 0;
- }
- }
Add Comment
Please, Sign In to add comment