Avoid not needed too oftent send update data, cleanups. by SilverIce

--HG--
branch : trunk
This commit is contained in:
n0n4m3
2009-12-19 17:58:45 +01:00
parent 57bdbdc0ca
commit ef2cbee517
8 changed files with 28 additions and 69 deletions

View File

@@ -208,10 +208,10 @@ void PetAI::UpdateAI(const uint32 diff)
{
m_creature->SetInFront(target);
if( target->GetTypeId() == TYPEID_PLAYER )
m_creature->SendUpdateToPlayer( (Player*)target );
m_creature->SendCreateUpdateToPlayer( (Player*)target );
if(owner && owner->GetTypeId() == TYPEID_PLAYER)
m_creature->SendUpdateToPlayer( (Player*)owner );
m_creature->SendCreateUpdateToPlayer( (Player*)owner );
}
m_creature->AddCreatureSpellCooldown(spell->m_spellInfo->Id);