aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorlinencloth <none@none>2010-11-13 18:04:56 +0100
committerlinencloth <none@none>2010-11-13 18:04:56 +0100
commit880ef0c398a043b60d18e750c420dd8209272cb3 (patch)
tree0a1296ba298b52630df38576a74132b6cceb56d1 /src/server/game/Spells/Spell.cpp
parentbf888285aab32ae2571002f23dd217396b2f12d8 (diff)
Core/Spells: Fix spelleffect sanctuary
- No longer removes every attacker, but updates the visibility - Using that effect won't remove attackers that can still see through the stealth of the caster based on distance - Ignores spells that were casted before or at the same time of that effect - Trigger other needed spells when casting Shadowmeld --HG-- branch : trunk
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rwxr-xr-xsrc/server/game/Spells/Spell.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index f912a6f20b5..9ce3d89a99d 100755
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1138,6 +1138,9 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
if (unit->isAlive() != target->alive)
return;
+ if (getState() == SPELL_STATE_DELAYED && !IsPositiveSpell(m_spellInfo->Id) && (getMSTime() - target->timeDelay) <= unit->m_lastSanctuaryTime)
+ return; // No missinfo in that case
+
// Get original caster (if exist) and calculate damage/healing from him data
Unit *caster = m_originalCaster ? m_originalCaster : m_caster;
@@ -3414,7 +3417,10 @@ uint64 Spell::handle_delayed(uint64 t_offset)
if (ihit->processed == false)
{
if (single_missile || ihit->timeDelay <= t_offset)
+ {
+ ihit->timeDelay = t_offset;
DoAllEffectOnTarget(&(*ihit));
+ }
else if (next_time == 0 || ihit->timeDelay < next_time)
next_time = ihit->timeDelay;
}