aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/Spell.cpp12
-rw-r--r--src/game/Unit.cpp5
2 files changed, 9 insertions, 8 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 70d152b9e5b..723dca962bd 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -909,7 +909,6 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
uint32 procAttacker = m_procAttacker;
uint32 procVictim = m_procVictim;
uint32 procEx = m_triggeredByAuraSpell && !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER) ? PROC_EX_INTERNAL_TRIGGERED : PROC_EX_NONE;
- sLog.outError("%d, %d, %d",m_procAttacker, m_procVictim, procEx);
m_spellAura = NULL; // Set aura to null for every target-make sure that pointer is not used for unit without aura applied
if (missInfo==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
@@ -1515,14 +1514,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
unMaxTargets+=(*j)->GetAmount();
}
- if(m_originalCaster)
+ if(Player* modOwner = m_caster->GetSpellModOwner())
{
- if(Player* modOwner = m_originalCaster->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);
- }
+ 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/Unit.cpp b/src/game/Unit.cpp
index efdff7d7540..d61d5731835 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -979,6 +979,11 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
return;
}
+ if (!originalCaster && GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem())
+ if (Unit * owner = GetOwner())
+ if (owner->GetTypeId()==TYPEID_PLAYER)
+ originalCaster=owner->GetGUID();
+
SpellCastTargets targets;
uint32 targetMask = spellInfo->Targets;
//if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2))