diff options
author | megamage <none@none> | 2009-08-29 23:20:16 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-29 23:20:16 -0500 |
commit | d802cd3811c77a1b0bef95a65fdfc4872ff557a8 (patch) | |
tree | 68be363ef1f3ce843a32254a9b8fd122b7803434 /src/game/PetHandler.cpp | |
parent | 6954eae60ac320639451bd83782f294da367b733 (diff) |
*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
Diffstat (limited to 'src/game/PetHandler.cpp')
-rw-r--r-- | src/game/PetHandler.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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); |