Core: Fix annoying compile warning and some other minor changes here and there

This commit is contained in:
Spp-
2011-08-01 13:46:00 +02:00
parent 0457d98405
commit 1fc1da842e
5 changed files with 47 additions and 30 deletions
+3 -3
View File
@@ -1899,8 +1899,8 @@ public:
void InitializeAI()
{
CasterAI::InitializeAI();
Unit* owner = me->GetOwner();
if (!owner)
uint64 owner_guid = me->GetOwnerGUID();
if (!owner_guid)
return;
// Not needed to be despawned now
despawnTimer = 0;
@@ -1910,7 +1910,7 @@ public:
Trinity::UnitListSearcher<Trinity::AnyUnfriendlyUnitInObjectRangeCheck> searcher(me, targets, u_check);
me->VisitNearbyObject(30, searcher);
for (std::list<Unit*>::const_iterator iter = targets.begin(); iter != targets.end(); ++iter)
if ((*iter)->GetAura(49206, owner->GetGUID()))
if ((*iter)->GetAura(49206, owner_guid))
{
me->Attack((*iter), false);
break;