Core/Spells: Store BasePoints as float in SpellEffectInfo
Port From (https://github.com/TrinityCore/TrinityCore/commit/e9b0d347a4f5f51cda083a4dc7ed328530f0b5f6)
This commit is contained in:
@@ -2652,7 +2652,7 @@ namespace Game.Entities
|
|||||||
{
|
{
|
||||||
int[] bp = new int[SpellConst.MaxEffects];
|
int[] bp = new int[SpellConst.MaxEffects];
|
||||||
foreach (var spellEffectInfo in spellEntry.GetEffects())
|
foreach (var spellEffectInfo in spellEntry.GetEffects())
|
||||||
bp[spellEffectInfo.EffectIndex] = spellEffectInfo.BasePoints;
|
bp[spellEffectInfo.EffectIndex] = (int)spellEffectInfo.BasePoints;
|
||||||
|
|
||||||
bp[i] = seatId;
|
bp[i] = seatId;
|
||||||
|
|
||||||
@@ -4079,7 +4079,7 @@ namespace Game.Entities
|
|||||||
if (createInfo.BaseAmount != null)
|
if (createInfo.BaseAmount != null)
|
||||||
bp = createInfo.BaseAmount[spellEffectInfo.EffectIndex];
|
bp = createInfo.BaseAmount[spellEffectInfo.EffectIndex];
|
||||||
else
|
else
|
||||||
bp = spellEffectInfo.BasePoints;
|
bp = (int)spellEffectInfo.BasePoints;
|
||||||
|
|
||||||
auraEff.m_baseAmount = bp;
|
auraEff.m_baseAmount = bp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5744,7 +5744,7 @@ namespace Game.Spells
|
|||||||
|
|
||||||
if (spellEffectInfo.Effect == SpellEffectName.ChangeBattlepetQuality)
|
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;
|
BattlePetBreedQuality quality = BattlePetBreedQuality.Poor;
|
||||||
if (qualityRecord != null)
|
if (qualityRecord != null)
|
||||||
@@ -6230,7 +6230,7 @@ namespace Game.Spells
|
|||||||
break;
|
break;
|
||||||
case SpellGroupStackRule.ExclusiveSameEffect: // this one has further checks, but i don't think they're necessary for autocast logic
|
case SpellGroupStackRule.ExclusiveSameEffect: // this one has further checks, but i don't think they're necessary for autocast logic
|
||||||
case SpellGroupStackRule.ExclusiveHighest:
|
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;
|
return false;
|
||||||
break;
|
break;
|
||||||
case SpellGroupStackRule.Default:
|
case SpellGroupStackRule.Default:
|
||||||
|
|||||||
@@ -4911,7 +4911,7 @@ namespace Game.Spells
|
|||||||
public SpellEffectName Effect;
|
public SpellEffectName Effect;
|
||||||
public AuraType ApplyAuraName;
|
public AuraType ApplyAuraName;
|
||||||
public uint ApplyAuraPeriod;
|
public uint ApplyAuraPeriod;
|
||||||
public int BasePoints;
|
public float BasePoints;
|
||||||
public float RealPointsPerLevel;
|
public float RealPointsPerLevel;
|
||||||
public float PointsPerResource;
|
public float PointsPerResource;
|
||||||
public float Amplitude;
|
public float Amplitude;
|
||||||
|
|||||||
Reference in New Issue
Block a user