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());
|
creatureAddon.visibilityDistanceType = VisibilityDistanceType(fields[6].GetUInt8());
|
||||||
|
|
||||||
Tokenizer tokens(fields[7].GetString(), ' ');
|
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)
|
for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
|
||||||
{
|
{
|
||||||
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
|
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
|
||||||
@@ -768,7 +768,7 @@ void ObjectMgr::LoadCreatureTemplateAddons()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
creatureAddon.auras[i++] = uint32(atol(*itr));
|
creatureAddon.auras.push_back(atol(*itr));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (creatureAddon.mount)
|
if (creatureAddon.mount)
|
||||||
@@ -1188,8 +1188,8 @@ void ObjectMgr::LoadCreatureAddons()
|
|||||||
creatureAddon.visibilityDistanceType = VisibilityDistanceType(fields[6].GetUInt8());
|
creatureAddon.visibilityDistanceType = VisibilityDistanceType(fields[6].GetUInt8());
|
||||||
|
|
||||||
Tokenizer tokens(fields[7].GetString(), ' ');
|
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)
|
for (Tokenizer::const_iterator itr = tokens.begin(); itr != tokens.end(); ++itr)
|
||||||
{
|
{
|
||||||
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
|
SpellInfo const* AdditionalSpellInfo = sSpellMgr->GetSpellInfo(uint32(atol(*itr)));
|
||||||
@@ -1205,7 +1205,7 @@ void ObjectMgr::LoadCreatureAddons()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
creatureAddon.auras[i++] = uint32(atol(*itr));
|
creatureAddon.auras.push_back(atol(*itr));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (creatureAddon.mount)
|
if (creatureAddon.mount)
|
||||||
|
|||||||
Reference in New Issue
Block a user