[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

@ -826,7 +826,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT)
return;
((Creature*)unitTarget)->setDeathState(JUST_ALIVED);
((Creature*)unitTarget)->SetDeathState(JUST_ALIVED);
return;
}
case 10254: // Stone Dwarf Awaken Visual
@ -938,11 +938,11 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
}
case 23019: // Crystal Prison Dummy DND
{
if (!unitTarget || !unitTarget->isAlive() || unitTarget->GetTypeId() != TYPEID_UNIT || ((Creature*)unitTarget)->isPet())
if (!unitTarget || !unitTarget->isAlive() || unitTarget->GetTypeId() != TYPEID_UNIT || ((Creature*)unitTarget)->IsPet())
return;
Creature* creatureTarget = (Creature*)unitTarget;
if (creatureTarget->isPet())
if (creatureTarget->IsPet())
return;
GameObject* pGameObj = new GameObject;
@ -1390,7 +1390,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
return;
unitTarget->CastSpell(m_caster, 43160, true);
unitTarget->setDeathState(JUST_DIED);
unitTarget->SetDeathState(JUST_DIED);
unitTarget->SetHealth(0);
return;
}
@ -1496,7 +1496,7 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx)
unitTarget->CastSpell(unitTarget, 51278, true);
unitTarget->CastSpell(m_caster, 51279, true);
unitTarget->setDeathState(JUST_DIED);
unitTarget->SetDeathState(JUST_DIED);
return;
}
case 51330: // Shoot RJR
@ -4978,7 +4978,7 @@ void Spell::EffectSummonPet(SpellEffectIndex eff_idx)
uint32 faction = m_caster->getFaction();
if(m_caster->GetTypeId() == TYPEID_UNIT)
{
if ( ((Creature*)m_caster)->isTotem() )
if ( ((Creature*)m_caster)->IsTotem() )
NewSummon->GetCharmInfo()->SetReactState(REACT_AGGRESSIVE);
else
NewSummon->GetCharmInfo()->SetReactState(REACT_DEFENSIVE);
@ -5749,7 +5749,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
if (const SpellEntry *pSpell = sSpellStore.LookupEntry(m_spellInfo->CalculateSimpleValue(eff_idx)))
{
// if we used item at least once...
if (pTarget->isTemporarySummon() && pTarget->GetEntry() == pSpell->EffectMiscValue[eff_idx])
if (pTarget->IsTemporarySummon() && pTarget->GetEntry() == pSpell->EffectMiscValue[eff_idx])
{
TemporarySummon* pSummon = (TemporarySummon*)pTarget;
@ -5797,7 +5797,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
if (!pQuestCow)
return;
if (!((Creature*)m_caster)->isTemporarySummon())
if (!((Creature*)m_caster)->IsTemporarySummon())
return;
if (const SpellEntry *pSpell = sSpellStore.LookupEntry(m_spellInfo->CalculateSimpleValue(eff_idx)))
@ -6017,7 +6017,7 @@ void Spell::EffectScriptEffect(SpellEffectIndex eff_idx)
if (m_caster->GetTypeId() != TYPEID_UNIT)
return;
if (((Creature*)m_caster)->isTemporarySummon())
if (((Creature*)m_caster)->IsTemporarySummon())
{
TemporarySummon* pSummon = (TemporarySummon*)m_caster;
@ -7332,7 +7332,7 @@ void Spell::EffectSkinning(SpellEffectIndex /*eff_idx*/)
int32 skillValue = ((Player*)m_caster)->GetPureSkillValue(skill);
// Double chances for elites
((Player*)m_caster)->UpdateGatherSkill(skill, skillValue, reqValue, creature->isElite() ? 2 : 1 );
((Player*)m_caster)->UpdateGatherSkill(skill, skillValue, reqValue, creature->IsElite() ? 2 : 1 );
}
void Spell::EffectCharge(SpellEffectIndex /*eff_idx*/)
@ -7531,7 +7531,7 @@ void Spell::EffectSummonDeadPet(SpellEffectIndex /*eff_idx*/)
return;
pet->SetUInt32Value(UNIT_DYNAMIC_FLAGS, 0);
pet->RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
pet->setDeathState( ALIVE );
pet->SetDeathState( ALIVE );
pet->clearUnitState(UNIT_STAT_ALL_STATE);
pet->SetHealth( uint32(pet->GetMaxHealth()*(float(damage)/100)));
@ -7965,7 +7965,7 @@ void Spell::EffectTitanGrip(SpellEffectIndex eff_idx)
void Spell::EffectRenamePet(SpellEffectIndex /*eff_idx*/)
{
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT ||
!((Creature*)unitTarget)->isPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
!((Creature*)unitTarget)->IsPet() || ((Pet*)unitTarget)->getPetType() != HUNTER_PET)
return;
unitTarget->RemoveByteFlag(UNIT_FIELD_BYTES_2, 2, UNIT_CAN_BE_RENAMED);