[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

@ -197,7 +197,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleAuraSafeFall, //144 SPELL_AURA_SAFE_FALL implemented in WorldSession::HandleMovementOpcodes
&Aura::HandleAuraModPetTalentsPoints, //145 SPELL_AURA_MOD_PET_TALENT_POINTS
&Aura::HandleNoImmediateEffect, //146 SPELL_AURA_ALLOW_TAME_PET_TYPE implemented in Player::CanTameExoticPets
&Aura::HandleModMechanicImmunityMask, //147 SPELL_AURA_MECHANIC_IMMUNITY_MASK implemented in Unit::IsImmunedToSpell and Unit::IsImmunedToSpellEffect (check part)
&Aura::HandleModMechanicImmunityMask, //147 SPELL_AURA_MECHANIC_IMMUNITY_MASK implemented in Unit::IsImmuneToSpell and Unit::IsImmuneToSpellEffect (check part)
&Aura::HandleAuraRetainComboPoints, //148 SPELL_AURA_RETAIN_COMBO_POINTS
&Aura::HandleNoImmediateEffect, //149 SPELL_AURA_REDUCE_PUSHBACK implemented in Spell::Delayed and Spell::DelayedChannel
&Aura::HandleShieldBlockValue, //150 SPELL_AURA_MOD_SHIELD_BLOCKVALUE_PCT
@ -317,7 +317,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&Aura::HandleUnused, //264 unused (3.0.8a-3.2.2a)
&Aura::HandleUnused, //265 unused (3.0.8a-3.2.2a)
&Aura::HandleUnused, //266 unused (3.0.8a-3.2.2a)
&Aura::HandleNoImmediateEffect, //267 SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL implemented in Unit::IsImmunedToSpellEffect
&Aura::HandleNoImmediateEffect, //267 SPELL_AURA_MOD_IMMUNE_AURA_APPLY_SCHOOL implemented in Unit::IsImmuneToSpellEffect
&Aura::HandleAuraModAttackPowerOfStatPercent, //268 SPELL_AURA_MOD_ATTACK_POWER_OF_STAT_PERCENT
&Aura::HandleNoImmediateEffect, //269 SPELL_AURA_MOD_IGNORE_DAMAGE_REDUCTION_SCHOOL implemented in Unit::CalcNotIgnoreDamageRedunction
&Aura::HandleUnused, //270 SPELL_AURA_MOD_IGNORE_TARGET_RESIST (unused in 3.2.2a)
@ -473,12 +473,12 @@ Unit *caster, Item* castItem) : Aura(spellproto, eff, currentBasePoints, holder,
{
case SPELL_EFFECT_APPLY_AREA_AURA_PARTY:
m_areaAuraType = AREA_AURA_PARTY;
if (target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->isTotem())
if (target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->IsTotem())
m_modifier.m_auraname = SPELL_AURA_NONE;
break;
case SPELL_EFFECT_APPLY_AREA_AURA_RAID:
m_areaAuraType = AREA_AURA_RAID;
if (target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->isTotem())
if (target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->IsTotem())
m_modifier.m_auraname = SPELL_AURA_NONE;
// Light's Beacon not applied to caster itself (TODO: more generic check for another simialr spell if any?)
else if (target == caster_ptr && spellproto->Id == 53651)
@ -3519,7 +3519,7 @@ void Aura::HandleModPossessPet(bool apply, bool Real)
return;
Unit* target = GetTarget();
if (target->GetTypeId() != TYPEID_UNIT || !((Creature*)target)->isPet())
if (target->GetTypeId() != TYPEID_UNIT || !((Creature*)target)->IsPet())
return;
Pet* pet = (Pet*)target;
@ -3665,7 +3665,7 @@ void Aura::HandleModCharm(bool apply, bool Real)
CreatureInfo const *cinfo = ((Creature*)target)->GetCreatureInfo();
// restore faction
if(((Creature*)target)->isPet())
if(((Creature*)target)->IsPet())
{
if(Unit* owner = target->GetOwner())
target->setFaction(owner->getFaction());
@ -4442,7 +4442,7 @@ void Aura::HandleModMechanicImmunityMask(bool apply, bool /*Real*/)
if(apply && GetSpellProto()->AttributesEx & SPELL_ATTR_EX_DISPEL_AURAS_ON_IMMUNITY)
GetTarget()->RemoveAurasAtMechanicImmunity(mechanic,GetId());
// check implemented in Unit::IsImmunedToSpell and Unit::IsImmunedToSpellEffect
// check implemented in Unit::IsImmuneToSpell and Unit::IsImmuneToSpellEffect
}
//this method is called whenever we add / remove aura which gives m_target some imunity to some spell effect
@ -4992,7 +4992,7 @@ void Aura::HandleAuraModResistance(bool apply, bool /*Real*/)
if(m_modifier.m_miscvalue & int32(1<<x))
{
GetTarget()->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + x), TOTAL_VALUE, float(m_modifier.m_amount), apply);
if(GetTarget()->GetTypeId() == TYPEID_PLAYER || ((Creature*)GetTarget())->isPet())
if(GetTarget()->GetTypeId() == TYPEID_PLAYER || ((Creature*)GetTarget())->IsPet())
GetTarget()->ApplyResistanceBuffModsMod(SpellSchools(x), m_positive, float(m_modifier.m_amount), apply);
}
}
@ -5004,7 +5004,7 @@ void Aura::HandleAuraModBaseResistancePCT(bool apply, bool /*Real*/)
if(GetTarget()->GetTypeId() != TYPEID_PLAYER)
{
//pets only have base armor
if(((Creature*)GetTarget())->isPet() && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_NORMAL))
if(((Creature*)GetTarget())->IsPet() && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_NORMAL))
GetTarget()->HandleStatModifier(UNIT_MOD_ARMOR, BASE_PCT, float(m_modifier.m_amount), apply);
}
else
@ -5026,7 +5026,7 @@ void Aura::HandleModResistancePercent(bool apply, bool /*Real*/)
if(m_modifier.m_miscvalue & int32(1<<i))
{
target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_PCT, float(m_modifier.m_amount), apply);
if(target->GetTypeId() == TYPEID_PLAYER || ((Creature*)target)->isPet())
if(target->GetTypeId() == TYPEID_PLAYER || ((Creature*)target)->IsPet())
{
target->ApplyResistanceBuffModsPercentMod(SpellSchools(i), true, float(m_modifier.m_amount), apply);
target->ApplyResistanceBuffModsPercentMod(SpellSchools(i), false, float(m_modifier.m_amount), apply);
@ -5041,7 +5041,7 @@ void Aura::HandleModBaseResistance(bool apply, bool /*Real*/)
if(GetTarget()->GetTypeId() != TYPEID_PLAYER)
{
//only pets have base stats
if(((Creature*)GetTarget())->isPet() && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_NORMAL))
if(((Creature*)GetTarget())->IsPet() && (m_modifier.m_miscvalue & SPELL_SCHOOL_MASK_NORMAL))
GetTarget()->HandleStatModifier(UNIT_MOD_ARMOR, TOTAL_VALUE, float(m_modifier.m_amount), apply);
}
else
@ -5071,7 +5071,7 @@ void Aura::HandleAuraModStat(bool apply, bool /*Real*/)
{
//m_target->ApplyStatMod(Stats(i), m_modifier.m_amount,apply);
GetTarget()->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_VALUE, float(m_modifier.m_amount), apply);
if(GetTarget()->GetTypeId() == TYPEID_PLAYER || ((Creature*)GetTarget())->isPet())
if(GetTarget()->GetTypeId() == TYPEID_PLAYER || ((Creature*)GetTarget())->IsPet())
GetTarget()->ApplyStatBuffMod(Stats(i), float(m_modifier.m_amount), apply);
}
}
@ -5173,7 +5173,7 @@ void Aura::HandleModTotalPercentStat(bool apply, bool /*Real*/)
if(m_modifier.m_miscvalue == i || m_modifier.m_miscvalue == -1)
{
target->HandleStatModifier(UnitMods(UNIT_MOD_STAT_START + i), TOTAL_PCT, float(m_modifier.m_amount), apply);
if(target->GetTypeId() == TYPEID_PLAYER || ((Creature*)target)->isPet())
if(target->GetTypeId() == TYPEID_PLAYER || ((Creature*)target)->IsPet())
target->ApplyStatPercentBuffMod(Stats(i), float(m_modifier.m_amount), apply );
}
}
@ -7562,7 +7562,7 @@ void Aura::HandleAuraControlVehicle(bool apply, bool Real)
return;
Unit* target = GetTarget();
if (target->GetTypeId() != TYPEID_UNIT || !((Creature*)target)->isVehicle())
if (target->GetTypeId() != TYPEID_UNIT || !((Creature*)target)->IsVehicle())
return;
Vehicle* vehicle = (Vehicle*)target;
@ -7969,7 +7969,7 @@ void SpellAuraHolder::_RemoveSpellAuraHolder()
//passive auras do not get put in slots - said who? ;)
// Note: but totem can be not accessible for aura target in time remove (to far for find in grid)
//if(m_isPassive && !(caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->isTotem()))
//if(m_isPassive && !(caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->IsTotem()))
// return;
uint8 slot = GetAuraSlot();
@ -8207,7 +8207,7 @@ bool SpellAuraHolder::IsWeaponBuffCoexistableWith(SpellAuraHolder* ref)
bool SpellAuraHolder::IsNeedVisibleSlot(Unit const* caster) const
{
bool totemAura = caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->isTotem();
bool totemAura = caster && caster->GetTypeId() == TYPEID_UNIT && ((Creature*)caster)->IsTotem();
if (m_spellProto->procFlags)
return true;