diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/GameObject.cpp | 7 | ||||
-rw-r--r-- | src/game/Spell.cpp | 5 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 540ea1e0dd7..a6292a9964b 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -302,7 +302,12 @@ void GameObject::Update(uint32 /*p_time*/) bool IsBattleGroundTrap = false; //FIXME: this is activation radius (in different casting radius that must be selected from spell data) //TODO: move activated state code (cast itself) to GO_ACTIVATED, in this place only check activating and set state - float radius = goInfo->trap.radius; + float radius = 0.0f; + const SpellEntry *spellEntry = sSpellStore.LookupEntry(m_spellId); + if(spellEntry) + radius = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(spellEntry->EffectRadiusIndex[0])); + else + radius = goInfo->trap.radius; if(!radius) { if(goInfo->trap.cooldown != 3) // cast in other case (at some triggering/linked go/etc explicit call) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 2c778616d78..43c33700bce 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -980,7 +980,8 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) m_spellAura = NULL; // Set aura to null for every target-make sure that pointer is not used for unit without aura applied //Spells with this flag cannot trigger if effect is casted on self - bool canEffectTrigger = (m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST ? m_caster != unitTarget : true); + // Slice and Dice, relentless strikes, eviscerate + bool canEffectTrigger = (m_spellInfo->AttributesEx4 & (SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST | SPELL_ATTR_EX4_UNK4) ? m_caster!=unitTarget : true) Unit * spellHitTarget = NULL; if (missInfo==SPELL_MISS_NONE) // In case spell hit target, do all effect on that target @@ -1258,7 +1259,7 @@ void Spell::DoTriggersOnSpellHit(Unit *unit) } // spells with this flag can trigger only if not selfcast (eviscerate for example) - if (m_ChanceTriggerSpells.size() && (!(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST) || unit!=m_caster)) + if (m_ChanceTriggerSpells.size() && (!(m_spellInfo->AttributesEx4 & SPELL_ATTR_EX4_CANT_PROC_FROM_SELFCAST | SPELL_ATTR_EX4_UNK4) || unit!=m_caster)) { int _duration=0; for(ChanceTriggerSpells::const_iterator i = m_ChanceTriggerSpells.begin(); i != m_ChanceTriggerSpells.end(); ++i) |