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
+3 -3
View File
@@ -111,8 +111,8 @@ namespace Game.Entities
if (IsWorldObject())
SetActive(true); //must before add to map to be put in world container
Transport transport = caster.GetTransport();
if (transport)
ITransport transport = caster.GetTransport();
if (transport != null)
{
float x, y, z, o;
pos.GetPosition(out x, out y, out z, out o);
@@ -126,7 +126,7 @@ namespace Game.Entities
if (!GetMap().AddToMap(this))
{
// Returning false will cause the object to be deleted - remove from transport
if (transport)
if (transport != null)
transport.RemovePassenger(this);
return false;
}