Core/Spells: Implemented evoker empower spell mechanic
Port From (https://github.com/TrinityCore/TrinityCore/commit/a39d0db9ec64f6bf38716abaade5b7835f2db338)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user