aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeji <alvaro.megias@outlook.com>2024-11-05 14:42:35 +0100
committerGitHub <noreply@github.com>2024-11-05 14:42:35 +0100
commit23bb1a56b74191e131e41ad25edbe40ee4e76a96 (patch)
tree1d186ebab1703795c7b4b521b460b0e7b9c602d6
parentc68f4ceeb58d9e113510359eb4b7e87ef270cc9e (diff)
Core/Summons: Handle summons using SummonProperties.Control type 5 as vehicles (#30391)
-rw-r--r--src/server/game/AI/CreatureAI.cpp1
-rw-r--r--src/server/game/Entities/Object/Object.cpp2
-rw-r--r--src/server/game/Entities/Transport/Transport.cpp2
-rw-r--r--src/server/game/Miscellaneous/SharedDefines.h13
-rw-r--r--src/server/game/Spells/SpellEffects.cpp2
5 files changed, 9 insertions, 11 deletions
diff --git a/src/server/game/AI/CreatureAI.cpp b/src/server/game/AI/CreatureAI.cpp
index 4a4edcfbb32..9130e10bf13 100644
--- a/src/server/game/AI/CreatureAI.cpp
+++ b/src/server/game/AI/CreatureAI.cpp
@@ -172,7 +172,6 @@ static bool ShouldFollowOnSpawn(SummonPropertiesEntry const* properties)
return true;
case SUMMON_CATEGORY_WILD:
case SUMMON_CATEGORY_ALLY:
- case SUMMON_CATEGORY_UNK:
if (properties->GetFlags().HasFlag(SummonPropertiesFlags::JoinSummonerSpawnGroup))
return true;
switch (SummonTitle(properties->Title))
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index 66f5c5734aa..37004378740 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -1895,12 +1895,12 @@ TempSummon* Map::SummonCreature(uint32 entry, Position const& pos, SummonPropert
case SUMMON_CATEGORY_PUPPET:
mask = UNIT_MASK_PUPPET;
break;
+ case SUMMON_CATEGORY_POSSESSED_VEHICLE:
case SUMMON_CATEGORY_VEHICLE:
mask = UNIT_MASK_MINION;
break;
case SUMMON_CATEGORY_WILD:
case SUMMON_CATEGORY_ALLY:
- case SUMMON_CATEGORY_UNK:
{
switch (SummonTitle(properties->Title))
{
diff --git a/src/server/game/Entities/Transport/Transport.cpp b/src/server/game/Entities/Transport/Transport.cpp
index 36d92cfcfb1..dadbd4e960c 100644
--- a/src/server/game/Entities/Transport/Transport.cpp
+++ b/src/server/game/Entities/Transport/Transport.cpp
@@ -421,12 +421,12 @@ TempSummon* Transport::SummonPassenger(uint32 entry, Position const& pos, TempSu
case SUMMON_CATEGORY_PUPPET:
mask = UNIT_MASK_PUPPET;
break;
+ case SUMMON_CATEGORY_POSSESSED_VEHICLE:
case SUMMON_CATEGORY_VEHICLE:
mask = UNIT_MASK_MINION;
break;
case SUMMON_CATEGORY_WILD:
case SUMMON_CATEGORY_ALLY:
- case SUMMON_CATEGORY_UNK:
{
switch (SummonTitle(properties->Title))
{
diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h
index ccca3587d03..c599b2a0fb0 100644
--- a/src/server/game/Miscellaneous/SharedDefines.h
+++ b/src/server/game/Miscellaneous/SharedDefines.h
@@ -6212,13 +6212,12 @@ enum DiminishingGroup : uint16
enum SummonCategory
{
- SUMMON_CATEGORY_WILD = 0,
- SUMMON_CATEGORY_ALLY = 1,
- SUMMON_CATEGORY_PET = 2,
- SUMMON_CATEGORY_PUPPET = 3,
- SUMMON_CATEGORY_VEHICLE = 4,
- SUMMON_CATEGORY_UNK = 5 // as of patch 3.3.5a only Bone Spike in Icecrown Citadel
- // uses this category
+ SUMMON_CATEGORY_WILD = 0,
+ SUMMON_CATEGORY_ALLY = 1,
+ SUMMON_CATEGORY_PET = 2,
+ SUMMON_CATEGORY_PUPPET = 3,
+ SUMMON_CATEGORY_POSSESSED_VEHICLE = 4,
+ SUMMON_CATEGORY_VEHICLE = 5 // Wild, but Ride Spell will be cast
};
enum class SummonTitle : int32
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index 61c5afa05bc..97b11625380 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -1896,7 +1896,6 @@ void Spell::EffectSummonType()
{
case SUMMON_CATEGORY_WILD:
case SUMMON_CATEGORY_ALLY:
- case SUMMON_CATEGORY_UNK:
{
if (properties->GetFlags().HasFlag(SummonPropertiesFlags::JoinSummonerSpawnGroup))
{
@@ -2000,6 +1999,7 @@ void Spell::EffectSummonType()
summon = unitCaster->GetMap()->SummonCreature(entry, *destTarget, properties, duration, unitCaster, m_spellInfo->Id, 0, privateObjectOwner);
break;
}
+ case SUMMON_CATEGORY_POSSESSED_VEHICLE:
case SUMMON_CATEGORY_VEHICLE:
{
if (!unitCaster)