Core/GameObjects: Transport (type 11) improvements

Port From (https://github.com/TrinityCore/TrinityCore/commit/630b60eb0dcd3d9ce41582664ab822b049365431)
This commit is contained in:
hondacrx
2022-06-03 16:20:41 -04:00
parent e65ce31742
commit 40444525b2
30 changed files with 807 additions and 377 deletions
+4 -1
View File
@@ -103,7 +103,7 @@ namespace Game.Maps
{
// at this moment i_clientGUIDs have guids that not iterate at grid level checks
// but exist one case when this possible and object not out of range: transports
Transport transport = i_player.GetTransport();
Transport transport = i_player.GetTransport<Transport>();
if (transport)
{
foreach (var obj in transport.GetPassengers())
@@ -128,6 +128,9 @@ namespace Game.Maps
case TypeId.DynamicObject:
i_player.UpdateVisibilityOf(obj.ToDynamicObject(), i_data, i_visibleNow);
break;
case TypeId.AreaTrigger:
i_player.UpdateVisibilityOf(obj.ToAreaTrigger(), i_data, i_visibleNow);
break;
default:
break;
}