mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[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:
parent
d090bce461
commit
61102e3b16
50 changed files with 305 additions and 305 deletions
|
|
@ -797,7 +797,7 @@ void Spell::AddUnitTarget(Unit* pVictim, SpellEffectIndex effIndex)
|
|||
return;
|
||||
|
||||
// Check for effect immune skip if immuned
|
||||
bool immuned = pVictim->IsImmunedToSpellEffect(m_spellInfo, effIndex);
|
||||
bool immuned = pVictim->IsImmuneToSpellEffect(m_spellInfo, effIndex);
|
||||
|
||||
ObjectGuid targetGUID = pVictim->GetObjectGuid();
|
||||
|
||||
|
|
@ -1106,7 +1106,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
|||
{
|
||||
// cast at creature (or GO) quest objectives update at successful cast finished (+channel finished)
|
||||
// ignore pets or autorepeat/melee casts for speed (not exist quest for spells (hm... )
|
||||
if (real_caster && !((Creature*)unit)->isPet() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive())
|
||||
if (real_caster && !((Creature*)unit)->IsPet() && !IsAutoRepeat() && !IsNextMeleeSwingSpell() && !IsChannelActive())
|
||||
if (Player* p = real_caster->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
p->RewardPlayerAndGroupAtCast(unit, m_spellInfo->Id);
|
||||
|
||||
|
|
@ -1129,7 +1129,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
// Recheck immune (only for delayed spells)
|
||||
if (m_spellInfo->speed && (
|
||||
unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo)) ||
|
||||
unit->IsImmunedToSpell(m_spellInfo)))
|
||||
unit->IsImmuneToSpell(m_spellInfo)))
|
||||
{
|
||||
if (realCaster)
|
||||
realCaster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_IMMUNE);
|
||||
|
|
@ -1915,7 +1915,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
break;
|
||||
case TARGET_NONCOMBAT_PET:
|
||||
if(Unit* target = m_targets.getUnitTarget())
|
||||
if( target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->isPet() && ((Pet*)target)->getPetType() == MINI_PET)
|
||||
if( target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->IsPet() && ((Pet*)target)->getPetType() == MINI_PET)
|
||||
targetUnitMap.push_back(target);
|
||||
break;
|
||||
case TARGET_CASTER_COORDINATES:
|
||||
|
|
@ -2011,7 +2011,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
}
|
||||
else if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if( targetOwner == m_caster && target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->isPet())
|
||||
if( targetOwner == m_caster && target->GetTypeId() == TYPEID_UNIT && ((Creature*)target)->IsPet())
|
||||
{
|
||||
targetUnitMap.push_back(target);
|
||||
break;
|
||||
|
|
@ -2025,7 +2025,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
if(targetOwner)
|
||||
{
|
||||
if( targetOwner->GetTypeId() == TYPEID_PLAYER &&
|
||||
target->GetTypeId() == TYPEID_UNIT && (((Creature*)target)->isPet()) &&
|
||||
target->GetTypeId() == TYPEID_UNIT && (((Creature*)target)->IsPet()) &&
|
||||
target->GetOwnerGUID() == targetOwner->GetGUID() &&
|
||||
pGroup->IsMember(((Player*)targetOwner)->GetObjectGuid()))
|
||||
{
|
||||
|
|
@ -2125,7 +2125,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
{
|
||||
if( target->GetTypeId() != TYPEID_PLAYER)
|
||||
{
|
||||
if(((Creature*)target)->isPet())
|
||||
if(((Creature*)target)->IsPet())
|
||||
{
|
||||
Unit *targetOwner = target->GetOwner();
|
||||
if(targetOwner->GetTypeId() == TYPEID_PLAYER)
|
||||
|
|
@ -4497,7 +4497,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
}
|
||||
|
||||
if(IsPositiveSpell(m_spellInfo->Id))
|
||||
if(target->IsImmunedToSpell(m_spellInfo))
|
||||
if(target->IsImmuneToSpell(m_spellInfo))
|
||||
return SPELL_FAILED_TARGET_AURASTATE;
|
||||
|
||||
//Must be behind the target.
|
||||
|
|
@ -4833,7 +4833,7 @@ SpellCastResult Spell::CheckCast(bool strict)
|
|||
|
||||
Creature* target = (Creature*)m_targets.getUnitTarget();
|
||||
|
||||
if(target->isPet() || target->isCharmed())
|
||||
if(target->IsPet() || target->isCharmed())
|
||||
{
|
||||
plrCaster->SendPetTameFailure(PETTAME_CREATUREALREADYOWNED);
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
|
|
@ -5331,7 +5331,7 @@ SpellCastResult Spell::CheckPetCast(Unit* target)
|
|||
if(m_caster->isInCombat() && IsNonCombatSpell(m_spellInfo))
|
||||
return SPELL_FAILED_AFFECTING_COMBAT;
|
||||
|
||||
if(m_caster->GetTypeId()==TYPEID_UNIT && (((Creature*)m_caster)->isPet() || m_caster->isCharmed()))
|
||||
if(m_caster->GetTypeId()==TYPEID_UNIT && (((Creature*)m_caster)->IsPet() || m_caster->isCharmed()))
|
||||
{
|
||||
//dead owner (pets still alive when owners ressed?)
|
||||
if(m_caster->GetCharmerOrOwner() && !m_caster->GetCharmerOrOwner()->isAlive())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue