[7730] Some optimizantion and code style.

Signed-off-by: AlexDereka <dereka.alex@gmail.com>
This commit is contained in:
zhenya 2009-04-28 21:03:25 +04:00 committed by AlexDereka
parent a4373c887d
commit 8144f30199
69 changed files with 536 additions and 536 deletions

View file

@ -197,7 +197,7 @@ void PetAI::UpdateAI(const uint32 diff)
if (m_creature->GetGlobalCooldown() == 0 && !m_creature->IsNonMeleeSpellCasted(false))
{
//Autocast
for (uint8 i = 0; i < m_creature->GetPetAutoSpellSize(); i++)
for (uint8 i = 0; i < m_creature->GetPetAutoSpellSize(); ++i)
{
uint32 spellID = m_creature->GetPetAutoSpellOnPos(i);
if (!spellID)
@ -229,7 +229,7 @@ void PetAI::UpdateAI(const uint32 diff)
else
{
bool spellUsed = false;
for(std::set<uint64>::iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
for(std::set<uint64>::const_iterator tar = m_AllySet.begin(); tar != m_AllySet.end(); ++tar)
{
Unit* Target = ObjectAccessor::GetUnit(*m_creature,*tar);