feat(Core/Spells): Allow modifying MiscValues during cast (#20731)

This commit is contained in:
Andrew
2024-11-26 12:17:02 -03:00
committed by GitHub
parent e5b83b29de
commit 2649ca2d65
4 changed files with 22 additions and 1 deletions

View File

@@ -556,7 +556,11 @@ void SpellCastTargets::OutDebug() const
SpellValue::SpellValue(SpellInfo const* proto)
{
for (uint32 i = 0; i < MAX_SPELL_EFFECTS; ++i)
{
EffectBasePoints[i] = proto->Effects[i].BasePoints;
MiscVal[i] = 0;
}
MaxAffectedTargets = proto->MaxAffectedTargets;
RadiusMod = 1.0f;
AuraStackAmount = 1;
@@ -8458,6 +8462,15 @@ void Spell::SetSpellValue(SpellValueMod mod, int32 value)
case SPELLVALUE_FORCED_CRIT_RESULT:
m_spellValue->ForcedCritResult = (bool)value;
break;
case SPELLVALUE_MISCVALUE0:
m_spellValue->MiscVal[0] = value;
break;
case SPELLVALUE_MISCVALUE1:
m_spellValue->MiscVal[1] = value;
break;
case SPELLVALUE_MISCVALUE2:
m_spellValue->MiscVal[2] = value;
break;
}
}