From d802cd3811c77a1b0bef95a65fdfc4872ff557a8 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 29 Aug 2009 23:20:16 -0500 Subject: *More update about positions. *Ulduar: do not allow demolisher to regenerate pyrite. Player must shoot down and grab the containers to refill pyrite. --HG-- branch : trunk --- src/game/PetHandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/game/PetHandler.cpp') diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 9da36fc9215..53c9873be72 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -167,7 +167,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid else if(pet->GetOwnerGUID() == GetPlayer()->GetGUID()) { assert(pet->GetTypeId() == TYPEID_UNIT); - if(((Creature*)pet)->isPet()) + if(pet->isPet()) { if(((Pet*)pet)->getPetType() == HUNTER_PET) GetPlayer()->RemovePet((Pet*)pet, PET_SAVE_AS_DELETED); @@ -175,7 +175,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid //dismissing a summoned pet is like killing them (this prevents returning a soulshard...) pet->setDeathState(CORPSE); } - else if(((Creature*)pet)->HasUnitTypeMask(UNIT_MASK_MINION)) + else if(pet->HasUnitTypeMask(UNIT_MASK_MINION)) { ((Minion*)pet)->UnSummon(); } @@ -232,7 +232,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid SpellCastResult result = spell->CheckPetCast(unit_target); //auto turn to target unless possessed - if(result == SPELL_FAILED_UNIT_NOT_INFRONT && !pet->isPossessed()) + if(result == SPELL_FAILED_UNIT_NOT_INFRONT && !pet->isPossessed() && !pet->IsVehicle()) { if(unit_target) { @@ -267,7 +267,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid pet->SendPetAIReaction(guid1); } - if( unit_target && !GetPlayer()->IsFriendlyTo(unit_target) && !pet->isPossessed()) + if( unit_target && !GetPlayer()->IsFriendlyTo(unit_target) && !pet->isPossessed() && !pet->IsVehicle()) { // This is true if pet has no target or has target but targets differs. if (pet->getVictim() != unit_target) @@ -284,7 +284,7 @@ void WorldSession::HandlePetActionHelper(Unit *pet, uint64 guid1, uint16 spellid } else { - if(pet->isPossessed()) + if(pet->isPossessed() || pet->IsVehicle()) Spell::SendCastResult(GetPlayer(),spellInfo,0,result); else pet->SendPetCastFail(spellid, result); -- cgit v1.2.3