mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
*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
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user