*Cleanup and optimization

--HG--
branch : trunk
This commit is contained in:
maximius
2009-10-18 15:09:43 -07:00
parent 32e2c3e411
commit d095feefc0
3 changed files with 50 additions and 87 deletions

View File

@@ -305,9 +305,9 @@ void InstanceData::DoSendNotifyToInstance(const char *format, ...)
InstanceMap::PlayerList::const_iterator i;
if (!PlayerList.isEmpty())
for (i = PlayerList.begin(); i != PlayerList.end(); ++i)
if ((*i).getSource() && (*i).getSource()->GetSession())
(*i).getSource()->GetSession()->SendNotification(format);
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->getSource() && i->getSource()->GetSession())
i->getSource()->GetSession()->SendNotification(format);
}
// Complete Achievement for all players in instance
@@ -330,5 +330,6 @@ void InstanceData::DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
if (!PlayerList.isEmpty())
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
if (i->getSource() && i->getSource()->HasAura(spell)) i->getSource()->RemoveAurasDueToSpell(spell);
if (i->getSource())
i->getSource()->RemoveAurasDueToSpell(spell);
}