@@ -643,7 +643,7 @@ SpellSpellGroupMapBounds SpellMgr::GetSpellSpellGroupMapBounds(uint32 spell_id)
|
||||
uint32 SpellMgr::IsSpellMemberOfSpellGroup(uint32 spellid, SpellGroup groupid) const
|
||||
{
|
||||
SpellSpellGroupMapBounds spellGroup = GetSpellSpellGroupMapBounds(spellid);
|
||||
for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second ; ++itr)
|
||||
for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second; ++itr)
|
||||
{
|
||||
if (itr->second == groupid)
|
||||
return true;
|
||||
@@ -669,7 +669,7 @@ void SpellMgr::GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>&
|
||||
usedGroups.insert(group_id);
|
||||
|
||||
SpellGroupSpellMapBounds groupSpell = GetSpellGroupSpellMapBounds(group_id);
|
||||
for (SpellGroupSpellMap::const_iterator itr = groupSpell.first; itr != groupSpell.second ; ++itr)
|
||||
for (SpellGroupSpellMap::const_iterator itr = groupSpell.first; itr != groupSpell.second; ++itr)
|
||||
{
|
||||
if (itr->second < 0)
|
||||
{
|
||||
@@ -688,7 +688,7 @@ bool SpellMgr::AddSameEffectStackRuleSpellGroups(SpellInfo const* spellInfo, int
|
||||
uint32 spellId = spellInfo->GetFirstRankSpell()->Id;
|
||||
SpellSpellGroupMapBounds spellGroup = GetSpellSpellGroupMapBounds(spellId);
|
||||
// Find group with SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT if it belongs to one
|
||||
for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second ; ++itr)
|
||||
for (SpellSpellGroupMap::const_iterator itr = spellGroup.first; itr != spellGroup.second; ++itr)
|
||||
{
|
||||
SpellGroup group = itr->second;
|
||||
SpellGroupStackMap::const_iterator found = mSpellGroupStack.find(group);
|
||||
@@ -724,13 +724,13 @@ SpellGroupStackRule SpellMgr::CheckSpellGroupStackRules(SpellInfo const* spellIn
|
||||
// find SpellGroups which are common for both spells
|
||||
SpellSpellGroupMapBounds spellGroup1 = GetSpellSpellGroupMapBounds(spellid_1);
|
||||
std::set<SpellGroup> groups;
|
||||
for (SpellSpellGroupMap::const_iterator itr = spellGroup1.first; itr != spellGroup1.second ; ++itr)
|
||||
for (SpellSpellGroupMap::const_iterator itr = spellGroup1.first; itr != spellGroup1.second; ++itr)
|
||||
{
|
||||
if (IsSpellMemberOfSpellGroup(spellid_2, itr->second))
|
||||
{
|
||||
bool add = true;
|
||||
SpellGroupSpellMapBounds groupSpell = GetSpellGroupSpellMapBounds(itr->second);
|
||||
for (SpellGroupSpellMap::const_iterator itr2 = groupSpell.first; itr2 != groupSpell.second ; ++itr2)
|
||||
for (SpellGroupSpellMap::const_iterator itr2 = groupSpell.first; itr2 != groupSpell.second; ++itr2)
|
||||
{
|
||||
if (itr2->second < 0)
|
||||
{
|
||||
@@ -749,7 +749,7 @@ SpellGroupStackRule SpellMgr::CheckSpellGroupStackRules(SpellInfo const* spellIn
|
||||
|
||||
SpellGroupStackRule rule = SPELL_GROUP_STACK_RULE_DEFAULT;
|
||||
|
||||
for (std::set<SpellGroup>::iterator itr = groups.begin() ; itr!= groups.end() ; ++itr)
|
||||
for (std::set<SpellGroup>::iterator itr = groups.begin(); itr!= groups.end(); ++itr)
|
||||
{
|
||||
SpellGroupStackMap::const_iterator found = mSpellGroupStack.find(*itr);
|
||||
if (found != mSpellGroupStack.end())
|
||||
@@ -1213,7 +1213,7 @@ void SpellMgr::LoadSpellRanks()
|
||||
int32 curRank = 0;
|
||||
bool valid = true;
|
||||
// check spells in chain
|
||||
for (std::list<std::pair<int32, int32> >::iterator itr = rankChain.begin() ; itr!= rankChain.end(); ++itr)
|
||||
for (std::list<std::pair<int32, int32> >::iterator itr = rankChain.begin(); itr!= rankChain.end(); ++itr)
|
||||
{
|
||||
SpellInfo const* spell = GetSpellInfo(itr->first);
|
||||
if (!spell)
|
||||
@@ -1620,7 +1620,7 @@ void SpellMgr::LoadSpellGroups()
|
||||
|
||||
} while (result->NextRow());
|
||||
|
||||
for (SpellGroupSpellMap::iterator itr = mSpellGroupSpell.begin(); itr!= mSpellGroupSpell.end() ;)
|
||||
for (SpellGroupSpellMap::iterator itr = mSpellGroupSpell.begin(); itr!= mSpellGroupSpell.end();)
|
||||
{
|
||||
if (itr->second < 0)
|
||||
{
|
||||
@@ -1651,12 +1651,12 @@ void SpellMgr::LoadSpellGroups()
|
||||
}
|
||||
}
|
||||
|
||||
for (std::set<uint32>::iterator groupItr = groups.begin() ; groupItr != groups.end() ; ++groupItr)
|
||||
for (std::set<uint32>::iterator groupItr = groups.begin(); groupItr != groups.end(); ++groupItr)
|
||||
{
|
||||
std::set<uint32> spells;
|
||||
GetSetOfSpellsInSpellGroup(SpellGroup(*groupItr), spells);
|
||||
|
||||
for (std::set<uint32>::iterator spellItr = spells.begin() ; spellItr != spells.end() ; ++spellItr)
|
||||
for (std::set<uint32>::iterator spellItr = spells.begin(); spellItr != spells.end(); ++spellItr)
|
||||
{
|
||||
++count;
|
||||
mSpellSpellGroup.insert(SpellSpellGroupMap::value_type(*spellItr, SpellGroup(*groupItr)));
|
||||
|
||||
Reference in New Issue
Block a user