First try at updating command system to be like TC. Still needs alot of testing/work
This commit is contained in:
@@ -237,7 +237,7 @@ namespace Game.Spells
|
||||
if (remove)
|
||||
return;
|
||||
|
||||
auraInfo.AuraData.HasValue = true;
|
||||
auraInfo.AuraData.Value = new();
|
||||
|
||||
Aura aura = GetBase();
|
||||
|
||||
|
||||
@@ -3539,7 +3539,7 @@ namespace Game.Spells
|
||||
|
||||
if (castFlags.HasAnyFlag(SpellCastFlags.RuneList)) // rune cooldowns list
|
||||
{
|
||||
castData.RemainingRunes.HasValue = true;
|
||||
castData.RemainingRunes.Value = new();
|
||||
|
||||
RuneData runeData = castData.RemainingRunes.Value;
|
||||
//TODO: There is a crash caused by a spell with CAST_FLAG_RUNE_LIST casted by a creature
|
||||
@@ -3654,7 +3654,7 @@ namespace Game.Spells
|
||||
|
||||
if (Convert.ToBoolean(castFlags & SpellCastFlags.RuneList)) // rune cooldowns list
|
||||
{
|
||||
castData.RemainingRunes.HasValue = true;
|
||||
castData.RemainingRunes.Value = new();
|
||||
RuneData runeData = castData.RemainingRunes.Value;
|
||||
|
||||
Player player = m_caster.ToPlayer();
|
||||
@@ -3965,7 +3965,7 @@ namespace Game.Spells
|
||||
|
||||
if (schoolImmunityMask != 0 || mechanicImmunityMask != 0)
|
||||
{
|
||||
spellChannelStart.InterruptImmunities.HasValue = true;
|
||||
spellChannelStart.InterruptImmunities.Value = new();
|
||||
spellChannelStart.InterruptImmunities.Value.SchoolImmunities = (int)schoolImmunityMask;
|
||||
spellChannelStart.InterruptImmunities.Value.Immunities = (int)mechanicImmunityMask;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Game.Spells
|
||||
|
||||
if (m_targetMask.HasAnyFlag(SpellCastTargetFlags.SourceLocation))
|
||||
{
|
||||
data.SrcLocation.HasValue = true;
|
||||
data.SrcLocation.Value = new();
|
||||
TargetLocation target = new();
|
||||
target.Transport = m_src.TransportGUID; // relative position guid here - transport for example
|
||||
if (!m_src.TransportGUID.IsEmpty())
|
||||
@@ -101,7 +101,7 @@ namespace Game.Spells
|
||||
|
||||
if (Convert.ToBoolean(m_targetMask & SpellCastTargetFlags.DestLocation))
|
||||
{
|
||||
data.DstLocation.HasValue = true;
|
||||
data.DstLocation.Value = new();
|
||||
TargetLocation target = new();
|
||||
target.Transport = m_dst.TransportGUID; // relative position guid here - transport for example
|
||||
if (!m_dst.TransportGUID.IsEmpty())
|
||||
|
||||
@@ -5395,14 +5395,14 @@ namespace Game.Spells
|
||||
Optional<JumpArrivalCastArgs> arrivalCast = new();
|
||||
if (effectInfo.TriggerSpell != 0)
|
||||
{
|
||||
arrivalCast.HasValue = true;
|
||||
arrivalCast.Value = new();
|
||||
arrivalCast.Value.SpellId = effectInfo.TriggerSpell;
|
||||
}
|
||||
|
||||
Optional<SpellEffectExtraData> effectExtra = new();
|
||||
if (jumpParams.SpellVisualId.HasValue || jumpParams.ProgressCurveId.HasValue || jumpParams.ParabolicCurveId.HasValue)
|
||||
{
|
||||
effectExtra.HasValue = true;
|
||||
effectExtra.Value = new();
|
||||
if (jumpParams.SpellVisualId.HasValue)
|
||||
effectExtra.Value.SpellVisualId = jumpParams.SpellVisualId.Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user