aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <none@none>2009-04-20 16:48:35 +0200
committerQAston <none@none>2009-04-20 16:48:35 +0200
commitcc5414f9256ab2d27caa9f08bbb7b453a3155feb (patch)
tree89885b6db912b73641764e6bb1b4a2c51b9cfa51
parent4ac0914d81ebad67b63e3b093117cc67cb717d81 (diff)
*Correct check range for totem area auras.
--HG-- branch : trunk
-rw-r--r--src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp2
-rw-r--r--src/game/AchievementMgr.cpp4
-rw-r--r--src/game/Creature.cpp2
-rw-r--r--src/game/CreatureEventAI.cpp2
-rw-r--r--src/game/GridNotifiers.h2
-rw-r--r--src/game/ObjectMgr.cpp4
-rw-r--r--src/game/OutdoorPvPZM.cpp4
-rw-r--r--src/game/Player.cpp4
-rw-r--r--src/game/Spell.cpp15
-rw-r--r--src/game/SpellAuras.cpp38
-rw-r--r--src/game/SpellAuras.h12
-rw-r--r--src/game/Unit.cpp2
14 files changed, 56 insertions, 39 deletions
diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp
index 33c6ec44cf9..c1934ada453 100644
--- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp
+++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/boss_kazrogal.cpp
@@ -145,7 +145,7 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
WarStompTimer = 60000;
}else WarStompTimer -= diff;
- if(m_creature->HasAura(SPELL_MARK,0))
+ if(m_creature->HasAura(SPELL_MARK))
m_creature->RemoveAurasDueToSpell(SPELL_MARK);
if(MarkTimer < diff)
{
diff --git a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp
index ac15c8cc30e..aeca740179c 100644
--- a/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp
+++ b/src/bindings/scripts/scripts/zone/caverns_of_time/hyjal/hyjal_trash.cpp
@@ -718,7 +718,7 @@ struct mob_abominationAI : public hyjal_trashAI
}
}
}
- if(!m_creature->HasAura(SPELL_DISEASE_CLOUD,0))
+ if(!m_creature->HasAura(SPELL_DISEASE_CLOUD))
DoCast(m_creature,SPELL_DISEASE_CLOUD);
if (!UpdateVictim())
return;
diff --git a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
index c39c14b7f20..4e0d6f7bc6a 100644
--- a/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
+++ b/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_kalecgos.cpp
@@ -335,7 +335,7 @@ struct TRINITY_DLL_DECL boss_sathrovarrAI : public ScriptedAI
Map::PlayerList::const_iterator i;
for(i = PlayerList.begin(); i != PlayerList.end(); ++i)
if(Player* i_pl = i->getSource())
- if(i_pl->HasAura(AURA_SPECTRAL_REALM,0))
+ if(i_pl->HasAura(AURA_SPECTRAL_REALM))
i_pl->RemoveAurasDueToSpell(AURA_SPECTRAL_REALM);
}
diff --git a/src/game/AchievementMgr.cpp b/src/game/AchievementMgr.cpp
index b79af868754..445e624c441 100644
--- a/src/game/AchievementMgr.cpp
+++ b/src/game/AchievementMgr.cpp
@@ -194,7 +194,7 @@ bool AchievementCriteriaData::Meets(Player const* source, Unit const* target) co
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_PLAYER_DEAD:
return target && target->GetTypeId() == TYPEID_PLAYER && !target->isAlive() && ((Player*)target)->GetDeathTimer() != 0;
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AURA:
- return source->HasAura(aura.spell_id,aura.effect_idx);
+ return source->HasAuraEffect(aura.spell_id,aura.effect_idx);
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_AREA:
{
uint32 zone_id,area_id;
@@ -202,7 +202,7 @@ bool AchievementCriteriaData::Meets(Player const* source, Unit const* target) co
return area.id==zone_id || area.id==area_id;
}
case ACHIEVEMENT_CRITERIA_DATA_TYPE_T_AURA:
- return target && target->HasAura(aura.spell_id,aura.effect_idx);
+ return target && target->HasAuraEffect(aura.spell_id,aura.effect_idx);
}
return false;
diff --git a/src/game/Creature.cpp b/src/game/Creature.cpp
index 0de19314ab6..9c27996931d 100644
--- a/src/game/Creature.cpp
+++ b/src/game/Creature.cpp
@@ -2090,7 +2090,7 @@ bool Creature::LoadCreaturesAddon(bool reload)
}
// skip already applied aura
- if(HasAura(cAura->spell_id,cAura->effect_idx))
+ if(HasAuraEffect(cAura->spell_id,cAura->effect_idx))
{
if(!reload)
sLog.outErrorDb("Creature (GUIDLow: %u Entry: %u ) has duplicate aura (spell %u effect %u) in `auras` field.",GetGUIDLow(),GetEntry(),cAura->spell_id,cAura->effect_idx);
diff --git a/src/game/CreatureEventAI.cpp b/src/game/CreatureEventAI.cpp
index 2cc5d4f14cc..729cee20fb9 100644
--- a/src/game/CreatureEventAI.cpp
+++ b/src/game/CreatureEventAI.cpp
@@ -1617,7 +1617,7 @@ void CreatureEventAI::ReceiveEmote(Player* pPlayer, uint32 text_emote)
bProcess = true;
break;
case CONDITION_AURA: // spell_id effindex
- if (pPlayer->HasAura((*itr).Event.event_param3,(*itr).Event.event_param4))
+ if (pPlayer->HasAuraEffect((*itr).Event.event_param3,(*itr).Event.event_param4))
bProcess = true;
break;
case CONDITION_ITEM: // item_id count
diff --git a/src/game/GridNotifiers.h b/src/game/GridNotifiers.h
index 521a543c08c..03d8ea11b16 100644
--- a/src/game/GridNotifiers.h
+++ b/src/game/GridNotifiers.h
@@ -672,7 +672,7 @@ namespace Trinity
bool operator()(Unit* u)
{
if(u->isAlive() && u->isInCombat() && !i_obj->IsHostileTo(u) && i_obj->IsWithinDistInMap(u, i_range) &&
- !(u->HasAura(i_spell, 0) || u->HasAura(i_spell, 1) || u->HasAura(i_spell, 2)))
+ !(u->HasAura(i_spell)))
{
return true;
}
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 5ddd361abf6..998484a552b 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -6974,7 +6974,7 @@ bool PlayerCondition::Meets(Player const * player) const
case CONDITION_NONE:
return true; // empty condition, always met
case CONDITION_AURA:
- return player->HasAura(value1, value2);
+ return player->HasAuraEffect(value1, value2);
case CONDITION_ITEM:
return player->HasItemCount(value1, value2);
case CONDITION_ITEM_EQUIPPED:
@@ -7006,7 +7006,7 @@ bool PlayerCondition::Meets(Player const * player) const
return false;
}
case CONDITION_NO_AURA:
- return !player->HasAura(value1, value2);
+ return !player->HasAuraEffect(value1, value2);
case CONDITION_ACTIVE_EVENT:
return gameeventmgr.IsActiveEvent(value1);
case CONDITION_INSTANCE_DATA:
diff --git a/src/game/OutdoorPvPZM.cpp b/src/game/OutdoorPvPZM.cpp
index 29997eec920..6077a0ba66f 100644
--- a/src/game/OutdoorPvPZM.cpp
+++ b/src/game/OutdoorPvPZM.cpp
@@ -279,7 +279,7 @@ int32 OutdoorPvPObjectiveZM_GraveYard::HandleOpenGo(Player *plr, uint64 guid)
uint32 retval = OutdoorPvPObjective::HandleOpenGo(plr, guid);
if(retval>=0)
{
- if(plr->HasAura(ZM_BATTLE_STANDARD_A,0) && m_GraveYardState != ZM_GRAVEYARD_A)
+ if(plr->HasAura(ZM_BATTLE_STANDARD_A) && m_GraveYardState != ZM_GRAVEYARD_A)
{
if(m_GraveYardState == ZM_GRAVEYARD_H)
sWorld.SendZoneText(ZM_GRAVEYARD_ZONE,objmgr.GetTrinityStringForDBCLocale(LANG_OPVP_ZM_LOOSE_GY_H));
@@ -292,7 +292,7 @@ int32 OutdoorPvPObjectiveZM_GraveYard::HandleOpenGo(Player *plr, uint64 guid)
plr->RemoveAurasDueToSpell(ZM_BATTLE_STANDARD_A);
sWorld.SendZoneText(ZM_GRAVEYARD_ZONE,objmgr.GetTrinityStringForDBCLocale(LANG_OPVP_ZM_CAPTURE_GY_A));
}
- else if(plr->HasAura(ZM_BATTLE_STANDARD_H,0) && m_GraveYardState != ZM_GRAVEYARD_H)
+ else if(plr->HasAura(ZM_BATTLE_STANDARD_H) && m_GraveYardState != ZM_GRAVEYARD_H)
{
if(m_GraveYardState == ZM_GRAVEYARD_A)
sWorld.SendZoneText(ZM_GRAVEYARD_ZONE,objmgr.GetTrinityStringForDBCLocale(LANG_OPVP_ZM_LOOSE_GY_A));
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 29bf8b68ce2..930e58e17d6 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1852,7 +1852,7 @@ void Player::RewardRage( uint32 damage, uint32 weaponSpeedHitFactor, bool attack
addRage = damage/rageconversion*2.5;
// Berserker Rage effect
- if(HasAura(18499,0))
+ if(HasAura(18499))
addRage *= 1.3;
}
@@ -17985,7 +17985,7 @@ void Player::ReportedAfkBy(Player* reporter)
return;
// check if player has 'Idle' or 'Inactive' debuff
- if(m_bgAfkReporter.find(reporter->GetGUIDLow())==m_bgAfkReporter.end() && !HasAura(43680,0) && !HasAura(43681,0) && reporter->CanReportAfkDueToLimit())
+ if(m_bgAfkReporter.find(reporter->GetGUIDLow())==m_bgAfkReporter.end() && !HasAura(43680) && !HasAura(43681) && reporter->CanReportAfkDueToLimit())
{
m_bgAfkReporter.insert(reporter->GetGUIDLow());
// 3 players have to complain to apply debuff
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 723dca962bd..5bc50b2b9d4 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -1147,7 +1147,7 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
if (aura_effmask)
{
Unit * caster = m_originalCaster ? m_originalCaster : m_caster;
- Aura * Aur= new Aura(m_spellInfo, aura_effmask, &m_currentBasePoints[0], unit, caster , m_CastItem);
+ Aura * Aur= new Aura(m_spellInfo, aura_effmask, &m_currentBasePoints[0], unit, caster , m_CastItem, m_caster);
if (!Aur->IsAreaAura())
{
@@ -1514,12 +1514,13 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
unMaxTargets+=(*j)->GetAmount();
}
- if(Player* modOwner = m_caster->GetSpellModOwner())
- {
- modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius_f,this);
- modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius_h,this);
- modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, EffectChainTarget, this);
- }
+ if(m_originalCaster)
+ if (Player* modOwner = m_caster->GetSpellModOwner())
+ {
+ modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius_f,this);
+ modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius_h,this);
+ modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, EffectChainTarget, this);
+ }
if(EffectChainTarget > 1)
{
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 5d0e03818d6..6d3b9bb5424 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -342,7 +342,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
&AuraEffect::HandleUnused, //288 not used by any spells (3.09) except 1 test spell.
};
-Aura::Aura(SpellEntry const* spellproto, uint32 effMask, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem) :
+Aura::Aura(SpellEntry const* spellproto, uint32 effMask, int32 *currentBasePoints, Unit *target, Unit *caster, Item* castItem, Unit * formalCaster) :
m_caster_guid(0), m_castItemGuid(castItem?castItem->GetGUID():0), m_target(target),
m_timeCla(1000), m_removeMode(AURA_REMOVE_BY_DEFAULT), m_AuraDRGroup(DIMINISHING_NONE),
m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_auraStateMask(0), m_updated(false), m_isRemoved(false)
@@ -376,6 +376,7 @@ m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_aura
//damage = caster->CalculateSpellDamage(m_spellProto,m_effIndex,m_currentBasePoints,target);
m_maxduration = caster->CalcSpellDuration(m_spellProto);
}
+ m_formalCasterGUID = formalCaster ? formalCaster->GetGUID() : m_caster_guid;
if(m_maxduration == -1 || m_isPassive && m_spellProto->DurationIndex == 0)
m_permanent = true;
@@ -410,9 +411,9 @@ m_auraSlot(MAX_AURAS), m_auraLevel(1), m_procCharges(0), m_stackAmount(1),m_aura
if (m_auraFlags & (uint8(1) << i))
{
if (&currentBasePoints[0])
- m_partAuras[i]=CreateAuraEffect(this, i,&currentBasePoints[0]+i, caster);
+ m_partAuras[i]=CreateAuraEffect(this, i,&currentBasePoints[0]+i, caster, NULL, formalCaster);
else
- m_partAuras[i]=CreateAuraEffect(this, i, NULL , caster);
+ m_partAuras[i]=CreateAuraEffect(this, i, NULL , caster, NULL, formalCaster);
// correct flags if aura couldn't be created
if (!m_partAuras[i])
m_auraFlags &= uint8(~(1<< i));
@@ -510,13 +511,13 @@ m_target(parentAura->GetTarget()), m_tickNumber(0)
m_periodicTimer += m_amplitude;
}
-AreaAuraEffect::AreaAuraEffect(Aura * parentAura, uint32 effIndex, int32 * currentBasePoints, Unit * caster, Item * castItem)
+AreaAuraEffect::AreaAuraEffect(Aura * parentAura, uint32 effIndex, int32 * currentBasePoints, Unit * caster, Item * castItem, Unit * formalCaster)
: AuraEffect(parentAura, effIndex, currentBasePoints, caster, castItem)
{
m_removeTime = FRIENDLY_AA_REMOVE_TIME;
m_isAreaAura = true;
- Unit* caster_ptr = caster ? caster : m_target;
+ Unit* caster_ptr = formalCaster ? formalCaster : m_target;
if (m_spellProto->Effect[effIndex] == SPELL_EFFECT_APPLY_AREA_AURA_ENEMY)
m_radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(GetSpellProto()->EffectRadiusIndex[m_effIndex]));
@@ -575,11 +576,11 @@ PersistentAreaAuraEffect::~PersistentAreaAuraEffect()
{
}
-AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints, Unit * caster, Item * castItem)
+AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints, Unit * caster, Item * castItem, Unit* formalCaster)
{
assert (parentAura);
if (IsAreaAuraEffect(parentAura->GetSpellProto()->Effect[effIndex]))
- return new AreaAuraEffect(parentAura, effIndex, currentBasePoints, caster, castItem);
+ return new AreaAuraEffect(parentAura, effIndex, currentBasePoints, caster, castItem, formalCaster);
else if (parentAura->GetSpellProto()->Effect[effIndex] == SPELL_EFFECT_APPLY_AURA)
return new AuraEffect(parentAura, effIndex, currentBasePoints, caster, castItem);
else if (parentAura->GetSpellProto()->Effect[effIndex] == SPELL_EFFECT_PERSISTENT_AREA_AURA)
@@ -598,6 +599,17 @@ Unit* Aura::GetCaster() const
return unit && unit->IsInWorld() ? unit : NULL;
}
+Unit* Aura::GetFormalCaster() const
+{
+ if(m_formalCasterGUID==m_target->GetGUID())
+ return m_target;
+
+ //return ObjectAccessor::GetUnit(*m_target,m_caster_guid);
+ //must return caster even if it's in another grid/map
+ Unit *unit = ObjectAccessor::GetObjectInWorld(m_formalCasterGUID, (Unit*)NULL);
+ return unit && unit->IsInWorld() ? unit : NULL;
+}
+
void Aura::Update(uint32 diff)
{
if (m_duration > 0)
@@ -647,7 +659,7 @@ void Aura::Update(uint32 diff)
if(IsChanneledSpell(m_spellProto) && m_caster_guid != m_target->GetGUID()
&& !IsAreaAura() && !IsPersistent()) // check for these is done in auraeffect
{
- Unit* caster = GetCaster();
+ Unit* caster = GetFormalCaster();
if(!caster)
{
m_target->RemoveAura(this);
@@ -691,7 +703,7 @@ void AuraEffect::Update(uint32 diff)
void AreaAuraEffect::Update(uint32 diff)
{
// update for the caster of the aura
- if(GetCasterGUID() == m_target->GetGUID())
+ if(GetFormalCasterGUID() == m_target->GetGUID())
{
Unit* caster = m_target;
@@ -761,7 +773,7 @@ void AreaAuraEffect::Update(uint32 diff)
return;
// Caster may be deleted due to update
- Unit* caster = GetCaster();
+ Unit* caster = GetParentAura()->GetFormalCaster();
// remove aura if out-of-range from caster (after teleport for example)
// or caster is isolated or caster no longer has the aura
@@ -810,7 +822,7 @@ void AreaAuraEffect::Update(uint32 diff)
void PersistentAreaAuraEffect::Update(uint32 diff)
{
- if(Unit *caster = GetCaster())
+ if(Unit *caster = GetParentAura()->GetFormalCaster())
{
if(DynamicObject *dynObj = caster->GetDynObject(GetId(), GetEffIndex()))
{
@@ -993,7 +1005,7 @@ void Aura::_AddAura()
if(*itr < 0)
m_target->ApplySpellImmune(id, IMMUNITY_ID, -(*itr), m_target);
else if(Unit* caster = GetCaster())
- m_target->AddAura(*itr, m_target);
+ caster->AddAura(*itr, m_target);
}
}
@@ -6841,7 +6853,7 @@ void AuraEffect::HandlePhase(bool apply, bool Real)
// some auras applied at aura apply
else if(itr->second->autocast)
{
- if( !m_target->HasAura(itr->second->spellId,0) )
+ if( !m_target->HasAura(itr->second->spellId) )
m_target->CastSpell(m_target,itr->second->spellId,true);
}
}
diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h
index bef0be0bdd9..a1b8f0b2736 100644
--- a/src/game/SpellAuras.h
+++ b/src/game/SpellAuras.h
@@ -50,14 +50,16 @@ class TRINITY_DLL_SPEC Aura
friend void Player::SendAurasForTarget(Unit *target);
public:
virtual ~Aura();
- Aura(SpellEntry const* spellproto, uint32 effMask, int32 *currentBasePoints, Unit *target, Unit *caster = NULL, Item* castItem = NULL);
+ Aura(SpellEntry const* spellproto, uint32 effMask, int32 *currentBasePoints, Unit *target, Unit *caster = NULL, Item* castItem = NULL, Unit * formalCaster=NULL);
SpellEntry const* GetSpellProto() const { return m_spellProto; }
uint32 GetId() const{ return m_spellProto->Id; }
uint64 GetCastItemGUID() const { return m_castItemGuid; }
uint64 const& GetCasterGUID() const { return m_caster_guid; }
+ uint64 const& GetFormalCasterGUID() const { return m_formalCasterGUID; }
Unit* GetCaster() const;
+ Unit* GetFormalCaster() const;
Unit* GetTarget() const { return m_target; }
time_t GetAuraApplyTime() const { return m_applyTime; }
@@ -134,6 +136,7 @@ class TRINITY_DLL_SPEC Aura
SpellEntry const *m_spellProto;
Unit * const m_target;
uint64 m_caster_guid;
+ uint64 m_formalCasterGUID; // used for check range
uint64 m_castItemGuid; // it is NOT safe to keep a pointer to the item because it may get deleted
time_t m_applyTime;
@@ -166,7 +169,7 @@ class TRINITY_DLL_SPEC Aura
class TRINITY_DLL_SPEC AuraEffect
{
public:
- friend AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints, Unit * caster, Item * castItem);
+ friend AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints, Unit * caster, Item * castItem, Unit * formalCaster);
friend void Aura::SetStackAmount(uint8 stackAmount);
//aura handlers
void HandleNULL(bool, bool)
@@ -330,6 +333,7 @@ class TRINITY_DLL_SPEC AuraEffect
inline Unit * GetCaster() const{ return m_parentAura->GetCaster(); }
inline uint64 GetCasterGUID() const{ return m_parentAura->GetCasterGUID(); }
+ inline uint64 GetFormalCasterGUID() const { return m_parentAura->GetFormalCasterGUID(); }
Aura * GetParentAura() const { return m_parentAura; }
SpellEntry const* GetSpellProto() const { return m_spellProto; }
@@ -388,7 +392,7 @@ class TRINITY_DLL_SPEC AuraEffect
class TRINITY_DLL_SPEC AreaAuraEffect : public AuraEffect
{
public:
- AreaAuraEffect(Aura * parentAura, uint32 effIndex, int32 * currentBasePoints, Unit * caster=NULL, Item * castItem=NULL);
+ AreaAuraEffect(Aura * parentAura, uint32 effIndex, int32 * currentBasePoints, Unit * caster=NULL, Item * castItem=NULL, Unit * formalCaster=NULL);
~AreaAuraEffect();
void Update(uint32 diff);
private:
@@ -404,5 +408,5 @@ class TRINITY_DLL_SPEC PersistentAreaAuraEffect : public AuraEffect
~PersistentAreaAuraEffect();
void Update(uint32 diff);
};
-AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints, Unit * caster, Item * castItem = NULL);
+AuraEffect* CreateAuraEffect(Aura * parentAura, uint32 effIndex, int32 *currentBasePoints, Unit * caster, Item * castItem = NULL, Unit * formalCaster=NULL);
#endif
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index d61d5731835..5effacc14a3 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -3203,7 +3203,7 @@ void Unit::_DeleteAuras()
Totem* statue = NULL;
if(Aur->GetAuraDuration() && !Aur->IsPersistent() && IsChanneledSpell(Aur->GetSpellProto()))
{
- Unit* caster = Aur->GetCaster();
+ Unit* caster = Aur->GetFormalCaster();
if(caster && caster->isAlive())
{
// stop caster chanelling state