Cleanup some warnings.

This commit is contained in:
hondacrx
2021-11-15 16:11:20 -05:00
parent e0f344af25
commit 032f9a55f3
70 changed files with 233 additions and 234 deletions
+1 -1
View File
@@ -606,7 +606,7 @@ namespace Game.AI
if (spellInfo == null)
return;
Spell spell = new Spell(me, spellInfo, TriggerCastFlags.CastDirectly);
Spell spell = new(me, spellInfo, TriggerCastFlags.CastDirectly);
if (spell.CheckPetCast(victim) != SpellCastResult.SpellCastOk)
return;
+1 -1
View File
@@ -2232,7 +2232,7 @@ namespace Game.Entities
return;
}
Spell spell = new Spell(this, info, args.TriggerFlags, args.OriginalCaster, args.OriginalCastId);
Spell spell = new(this, info, args.TriggerFlags, args.OriginalCaster, args.OriginalCastId);
foreach (var pair in args.SpellValueOverrides)
spell.SetSpellValue(pair.Key, pair.Value);
+1 -1
View File
@@ -95,7 +95,7 @@ namespace Game.Entities
ulong lowGuid = creator.GetMap().GenerateLowGuid(HighGuid.SceneObject);
SceneObject sceneObject = new SceneObject();
SceneObject sceneObject = new();
if (!sceneObject.Create(lowGuid, SceneType.Normal, sceneId, sceneTemplate != null ? sceneTemplate.ScenePackageId : 0, creator.GetMap(), creator, pos, privateObjectOwner))
{
sceneObject.Dispose();
+6 -6
View File
@@ -625,14 +625,14 @@ namespace Game.Movement
if (_owner.IsTypeId(TypeId.Player))
{
PointMovementGenerator<Player> movement = new PointMovementGenerator<Player>(id, x, y, z, generatePath, speed, null, target, spellEffectExtraData);
PointMovementGenerator<Player> movement = new(id, x, y, z, generatePath, speed, null, target, spellEffectExtraData);
movement.Priority = MovementGeneratorPriority.Highest;
movement.BaseUnitState = UnitState.Charging;
Add(movement);
}
else
{
PointMovementGenerator<Creature> movement = new PointMovementGenerator<Creature>(id, x, y, z, generatePath, speed, null, target, spellEffectExtraData);
PointMovementGenerator<Creature> movement = new(id, x, y, z, generatePath, speed, null, target, spellEffectExtraData);
movement.Priority = MovementGeneratorPriority.Highest;
movement.BaseUnitState = UnitState.Charging;
Add(movement);
@@ -680,7 +680,7 @@ namespace Game.Movement
if (spellEffectExtraData != null)
init.SetSpellEffectExtraData(spellEffectExtraData);
GenericMovementGenerator movement = new GenericMovementGenerator(init, MovementGeneratorType.Effect, 0);
GenericMovementGenerator movement = new(init, MovementGeneratorType.Effect, 0);
movement.Priority = MovementGeneratorPriority.Highest;
Add(movement);
}
@@ -730,7 +730,7 @@ namespace Game.Movement
arrivalSpellTargetGuid = arrivalCast.Target;
}
GenericMovementGenerator movement = new GenericMovementGenerator(init, MovementGeneratorType.Effect, id, arrivalSpellId, arrivalSpellTargetGuid);
GenericMovementGenerator movement = new(init, MovementGeneratorType.Effect, id, arrivalSpellId, arrivalSpellTargetGuid);
movement.Priority = MovementGeneratorPriority.Highest;
movement.BaseUnitState = UnitState.Jumping;
Add(movement);
@@ -849,7 +849,7 @@ namespace Game.Movement
init.MoveTo(_owner.GetPositionX(), _owner.GetPositionY(), tz + _owner.GetHoverOffset(), false);
init.SetFall();
GenericMovementGenerator movement = new GenericMovementGenerator(init, MovementGeneratorType.Effect, id);
GenericMovementGenerator movement = new(init, MovementGeneratorType.Effect, id);
movement.Priority = MovementGeneratorPriority.Highest;
Add(movement);
}
@@ -943,7 +943,7 @@ namespace Game.Movement
return;
}
GenericMovementGenerator movement = new GenericMovementGenerator(init, type, id);
GenericMovementGenerator movement = new(init, type, id);
movement.Priority = priority;
Add(movement);
}
+3 -3
View File
@@ -256,7 +256,7 @@ namespace Game.Spells
case AuraType.AddPctModifier:
if (m_spellmod == null)
{
SpellModifierByClassMask spellmod = new SpellModifierByClassMask(GetBase());
SpellModifierByClassMask spellmod = new(GetBase());
spellmod.op = (SpellModOp)GetMiscValue();
spellmod.type = GetAuraType() == AuraType.AddPctModifier ? SpellModType.Pct : SpellModType.Flat;
@@ -269,7 +269,7 @@ namespace Game.Spells
case AuraType.AddFlatModifierBySpellLabel:
if (m_spellmod == null)
{
SpellFlatModifierByLabel spellmod = new SpellFlatModifierByLabel(GetBase());
SpellFlatModifierByLabel spellmod = new(GetBase());
spellmod.op = (SpellModOp)GetMiscValue();
spellmod.type = SpellModType.LabelFlat;
@@ -283,7 +283,7 @@ namespace Game.Spells
case AuraType.AddPctModifierBySpellLabel:
if (m_spellmod == null)
{
SpellPctModifierByLabel spellmod = new SpellPctModifierByLabel(GetBase());
SpellPctModifierByLabel spellmod = new(GetBase());
spellmod.op = (SpellModOp)GetMiscValue();
spellmod.type = SpellModType.LabelPct;
+1 -1
View File
@@ -694,7 +694,7 @@ namespace Game.Spells
}
// Init dest coordinates
WorldLocation targetDest = new WorldLocation(destTarget);
WorldLocation targetDest = new(destTarget);
if (targetDest.GetMapId() == 0xFFFFFFFF)
targetDest.SetMapId(unitTarget.GetMapId());