Core/Spells: Store BasePoints as float in SpellEffectInfo

Port From (https://github.com/TrinityCore/TrinityCore/commit/e9b0d347a4f5f51cda083a4dc7ed328530f0b5f6)
This commit is contained in:
hondacrx
2024-02-02 14:46:09 -05:00
parent a5fedc5d69
commit 4ff0ccd143
3 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -2652,7 +2652,7 @@ namespace Game.Entities
{
int[] bp = new int[SpellConst.MaxEffects];
foreach (var spellEffectInfo in spellEntry.GetEffects())
bp[spellEffectInfo.EffectIndex] = spellEffectInfo.BasePoints;
bp[spellEffectInfo.EffectIndex] = (int)spellEffectInfo.BasePoints;
bp[i] = seatId;
@@ -4079,7 +4079,7 @@ namespace Game.Entities
if (createInfo.BaseAmount != null)
bp = createInfo.BaseAmount[spellEffectInfo.EffectIndex];
else
bp = spellEffectInfo.BasePoints;
bp = (int)spellEffectInfo.BasePoints;
auraEff.m_baseAmount = bp;
}
+2 -2
View File
@@ -5744,7 +5744,7 @@ namespace Game.Spells
if (spellEffectInfo.Effect == SpellEffectName.ChangeBattlepetQuality)
{
var qualityRecord = CliDB.BattlePetBreedQualityStorage.Values.FirstOrDefault(a1 => a1.MaxQualityRoll < spellEffectInfo.BasePoints);
var qualityRecord = CliDB.BattlePetBreedQualityStorage.Values.FirstOrDefault(a1 => a1.MaxQualityRoll < spellEffectInfo.CalcBaseValue(m_caster, creature, m_castItemEntry, m_castItemLevel));
BattlePetBreedQuality quality = BattlePetBreedQuality.Poor;
if (qualityRecord != null)
@@ -6230,7 +6230,7 @@ namespace Game.Spells
break;
case SpellGroupStackRule.ExclusiveSameEffect: // this one has further checks, but i don't think they're necessary for autocast logic
case SpellGroupStackRule.ExclusiveHighest:
if (Math.Abs(spellEffectInfo.BasePoints) <= Math.Abs(eff.GetAmount()))
if (Math.Abs(spellEffectInfo.CalcBaseValue(m_caster, target, 0, -1)) <= Math.Abs(eff.GetAmount()))
return false;
break;
case SpellGroupStackRule.Default:
+1 -1
View File
@@ -4911,7 +4911,7 @@ namespace Game.Spells
public SpellEffectName Effect;
public AuraType ApplyAuraName;
public uint ApplyAuraPeriod;
public int BasePoints;
public float BasePoints;
public float RealPointsPerLevel;
public float PointsPerResource;
public float Amplitude;