From df8124ce522ce821c39965aa892dcacb50f61fa5 Mon Sep 17 00:00:00 2001 From: CekisSWG Date: Sat, 5 May 2018 18:13:08 +0100 Subject: [PATCH] Fixed issue with some creatures (i.e. holopets) not being allowed in buildings. --- .../serverGame/src/shared/object/BuildingObject.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/engine/server/library/serverGame/src/shared/object/BuildingObject.cpp b/engine/server/library/serverGame/src/shared/object/BuildingObject.cpp index c5837782..25cabb41 100755 --- a/engine/server/library/serverGame/src/shared/object/BuildingObject.cpp +++ b/engine/server/library/serverGame/src/shared/object/BuildingObject.cpp @@ -613,6 +613,15 @@ bool BuildingObject::isAllowed(CreatureObject const &who) const if (who.hasCondition(static_cast(ServerTangibleObjectTemplate::C_vendor))) return true; + // allow non-player-controlled creatures in private buildings if the *creature* has no owner + if (!who.isPlayerControlled() + && who.getMasterId() == NetworkId::cms_invalid + && who.getLevel() < 0 + ) + { + return true; + } + return CellPermissions::isOnList(m_allowed.get(), who); } }