[10610] Renamed some functions from the Creature class

Also other classes have been affected, due to the use of search&replace.
This will probably break some patches and 3rd party libraries, so make sure to update them if required.
Thanks to Phille for the original idea and patch!
This commit is contained in:
DasBlub 2010-10-14 21:56:40 +02:00
parent d090bce461
commit 61102e3b16
50 changed files with 305 additions and 305 deletions

View file

@ -66,7 +66,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
if (!(flag == ACT_COMMAND && spellid == COMMAND_ATTACK))
return;
}
else if (((Creature*)pet)->isPet())
else if (((Creature*)pet)->IsPet())
{
// pet can have action bar disabled
if(((Pet*)pet)->GetModeFlags() & PET_MODE_DISABLE_ACTIONS)
@ -128,7 +128,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
((Creature*)pet)->AI()->AttackStart(TargetUnit);
// 10% chance to play special pet attack talk, else growl
if(((Creature*)pet)->isPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && roll_chance_i(10))
if(((Creature*)pet)->IsPet() && ((Pet*)pet)->getPetType() == SUMMON_PET && pet != TargetUnit && roll_chance_i(10))
pet->SendPetTalk((uint32)PET_TALK_ATTACK);
else
{
@ -140,14 +140,14 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
break;
}
case COMMAND_ABANDON: // abandon (hunter pet) or dismiss (summoned pet)
if(((Creature*)pet)->isPet())
if(((Creature*)pet)->IsPet())
{
Pet* p = (Pet*)pet;
if(p->getPetType() == HUNTER_PET)
_player->RemovePet(p,PET_SAVE_AS_DELETED);
else
//dismissing a summoned pet is like killing them (this prevents returning a soulshard...)
p->setDeathState(CORPSE);
p->SetDeathState(CORPSE);
}
else // charmed
_player->Uncharm();
@ -230,7 +230,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
//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(((Creature*)pet)->isPet() && (((Pet*)pet)->getPetType() == SUMMON_PET) && (pet != unit_target) && (urand(0, 100) < 10))
if(((Creature*)pet)->IsPet() && (((Pet*)pet)->getPetType() == SUMMON_PET) && (pet != unit_target) && (urand(0, 100) < 10))
pet->SendPetTalk((uint32)PET_TALK_SPECIAL_SPELL);
else
{
@ -324,7 +324,7 @@ void WorldSession::SendPetNameQuery( uint64 petguid, uint32 petnumber)
data << name.c_str();
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(int i = 0; i < MAX_DECLINED_NAME_CASES; ++i)
@ -354,7 +354,7 @@ void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
}
// pet can have action bar disabled
if(pet->isPet() && ((Pet*)pet)->GetModeFlags() & PET_MODE_DISABLE_ACTIONS)
if(pet->IsPet() && ((Pet*)pet)->GetModeFlags() & PET_MODE_DISABLE_ACTIONS)
return;
CharmInfo *charmInfo = pet->GetCharmInfo();
@ -535,7 +535,7 @@ void WorldSession::HandlePetAbandon( WorldPacket & recv_data )
// pet/charmed
if (Creature* pet = _player->GetMap()->GetAnyTypeCreature(guid))
{
if(pet->isPet())
if(pet->IsPet())
{
if(pet->GetGUID() == _player->GetPetGUID())
{
@ -671,7 +671,7 @@ void WorldSession::HandlePetCastSpellOpcode( WorldPacket& recvPacket )
if (result == SPELL_CAST_OK)
{
pet->AddCreatureSpellCooldown(spellid);
if (pet->isPet())
if (pet->IsPet())
{
//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