Core/Spell: SpellValueOverrides encapsulation

Port From (https://github.com/TrinityCore/TrinityCore/commit/5fbddef85f48f6b9140d025d7f2e14faae0af178)
This commit is contained in:
hondacrx
2021-06-22 18:43:40 -04:00
parent 046cd9f917
commit c51c4d443f
21 changed files with 74 additions and 66 deletions
+1 -1
View File
@@ -3009,7 +3009,7 @@ namespace Game.Entities
{
CastSpellExtraArgs args = new(flags);
args.OriginalCaster = origCasterGUID;
args.SpellValueOverrides.Add(SpellValueMod.BasePoint0 + i, seatId + 1);
args.AddSpellMod(SpellValueMod.BasePoint0 + i, seatId + 1);
caster.CastSpell(target, clickInfo.spellId, args);
}
else // This can happen during Player._LoadAuras
+3 -3
View File
@@ -862,11 +862,11 @@ namespace Game.Entities
return targets.SelectRandom();
}
public void EnterVehicle(Unit Base, sbyte seatId = -1)
public void EnterVehicle(Unit baseUnit, sbyte seatId = -1)
{
CastSpellExtraArgs args = new(TriggerCastFlags.IgnoreCasterMountedOrOnVehicle);
args.SpellValueOverrides.Add(SpellValueMod.BasePoint0, seatId + 1);
CastSpell(this, SharedConst.VehicleSpellRideHardcoded, args);
args.AddSpellMod(SpellValueMod.BasePoint0, seatId + 1);
CastSpell(baseUnit, SharedConst.VehicleSpellRideHardcoded, args);
}
public void _EnterVehicle(Vehicle vehicle, sbyte seatId, AuraApplication aurApp)