Core/Spells: Implemented evoker empower spell mechanic
Port From (https://github.com/TrinityCore/TrinityCore/commit/a39d0db9ec64f6bf38716abaade5b7835f2db338)
This commit is contained in:
@@ -262,6 +262,7 @@ namespace Game.Entities
|
||||
SetModRangedHaste(1.0f);
|
||||
SetModHasteRegen(1.0f);
|
||||
SetModTimeRate(1.0f);
|
||||
SetSpellEmpowerStage(-1);
|
||||
|
||||
SetSpeedRate(UnitMoveType.Walk, creatureInfo.SpeedWalk);
|
||||
SetSpeedRate(UnitMoveType.Run, creatureInfo.SpeedRun);
|
||||
|
||||
@@ -112,6 +112,7 @@ namespace Game.Entities
|
||||
ObjectGuid m_temporaryUnsummonedBattlePet;
|
||||
Dictionary<uint, StoredAuraTeleportLocation> m_storedAuraTeleportLocations = new();
|
||||
SpellCastRequest _pendingSpellCastRequest;
|
||||
float m_empowerMinHoldStagePercent;
|
||||
|
||||
//Mail
|
||||
List<Mail> m_mail = new();
|
||||
|
||||
@@ -73,6 +73,8 @@ namespace Game.Entities
|
||||
m_legacyRaidDifficulty = Difficulty.Raid10N;
|
||||
m_InstanceValid = true;
|
||||
|
||||
m_empowerMinHoldStagePercent = 1.0f;
|
||||
|
||||
_specializationInfo = new SpecializationInfo();
|
||||
|
||||
for (byte i = 0; i < (byte)BaseModGroup.End; ++i)
|
||||
@@ -3319,6 +3321,10 @@ namespace Game.Entities
|
||||
SetFaction(rEntry != null ? (uint)rEntry.FactionID : 0);
|
||||
}
|
||||
|
||||
public float GetEmpowerMinHoldStagePercent() { return m_empowerMinHoldStagePercent; }
|
||||
|
||||
public void SetEmpowerMinHoldStagePercent(float empowerMinHoldStagePercent) { m_empowerMinHoldStagePercent = empowerMinHoldStagePercent; }
|
||||
|
||||
public void SetResurrectRequestData(WorldObject caster, uint health, uint mana, uint appliedAura)
|
||||
{
|
||||
Cypher.Assert(!IsResurrectRequested());
|
||||
@@ -3329,6 +3335,7 @@ namespace Game.Entities
|
||||
_resurrectionData.Mana = mana;
|
||||
_resurrectionData.Aura = appliedAura;
|
||||
}
|
||||
|
||||
public void ClearResurrectRequestData()
|
||||
{
|
||||
_resurrectionData = null;
|
||||
@@ -5810,6 +5817,7 @@ namespace Game.Entities
|
||||
SetModRangedHaste(1.0f);
|
||||
SetModHasteRegen(1.0f);
|
||||
SetModTimeRate(1.0f);
|
||||
SetSpellEmpowerStage(-1);
|
||||
|
||||
// reset size before reapply auras
|
||||
SetObjectScale(1.0f);
|
||||
|
||||
@@ -898,7 +898,7 @@ namespace Game.Entities
|
||||
return;
|
||||
|
||||
if (spellType == CurrentSpellTypes.Channeled)
|
||||
spell.SendChannelUpdate(0);
|
||||
spell.SendChannelUpdate(0, result);
|
||||
|
||||
spell.Finish(result);
|
||||
}
|
||||
|
||||
@@ -2428,6 +2428,10 @@ namespace Game.Entities
|
||||
RemoveDynamicUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.ChannelObjects), index);
|
||||
}
|
||||
|
||||
public sbyte GetSpellEmpowerStage() { return m_unitData.SpellEmpowerStage; }
|
||||
|
||||
public void SetSpellEmpowerStage(sbyte stage) { SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.SpellEmpowerStage), stage); }
|
||||
|
||||
public static bool IsDamageReducedByArmor(SpellSchoolMask schoolMask, SpellInfo spellInfo = null)
|
||||
{
|
||||
// only physical spells damage gets reduced by armor
|
||||
|
||||
Reference in New Issue
Block a user