Core/Misc: Fixed warnings

This commit is contained in:
Vincent-Michael
2016-06-08 13:05:23 +02:00
parent 15bea97f83
commit 7eceba09d7
3 changed files with 6 additions and 6 deletions

View File

@@ -198,8 +198,8 @@ class npc_pet_mage_mirror_image : public CreatureScript
if (!target || me->GetVictim() != target)
{
Unit* ownerTarget = nullptr;
if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
ownerTarget = owner->GetSelectedUnit();
if (Player* ownerPlayer = me->GetCharmerOrOwner()->ToPlayer())
ownerTarget = ownerPlayer->GetSelectedUnit();
// recognize which victim will be choosen
if (ownerTarget && ownerTarget->GetTypeId() == TYPEID_PLAYER)