Remove custom OptionalType and use the default c# nullable type.

This commit is contained in:
hondacrx
2022-03-01 17:27:56 -05:00
parent cc08afe269
commit c14f1eb3dc
89 changed files with 924 additions and 976 deletions
+1 -1
View File
@@ -616,7 +616,7 @@ namespace Game.Entities
subDmg.Damage = (int)damageInfo.Damage; // Sub Damage
subDmg.Absorbed = (int)damageInfo.Absorb;
subDmg.Resisted = (int)damageInfo.Resist;
packet.SubDmg.Set(subDmg);
packet.SubDmg = subDmg;
packet.VictimState = (byte)damageInfo.TargetState;
packet.BlockAmount = (int)damageInfo.Blocked;
+5 -4
View File
@@ -825,7 +825,7 @@ namespace Game.Entities
ProcessTerrainStatusUpdate(oldLiquidStatus, data.LiquidInfo);
}
public virtual void ProcessTerrainStatusUpdate(ZLiquidStatus oldLiquidStatus, Optional<LiquidData> newLiquidData)
public virtual void ProcessTerrainStatusUpdate(ZLiquidStatus oldLiquidStatus, LiquidData newLiquidData)
{
if (!IsControlledByPlayer())
return;
@@ -838,8 +838,8 @@ namespace Game.Entities
// liquid aura handling
LiquidTypeRecord curLiquid = null;
if (IsInWater() && newLiquidData.HasValue)
curLiquid = CliDB.LiquidTypeStorage.LookupByKey(newLiquidData.Value.entry);
if (IsInWater() && newLiquidData != null)
curLiquid = CliDB.LiquidTypeStorage.LookupByKey(newLiquidData.entry);
if (curLiquid != _lastLiquid)
{
if (_lastLiquid != null && _lastLiquid.SpellID != 0)
@@ -1804,7 +1804,8 @@ namespace Game.Entities
moveTeleport.MoverGUID = GetGUID();
moveTeleport.Pos = new Position(x, y, z, o);
if (GetTransGUID() != ObjectGuid.Empty)
moveTeleport.TransportGUID.Set(GetTransGUID());
moveTeleport.TransportGUID = GetTransGUID();
moveTeleport.Facing = o;
moveTeleport.SequenceIndex = m_movementCounter++;
playerMover.SendPacket(moveTeleport);
+2 -2
View File
@@ -2092,7 +2092,7 @@ namespace Game.Entities
ContentTuningParams contentTuningParams = new();
if (contentTuningParams.GenerateDataForUnits(log.attacker, log.target))
packet.ContentTuning.Set(contentTuningParams);
packet.ContentTuning = contentTuningParams;
SendCombatLogMessage(packet);
}
@@ -2121,7 +2121,7 @@ namespace Game.Entities
ContentTuningParams contentTuningParams = new();
Unit caster = Global.ObjAccessor.GetUnit(this, aura.GetCasterGUID());
if (caster && contentTuningParams.GenerateDataForUnits(caster, this))
spellLogEffect.ContentTuning.Set(contentTuningParams);
spellLogEffect.ContentTuning = contentTuningParams;
data.Effects.Add(spellLogEffect);