mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11267] Restore itemset 647 4p bonus affect work.
This commit is contained in:
parent
52c6d0ef24
commit
b442332403
3 changed files with 60 additions and 12 deletions
|
|
@ -1853,6 +1853,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
|
||||||
SpellAuraProcResult HandleAddPctModifierAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
SpellAuraProcResult HandleAddPctModifierAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||||
SpellAuraProcResult HandleModDamagePercentDoneAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
SpellAuraProcResult HandleModDamagePercentDoneAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||||
SpellAuraProcResult HandleModRating(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
SpellAuraProcResult HandleModRating(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||||
|
SpellAuraProcResult HandleManaShieldAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
|
||||||
SpellAuraProcResult HandleNULLProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
|
SpellAuraProcResult HandleNULLProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
|
||||||
{
|
{
|
||||||
// no proc handler for this aura type
|
// no proc handler for this aura type
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ pAuraProcHandler AuraProcHandler[TOTAL_AURAS]=
|
||||||
&Unit::HandleNULLProc, // 94 SPELL_AURA_INTERRUPT_REGEN
|
&Unit::HandleNULLProc, // 94 SPELL_AURA_INTERRUPT_REGEN
|
||||||
&Unit::HandleNULLProc, // 95 SPELL_AURA_GHOST
|
&Unit::HandleNULLProc, // 95 SPELL_AURA_GHOST
|
||||||
&Unit::HandleNULLProc, // 96 SPELL_AURA_SPELL_MAGNET
|
&Unit::HandleNULLProc, // 96 SPELL_AURA_SPELL_MAGNET
|
||||||
&Unit::HandleNULLProc, // 97 SPELL_AURA_MANA_SHIELD
|
&Unit::HandleManaShieldAuraProc, // 97 SPELL_AURA_MANA_SHIELD
|
||||||
&Unit::HandleNULLProc, // 98 SPELL_AURA_MOD_SKILL_TALENT
|
&Unit::HandleNULLProc, // 98 SPELL_AURA_MOD_SKILL_TALENT
|
||||||
&Unit::HandleNULLProc, // 99 SPELL_AURA_MOD_ATTACK_POWER
|
&Unit::HandleNULLProc, // 99 SPELL_AURA_MOD_ATTACK_POWER
|
||||||
&Unit::HandleNULLProc, //100 SPELL_AURA_AURAS_VISIBLE obsolete 3.x? all player can see all auras now, but still have 2 spells including GM-spell (1852,2855)
|
&Unit::HandleNULLProc, //100 SPELL_AURA_AURAS_VISIBLE obsolete 3.x? all player can see all auras now, but still have 2 spells including GM-spell (1852,2855)
|
||||||
|
|
@ -1086,16 +1086,6 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
|
||||||
target = this;
|
target = this;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
// Incanter's Regalia set (add trigger chance to Mana Shield)
|
|
||||||
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000008000))
|
|
||||||
{
|
|
||||||
if (GetTypeId() != TYPEID_PLAYER)
|
|
||||||
return SPELL_AURA_PROC_FAILED;
|
|
||||||
|
|
||||||
target = this;
|
|
||||||
triggered_spell_id = 37436;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch(dummySpell->Id)
|
switch(dummySpell->Id)
|
||||||
{
|
{
|
||||||
// Ignite
|
// Ignite
|
||||||
|
|
@ -3888,3 +3878,60 @@ SpellAuraProcResult Unit::HandleModRating(Unit* /*pVictim*/, uint32 /*damage*/,
|
||||||
|
|
||||||
return SPELL_AURA_PROC_OK;
|
return SPELL_AURA_PROC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpellAuraProcResult Unit::HandleManaShieldAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const * procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
|
||||||
|
{
|
||||||
|
SpellEntry const *dummySpell = triggeredByAura->GetSpellProto ();
|
||||||
|
|
||||||
|
Item* castItem = !triggeredByAura->GetCastItemGuid().IsEmpty() && GetTypeId()==TYPEID_PLAYER
|
||||||
|
? ((Player*)this)->GetItemByGuid(triggeredByAura->GetCastItemGuid()) : NULL;
|
||||||
|
|
||||||
|
uint32 triggered_spell_id = 0;
|
||||||
|
Unit* target = pVictim;
|
||||||
|
|
||||||
|
switch(dummySpell->SpellFamilyName)
|
||||||
|
{
|
||||||
|
case SPELLFAMILY_MAGE:
|
||||||
|
{
|
||||||
|
// Incanter's Regalia set (add trigger chance to Mana Shield)
|
||||||
|
if (dummySpell->SpellFamilyFlags & UI64LIT(0x0000000000008000))
|
||||||
|
{
|
||||||
|
if (GetTypeId() != TYPEID_PLAYER)
|
||||||
|
return SPELL_AURA_PROC_FAILED;
|
||||||
|
|
||||||
|
target = this;
|
||||||
|
triggered_spell_id = 37436;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// processed charge only counting case
|
||||||
|
if (!triggered_spell_id)
|
||||||
|
return SPELL_AURA_PROC_OK;
|
||||||
|
|
||||||
|
SpellEntry const* triggerEntry = sSpellStore.LookupEntry(triggered_spell_id);
|
||||||
|
|
||||||
|
if (!triggerEntry)
|
||||||
|
{
|
||||||
|
sLog.outError("Unit::HandleManaShieldAuraProc: Spell %u have nonexistent triggered spell %u",dummySpell->Id,triggered_spell_id);
|
||||||
|
return SPELL_AURA_PROC_FAILED;
|
||||||
|
}
|
||||||
|
|
||||||
|
// default case
|
||||||
|
if (!target || (target != this && !target->isAlive()))
|
||||||
|
return SPELL_AURA_PROC_FAILED;
|
||||||
|
|
||||||
|
if (cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(triggered_spell_id))
|
||||||
|
return SPELL_AURA_PROC_FAILED;
|
||||||
|
|
||||||
|
CastSpell(target, triggered_spell_id, true, castItem, triggeredByAura);
|
||||||
|
|
||||||
|
if (cooldown && GetTypeId()==TYPEID_PLAYER)
|
||||||
|
((Player*)this)->AddSpellCooldown(triggered_spell_id,0,time(NULL) + cooldown);
|
||||||
|
|
||||||
|
return SPELL_AURA_PROC_OK;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11266"
|
#define REVISION_NR "11267"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue