More warning removal (Some code modifications and cleanup when needed)

--HG--
branch : trunk
This commit is contained in:
Spp committed 2010-04-19 17:03:10 +02:00
1 parent f74e969a06
commit be01821050
46 files changed
+420 -353

No files matched your search

+3 -2
View File
@@ -374,9 +374,10 @@ void CreatureEventAI::ProcessAction(CreatureEventAI_Action const& action, uint32
target = owner;
}
}
else if ((target = me->getVictim()))
else
{
if (target->GetTypeId() != TYPEID_PLAYER)
target = me->getVictim();
if (target && target->GetTypeId() != TYPEID_PLAYER)
if (Unit* owner = target->GetOwner())
if (owner->GetTypeId() == TYPEID_PLAYER)
target = owner;