diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SharedDefines.h | 2 | ||||
-rw-r--r-- | src/game/Spell.cpp | 1 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 2 | ||||
-rw-r--r-- | src/game/Unit.cpp | 17 | ||||
-rw-r--r-- | src/game/Unit.h | 2 |
5 files changed, 17 insertions, 7 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 2b139a4de67..514d927cd47 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -338,7 +338,7 @@ enum SpellCategory #define SPELL_ATTR_EX3_UNK16 0x00010000 // 16 no triggers effects that trigger on casting a spell?? #define SPELL_ATTR_EX3_UNK17 0x00020000 // 17 no triggers effects that trigger on casting a spell?? #define SPELL_ATTR_EX3_UNK18 0x00040000 // 18 -#define SPELL_ATTR_EX3_UNK19 0x00080000 // 19 +#define SPELL_ATTR_EX3_UNK19 0x00080000 // 19 spells triggered by spell with this flag can't proc caster auras and can proc from triggered (swings too - 20178) #define SPELL_ATTR_EX3_DEATH_PERSISTENT 0x00100000 // 20 Death persistent spells #define SPELL_ATTR_EX3_UNK21 0x00200000 // 21 #define SPELL_ATTR_EX3_REQ_WAND 0x00400000 // 22 Req wand diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index c5f0d901840..68b416cad63 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -2302,6 +2302,7 @@ void Spell::prepare(SpellCastTargets const* targets, AuraEffect* triggeredByAura // calculate cast time (calculated after first CheckCast check to prevent charge counting for first CheckCast fail) m_casttime = GetSpellCastTime(m_spellInfo, this); + m_caster->ModSpellCastTime(m_spellInfo, m_casttime, this); // set timer base at cast time ReSetTimer(); diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 0ba19211c65..b8d742c7f35 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -750,7 +750,7 @@ void AreaAuraEffect::Update(uint32 diff) // recalculate basepoints for lower rank (all AreaAura spell not use custom basepoints?) //if(actualSpellInfo != GetSpellProto()) // actualBasePoints = actualSpellInfo->EffectBasePoints[m_effIndex]; - Aura * aur = (*tIter)->AddAuraEffect(actualSpellInfo->Id, GetEffIndex(), caster); + Aura * aur = (*tIter)->AddAuraEffect(actualSpellInfo->Id, GetEffIndex(), caster, &m_currentBasePoints); if(m_areaAuraType == AREA_AURA_ENEMY) caster->CombatStart(*tIter); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 0062283b0df..28713ae59d9 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -5212,7 +5212,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, AuraEffect* trigger // only on dispel/remove aura by destroy target = NULL; triggered_spell_id = 55080; - CastSpell(target, triggered_spell_id, true); + CastSpell(target, triggered_spell_id, true, 0, triggeredByAura); return true; } // Hot Streak @@ -13581,7 +13581,7 @@ void Unit::AddAura(uint32 spellId, Unit* target) target->AddAura(Aur); } -Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster) +Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 * basePoints) { SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId); if(!spellInfo || !caster) @@ -13594,7 +13594,7 @@ Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster) if (aur) { - AuraEffect *aurEffect = CreateAuraEffect(aur, effIndex, NULL, caster); + AuraEffect *aurEffect = CreateAuraEffect(aur, effIndex, basePoints, caster); if (!aurEffect) return aur; if (!aur->SetPartAura(aurEffect, effIndex)) @@ -13602,7 +13602,16 @@ Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster) } else { - aur = new Aura(spellInfo, 1<<effIndex, NULL, this ,caster); + if (basePoints) + { + int32 amount [3]; + amount[effIndex] = *basePoints; + aur = new Aura(spellInfo, 1<<effIndex, &amount[0], this ,caster); + } + else + { + aur = new Aura(spellInfo, 1<<effIndex, NULL, this ,caster); + } AddAura(aur); } return aur; diff --git a/src/game/Unit.h b/src/game/Unit.h index 6e6c42706b7..ea3845a2b80 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1186,7 +1186,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject void CastSpell(GameObject *go, uint32 spellId, bool triggered, Item *castItem = NULL, AuraEffect* triggeredByAura = NULL, uint64 originalCaster = 0); void AddAura(uint32 spellId, Unit *target); void HandleAuraEffect(AuraEffect * aureff, bool apply); - Aura *AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster); + Aura *AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 * basePoints=NULL); bool IsDamageToThreatSpell(SpellEntry const * spellInfo) const; |