mirror of
https://github.com/mangosfour/server.git
synced 2025-12-21 19:37:02 +00:00
Merge remote branch 'origin/master' into 330
This commit is contained in:
commit
d69abfcae1
15 changed files with 98 additions and 167 deletions
|
|
@ -1405,30 +1405,14 @@ void Aura::HandleAddModifier(bool apply, bool Real)
|
|||
break;
|
||||
}
|
||||
|
||||
SpellModifier *mod = new SpellModifier;
|
||||
mod->op = SpellModOp(m_modifier.m_miscvalue);
|
||||
mod->value = m_modifier.m_amount;
|
||||
mod->type = SpellModType(m_modifier.m_auraname); // SpellModType value == spell aura types
|
||||
mod->spellId = GetId();
|
||||
|
||||
uint32 const *ptr;
|
||||
switch (m_effIndex)
|
||||
{
|
||||
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
|
||||
case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break;
|
||||
case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
|
||||
mod->mask2= (uint64)ptr[2];
|
||||
|
||||
// prevent expire spell mods with (charges > 0 && m_stackAmount > 1)
|
||||
// all this spell expected expire not at use but at spell proc event check
|
||||
mod->charges = m_spellProto->StackAmount > 1 ? 0 : m_procCharges;
|
||||
|
||||
m_spellmod = mod;
|
||||
m_spellmod = new SpellModifier(
|
||||
SpellModOp(m_modifier.m_miscvalue),
|
||||
SpellModType(m_modifier.m_auraname), // SpellModType value == spell aura types
|
||||
m_modifier.m_amount,
|
||||
this,
|
||||
// prevent expire spell mods with (charges > 0 && m_stackAmount > 1)
|
||||
// all this spell expected expire not at use but at spell proc event check
|
||||
m_spellProto->StackAmount > 1 ? 0 : m_procCharges);
|
||||
}
|
||||
|
||||
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
|
||||
|
|
@ -1464,18 +1448,10 @@ void Aura::HandleAddTargetTrigger(bool apply, bool /*Real*/)
|
|||
SpellModifier *mod = new SpellModifier;
|
||||
mod->spellId = GetId();
|
||||
|
||||
uint32 const *ptr;
|
||||
switch (m_effIndex)
|
||||
{
|
||||
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
|
||||
case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break;
|
||||
case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
uint32 const *ptr = m_spellProto->GetEffectSpellClassMask(m_effIndex);
|
||||
|
||||
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
|
||||
mod->mask2= (uint64)ptr[2];
|
||||
mod->mask2= ptr[2];
|
||||
m_spellmod = mod;
|
||||
}
|
||||
else
|
||||
|
|
@ -2621,14 +2597,8 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
if(apply)
|
||||
{
|
||||
// Reduce backfire damage (dot damage) from Shadow Word: Death
|
||||
SpellModifier *mod = new SpellModifier;
|
||||
mod->op = SPELLMOD_DOT;
|
||||
mod->value = m_modifier.m_amount;
|
||||
mod->type = SPELLMOD_PCT;
|
||||
mod->spellId = GetId();
|
||||
mod->mask = UI64LIT(0x0000200000000000);
|
||||
mod->mask2= UI64LIT(0x0);
|
||||
m_spellmod = mod;
|
||||
// aura have wrong effectclassmask, so use hardcoded value
|
||||
m_spellmod = new SpellModifier(SPELLMOD_DOT,SPELLMOD_PCT,m_modifier.m_amount,GetId(),UI64LIT(0x0000200000000000));
|
||||
}
|
||||
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
|
||||
return;
|
||||
|
|
@ -2646,17 +2616,8 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
return;
|
||||
|
||||
if(apply)
|
||||
{
|
||||
SpellModifier *mod = new SpellModifier;
|
||||
mod->op = SPELLMOD_DOT;
|
||||
mod->value = m_modifier.m_amount/7;
|
||||
mod->type = SPELLMOD_FLAT;
|
||||
mod->spellId = GetId();
|
||||
mod->mask = UI64LIT(0x001000000000);
|
||||
mod->mask2= UI64LIT(0x0);
|
||||
|
||||
m_spellmod = mod;
|
||||
}
|
||||
// dummy not have proper effectclassmask
|
||||
m_spellmod = new SpellModifier(SPELLMOD_DOT,SPELLMOD_FLAT,m_modifier.m_amount/7,GetId(),UI64LIT(0x001000000000));
|
||||
|
||||
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
|
||||
return;
|
||||
|
|
@ -2780,39 +2741,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
|
|||
}
|
||||
break;
|
||||
case SPELLFAMILY_SHAMAN:
|
||||
{
|
||||
// Improved Weapon Totems
|
||||
if( GetSpellProto()->SpellIconID == 57 && m_target->GetTypeId()==TYPEID_PLAYER )
|
||||
{
|
||||
if(apply)
|
||||
{
|
||||
SpellModifier *mod = new SpellModifier;
|
||||
mod->op = SPELLMOD_EFFECT1;
|
||||
mod->value = m_modifier.m_amount;
|
||||
mod->type = SPELLMOD_PCT;
|
||||
mod->spellId = GetId();
|
||||
switch (m_effIndex)
|
||||
{
|
||||
case 0:
|
||||
// Windfury Totem
|
||||
mod->mask = UI64LIT(0x00200000000);
|
||||
mod->mask2= UI64LIT(0x0);
|
||||
break;
|
||||
case 1:
|
||||
// Flametongue Totem
|
||||
mod->mask = UI64LIT(0x00400000000);
|
||||
mod->mask2= UI64LIT(0x0);
|
||||
break;
|
||||
}
|
||||
|
||||
m_spellmod = mod;
|
||||
}
|
||||
|
||||
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// pet auras
|
||||
|
|
@ -3089,27 +3018,30 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
|
|||
case FORM_DIREBEAR:
|
||||
{
|
||||
// get furor proc chance
|
||||
uint32 FurorChance = 0;
|
||||
int32 furorChance = 0;
|
||||
Unit::AuraList const& mDummy = m_target->GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraList::const_iterator i = mDummy.begin(); i != mDummy.end(); ++i)
|
||||
{
|
||||
if ((*i)->GetSpellProto()->SpellIconID == 238)
|
||||
{
|
||||
FurorChance = (*i)->GetModifier()->m_amount;
|
||||
furorChance = (*i)->GetModifier()->m_amount;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(!furorChance)
|
||||
break;
|
||||
|
||||
if (m_modifier.m_miscvalue == FORM_CAT)
|
||||
{
|
||||
m_target->SetPower(POWER_ENERGY, 0);
|
||||
if(urand(1,100) <= FurorChance)
|
||||
m_target->CastSpell(m_target, 17099, true, NULL, this);
|
||||
// Furor chance is now amount of energy for cat form
|
||||
m_target->CastCustomSpell(m_target, 17099, &furorChance, NULL, NULL, this);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_target->SetPower(POWER_RAGE, 0);
|
||||
if(urand(1,100) <= FurorChance)
|
||||
if(urand(1,100) <= furorChance)
|
||||
m_target->CastSpell(m_target, 17057, true, NULL, this);
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue