Core/Spells: Implemented evoker empower spell mechanic

Port From (https://github.com/TrinityCore/TrinityCore/commit/a39d0db9ec64f6bf38716abaade5b7835f2db338)
This commit is contained in:
Hondacrx
2024-08-19 18:48:32 -04:00
parent 2405543be4
commit d231c06b8e
18 changed files with 616 additions and 89 deletions
+11
View File
@@ -158,6 +158,11 @@ namespace Game.Spells
EquippedItemClass = ItemClass.None;
EquippedItemSubClassMask = 0;
EquippedItemInventoryTypeMask = 0;
// SpellEmpowerStageEntry
foreach (var stage in data.EmpowerStages)
EmpowerStageThresholds.Add(TimeSpan.FromMilliseconds(stage.DurationMs));
// SpellEquippedItemsEntry
SpellEquippedItemsRecord _equipped = data.EquippedItems;
if (_equipped != null)
@@ -566,6 +571,11 @@ namespace Game.Spells
return HasAttribute(SpellAttr2.AutoRepeat);
}
public bool IsEmpowerSpell()
{
return !EmpowerStageThresholds.Empty();
}
public bool HasInitialAggro()
{
return !(HasAttribute(SpellAttr1.NoThreat) || HasAttribute(SpellAttr2.NoInitialThreat) || HasAttribute(SpellAttr4.NoHarmfulThreat));
@@ -3940,6 +3950,7 @@ namespace Game.Spells
public SpellSchoolMask SchoolMask { get; set; }
public uint ChargeCategoryId;
public List<uint> Labels = new();
public List<TimeSpan> EmpowerStageThresholds = new();
// SpellScalingEntry
public ScalingInfo Scaling;