Core/Summons: Handle summons using SummonProperties.Control type 5 as vehicles

Port From (https://github.com/TrinityCore/TrinityCore/commit/23bb1a56b74191e131e41ad25edbe40ee4e76a96)
This commit is contained in:
Hondacrx
2024-11-17 12:09:17 -05:00
parent b30fb05495
commit ba80dede79
5 changed files with 5 additions and 7 deletions
+2 -3
View File
@@ -130,9 +130,8 @@ namespace Framework.Constants
Ally = 1, Ally = 1,
Pet = 2, Pet = 2,
Puppet = 3, Puppet = 3,
Vehicle = 4, PossessedVehicle = 4,
Unk = 5 // as of patch 3.3.5a only Bone Spike in Icecrown Citadel Vehicle = 5 // Wild, but Ride Spell will be cast
// uses this category
} }
public enum SummonTitle public enum SummonTitle
-1
View File
@@ -150,7 +150,6 @@ namespace Game.AI
return true; return true;
case SummonCategory.Wild: case SummonCategory.Wild:
case SummonCategory.Ally: case SummonCategory.Ally:
case SummonCategory.Unk:
if (properties.HasFlag(SummonPropertiesFlags.JoinSummonerSpawnGroup)) if (properties.HasFlag(SummonPropertiesFlags.JoinSummonerSpawnGroup))
return true; return true;
switch (properties.Title) switch (properties.Title)
+1 -1
View File
@@ -446,12 +446,12 @@ namespace Game.Entities
case SummonCategory.Puppet: case SummonCategory.Puppet:
mask = UnitTypeMask.Puppet; mask = UnitTypeMask.Puppet;
break; break;
case SummonCategory.PossessedVehicle:
case SummonCategory.Vehicle: case SummonCategory.Vehicle:
mask = UnitTypeMask.Minion; mask = UnitTypeMask.Minion;
break; break;
case SummonCategory.Wild: case SummonCategory.Wild:
case SummonCategory.Ally: case SummonCategory.Ally:
case SummonCategory.Unk:
{ {
switch (properties.Title) switch (properties.Title)
{ {
+1 -1
View File
@@ -3711,12 +3711,12 @@ namespace Game.Maps
case SummonCategory.Puppet: case SummonCategory.Puppet:
mask = UnitTypeMask.Puppet; mask = UnitTypeMask.Puppet;
break; break;
case SummonCategory.PossessedVehicle:
case SummonCategory.Vehicle: case SummonCategory.Vehicle:
mask = UnitTypeMask.Minion; mask = UnitTypeMask.Minion;
break; break;
case SummonCategory.Wild: case SummonCategory.Wild:
case SummonCategory.Ally: case SummonCategory.Ally:
case SummonCategory.Unk:
{ {
switch (properties.Title) switch (properties.Title)
{ {
+1 -1
View File
@@ -1512,7 +1512,6 @@ namespace Game.Spells
{ {
case SummonCategory.Wild: case SummonCategory.Wild:
case SummonCategory.Ally: case SummonCategory.Ally:
case SummonCategory.Unk:
if (properties.HasFlag(SummonPropertiesFlags.JoinSummonerSpawnGroup)) if (properties.HasFlag(SummonPropertiesFlags.JoinSummonerSpawnGroup))
{ {
SummonGuardian(effectInfo, entry, properties, numSummons, privateObjectOwner); 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); summon = unitCaster.GetMap().SummonCreature(entry, destTarget, properties, duration, unitCaster, m_spellInfo.Id, 0, privateObjectOwner);
break; break;
} }
case SummonCategory.PossessedVehicle:
case SummonCategory.Vehicle: case SummonCategory.Vehicle:
{ {
if (unitCaster == null) if (unitCaster == null)