Core/Vehicle: Fix an assertion when applying SPELL_AURA_SET_VEHICLE_ID on creatures that are already vehicles

Port From (https://github.com/TrinityCore/TrinityCore/commit/53f0f2e5da3e7e6a9e6fa926e2f51ac8b506caa9)
This commit is contained in:
Hondacrx
2024-09-01 16:23:42 -04:00
parent 03e2904f0d
commit 3945a662eb
2 changed files with 13 additions and 3 deletions
+1 -1
View File
@@ -42,7 +42,7 @@ namespace Game.Entities
// Set or remove correct flags based on available seats. Will overwrite db data (if wrong).
if (UsableSeatNum != 0)
_me.SetNpcFlag(_me.IsTypeId(TypeId.Player) ? NPCFlags.PlayerVehicle : NPCFlags.SpellClick);
else
else if(unit.m_unitData.InteractSpellID == 0)
_me.RemoveNpcFlag(_me.IsTypeId(TypeId.Player) ? NPCFlags.PlayerVehicle : NPCFlags.SpellClick);
InitMovementInfoForBase();