Core/Auras: Implemented SPELL_AURA_ADD_PCT_MODIFIER_BY_SPELL_LABEL and SPELL_AURA_ADD_FLAT_MODIFIER_BY_SPELL_LABEL
Port From (https://github.com/TrinityCore/TrinityCore/commit/ba4fa060d765a35507f1a73287504c3f2e440fdb)
This commit is contained in:
@@ -259,14 +259,43 @@ namespace Game.Spells
|
||||
case AuraType.AddPctModifier:
|
||||
if (m_spellmod == null)
|
||||
{
|
||||
m_spellmod = new SpellModifier(GetBase());
|
||||
m_spellmod.op = (SpellModOp)GetMiscValue();
|
||||
SpellModifierByClassMask spellmod = new SpellModifierByClassMask(GetBase());
|
||||
spellmod.op = (SpellModOp)GetMiscValue();
|
||||
|
||||
m_spellmod.type = GetAuraType() == AuraType.AddPctModifier ? SpellModType.Pct : SpellModType.Flat;
|
||||
m_spellmod.spellId = GetId();
|
||||
m_spellmod.mask = GetSpellEffectInfo().SpellClassMask;
|
||||
spellmod.type = GetAuraType() == AuraType.AddPctModifier ? SpellModType.Pct : SpellModType.Flat;
|
||||
spellmod.spellId = GetId();
|
||||
spellmod.mask = GetSpellEffectInfo().SpellClassMask;
|
||||
m_spellmod = spellmod;
|
||||
}
|
||||
m_spellmod.value = GetAmount();
|
||||
(m_spellmod as SpellModifierByClassMask).value = GetAmount();
|
||||
break;
|
||||
case AuraType.AddFlatModifierBySpellLabel:
|
||||
if (m_spellmod == null)
|
||||
{
|
||||
SpellFlatModifierByLabel spellmod = new SpellFlatModifierByLabel(GetBase());
|
||||
spellmod.op = (SpellModOp)GetMiscValue();
|
||||
|
||||
spellmod.type = SpellModType.LabelFlat;
|
||||
spellmod.spellId = GetId();
|
||||
spellmod.value.ModIndex = GetMiscValue();
|
||||
spellmod.value.LabelID = GetMiscValueB();
|
||||
m_spellmod = spellmod;
|
||||
}
|
||||
(m_spellmod as SpellFlatModifierByLabel).value.ModifierValue = GetAmount();
|
||||
break;
|
||||
case AuraType.AddPctModifierBySpellLabel:
|
||||
if (m_spellmod == null)
|
||||
{
|
||||
SpellPctModifierByLabel spellmod = new SpellPctModifierByLabel(GetBase());
|
||||
spellmod.op = (SpellModOp)GetMiscValue();
|
||||
|
||||
spellmod.type = SpellModType.LabelPct;
|
||||
spellmod.spellId = GetId();
|
||||
spellmod.value.ModIndex = GetMiscValue();
|
||||
spellmod.value.LabelID = GetMiscValueB();
|
||||
m_spellmod = spellmod;
|
||||
}
|
||||
(m_spellmod as SpellPctModifierByLabel).value.ModifierValue = 1.0f + MathFunctions.CalculatePct(1.0f, GetAmount());
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user