mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7051] Implement some mage dummy triggers (fix typo)
44546 and ranks 44449 and ranks 54747 and ranks Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
40d7fecb36
commit
e573bd9ea8
8 changed files with 123 additions and 14 deletions
|
|
@ -4595,7 +4595,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
return false;
|
||||
|
||||
// mana cost save
|
||||
basepoints0 = procSpell->manaCost * triggeredByAura->GetModifier()->m_amount/100;
|
||||
int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
|
||||
basepoints0 = cost * triggeredByAura->GetModifier()->m_amount/100;
|
||||
if( basepoints0 <=0 )
|
||||
return false;
|
||||
|
||||
|
|
@ -4626,6 +4627,20 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
mod->m_amount = 25;
|
||||
return true;
|
||||
}
|
||||
// Burnout
|
||||
if (dummySpell->SpellIconID == 2998)
|
||||
{
|
||||
if(!procSpell)
|
||||
return false;
|
||||
|
||||
int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
|
||||
basepoints0 = cost * triggeredByAura->GetModifier()->m_amount/100;
|
||||
if( basepoints0 <=0 )
|
||||
return false;
|
||||
triggered_spell_id = 44450;
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
// Incanter's Regalia set (add trigger chance to Mana Shield)
|
||||
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL)
|
||||
{
|
||||
|
|
@ -4694,15 +4709,8 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
|
|||
if (procSpell == 0 || !(procEx & (PROC_EX_NORMAL_HIT|PROC_EX_CRITICAL_HIT)) || this == pVictim)
|
||||
return false;
|
||||
// Need stun or root mechanic
|
||||
if (procSpell->Mechanic != MECHANIC_ROOT && procSpell->Mechanic != MECHANIC_STUN)
|
||||
{
|
||||
int32 i;
|
||||
for (i=0; i<3; i++)
|
||||
if (procSpell->EffectMechanic[i] == MECHANIC_ROOT || procSpell->EffectMechanic[i] == MECHANIC_STUN)
|
||||
break;
|
||||
if (i == 3)
|
||||
return false;
|
||||
}
|
||||
if (!(GetAllSpellMechanicMask(procSpell) & ((1<<MECHANIC_ROOT)|(1<<MECHANIC_STUN))))
|
||||
return false;
|
||||
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
|
|
@ -6100,6 +6108,40 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
|
|||
return false;
|
||||
break;
|
||||
}
|
||||
// Brain Freeze
|
||||
case 57761:
|
||||
{
|
||||
if(!procSpell)
|
||||
return false;
|
||||
// For trigger from Blizzard need exist Improved Blizzard
|
||||
if (procSpell->SpellFamilyName==SPELLFAMILY_MAGE && procSpell->SpellFamilyFlags & 0x0000000000000080)
|
||||
{
|
||||
bool found = false;
|
||||
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
|
||||
for(AuraList::const_iterator i = mOverrideClassScript.begin(); i != mOverrideClassScript.end(); ++i)
|
||||
{
|
||||
int32 script = (*i)->GetModifier()->m_miscvalue;
|
||||
if(script==836 || script==988 || script==989)
|
||||
{
|
||||
found=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found)
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Burning Determination
|
||||
case 54748:
|
||||
{
|
||||
if(!procSpell)
|
||||
return false;
|
||||
// Need Interrupt or Silenced mechanic
|
||||
if (!(GetAllSpellMechanicMask(procSpell) & ((1<<MECHANIC_INTERRUPT)|(1<<MECHANIC_SILENCE))))
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( cooldown && GetTypeId()==TYPEID_PLAYER && ((Player*)this)->HasSpellCooldown(trigger_spell_id))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue