*Change totem cast handling, use owner guid as m_originalCaster by default.
*Check range for formal caster instead of original one --HG-- branch : trunk
This commit is contained in:
+1
-5
@@ -909,7 +909,6 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
|
|||||||
uint32 procAttacker = m_procAttacker;
|
uint32 procAttacker = m_procAttacker;
|
||||||
uint32 procVictim = m_procVictim;
|
uint32 procVictim = m_procVictim;
|
||||||
uint32 procEx = m_triggeredByAuraSpell && !(m_spellInfo->AttributesEx2 & SPELL_ATTR_EX2_TRIGGERED_CAN_TRIGGER) ? PROC_EX_INTERNAL_TRIGGERED : PROC_EX_NONE;
|
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
|
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
|
if (missInfo==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target
|
||||||
@@ -1515,15 +1514,12 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||||||
unMaxTargets+=(*j)->GetAmount();
|
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_f,this);
|
||||||
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius_h,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_JUMP_TARGETS, EffectChainTarget, this);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if(EffectChainTarget > 1)
|
if(EffectChainTarget > 1)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -979,6 +979,11 @@ void Unit::CastSpell(Unit* Victim,SpellEntry const *spellInfo, bool triggered, I
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!originalCaster && GetTypeId()==TYPEID_UNIT && ((Creature*)this)->isTotem())
|
||||||
|
if (Unit * owner = GetOwner())
|
||||||
|
if (owner->GetTypeId()==TYPEID_PLAYER)
|
||||||
|
originalCaster=owner->GetGUID();
|
||||||
|
|
||||||
SpellCastTargets targets;
|
SpellCastTargets targets;
|
||||||
uint32 targetMask = spellInfo->Targets;
|
uint32 targetMask = spellInfo->Targets;
|
||||||
//if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2))
|
//if(targetMask & (TARGET_FLAG_UNIT|TARGET_FLAG_UNK2))
|
||||||
|
|||||||
Reference in New Issue
Block a user