CORE/Spell: add diminishing returns on reflected spell. (#1050)

Fix "Spell which is reflected doesn't create DR on whom is casting the spell"
Now warrior would not add diminishing returns if he reflect spell (code may be a bit hacky)

Closes issue #650 on github
This commit is contained in:
Jinyang li
2018-11-24 05:39:30 +08:00
committed by Barbz
parent f49e651107
commit f2f3872c25
2 changed files with 26 additions and 3 deletions

View File

@@ -61,6 +61,14 @@ enum SpellCastFlags
CAST_FLAG_UNKNOWN_32 = 0x80000000,
};
//Spells casted on self should not be diminished.
enum SpellFlags
{
SPELL_FLAG_NORMAL = 0x00,
SPELL_FLAG_REFLECTED = 0x01, // reflected spell
SPELL_FLAG_REDIRECTED = 0x02 // redirected spell
};
enum SpellRangeFlag
{
SPELL_RANGE_DEFAULT = 0,
@@ -553,6 +561,9 @@ class Spell
int32 m_casttime; // Calculated spell cast time initialized only in Spell::prepare
int32 m_channeledDuration; // Calculated channeled spell duration in order to calculate correct pushback.
bool m_canReflect; // can reflect this spell?
uint8 m_spellFlags; // for spells whose target was changed in cast i.e. due to reflect
bool m_autoRepeat;
uint8 m_runesState;