From ba80dede7957967bea7f7fae2ee28e6614afd8c6 Mon Sep 17 00:00:00 2001 From: Hondacrx Date: Sun, 17 Nov 2024 12:09:17 -0500 Subject: [PATCH] Core/Summons: Handle summons using SummonProperties.Control type 5 as vehicles Port From (https://github.com/TrinityCore/TrinityCore/commit/23bb1a56b74191e131e41ad25edbe40ee4e76a96) --- Source/Framework/Constants/ObjectConst.cs | 5 ++--- Source/Game/AI/CoreAI/CreatureAI.cs | 1 - Source/Game/Entities/Transport.cs | 2 +- Source/Game/Maps/Map.cs | 2 +- Source/Game/Spells/SpellEffects.cs | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Source/Framework/Constants/ObjectConst.cs b/Source/Framework/Constants/ObjectConst.cs index 106d17318..4974eeb08 100644 --- a/Source/Framework/Constants/ObjectConst.cs +++ b/Source/Framework/Constants/ObjectConst.cs @@ -130,9 +130,8 @@ namespace Framework.Constants Ally = 1, Pet = 2, Puppet = 3, - Vehicle = 4, - Unk = 5 // as of patch 3.3.5a only Bone Spike in Icecrown Citadel - // uses this category + PossessedVehicle = 4, + Vehicle = 5 // Wild, but Ride Spell will be cast } public enum SummonTitle diff --git a/Source/Game/AI/CoreAI/CreatureAI.cs b/Source/Game/AI/CoreAI/CreatureAI.cs index 5966a0245..5e368c626 100644 --- a/Source/Game/AI/CoreAI/CreatureAI.cs +++ b/Source/Game/AI/CoreAI/CreatureAI.cs @@ -150,7 +150,6 @@ namespace Game.AI return true; case SummonCategory.Wild: case SummonCategory.Ally: - case SummonCategory.Unk: if (properties.HasFlag(SummonPropertiesFlags.JoinSummonerSpawnGroup)) return true; switch (properties.Title) diff --git a/Source/Game/Entities/Transport.cs b/Source/Game/Entities/Transport.cs index 058daeeb4..a25bad4e6 100644 --- a/Source/Game/Entities/Transport.cs +++ b/Source/Game/Entities/Transport.cs @@ -446,12 +446,12 @@ namespace Game.Entities case SummonCategory.Puppet: mask = UnitTypeMask.Puppet; break; + case SummonCategory.PossessedVehicle: case SummonCategory.Vehicle: mask = UnitTypeMask.Minion; break; case SummonCategory.Wild: case SummonCategory.Ally: - case SummonCategory.Unk: { switch (properties.Title) { diff --git a/Source/Game/Maps/Map.cs b/Source/Game/Maps/Map.cs index 9238a876d..cb67c1e03 100644 --- a/Source/Game/Maps/Map.cs +++ b/Source/Game/Maps/Map.cs @@ -3711,12 +3711,12 @@ namespace Game.Maps case SummonCategory.Puppet: mask = UnitTypeMask.Puppet; break; + case SummonCategory.PossessedVehicle: case SummonCategory.Vehicle: mask = UnitTypeMask.Minion; break; case SummonCategory.Wild: case SummonCategory.Ally: - case SummonCategory.Unk: { switch (properties.Title) { diff --git a/Source/Game/Spells/SpellEffects.cs b/Source/Game/Spells/SpellEffects.cs index 5352fd98c..cb55ce322 100644 --- a/Source/Game/Spells/SpellEffects.cs +++ b/Source/Game/Spells/SpellEffects.cs @@ -1512,7 +1512,6 @@ namespace Game.Spells { case SummonCategory.Wild: case SummonCategory.Ally: - case SummonCategory.Unk: if (properties.HasFlag(SummonPropertiesFlags.JoinSummonerSpawnGroup)) { SummonGuardian(effectInfo, entry, properties, numSummons, privateObjectOwner); @@ -1614,6 +1613,7 @@ namespace Game.Spells summon = unitCaster.GetMap().SummonCreature(entry, destTarget, properties, duration, unitCaster, m_spellInfo.Id, 0, privateObjectOwner); break; } + case SummonCategory.PossessedVehicle: case SummonCategory.Vehicle: { if (unitCaster == null)