mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[6965] Implement aura SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE.
This must let work triggering part of: DK talents 49182, 49027, 49149, 49223, 50880, 55610 and ranks Warrior glyph item 43418 And some boss spells. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
dd65b8b840
commit
27175a9ad8
4 changed files with 15 additions and 3 deletions
|
|
@ -273,7 +273,7 @@ enum AuraType
|
||||||
SPELL_AURA_DETECT_STEALTH = 228,
|
SPELL_AURA_DETECT_STEALTH = 228,
|
||||||
SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE = 229,
|
SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE = 229,
|
||||||
SPELL_AURA_230 = 230,
|
SPELL_AURA_230 = 230,
|
||||||
SPELL_AURA_231 = 231,
|
SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE = 231,
|
||||||
SPELL_AURA_MECHANIC_DURATION_MOD = 232,
|
SPELL_AURA_MECHANIC_DURATION_MOD = 232,
|
||||||
SPELL_AURA_233 = 233,
|
SPELL_AURA_233 = 233,
|
||||||
SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK = 234,
|
SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK = 234,
|
||||||
|
|
|
||||||
|
|
@ -281,7 +281,7 @@ pAuraHandler AuraHandler[TOTAL_AURAS]=
|
||||||
&Aura::HandleNoImmediateEffect, //228 stealth detection
|
&Aura::HandleNoImmediateEffect, //228 stealth detection
|
||||||
&Aura::HandleNULL, //229 SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE
|
&Aura::HandleNULL, //229 SPELL_AURA_MOD_AOE_DAMAGE_AVOIDANCE
|
||||||
&Aura::HandleAuraModIncreaseMaxHealth, //230 Commanding Shout
|
&Aura::HandleAuraModIncreaseMaxHealth, //230 Commanding Shout
|
||||||
&Aura::HandleNULL, //231
|
&Aura::HandleNoImmediateEffect, //231 SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE
|
||||||
&Aura::HandleNoImmediateEffect, //232 SPELL_AURA_MECHANIC_DURATION_MOD implement in Unit::CalculateSpellDuration
|
&Aura::HandleNoImmediateEffect, //232 SPELL_AURA_MECHANIC_DURATION_MOD implement in Unit::CalculateSpellDuration
|
||||||
&Aura::HandleNULL, //233 set model id to the one of the creature with id m_modifier.m_miscvalue
|
&Aura::HandleNULL, //233 set model id to the one of the creature with id m_modifier.m_miscvalue
|
||||||
&Aura::HandleNoImmediateEffect, //234 SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK implement in Unit::CalculateSpellDuration
|
&Aura::HandleNoImmediateEffect, //234 SPELL_AURA_MECHANIC_DURATION_MOD_NOT_STACK implement in Unit::CalculateSpellDuration
|
||||||
|
|
|
||||||
|
|
@ -5382,6 +5382,9 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
||||||
Unit* target = NULL;
|
Unit* target = NULL;
|
||||||
int32 basepoints0 = 0;
|
int32 basepoints0 = 0;
|
||||||
|
|
||||||
|
if(triggeredByAura->GetModifier()->m_auraname == SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE)
|
||||||
|
basepoints0 = triggerAmount;
|
||||||
|
|
||||||
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
Item* castItem = triggeredByAura->GetCastItemGUID() && GetTypeId()==TYPEID_PLAYER
|
||||||
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGUID()) : NULL;
|
||||||
|
|
||||||
|
|
@ -9602,6 +9605,7 @@ bool InitTriggerAuraData()
|
||||||
isTriggerAura[SPELL_AURA_MOD_HASTE] = true;
|
isTriggerAura[SPELL_AURA_MOD_HASTE] = true;
|
||||||
isTriggerAura[SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE]=true;
|
isTriggerAura[SPELL_AURA_MOD_ATTACKER_MELEE_HIT_CHANCE]=true;
|
||||||
isTriggerAura[SPELL_AURA_PRAYER_OF_MENDING] = true;
|
isTriggerAura[SPELL_AURA_PRAYER_OF_MENDING] = true;
|
||||||
|
isTriggerAura[SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE] = true;
|
||||||
|
|
||||||
isNonTriggerAura[SPELL_AURA_MOD_POWER_REGEN]=true;
|
isNonTriggerAura[SPELL_AURA_MOD_POWER_REGEN]=true;
|
||||||
isNonTriggerAura[SPELL_AURA_RESIST_PUSHBACK]=true;
|
isNonTriggerAura[SPELL_AURA_RESIST_PUSHBACK]=true;
|
||||||
|
|
@ -9836,6 +9840,14 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
|
||||||
HandleMeandingAuraProc(triggeredByAura);
|
HandleMeandingAuraProc(triggeredByAura);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
|
||||||
|
{
|
||||||
|
sLog.outDebug("ProcDamageAndSpell: casting spell %u (triggered with value by %s aura of spell %u)", spellInfo->Id,(isVictim?"a victim's":"an attacker's"), triggeredByAura->GetId());
|
||||||
|
|
||||||
|
if (!HandleProcTriggerSpell(pTarget, damage, triggeredByAura, procSpell, procFlag, procExtra, cooldown))
|
||||||
|
continue;
|
||||||
|
break;
|
||||||
|
}
|
||||||
case SPELL_AURA_MOD_STUN:
|
case SPELL_AURA_MOD_STUN:
|
||||||
// Remove by default, but if charge exist drop it
|
// Remove by default, but if charge exist drop it
|
||||||
if (triggeredByAura->m_procCharges == 0)
|
if (triggeredByAura->m_procCharges == 0)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6964"
|
#define REVISION_NR "6965"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue