aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Player.cpp2
-rw-r--r--src/game/Spell.cpp18
-rw-r--r--src/game/Totem.cpp8
3 files changed, 16 insertions, 12 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 2736534ba07..1f17a75819d 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -14292,7 +14292,7 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
damage = aura->GetModifier()->m_amount;
aura->SetLoadedState(caster_guid,damage,maxduration,remaintime,remaincharges);
AddAura(aura);
- sLog.outString("Added aura spellid %u, effect %u", spellproto->Id, effindex);
+ sLog.outDetail("Added aura spellid %u, effect %u", spellproto->Id, effindex);
}
}
while( result->NextRow() );
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index 858ba23c49f..5cdbef26eed 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -712,17 +712,11 @@ void Spell::AddUnitTarget(Unit* pVictim, uint32 effIndex)
target.processed = false; // Effects not apply on target
// Calculate hit result
- if(m_spellInfo->Effect[effIndex] == SPELL_EFFECT_DUMMY)
- target.missCondition = SPELL_MISS_NONE;
- else if(m_originalCaster)
+ if(m_originalCaster)
target.missCondition = m_originalCaster->SpellHitResult(pVictim, m_spellInfo, m_canReflect);
else
target.missCondition = SPELL_MISS_EVADE; //SPELL_MISS_NONE;
- if(target.missCondition == SPELL_MISS_IMMUNE // Mass Dispel
- && m_spellInfo->Effect[effIndex] == SPELL_EFFECT_TRIGGER_SPELL)
- target.missCondition = SPELL_MISS_NONE;
-
if (target.missCondition == SPELL_MISS_NONE)
++m_countOfHit;
else
@@ -947,6 +941,16 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
if (target->reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him
DoSpellHitOnUnit(m_caster, mask);
}
+ else //TODO: This is a hack. need fix
+ {
+ uint32 tempMask = 0;
+ for(uint32 i = 0; i < 3; ++i)
+ if(m_spellInfo->Effect[i] == SPELL_EFFECT_DUMMY
+ || m_spellInfo->Effect[i] == SPELL_EFFECT_TRIGGER_SPELL)
+ tempMask |= 1<<i;
+ if(tempMask &= mask)
+ DoSpellHitOnUnit(unit, tempMask);
+ }
// Do triggers only on miss/resist/parry/dodge
if (missInfo!=SPELL_MISS_NONE)
diff --git a/src/game/Totem.cpp b/src/game/Totem.cpp
index 7fddd9fc127..26c471d441a 100644
--- a/src/game/Totem.cpp
+++ b/src/game/Totem.cpp
@@ -179,9 +179,9 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
m_type = TOTEM_STATUE; //Jewelery statue
}
-/*bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
+bool Totem::IsImmunedToSpell(SpellEntry const* spellInfo, bool useCharges)
{
- for (int i=0;i<3;i++)
+/* for (int i=0;i<3;i++)
{
switch(spellInfo->EffectApplyAuraName[i])
{
@@ -191,6 +191,6 @@ void Totem::SetTypeBySummonSpell(SpellEntry const * spellProto)
default:
continue;
}
- }
+ }*/
return Creature::IsImmunedToSpell(spellInfo, useCharges);
-}*/
+}