bugfix: runafterload for instanced agos
This commit is contained in:
1 parent
ad99415679
commit
45d26a82f2
2 files changed
+10
-1
No files matched your search
@@ -9,7 +9,9 @@
|
||||
|
||||
package engine.db.handlers;
|
||||
|
||||
import engine.Enum;
|
||||
import engine.Enum.GameObjectType;
|
||||
import engine.gameManager.ConfigManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.objects.AbstractGameObject;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
@@ -37,6 +39,13 @@ public abstract class dbHandlerBase {
|
||||
Logger.error(e);
|
||||
}
|
||||
|
||||
// Only call runAfterLoad() for objects instanced on the world server
|
||||
|
||||
if ((abstractGameObject != null && abstractGameObject instanceof AbstractWorldObject) &&
|
||||
(ConfigManager.serverType.equals(Enum.ServerType.WORLDSERVER) ||
|
||||
(abstractGameObject.getObjectType() == GameObjectType.Guild)))
|
||||
((AbstractWorldObject) abstractGameObject).runAfterLoad();
|
||||
|
||||
return abstractGameObject;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user