diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 27 | ||||
-rw-r--r-- | src/game/Spell.h | 3 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 7 | ||||
-rw-r--r-- | src/game/Unit.h | 1 |
4 files changed, 15 insertions, 23 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 01a41f7f51c..782a4722579 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -923,20 +923,11 @@ 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); } + // Do not take combo points on dodge if (m_needComboPoints && m_targets.getUnitTargetGUID() == target->targetGUID) if( missInfo != SPELL_MISS_NONE && missInfo != SPELL_MISS_MISS) m_needComboPoints = false; - /*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); - }*/ // All calculated do it! // Do healing and triggers @@ -1220,15 +1211,6 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) else unit->CastSpell(unit, *i, true, 0, 0, m_caster->GetGUID()); } - - //This is not needed with procflag patch - /*if(m_originalCaster) - { - if(m_customAttr & SPELL_ATTR_CU_EFFECT_HEAL) - m_originalCaster->ProcDamageAndSpell(unit, PROC_FLAG_HEAL, PROC_FLAG_NONE, 0, GetSpellSchoolMask(m_spellInfo), m_spellInfo); - if(m_originalCaster != unit && (m_customAttr & SPELL_ATTR_CU_EFFECT_DAMAGE)) - m_originalCaster->ProcDamageAndSpell(unit, PROC_FLAG_HIT_SPELL, PROC_FLAG_STRUCK_SPELL, 0, GetSpellSchoolMask(m_spellInfo), m_spellInfo); - }*/ } void Spell::DoAllEffectOnTarget(GOTargetInfo *target) @@ -1515,8 +1497,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap) float radius_h, radius_f; if (m_spellInfo->EffectRadiusIndex[i]) { - radius_h = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); - radius_f = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); + radius_h = GetSpellRadiusForHostile(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])) * m_spellValue->RadiusMod; + radius_f = GetSpellRadiusForFriend(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])) * m_spellValue->RadiusMod; } else { @@ -5791,6 +5773,9 @@ void Spell::SetSpellValue(SpellValueMod mod, int32 value) m_spellValue->EffectBasePoints[2] = value - int32(m_spellInfo->EffectBaseDice[2]); m_currentBasePoints[2] = m_spellValue->EffectBasePoints[2]; break; + case SPELLVALUE_RADIUS_MOD: + m_spellValue->RadiusMod = (float)value / 10000; + break; case SPELLVALUE_MAX_TARGETS: m_spellValue->MaxAffectedTargets = (uint32)value; break; diff --git a/src/game/Spell.h b/src/game/Spell.h index b6853ce74cf..bdcea410b10 100644 --- a/src/game/Spell.h +++ b/src/game/Spell.h @@ -213,9 +213,11 @@ struct SpellValue for(uint32 i = 0; i < 3; ++i) EffectBasePoints[i] = proto->EffectBasePoints[i]; MaxAffectedTargets = proto->MaxAffectedTargets; + RadiusMod = 1.0f; } int32 EffectBasePoints[3]; uint32 MaxAffectedTargets; + float RadiusMod; }; enum SpellState @@ -473,6 +475,7 @@ class Spell void CleanupTargetList(); void SetSpellValue(SpellValueMod mod, int32 value); + //void SetSpellValue(SpellValueMod mod, float value); protected: void SendLoot(uint64 guid, LootType loottype); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 30cbdc13ac8..430010af77d 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2199,10 +2199,13 @@ void AuraEffect::TriggerSpell() } // Negative Energy Periodic case 46284: - { caster->CastCustomSpell(trigger_spell_id, SPELLVALUE_MAX_TARGETS, m_tickNumber / 10 + 1, NULL, true, NULL, this); return; - } + // Poison (Grobbulus) + case 28158: + case 54362: + m_target->CastCustomSpell(trigger_spell_id, SPELLVALUE_RADIUS_MOD, (int32)((((float)m_tickNumber / 60) * 0.9f + 0.1f) * 10000), NULL, true, NULL, this); + return; } } diff --git a/src/game/Unit.h b/src/game/Unit.h index cbfa701a398..055eb9f3a38 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -128,6 +128,7 @@ enum SpellValueMod SPELLVALUE_BASE_POINT0, SPELLVALUE_BASE_POINT1, SPELLVALUE_BASE_POINT2, + SPELLVALUE_RADIUS_MOD, SPELLVALUE_MAX_TARGETS, }; |