Trinitycore: [3.3.5][master] Elevators reproducing like rabbits

Created on 13 Jun 2016  路  13Comments  路  Source: TrinityCore/TrinityCore

Description: when a grid is unloaded and loaded again, any elevator within it will be spawned again, effectively multiplying them for everygrid unload of the area.

Steps to reproduce the problem:

  1. Optional: set GridCleanUpDelay to 60000 (minimum value) for faster reproductibility
  2. Teleport to Undercity, go near elevator.
  3. Teleport to somewhere far enough to cause grid unloading (Deathknell in this case is good enough)
  4. Wait a minute (or however long your grid clean up delay is set to), then use the .recall command.
  5. Enjoy your very own elevator colony.

Branch(es): 3.3.5 / 6.x

TC hash/commit: 291a264

TDB version: 335.61

Branch-3.3.5a Branch-master Comp-Core

Most helpful comment

This is what I was considering (in IRC). That this is only existing client side. When the grid reloaded, the elevator received a new GUID and thus the client cached the old one and included the new one.

It's of course possible to work around this, but any workaround would be a hack on top of a hack. Actually I doubt retail have a solution for this, because for any given server up-time, an elevator would only have one GUID. I don't believe they actually unload areas entirely like we do.

All 13 comments

@r00ty-tc the same issue has creature duplicating?

Well, I don't think so. Since that only happened if creature was inside a loaded grid (moved from his home grid) and home grid was unloaded.

Since the lifts generally only work in the vertical, they generally are within the same grid. I suspect this is something else.

Probably related to the crappy hack we have in place for gameobject type 11 (never sending object_destroy/outofrange) to make elevators moving horizontally work properly (deeprun tram)

This is what I was considering (in IRC). That this is only existing client side. When the grid reloaded, the elevator received a new GUID and thus the client cached the old one and included the new one.

It's of course possible to work around this, but any workaround would be a hack on top of a hack. Actually I doubt retail have a solution for this, because for any given server up-time, an elevator would only have one GUID. I don't believe they actually unload areas entirely like we do.

I like rabbits, they are so fluffy

@Kittnz: they sure are. Leave a bunch of 'em alone for a while and you'll be swimming in fluffiness :D

But unlike them, elevators don't even need a partner.

Actually I doubt retail have a solution for this, because for any given server up-time, an elevator would only have one GUID. I don't believe they actually unload areas entirely like we do.

Well, one option is to never unload a grid that has an elevator. I wrote a patch a long time ago to keep flightmaster grids loaded (the core checks at unload and ignores it) which could be ported to elevator containing grids too.

dynamic_spawning has a mechanism to add/remove grids to a "never unload" list. But, in this case manually adding them would be a pain.

It could be fairly easy to search for a transport go inside a grid at unload and abort if found I guess.

This is what I've been using on my personal server. It originally started as a test to remove the lag at taxi path end on low end machines, when you had to wait for the flightmaster to load before the taxi would dismount. I've since then been using it out of habit.

From 92b0523d665c0b3161629271a3f548a8feac55ab Mon Sep 17 00:00:00 2001
From: MrSmite <[email protected]>
Date: Tue, 3 Dec 2013 03:00:25 -0500
Subject: [PATCH] Keep flightmasters loaded

---
 src/server/game/Maps/Map.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp
index 49f7bc8..2de4776 100644
--- a/src/server/game/Maps/Map.cpp
+++ b/src/server/game/Maps/Map.cpp
@@ -2766,6 +2766,10 @@ void Map::RemoveFromActive(T* /*obj*/) { }
 template <>
 void Map::RemoveFromActive(Creature* c)
 {
+    // Prevent unloading Flightmasters. This keeps the grid from unloading.
+    if (c->IsTaxi() && !sWorld->IsShuttingDown())
+        return;
+
     RemoveFromActiveHelper(c);

     // also allow unloading spawn grid
-- 
1.7.11.msysgit.1

As the comment says, it keeps the grid that has a flightmaster in it from unloading. Couldn't this easily be ported over for elevators?

NOTE: I have not submitted this as a PR mainly because I haven't seen anyone ask for this behavior and I have been having trouble pushing to my repo, an issue with SSL keys. If you think this is something worth having for taxi as well as elevators, feel free to take this to a PR.

This issue is still valid?

No answer after 2 months, closing, if this bug is still valid plz open a new ticket with updated core.

this is definitely still valid

Is this related to the visual issue that the Tauren elevators in Thunder Bluff & Freewind Post (Thousand Needles) get a duplicated (not synchronized) roof & support columns when the elevator moves?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tje3d picture tje3d  路  3Comments

jerbookins picture jerbookins  路  3Comments

Keader picture Keader  路  3Comments

chilito picture chilito  路  3Comments

daddycaddy picture daddycaddy  路  3Comments