aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Handlers/PetHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Handlers/PetHandler.cpp')
-rw-r--r--src/server/game/Handlers/PetHandler.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/server/game/Handlers/PetHandler.cpp b/src/server/game/Handlers/PetHandler.cpp
index a8046f2f441..3f89bd51c28 100644
--- a/src/server/game/Handlers/PetHandler.cpp
+++ b/src/server/game/Handlers/PetHandler.cpp
@@ -216,7 +216,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
pet->ToCreature()->AI()->AttackStart(TargetUnit);
//10% chance to play special pet attack talk, else growl
- if (pet->ToCreature()->isPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && urand(0, 100) < 10)
+ if (pet->ToCreature()->IsPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && urand(0, 100) < 10)
pet->SendPetTalk((uint32)PET_TALK_ATTACK);
else
{
@@ -247,7 +247,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
else if (pet->GetOwnerGUID() == GetPlayer()->GetGUID())
{
ASSERT(pet->GetTypeId() == TYPEID_UNIT);
- if (pet->isPet())
+ if (pet->IsPet())
{
if (((Pet*)pet)->getPetType() == HUNTER_PET)
GetPlayer()->RemovePet((Pet*)pet, PET_SAVE_AS_DELETED);
@@ -354,7 +354,7 @@ void WorldSession::HandlePetActionHelper(Unit* pet, uint64 guid1, uint32 spellid
//10% chance to play special pet attack talk, else growl
//actually this only seems to happen on special spells, fire shield for imp, torment for voidwalker, but it's stupid to check every spell
- if (pet->ToCreature()->isPet() && (((Pet*)pet)->getPetType() == SUMMON_PET) && (pet != unit_target) && (urand(0, 100) < 10))
+ if (pet->ToCreature()->IsPet() && (((Pet*)pet)->getPetType() == SUMMON_PET) && (pet != unit_target) && (urand(0, 100) < 10))
pet->SendPetTalk((uint32)PET_TALK_SPECIAL_SPELL);
else
{
@@ -432,7 +432,7 @@ void WorldSession::SendPetNameQuery(uint64 petguid, uint32 petnumber)
data << pet->GetName();
data << uint32(pet->GetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP));
- if (pet->isPet() && ((Pet*)pet)->GetDeclinedNames())
+ if (pet->IsPet() && ((Pet*)pet)->GetDeclinedNames())
{
data << uint8(1);
for (uint8 i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
@@ -560,7 +560,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
//sign for autocast
if (act_state == ACT_ENABLED)
{
- if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->isPet())
+ if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->IsPet())
((Pet*)pet)->ToggleAutocast(spellInfo, true);
else
for (Unit::ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
@@ -570,7 +570,7 @@ void WorldSession::HandlePetSetAction(WorldPacket& recvData)
//sign for no/turn off autocast
else if (act_state == ACT_DISABLED)
{
- if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->isPet())
+ if (pet->GetTypeId() == TYPEID_UNIT && pet->ToCreature()->IsPet())
((Pet*)pet)->ToggleAutocast(spellInfo, false);
else
for (Unit::ControlList::iterator itr = GetPlayer()->m_Controlled.begin(); itr != GetPlayer()->m_Controlled.end(); ++itr)
@@ -600,7 +600,7 @@ void WorldSession::HandlePetRename(WorldPacket& recvData)
Pet* pet = ObjectAccessor::FindPet(petguid);
// check it!
- if (!pet || !pet->isPet() || ((Pet*)pet)->getPetType()!= HUNTER_PET ||
+ if (!pet || !pet->IsPet() || ((Pet*)pet)->getPetType()!= HUNTER_PET ||
!pet->HasByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED) ||
pet->GetOwnerGUID() != _player->GetGUID() || !pet->GetCharmInfo())
return;
@@ -682,7 +682,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recvData)
Creature* pet = ObjectAccessor::GetCreatureOrPetOrVehicle(*_player, guid);
if (pet)
{
- if (pet->isPet())
+ if (pet->IsPet())
{
if (pet->GetGUID() == _player->GetPetGUID())
{
@@ -731,7 +731,7 @@ void WorldSession::HandlePetSpellAutocastOpcode(WorldPacket& recvPacket)
return;
}
- if (pet->isPet())
+ if (pet->IsPet())
((Pet*)pet)->ToggleAutocast(spellInfo, state);
else
pet->GetCharmInfo()->ToggleCreatureAutocast(spellInfo, state);
@@ -804,7 +804,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket)
{
Creature* pet = caster->ToCreature();
pet->AddCreatureSpellCooldown(spellId);
- if (pet->isPet())
+ if (pet->IsPet())
{
Pet* p = (Pet*)pet;
// 10% chance to play special pet attack talk, else growl