Core/Spells: Fixed spell effect value truncation when value is a large integer

This commit is contained in:
Shauren
2022-12-14 00:24:24 +01:00
parent e98e1283ea
commit 2d205506bf
4 changed files with 12 additions and 8 deletions

View File

@@ -2272,7 +2272,7 @@ float WorldObject::GetSpellMinRangeForTarget(Unit const* target, SpellInfo const
return spellInfo->GetMinRange(!IsHostileTo(target));
}
float WorldObject::ApplyEffectModifiers(SpellInfo const* spellInfo, uint8 effIndex, float value) const
double WorldObject::ApplyEffectModifiers(SpellInfo const* spellInfo, uint8 effIndex, double value) const
{
if (Player* modOwner = GetSpellModOwner())
{
@@ -2294,6 +2294,8 @@ float WorldObject::ApplyEffectModifiers(SpellInfo const* spellInfo, uint8 effInd
case EFFECT_4:
modOwner->ApplySpellMod(spellInfo, SpellModOp::PointsIndex4, value);
break;
default:
break;
}
}
return value;