mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
fix(Core/Creature): Remove empty spell ids from CreatureAddon.auras vector (#9783)
This commit is contained in:
@@ -751,8 +751,8 @@ void ObjectMgr::LoadCreatureTemplateAddons()
|
||||
creatureAddon.visibilityDistanceType = VisibilityDistanceType(fields[6].GetUInt8());
|
||||
|
||||
Tokenizer tokens(fields[7].GetString(), ' ');
|
||||
uint8 i = 0;
|
||||
creatureAddon.auras.resize(tokens.size());
|
||||
|
||||
creatureAddon.auras.reserve(tokens.size());
|
||||
for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
|
||||
{
|
||||
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
|
||||
@@ -768,7 +768,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
|
||||
continue;
|
||||
}
|
||||
|
||||
creatureAddon.auras[i++] = uint32(atol(*itr));
|
||||
creatureAddon.auras.push_back(atol(*itr));
|
||||
}
|
||||
|
||||
if (creatureAddon.mount)
|
||||
@@ -1188,8 +1188,8 @@ void ObjectMgr::LoadCreatureAddons()
|
||||
creatureAddon.visibilityDistanceType = VisibilityDistanceType(fields[6].GetUInt8());
|
||||
|
||||
Tokenizer tokens(fields[7].GetString(), ' ');
|
||||
uint8 i = 0;
|
||||
creatureAddon.auras.resize(tokens.size());
|
||||
|
||||
creatureAddon.auras.reserve(tokens.size());
|
||||
for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
|
||||
{
|
||||
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
|
||||
@@ -1205,7 +1205,7 @@ void ObjectMgr::LoadCreatureAddons()
|
||||
continue;
|
||||
}
|
||||
|
||||
creatureAddon.auras[i++] = uint32(atol(*itr));
|
||||
creatureAddon.auras.push_back(atol(*itr));
|
||||
}
|
||||
|
||||
if (creatureAddon.mount)
|
||||
|
||||
Reference in New Issue
Block a user