/* * server/zone/objects/building/BuildingObject.cpp generated by engine3 IDL compiler 0.60 */ #include "BuildingObject.h" #include "server/zone/objects/scene/SceneObject.h" #include "server/zone/objects/creature/CreatureObject.h" #include "server/zone/objects/tangible/sign/SignObject.h" #include "server/zone/ZoneServer.h" #include "server/zone/Zone.h" #include "server/zone/templates/SharedObjectTemplate.h" /* * BuildingObjectStub */ enum {RPC_CREATECELLOBJECTS__ = 6,RPC_DESTROYOBJECTFROMDATABASE__BOOL_,RPC_INITIALIZETRANSIENTMEMBERS__,RPC_CREATECONTAINERCOMPONENT__,RPC_SETCUSTOMOBJECTNAME__UNICODESTRING_BOOL_,RPC_UPDATESIGNNAME__BOOL_,RPC_SENDCONTAINEROBJECTSTO__SCENEOBJECT_,RPC_UPDATECELLPERMISSIONSTO__CREATUREOBJECT_,RPC_BROADCASTCELLPERMISSIONS__,RPC_BROADCASTCELLPERMISSIONS__LONG_,RPC_ISALLOWEDENTRY__CREATUREOBJECT_,RPC_ISCITYBANNED__CREATUREOBJECT_,RPC_NOTIFYSTRUCTUREPLACED__CREATUREOBJECT_,RPC_EJECTOBJECT__SCENEOBJECT_,RPC_NOTIFYREMOVEFROMZONE__,RPC_NOTIFYLOADFROMDATABASE__,RPC_NOTIFYINSERTTOZONE__ZONE_,RPC_NOTIFYOBJECTINSERTEDTOZONE__SCENEOBJECT_,RPC_SENDTO__SCENEOBJECT_BOOL_,RPC_SENDBASELINESTO__SCENEOBJECT_,RPC_SENDDESTROYTO__SCENEOBJECT_,RPC_ADDCELL__CELLOBJECT_INT_,RPC_ISSTATICBUILDING__,RPC_GETCELL__INT_,RPC_GETTOTALCELLNUMBER__,RPC_TRANSFEROBJECT__SCENEOBJECT_INT_BOOL_,RPC_NOTIFYOBJECTINSERTEDTOCHILD__SCENEOBJECT_SCENEOBJECT_SCENEOBJECT_,RPC_NOTIFYOBJECTREMOVEDFROMCHILD__SCENEOBJECT_SCENEOBJECT_,RPC_GETCURRENTNUMBEROFPLAYERITEMS__,RPC_DESTROYALLPLAYERITEMS__,RPC_ONENTER__CREATUREOBJECT_,RPC_ONEXIT__CREATUREOBJECT_LONG_,RPC_ISBUILDINGOBJECT__,RPC_SETSIGNOBJECT__SIGNOBJECT_,RPC_GETSIGNOBJECT__,RPC_ISPUBLICSTRUCTURE__,RPC_ISPRIVATESTRUCTURE__,RPC_SETPUBLICSTRUCTURE__BOOL_,RPC_ISCONDEMNED__,RPC_GETMAPCELLSIZE__,RPC_TOGGLEPRIVACY__,RPC_GETMAXIMUMNUMBEROFPLAYERITEMS__,RPC_GETREDEEDMESSAGE__,RPC_HASACCESSFEE__,RPC_GETACCESSFEE__,RPC_CANCHANGEACCESSFEE__,RPC_SETACCESSFEE__INT_INT_,RPC_REMOVEACCESSFEE__,RPC_GETACCESSFEEDELAY__,RPC_PAYACCESSFEE__CREATUREOBJECT_,RPC_UPDATEPAIDACCESSLIST__}; BuildingObject::BuildingObject() : StructureObject(DummyConstructorParameter::instance()) { BuildingObjectImplementation* _implementation = new BuildingObjectImplementation(); _impl = _implementation; _impl->_setStub(this); _setClassName("BuildingObject"); } BuildingObject::BuildingObject(DummyConstructorParameter* param) : StructureObject(param) { _setClassName("BuildingObject"); } BuildingObject::~BuildingObject() { } void BuildingObject::createCellObjects() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CREATECELLOBJECTS__); method.executeWithVoidReturn(); } else _implementation->createCellObjects(); } void BuildingObject::destroyObjectFromDatabase(bool destroyContainedObjects) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_DESTROYOBJECTFROMDATABASE__BOOL_); method.addBooleanParameter(destroyContainedObjects); method.executeWithVoidReturn(); } else _implementation->destroyObjectFromDatabase(destroyContainedObjects); } void BuildingObject::loadTemplateData(SharedObjectTemplate* templateData) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->loadTemplateData(templateData); } void BuildingObject::initializeTransientMembers() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_INITIALIZETRANSIENTMEMBERS__); method.executeWithVoidReturn(); } else _implementation->initializeTransientMembers(); } void BuildingObject::createContainerComponent() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CREATECONTAINERCOMPONENT__); method.executeWithVoidReturn(); } else _implementation->createContainerComponent(); } void BuildingObject::setCustomObjectName(const UnicodeString& name, bool notifyClient) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SETCUSTOMOBJECTNAME__UNICODESTRING_BOOL_); method.addUnicodeParameter(name); method.addBooleanParameter(notifyClient); method.executeWithVoidReturn(); } else _implementation->setCustomObjectName(name, notifyClient); } void BuildingObject::updateSignName(bool notifyClient) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UPDATESIGNNAME__BOOL_); method.addBooleanParameter(notifyClient); method.executeWithVoidReturn(); } else _implementation->updateSignName(notifyClient); } void BuildingObject::sendContainerObjectsTo(SceneObject* player) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SENDCONTAINEROBJECTSTO__SCENEOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->sendContainerObjectsTo(player); } void BuildingObject::updateCellPermissionsTo(CreatureObject* creature) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UPDATECELLPERMISSIONSTO__CREATUREOBJECT_); method.addObjectParameter(creature); method.executeWithVoidReturn(); } else _implementation->updateCellPermissionsTo(creature); } void BuildingObject::broadcastCellPermissions() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_BROADCASTCELLPERMISSIONS__); method.executeWithVoidReturn(); } else _implementation->broadcastCellPermissions(); } void BuildingObject::broadcastCellPermissions(unsigned long long objectid) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_BROADCASTCELLPERMISSIONS__LONG_); method.addUnsignedLongParameter(objectid); method.executeWithVoidReturn(); } else _implementation->broadcastCellPermissions(objectid); } bool BuildingObject::isAllowedEntry(CreatureObject* player) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ISALLOWEDENTRY__CREATUREOBJECT_); method.addObjectParameter(player); return method.executeWithBooleanReturn(); } else return _implementation->isAllowedEntry(player); } bool BuildingObject::isCityBanned(CreatureObject* player) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ISCITYBANNED__CREATUREOBJECT_); method.addObjectParameter(player); return method.executeWithBooleanReturn(); } else return _implementation->isCityBanned(player); } int BuildingObject::notifyStructurePlaced(CreatureObject* player) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYSTRUCTUREPLACED__CREATUREOBJECT_); method.addObjectParameter(player); return method.executeWithSignedIntReturn(); } else return _implementation->notifyStructurePlaced(player); } Vector3 BuildingObject::getEjectionPoint() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->getEjectionPoint(); } void BuildingObject::ejectObject(SceneObject* obj) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_EJECTOBJECT__SCENEOBJECT_); method.addObjectParameter(obj); method.executeWithVoidReturn(); } else _implementation->ejectObject(obj); } void BuildingObject::notifyRemoveFromZone() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYREMOVEFROMZONE__); method.executeWithVoidReturn(); } else _implementation->notifyRemoveFromZone(); } void BuildingObject::notifyLoadFromDatabase() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYLOADFROMDATABASE__); method.executeWithVoidReturn(); } else _implementation->notifyLoadFromDatabase(); } void BuildingObject::notifyInsert(QuadTreeEntry* obj) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->notifyInsert(obj); } void BuildingObject::notifyInsertToZone(Zone* zone) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYINSERTTOZONE__ZONE_); method.addObjectParameter(zone); method.executeWithVoidReturn(); } else _implementation->notifyInsertToZone(zone); } void BuildingObject::notifyDissapear(QuadTreeEntry* obj) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->notifyDissapear(obj); } void BuildingObject::notifyObjectInsertedToZone(SceneObject* object) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYOBJECTINSERTEDTOZONE__SCENEOBJECT_); method.addObjectParameter(object); method.executeWithVoidReturn(); } else _implementation->notifyObjectInsertedToZone(object); } void BuildingObject::insert(QuadTreeEntry* obj) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->insert(obj); } void BuildingObject::remove(QuadTreeEntry* obj) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->remove(obj); } void BuildingObject::update(QuadTreeEntry* obj) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->update(obj); } void BuildingObject::inRange(QuadTreeEntry* obj, float range) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->inRange(obj, range); } void BuildingObject::sendTo(SceneObject* player, bool doClose) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SENDTO__SCENEOBJECT_BOOL_); method.addObjectParameter(player); method.addBooleanParameter(doClose); method.executeWithVoidReturn(); } else _implementation->sendTo(player, doClose); } void BuildingObject::sendBaselinesTo(SceneObject* player) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SENDBASELINESTO__SCENEOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->sendBaselinesTo(player); } void BuildingObject::sendDestroyTo(SceneObject* player) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SENDDESTROYTO__SCENEOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->sendDestroyTo(player); } void BuildingObject::addCell(CellObject* cell, unsigned int cellNumber) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ADDCELL__CELLOBJECT_INT_); method.addObjectParameter(cell); method.addUnsignedIntParameter(cellNumber); method.executeWithVoidReturn(); } else _implementation->addCell(cell, cellNumber); } bool BuildingObject::isStaticBuilding() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ISSTATICBUILDING__); return method.executeWithBooleanReturn(); } else return _implementation->isStaticBuilding(); } CellObject* BuildingObject::getCell(unsigned int idx) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETCELL__INT_); method.addUnsignedIntParameter(idx); return static_cast(method.executeWithObjectReturn()); } else return _implementation->getCell(idx); } int BuildingObject::getTotalCellNumber() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETTOTALCELLNUMBER__); return method.executeWithSignedIntReturn(); } else return _implementation->getTotalCellNumber(); } bool BuildingObject::transferObject(SceneObject* object, int containmentType, bool notifyClient) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_TRANSFEROBJECT__SCENEOBJECT_INT_BOOL_); method.addObjectParameter(object); method.addSignedIntParameter(containmentType); method.addBooleanParameter(notifyClient); return method.executeWithBooleanReturn(); } else return _implementation->transferObject(object, containmentType, notifyClient); } int BuildingObject::notifyObjectInsertedToChild(SceneObject* object, SceneObject* child, SceneObject* oldParent) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYOBJECTINSERTEDTOCHILD__SCENEOBJECT_SCENEOBJECT_SCENEOBJECT_); method.addObjectParameter(object); method.addObjectParameter(child); method.addObjectParameter(oldParent); return method.executeWithSignedIntReturn(); } else return _implementation->notifyObjectInsertedToChild(object, child, oldParent); } int BuildingObject::notifyObjectRemovedFromChild(SceneObject* object, SceneObject* child) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYOBJECTREMOVEDFROMCHILD__SCENEOBJECT_SCENEOBJECT_); method.addObjectParameter(object); method.addObjectParameter(child); return method.executeWithSignedIntReturn(); } else return _implementation->notifyObjectRemovedFromChild(object, child); } int BuildingObject::getCurrentNumberOfPlayerItems() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETCURRENTNUMBEROFPLAYERITEMS__); return method.executeWithSignedIntReturn(); } else return _implementation->getCurrentNumberOfPlayerItems(); } void BuildingObject::destroyAllPlayerItems() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_DESTROYALLPLAYERITEMS__); method.executeWithVoidReturn(); } else _implementation->destroyAllPlayerItems(); } void BuildingObject::onEnter(CreatureObject* player) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ONENTER__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->onEnter(player); } void BuildingObject::onExit(CreatureObject* player, unsigned long long parentid) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ONEXIT__CREATUREOBJECT_LONG_); method.addObjectParameter(player); method.addUnsignedLongParameter(parentid); method.executeWithVoidReturn(); } else _implementation->onExit(player, parentid); } bool BuildingObject::isBuildingObject() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ISBUILDINGOBJECT__); return method.executeWithBooleanReturn(); } else return _implementation->isBuildingObject(); } void BuildingObject::setSignObject(SignObject* sign) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SETSIGNOBJECT__SIGNOBJECT_); method.addObjectParameter(sign); method.executeWithVoidReturn(); } else _implementation->setSignObject(sign); } SignObject* BuildingObject::getSignObject() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETSIGNOBJECT__); return static_cast(method.executeWithObjectReturn()); } else return _implementation->getSignObject(); } bool BuildingObject::isPublicStructure() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ISPUBLICSTRUCTURE__); return method.executeWithBooleanReturn(); } else return _implementation->isPublicStructure(); } bool BuildingObject::isPrivateStructure() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ISPRIVATESTRUCTURE__); return method.executeWithBooleanReturn(); } else return _implementation->isPrivateStructure(); } void BuildingObject::setPublicStructure(bool privacy) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SETPUBLICSTRUCTURE__BOOL_); method.addBooleanParameter(privacy); method.executeWithVoidReturn(); } else _implementation->setPublicStructure(privacy); } bool BuildingObject::isCondemned() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ISCONDEMNED__); return method.executeWithBooleanReturn(); } else return _implementation->isCondemned(); } int BuildingObject::getMapCellSize() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETMAPCELLSIZE__); return method.executeWithSignedIntReturn(); } else return _implementation->getMapCellSize(); } bool BuildingObject::togglePrivacy() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_TOGGLEPRIVACY__); return method.executeWithBooleanReturn(); } else return _implementation->togglePrivacy(); } unsigned int BuildingObject::getMaximumNumberOfPlayerItems() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETMAXIMUMNUMBEROFPLAYERITEMS__); return method.executeWithUnsignedIntReturn(); } else return _implementation->getMaximumNumberOfPlayerItems(); } String BuildingObject::getRedeedMessage() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETREDEEDMESSAGE__); String _return_getRedeedMessage; method.executeWithAsciiReturn(_return_getRedeedMessage); return _return_getRedeedMessage; } else return _implementation->getRedeedMessage(); } bool BuildingObject::hasAccessFee() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_HASACCESSFEE__); return method.executeWithBooleanReturn(); } else return _implementation->hasAccessFee(); } int BuildingObject::getAccessFee() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETACCESSFEE__); return method.executeWithSignedIntReturn(); } else return _implementation->getAccessFee(); } bool BuildingObject::canChangeAccessFee() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CANCHANGEACCESSFEE__); return method.executeWithBooleanReturn(); } else return _implementation->canChangeAccessFee(); } void BuildingObject::setAccessFee(int fee, int duration) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SETACCESSFEE__INT_INT_); method.addSignedIntParameter(fee); method.addSignedIntParameter(duration); method.executeWithVoidReturn(); } else _implementation->setAccessFee(fee, duration); } void BuildingObject::removeAccessFee() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_REMOVEACCESSFEE__); method.executeWithVoidReturn(); } else _implementation->removeAccessFee(); } int BuildingObject::getAccessFeeDelay() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETACCESSFEEDELAY__); return method.executeWithSignedIntReturn(); } else return _implementation->getAccessFeeDelay(); } void BuildingObject::payAccessFee(CreatureObject* player) { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_PAYACCESSFEE__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->payAccessFee(player); } void BuildingObject::updatePaidAccessList() { BuildingObjectImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UPDATEPAIDACCESSLIST__); method.executeWithVoidReturn(); } else _implementation->updatePaidAccessList(); } DistributedObjectServant* BuildingObject::_getImplementation() { if (!_updated) _updated = true; return _impl; } void BuildingObject::_setImplementation(DistributedObjectServant* servant) { _impl = servant; } /* * BuildingObjectImplementation */ BuildingObjectImplementation::BuildingObjectImplementation(DummyConstructorParameter* param) : StructureObjectImplementation(param) { _initializeImplementation(); } BuildingObjectImplementation::~BuildingObjectImplementation() { } void BuildingObjectImplementation::finalize() { } void BuildingObjectImplementation::_initializeImplementation() { _setClassHelper(BuildingObjectHelper::instance()); _this = NULL; _serializationHelperMethod(); } void BuildingObjectImplementation::_setStub(DistributedObjectStub* stub) { _this = static_cast(stub); StructureObjectImplementation::_setStub(stub); } DistributedObjectStub* BuildingObjectImplementation::_getStub() { return _this.get(); } BuildingObjectImplementation::operator const BuildingObject*() { return _this.get(); } void BuildingObjectImplementation::lock(bool doLock) { _this.getReferenceUnsafeStaticCast()->lock(doLock); } void BuildingObjectImplementation::lock(ManagedObject* obj) { _this.getReferenceUnsafeStaticCast()->lock(obj); } void BuildingObjectImplementation::rlock(bool doLock) { _this.getReferenceUnsafeStaticCast()->rlock(doLock); } void BuildingObjectImplementation::wlock(bool doLock) { _this.getReferenceUnsafeStaticCast()->wlock(doLock); } void BuildingObjectImplementation::wlock(ManagedObject* obj) { _this.getReferenceUnsafeStaticCast()->wlock(obj); } void BuildingObjectImplementation::unlock(bool doLock) { _this.getReferenceUnsafeStaticCast()->unlock(doLock); } void BuildingObjectImplementation::runlock(bool doLock) { _this.getReferenceUnsafeStaticCast()->runlock(doLock); } void BuildingObjectImplementation::_serializationHelperMethod() { StructureObjectImplementation::_serializationHelperMethod(); _setClassName("BuildingObject"); } void BuildingObjectImplementation::readObject(ObjectInputStream* stream) { uint16 _varCount = stream->readShort(); for (int i = 0; i < _varCount; ++i) { String _name; _name.parseFromBinaryStream(stream); uint32 _varSize = stream->readInt(); int _currentOffset = stream->getOffset(); if(BuildingObjectImplementation::readObjectMember(stream, _name)) { } stream->setOffset(_currentOffset + _varSize); } initializeTransientMembers(); } bool BuildingObjectImplementation::readObjectMember(ObjectInputStream* stream, const String& _name) { if (StructureObjectImplementation::readObjectMember(stream, _name)) return true; if (_name == "BuildingObject.cells") { TypeInfo > >::parseFromBinaryStream(&cells, stream); return true; } if (_name == "BuildingObject.totalCellNumber") { TypeInfo::parseFromBinaryStream(&totalCellNumber, stream); return true; } if (_name == "BuildingObject.signObject") { TypeInfo >::parseFromBinaryStream(&signObject, stream); return true; } if (_name == "BuildingObject.deedObjectID") { TypeInfo::parseFromBinaryStream(&deedObjectID, stream); return true; } if (_name == "BuildingObject.accessFee") { TypeInfo::parseFromBinaryStream(&accessFee, stream); return true; } if (_name == "BuildingObject.accessDuration") { TypeInfo::parseFromBinaryStream(&accessDuration, stream); return true; } if (_name == "BuildingObject.paidAccessList") { TypeInfo >::parseFromBinaryStream(&paidAccessList, stream); return true; } if (_name == "BuildingObject.publicStructure") { TypeInfo::parseFromBinaryStream(&publicStructure, stream); return true; } if (_name == "BuildingObject.signName") { TypeInfo::parseFromBinaryStream(&signName, stream); return true; } return false; } void BuildingObjectImplementation::writeObject(ObjectOutputStream* stream) { int _currentOffset = stream->getOffset(); stream->writeShort(0); int _varCount = BuildingObjectImplementation::writeObjectMembers(stream); stream->writeShort(_currentOffset, _varCount); } int BuildingObjectImplementation::writeObjectMembers(ObjectOutputStream* stream) { int _count = StructureObjectImplementation::writeObjectMembers(stream); String _name; int _offset; uint32 _totalSize; _name = "BuildingObject.cells"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo > >::toBinaryStream(&cells, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "BuildingObject.totalCellNumber"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo::toBinaryStream(&totalCellNumber, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "BuildingObject.signObject"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo >::toBinaryStream(&signObject, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "BuildingObject.deedObjectID"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo::toBinaryStream(&deedObjectID, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "BuildingObject.accessFee"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo::toBinaryStream(&accessFee, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "BuildingObject.accessDuration"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo::toBinaryStream(&accessDuration, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "BuildingObject.paidAccessList"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo >::toBinaryStream(&paidAccessList, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "BuildingObject.publicStructure"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo::toBinaryStream(&publicStructure, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "BuildingObject.signName"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo::toBinaryStream(&signName, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); return _count + 9; } BuildingObjectImplementation::BuildingObjectImplementation() { _initializeImplementation(); Reference _ref0; // server/zone/objects/building/BuildingObject.idl(): Logger.setLoggingName("BuildingObject"); Logger::setLoggingName("BuildingObject"); // server/zone/objects/building/BuildingObject.idl(): super.closeobjects = new CloseObjectsVector(); StructureObjectImplementation::closeobjects = _ref0 = new CloseObjectsVector(); // server/zone/objects/building/BuildingObject.idl(): super.closeobjects.setNoDuplicateInsertPlan(); StructureObjectImplementation::closeobjects->setNoDuplicateInsertPlan(); // server/zone/objects/building/BuildingObject.idl(): super.staticObject = false; StructureObjectImplementation::staticObject = false; // server/zone/objects/building/BuildingObject.idl(): totalCellNumber = 0; totalCellNumber = 0; // server/zone/objects/building/BuildingObject.idl(): accessFee = 0; accessFee = 0; // server/zone/objects/building/BuildingObject.idl(): accessDuration = 0; accessDuration = 0; // server/zone/objects/building/BuildingObject.idl(): lastAccessFeeChange = 0; lastAccessFeeChange = 0; // server/zone/objects/building/BuildingObject.idl(): deedObjectID = 0; deedObjectID = 0; // server/zone/objects/building/BuildingObject.idl(): publicStructure = true; publicStructure = true; // server/zone/objects/building/BuildingObject.idl(): signName = ""; signName = ""; } void BuildingObjectImplementation::setCustomObjectName(const UnicodeString& name, bool notifyClient) { // server/zone/objects/building/BuildingObject.idl(): signName = name; signName = name; // server/zone/objects/building/BuildingObject.idl(): updateSignName(notifyClient); updateSignName(notifyClient); } int BuildingObjectImplementation::notifyStructurePlaced(CreatureObject* player) { // server/zone/objects/building/BuildingObject.idl(): return 0; return 0; } bool BuildingObjectImplementation::isStaticBuilding() { // server/zone/objects/building/BuildingObject.idl(): return super.staticObject; return StructureObjectImplementation::staticObject; } CellObject* BuildingObjectImplementation::getCell(unsigned int idx) { // server/zone/objects/building/BuildingObject.idl(): return if (idx == 0){ // server/zone/objects/building/BuildingObject.idl(): super.error("trying to get Cell with id = 0"); StructureObjectImplementation::error("trying to get Cell with id = 0"); // server/zone/objects/building/BuildingObject.idl(): StackTrace.printStackTrace(); StackTrace::printStackTrace(); } // server/zone/objects/building/BuildingObject.idl(): return cells.get(idx); return (&cells)->get(idx); } int BuildingObjectImplementation::getTotalCellNumber() { // server/zone/objects/building/BuildingObject.idl(): return totalCellNumber; return totalCellNumber; } bool BuildingObjectImplementation::isBuildingObject() { // server/zone/objects/building/BuildingObject.idl(): return true; return true; } void BuildingObjectImplementation::setSignObject(SignObject* sign) { // server/zone/objects/building/BuildingObject.idl(): signObject = sign; signObject = sign; } SignObject* BuildingObjectImplementation::getSignObject() { // server/zone/objects/building/BuildingObject.idl(): return signObject; return signObject; } bool BuildingObjectImplementation::isPublicStructure() { // server/zone/objects/building/BuildingObject.idl(): return publicStructure; return publicStructure; } bool BuildingObjectImplementation::isPrivateStructure() { // server/zone/objects/building/BuildingObject.idl(): return !publicStructure; return !publicStructure; } void BuildingObjectImplementation::setPublicStructure(bool privacy) { // server/zone/objects/building/BuildingObject.idl(): publicStructure = privacy; publicStructure = privacy; } bool BuildingObjectImplementation::isCondemned() { // server/zone/objects/building/BuildingObject.idl(): return super.isDecayed(); return StructureObjectImplementation::isDecayed(); } int BuildingObjectImplementation::getMapCellSize() { // server/zone/objects/building/BuildingObject.idl(): return cells.size(); return (&cells)->size(); } bool BuildingObjectImplementation::togglePrivacy() { // server/zone/objects/building/BuildingObject.idl(): return (publicStructure = !publicStructure); return (publicStructure = !publicStructure); } String BuildingObjectImplementation::getRedeedMessage() { // server/zone/objects/building/BuildingObject.idl(): return if (getCurrentNumberOfPlayerItems() > 0) // server/zone/objects/building/BuildingObject.idl(): return "clear_building_for_delete"; return "clear_building_for_delete"; // server/zone/objects/building/BuildingObject.idl(): return ""; return ""; } bool BuildingObjectImplementation::hasAccessFee() { // server/zone/objects/building/BuildingObject.idl(): return accessFee > 0; return accessFee > 0; } int BuildingObjectImplementation::getAccessFee() { // server/zone/objects/building/BuildingObject.idl(): return accessFee; return accessFee; } void BuildingObjectImplementation::removeAccessFee() { // server/zone/objects/building/BuildingObject.idl(): accessFee = 0; accessFee = 0; // server/zone/objects/building/BuildingObject.idl(): accessDuration = 0; accessDuration = 0; // server/zone/objects/building/BuildingObject.idl(): paidAccessList.removeAll(); (&paidAccessList)->removeAll(); // server/zone/objects/building/BuildingObject.idl(): updatePaidAccessList(); updatePaidAccessList(); } /* * BuildingObjectAdapter */ #include "engine/orb/messages/InvokeMethodMessage.h" BuildingObjectAdapter::BuildingObjectAdapter(BuildingObject* obj) : StructureObjectAdapter(obj) { } void BuildingObjectAdapter::invokeMethod(uint32 methid, DistributedMethod* inv) { DOBMessage* resp = inv->getInvocationMessage(); switch (methid) { case RPC_CREATECELLOBJECTS__: { createCellObjects(); } break; case RPC_DESTROYOBJECTFROMDATABASE__BOOL_: { destroyObjectFromDatabase(inv->getBooleanParameter()); } break; case RPC_INITIALIZETRANSIENTMEMBERS__: { initializeTransientMembers(); } break; case RPC_CREATECONTAINERCOMPONENT__: { createContainerComponent(); } break; case RPC_SETCUSTOMOBJECTNAME__UNICODESTRING_BOOL_: { UnicodeString name; setCustomObjectName(inv->getUnicodeParameter(name), inv->getBooleanParameter()); } break; case RPC_UPDATESIGNNAME__BOOL_: { updateSignName(inv->getBooleanParameter()); } break; case RPC_SENDCONTAINEROBJECTSTO__SCENEOBJECT_: { sendContainerObjectsTo(static_cast(inv->getObjectParameter())); } break; case RPC_UPDATECELLPERMISSIONSTO__CREATUREOBJECT_: { updateCellPermissionsTo(static_cast(inv->getObjectParameter())); } break; case RPC_BROADCASTCELLPERMISSIONS__: { broadcastCellPermissions(); } break; case RPC_BROADCASTCELLPERMISSIONS__LONG_: { broadcastCellPermissions(inv->getUnsignedLongParameter()); } break; case RPC_ISALLOWEDENTRY__CREATUREOBJECT_: { resp->insertBoolean(isAllowedEntry(static_cast(inv->getObjectParameter()))); } break; case RPC_ISCITYBANNED__CREATUREOBJECT_: { resp->insertBoolean(isCityBanned(static_cast(inv->getObjectParameter()))); } break; case RPC_NOTIFYSTRUCTUREPLACED__CREATUREOBJECT_: { resp->insertSignedInt(notifyStructurePlaced(static_cast(inv->getObjectParameter()))); } break; case RPC_EJECTOBJECT__SCENEOBJECT_: { ejectObject(static_cast(inv->getObjectParameter())); } break; case RPC_NOTIFYREMOVEFROMZONE__: { notifyRemoveFromZone(); } break; case RPC_NOTIFYLOADFROMDATABASE__: { notifyLoadFromDatabase(); } break; case RPC_NOTIFYINSERTTOZONE__ZONE_: { notifyInsertToZone(static_cast(inv->getObjectParameter())); } break; case RPC_NOTIFYOBJECTINSERTEDTOZONE__SCENEOBJECT_: { notifyObjectInsertedToZone(static_cast(inv->getObjectParameter())); } break; case RPC_SENDTO__SCENEOBJECT_BOOL_: { sendTo(static_cast(inv->getObjectParameter()), inv->getBooleanParameter()); } break; case RPC_SENDBASELINESTO__SCENEOBJECT_: { sendBaselinesTo(static_cast(inv->getObjectParameter())); } break; case RPC_SENDDESTROYTO__SCENEOBJECT_: { sendDestroyTo(static_cast(inv->getObjectParameter())); } break; case RPC_ADDCELL__CELLOBJECT_INT_: { addCell(static_cast(inv->getObjectParameter()), inv->getUnsignedIntParameter()); } break; case RPC_ISSTATICBUILDING__: { resp->insertBoolean(isStaticBuilding()); } break; case RPC_GETCELL__INT_: { resp->insertLong(getCell(inv->getUnsignedIntParameter())->_getObjectID()); } break; case RPC_GETTOTALCELLNUMBER__: { resp->insertSignedInt(getTotalCellNumber()); } break; case RPC_TRANSFEROBJECT__SCENEOBJECT_INT_BOOL_: { resp->insertBoolean(transferObject(static_cast(inv->getObjectParameter()), inv->getSignedIntParameter(), inv->getBooleanParameter())); } break; case RPC_NOTIFYOBJECTINSERTEDTOCHILD__SCENEOBJECT_SCENEOBJECT_SCENEOBJECT_: { resp->insertSignedInt(notifyObjectInsertedToChild(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()))); } break; case RPC_NOTIFYOBJECTREMOVEDFROMCHILD__SCENEOBJECT_SCENEOBJECT_: { resp->insertSignedInt(notifyObjectRemovedFromChild(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()))); } break; case RPC_GETCURRENTNUMBEROFPLAYERITEMS__: { resp->insertSignedInt(getCurrentNumberOfPlayerItems()); } break; case RPC_DESTROYALLPLAYERITEMS__: { destroyAllPlayerItems(); } break; case RPC_ONENTER__CREATUREOBJECT_: { onEnter(static_cast(inv->getObjectParameter())); } break; case RPC_ONEXIT__CREATUREOBJECT_LONG_: { onExit(static_cast(inv->getObjectParameter()), inv->getUnsignedLongParameter()); } break; case RPC_ISBUILDINGOBJECT__: { resp->insertBoolean(isBuildingObject()); } break; case RPC_SETSIGNOBJECT__SIGNOBJECT_: { setSignObject(static_cast(inv->getObjectParameter())); } break; case RPC_GETSIGNOBJECT__: { resp->insertLong(getSignObject()->_getObjectID()); } break; case RPC_ISPUBLICSTRUCTURE__: { resp->insertBoolean(isPublicStructure()); } break; case RPC_ISPRIVATESTRUCTURE__: { resp->insertBoolean(isPrivateStructure()); } break; case RPC_SETPUBLICSTRUCTURE__BOOL_: { setPublicStructure(inv->getBooleanParameter()); } break; case RPC_ISCONDEMNED__: { resp->insertBoolean(isCondemned()); } break; case RPC_GETMAPCELLSIZE__: { resp->insertSignedInt(getMapCellSize()); } break; case RPC_TOGGLEPRIVACY__: { resp->insertBoolean(togglePrivacy()); } break; case RPC_GETMAXIMUMNUMBEROFPLAYERITEMS__: { resp->insertInt(getMaximumNumberOfPlayerItems()); } break; case RPC_GETREDEEDMESSAGE__: { resp->insertAscii(getRedeedMessage()); } break; case RPC_HASACCESSFEE__: { resp->insertBoolean(hasAccessFee()); } break; case RPC_GETACCESSFEE__: { resp->insertSignedInt(getAccessFee()); } break; case RPC_CANCHANGEACCESSFEE__: { resp->insertBoolean(canChangeAccessFee()); } break; case RPC_SETACCESSFEE__INT_INT_: { setAccessFee(inv->getSignedIntParameter(), inv->getSignedIntParameter()); } break; case RPC_REMOVEACCESSFEE__: { removeAccessFee(); } break; case RPC_GETACCESSFEEDELAY__: { resp->insertSignedInt(getAccessFeeDelay()); } break; case RPC_PAYACCESSFEE__CREATUREOBJECT_: { payAccessFee(static_cast(inv->getObjectParameter())); } break; case RPC_UPDATEPAIDACCESSLIST__: { updatePaidAccessList(); } break; default: throw Exception("Method does not exists"); } } void BuildingObjectAdapter::createCellObjects() { (static_cast(stub))->createCellObjects(); } void BuildingObjectAdapter::destroyObjectFromDatabase(bool destroyContainedObjects) { (static_cast(stub))->destroyObjectFromDatabase(destroyContainedObjects); } void BuildingObjectAdapter::initializeTransientMembers() { (static_cast(stub))->initializeTransientMembers(); } void BuildingObjectAdapter::createContainerComponent() { (static_cast(stub))->createContainerComponent(); } void BuildingObjectAdapter::setCustomObjectName(const UnicodeString& name, bool notifyClient) { (static_cast(stub))->setCustomObjectName(name, notifyClient); } void BuildingObjectAdapter::updateSignName(bool notifyClient) { (static_cast(stub))->updateSignName(notifyClient); } void BuildingObjectAdapter::sendContainerObjectsTo(SceneObject* player) { (static_cast(stub))->sendContainerObjectsTo(player); } void BuildingObjectAdapter::updateCellPermissionsTo(CreatureObject* creature) { (static_cast(stub))->updateCellPermissionsTo(creature); } void BuildingObjectAdapter::broadcastCellPermissions() { (static_cast(stub))->broadcastCellPermissions(); } void BuildingObjectAdapter::broadcastCellPermissions(unsigned long long objectid) { (static_cast(stub))->broadcastCellPermissions(objectid); } bool BuildingObjectAdapter::isAllowedEntry(CreatureObject* player) { return (static_cast(stub))->isAllowedEntry(player); } bool BuildingObjectAdapter::isCityBanned(CreatureObject* player) { return (static_cast(stub))->isCityBanned(player); } int BuildingObjectAdapter::notifyStructurePlaced(CreatureObject* player) { return (static_cast(stub))->notifyStructurePlaced(player); } void BuildingObjectAdapter::ejectObject(SceneObject* obj) { (static_cast(stub))->ejectObject(obj); } void BuildingObjectAdapter::notifyRemoveFromZone() { (static_cast(stub))->notifyRemoveFromZone(); } void BuildingObjectAdapter::notifyLoadFromDatabase() { (static_cast(stub))->notifyLoadFromDatabase(); } void BuildingObjectAdapter::notifyInsertToZone(Zone* zone) { (static_cast(stub))->notifyInsertToZone(zone); } void BuildingObjectAdapter::notifyObjectInsertedToZone(SceneObject* object) { (static_cast(stub))->notifyObjectInsertedToZone(object); } void BuildingObjectAdapter::sendTo(SceneObject* player, bool doClose) { (static_cast(stub))->sendTo(player, doClose); } void BuildingObjectAdapter::sendBaselinesTo(SceneObject* player) { (static_cast(stub))->sendBaselinesTo(player); } void BuildingObjectAdapter::sendDestroyTo(SceneObject* player) { (static_cast(stub))->sendDestroyTo(player); } void BuildingObjectAdapter::addCell(CellObject* cell, unsigned int cellNumber) { (static_cast(stub))->addCell(cell, cellNumber); } bool BuildingObjectAdapter::isStaticBuilding() { return (static_cast(stub))->isStaticBuilding(); } CellObject* BuildingObjectAdapter::getCell(unsigned int idx) { return (static_cast(stub))->getCell(idx); } int BuildingObjectAdapter::getTotalCellNumber() { return (static_cast(stub))->getTotalCellNumber(); } bool BuildingObjectAdapter::transferObject(SceneObject* object, int containmentType, bool notifyClient) { return (static_cast(stub))->transferObject(object, containmentType, notifyClient); } int BuildingObjectAdapter::notifyObjectInsertedToChild(SceneObject* object, SceneObject* child, SceneObject* oldParent) { return (static_cast(stub))->notifyObjectInsertedToChild(object, child, oldParent); } int BuildingObjectAdapter::notifyObjectRemovedFromChild(SceneObject* object, SceneObject* child) { return (static_cast(stub))->notifyObjectRemovedFromChild(object, child); } int BuildingObjectAdapter::getCurrentNumberOfPlayerItems() { return (static_cast(stub))->getCurrentNumberOfPlayerItems(); } void BuildingObjectAdapter::destroyAllPlayerItems() { (static_cast(stub))->destroyAllPlayerItems(); } void BuildingObjectAdapter::onEnter(CreatureObject* player) { (static_cast(stub))->onEnter(player); } void BuildingObjectAdapter::onExit(CreatureObject* player, unsigned long long parentid) { (static_cast(stub))->onExit(player, parentid); } bool BuildingObjectAdapter::isBuildingObject() { return (static_cast(stub))->isBuildingObject(); } void BuildingObjectAdapter::setSignObject(SignObject* sign) { (static_cast(stub))->setSignObject(sign); } SignObject* BuildingObjectAdapter::getSignObject() { return (static_cast(stub))->getSignObject(); } bool BuildingObjectAdapter::isPublicStructure() { return (static_cast(stub))->isPublicStructure(); } bool BuildingObjectAdapter::isPrivateStructure() { return (static_cast(stub))->isPrivateStructure(); } void BuildingObjectAdapter::setPublicStructure(bool privacy) { (static_cast(stub))->setPublicStructure(privacy); } bool BuildingObjectAdapter::isCondemned() { return (static_cast(stub))->isCondemned(); } int BuildingObjectAdapter::getMapCellSize() { return (static_cast(stub))->getMapCellSize(); } bool BuildingObjectAdapter::togglePrivacy() { return (static_cast(stub))->togglePrivacy(); } unsigned int BuildingObjectAdapter::getMaximumNumberOfPlayerItems() { return (static_cast(stub))->getMaximumNumberOfPlayerItems(); } String BuildingObjectAdapter::getRedeedMessage() { return (static_cast(stub))->getRedeedMessage(); } bool BuildingObjectAdapter::hasAccessFee() { return (static_cast(stub))->hasAccessFee(); } int BuildingObjectAdapter::getAccessFee() { return (static_cast(stub))->getAccessFee(); } bool BuildingObjectAdapter::canChangeAccessFee() { return (static_cast(stub))->canChangeAccessFee(); } void BuildingObjectAdapter::setAccessFee(int fee, int duration) { (static_cast(stub))->setAccessFee(fee, duration); } void BuildingObjectAdapter::removeAccessFee() { (static_cast(stub))->removeAccessFee(); } int BuildingObjectAdapter::getAccessFeeDelay() { return (static_cast(stub))->getAccessFeeDelay(); } void BuildingObjectAdapter::payAccessFee(CreatureObject* player) { (static_cast(stub))->payAccessFee(player); } void BuildingObjectAdapter::updatePaidAccessList() { (static_cast(stub))->updatePaidAccessList(); } /* * BuildingObjectHelper */ BuildingObjectHelper* BuildingObjectHelper::staticInitializer = BuildingObjectHelper::instance(); BuildingObjectHelper::BuildingObjectHelper() { className = "BuildingObject"; Core::getObjectBroker()->registerClass(className, this); } void BuildingObjectHelper::finalizeHelper() { BuildingObjectHelper::finalize(); } DistributedObject* BuildingObjectHelper::instantiateObject() { return new BuildingObject(DummyConstructorParameter::instance()); } DistributedObjectServant* BuildingObjectHelper::instantiateServant() { return new BuildingObjectImplementation(); } DistributedObjectAdapter* BuildingObjectHelper::createAdapter(DistributedObjectStub* obj) { DistributedObjectAdapter* adapter = new BuildingObjectAdapter(static_cast(obj)); obj->_setClassName(className); obj->_setClassHelper(this); adapter->setStub(obj); return adapter; }