Skip to content

Commit

Permalink
[11141] Add use of SpellMod for melee spells as needed, for exaplme, …
Browse files Browse the repository at this point in the history
…for some talents

Signed-off-by: Ambal <pogrebniak@gala.net>
  • Loading branch information
Schmoozerd authored and Ambal committed Feb 12, 2011
1 parent 51af2f5 commit 03511d6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/game/Spell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5742,8 +5742,13 @@ SpellCastResult Spell::CheckRange(bool strict)
if (target == m_caster)
return SPELL_CAST_OK;

float range_mod = strict ? 0.0f : 5.0f;
float base = ATTACK_DISTANCE;
if (Player* modOwner = m_caster->GetSpellModOwner())
range_mod += modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RANGE, base, this);

// with additional 5 dist for non stricted case (some melee spells have delay in apply
return m_caster->CanReachWithMeleeAttack(target, strict ? 0.0f : 5.0f) ? SPELL_CAST_OK : SPELL_FAILED_OUT_OF_RANGE;
return m_caster->CanReachWithMeleeAttack(target, range_mod) ? SPELL_CAST_OK : SPELL_FAILED_OUT_OF_RANGE;
}
break; // let continue in generic way for no target
}
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11140"
#define REVISION_NR "11141"
#endif // __REVISION_NR_H__

1 comment on commit 03511d6

@Aspro345
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://wowdata.ru/spell.html?id=1842 можно обезвреживать только в близи...
http://wowdata.ru/spell.html?id=6770 аналогично, даже с талантом http://wowdata.ru/spell.html?id=14094
раньше не было такого, попрошу проверить :)

Please sign in to comment.