[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

@ -1474,7 +1474,7 @@ void Player::Update( uint32 p_time )
TeleportTo(m_teleport_dest, m_teleport_options);
}
void Player::setDeathState(DeathState s)
void Player::SetDeathState(DeathState s)
{
uint32 ressSpellId = 0;
@ -1484,7 +1484,7 @@ void Player::setDeathState(DeathState s)
{
// drunken state is cleared on death
SetDrunkValue(0);
// lost combo points at any target (targeted combo points clear in Unit::setDeathState)
// lost combo points at any target (targeted combo points clear in Unit::SetDeathState)
ClearComboPoints();
clearResurrectRequestData();
@ -1492,13 +1492,13 @@ void Player::setDeathState(DeathState s)
// remove form before other mods to prevent incorrect stats calculation
RemoveAurasDueToSpell(m_ShapeShiftFormSpellId);
//FIXME: is pet dismissed at dying or releasing spirit? if second, add setDeathState(DEAD) to HandleRepopRequestOpcode and define pet unsummon here with (s == DEAD)
//FIXME: is pet dismissed at dying or releasing spirit? if second, add SetDeathState(DEAD) to HandleRepopRequestOpcode and define pet unsummon here with (s == DEAD)
RemovePet(NULL, PET_SAVE_NOT_IN_SLOT, true);
// remove uncontrolled pets
RemoveMiniPet();
// save value before aura remove in Unit::setDeathState
// save value before aura remove in Unit::SetDeathState
ressSpellId = GetUInt32Value(PLAYER_SELF_RES_SPELL);
// passive spell
@ -1513,7 +1513,7 @@ void Player::setDeathState(DeathState s)
mapInstance->OnPlayerDeath(this);
}
Unit::setDeathState(s);
Unit::SetDeathState(s);
// restore resurrection spell id for player after aura remove
if(s == JUST_DIED && cur && ressSpellId)
@ -4475,7 +4475,7 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
RemoveAurasDueToSpell(20584); // speed bonuses
RemoveAurasDueToSpell(8326); // SPELL_AURA_GHOST
setDeathState(ALIVE);
SetDeathState(ALIVE);
SetMovement(MOVE_LAND_WALK);
SetMovement(MOVE_UNROOT);
@ -4538,7 +4538,7 @@ void Player::KillPlayer()
StopMirrorTimers(); //disable timers(bars)
setDeathState(CORPSE);
SetDeathState(CORPSE);
//SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_IN_PVP );
SetFlag(UNIT_DYNAMIC_FLAGS, 0x00);
@ -5570,7 +5570,7 @@ void Player::UpdateCombatSkills(Unit *pVictim, WeaponAttackType attType, bool de
{
uint32 plevel = getLevel(); // if defense than pVictim == attacker
uint32 greylevel = MaNGOS::XP::GetGrayLevel(plevel);
uint32 moblevel = pVictim->getLevelForTarget(this);
uint32 moblevel = pVictim->GetLevelForTarget(this);
if(moblevel < greylevel)
return;
@ -6531,7 +6531,7 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor)
{
Creature *cVictim = (Creature *)uVictim;
if (!cVictim->isRacialLeader())
if (!cVictim->IsRacialLeader())
return false;
honor = 100; // ??? need more info
@ -12756,11 +12756,11 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
break;
}
case GOSSIP_OPTION_TRAINER:
if (!pCreature->isCanTrainingOf(this, false))
if (!pCreature->IsTrainerOf(this, false))
hasMenuItem = false;
break;
case GOSSIP_OPTION_UNLEARNTALENTS:
if (!pCreature->isCanTrainingAndResetTalentsOf(this))
if (!pCreature->CanTrainAndResetTalentsOf(this))
hasMenuItem = false;
break;
case GOSSIP_OPTION_UNLEARNPETSKILLS:
@ -12772,7 +12772,7 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
return;
break;
case GOSSIP_OPTION_BATTLEFIELD:
if (!pCreature->isCanInteractWithBattleMaster(this, false))
if (!pCreature->CanInteractWithBattleMaster(this, false))
hasMenuItem = false;
break;
case GOSSIP_OPTION_STABLEPET:
@ -12851,13 +12851,13 @@ void Player::PrepareGossipMenu(WorldObject *pSource, uint32 menuId)
if (pCreature->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_TRAINER))
{
// output error message if need
pCreature->isCanTrainingOf(this, true);
pCreature->IsTrainerOf(this, true);
}
if (pCreature->HasFlag(UNIT_NPC_FLAGS,UNIT_NPC_FLAG_BATTLEMASTER))
{
// output error message if need
pCreature->isCanInteractWithBattleMaster(this, true);
pCreature->CanInteractWithBattleMaster(this, true);
}
}*/
}
@ -19320,7 +19320,7 @@ inline void BeforeVisibilityDestroy(T* /*t*/, Player* /*p*/)
template<>
inline void BeforeVisibilityDestroy<Creature>(Creature* t, Player* p)
{
if (p->GetPetGUID()==t->GetGUID() && ((Creature*)t)->isPet())
if (p->GetPetGUID()==t->GetGUID() && ((Creature*)t)->IsPet())
((Pet*)t)->Remove(PET_SAVE_NOT_IN_SLOT, true);
}
@ -20305,8 +20305,8 @@ bool Player::isHonorOrXPTarget(Unit* pVictim) const
if(pVictim->GetTypeId() == TYPEID_UNIT)
{
if (((Creature*)pVictim)->isTotem() ||
((Creature*)pVictim)->isPet() ||
if (((Creature*)pVictim)->IsTotem() ||
((Creature*)pVictim)->IsPet() ||
((Creature*)pVictim)->GetCreatureInfo()->flags_extra & CREATURE_FLAG_EXTRA_NO_XP_AT_KILL)
return false;
}
@ -22205,7 +22205,7 @@ void Player::SendDuelCountdown(uint32 counter)
GetSession()->SendPacket(&data);
}
bool Player::IsImmunedToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const
bool Player::IsImmuneToSpellEffect(SpellEntry const* spellInfo, SpellEffectIndex index) const
{
switch(spellInfo->Effect[index])
{
@ -22221,7 +22221,7 @@ bool Player::IsImmunedToSpellEffect(SpellEntry const* spellInfo, SpellEffectInde
default:
break;
}
return Unit::IsImmunedToSpellEffect(spellInfo, index);
return Unit::IsImmuneToSpellEffect(spellInfo, index);
}
void Player::SetHomebindToLocation(WorldLocation const& loc, uint32 area_id)