/* * server/zone/managers/player/PlayerManager.cpp generated by engine3 IDL compiler 0.60 */ #include "PlayerManager.h" #include "server/zone/managers/objectcontroller/ObjectController.h" #include "server/zone/objects/group/GroupObject.h" #include "server/zone/ZoneProcessServer.h" #include "server/zone/managers/object/ObjectManager.h" #include "server/zone/packets/MessageCallback.h" #include "server/zone/objects/tangible/TangibleObject.h" #include "server/zone/ZoneServer.h" #include "server/zone/objects/tangible/wearables/ArmorObject.h" #include "server/zone/objects/tangible/weapon/WeaponObject.h" #include "server/zone/objects/player/PlayerObject.h" #include "server/zone/objects/structure/StructureObject.h" #include "server/zone/objects/creature/AiAgent.h" #include "server/zone/objects/creature/Creature.h" #include "server/zone/objects/tangible/tool/CraftingStation.h" #include "server/zone/objects/tangible/threat/ThreatMap.h" #include "server/login/account/Account.h" /* * PlayerManagerStub */ enum {RPC_LOADNAMEMAP__ = 6,RPC_GETHIGHESTBADGEINDEX__,RPC_FINALIZE__,RPC_KICKUSER__STRING_STRING_STRING_BOOL_,RPC_NOTIFYOBSERVEREVENT__INT_OBSERVABLE_MANAGEDOBJECT_LONG_,RPC_NOTIFYDESTRUCTION__TANGIBLEOBJECT_TANGIBLEOBJECT_INT_,RPC_SHOULDRESCHEDULECORPSEDESTRUCTION__CREATUREOBJECT_CREATUREOBJECT_,RPC_RESCHEDULECORPSEDESTRUCTION__CREATUREOBJECT_CREATUREOBJECT_,RPC_CANGROUPMEMBERHARVESTCORPSE__CREATUREOBJECT_CREATURE_,RPC_KILLPLAYER__TANGIBLEOBJECT_CREATUREOBJECT_INT_,RPC_CALCULATEINCAPACITATIONTIMER__CREATUREOBJECT_INT_,RPC_CHECKENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_,RPC_APPLYENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_,RPC_REMOVEENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_,RPC_AWARDBADGE__PLAYEROBJECT_INT_,RPC_SETEXPERIENCEMULTIPLIER__FLOAT_,RPC_AWARDEXPERIENCE__CREATUREOBJECT_STRING_INT_BOOL_FLOAT_,RPC_HANDLEABORTTRADEMESSAGE__CREATUREOBJECT_,RPC_HANDLEADDITEMTOTRADEWINDOW__CREATUREOBJECT_LONG_,RPC_HANDLEGIVEMONEYMESSAGE__CREATUREOBJECT_INT_,RPC_HANDLEACCEPTTRANSACTIONMESSAGE__CREATUREOBJECT_,RPC_HANDLEUNACCEPTTRANSACTIONMESSAGE__CREATUREOBJECT_,RPC_HANDLEVERIFYTRADEMESSAGE__CREATUREOBJECT_,RPC_CHECKTRADEITEMS__CREATUREOBJECT_CREATUREOBJECT_,RPC_GETINRANGESTRUCTUREWITHADMINRIGHTS__CREATUREOBJECT_LONG_,RPC_GETINRANGEOWNEDSTRUCTURE__CREATUREOBJECT_FLOAT_,RPC_SENDBATTLEFATIGUEMESSAGE__CREATUREOBJECT_CREATUREOBJECT_,RPC_STOPWATCH__CREATUREOBJECT_LONG_BOOL_BOOL_BOOL_BOOL_,RPC_STOPLISTEN__CREATUREOBJECT_LONG_BOOL_BOOL_BOOL_BOOL_,RPC_STARTWATCH__CREATUREOBJECT_LONG_,RPC_STARTLISTEN__CREATUREOBJECT_LONG_,RPC_LOOTALL__CREATUREOBJECT_CREATUREOBJECT_,RPC_HEALENHANCE__CREATUREOBJECT_CREATUREOBJECT_BYTE_INT_FLOAT_,RPC_CALCULATEPLAYERLEVEL__CREATUREOBJECT_,RPC_SENDLOGINMESSAGE__CREATUREOBJECT_,RPC_RESENDLOGINMESSAGETOALL__,RPC_SENDACTIVATECLONEREQUEST__CREATUREOBJECT_INT_,RPC_SENDPLAYERTOCLONER__CREATUREOBJECT_LONG_INT_,RPC_CHECKEXISTENTNAMEINDATABASE__STRING_,RPC_CREATEHAIROBJECT__STRING_STRING_,RPC_CREATEALLPLAYEROBJECTS__CREATUREOBJECT_,RPC_CREATEDEFAULTPLAYERITEMS__CREATUREOBJECT_STRING_STRING_,RPC_CREATETUTORIALBUILDING__CREATUREOBJECT_,RPC_CREATESKIPPEDTUTORIALBUILDING__CREATUREOBJECT_,RPC_UPDATESWIMMINGSTATE__CREATUREOBJECT_FLOAT_,RPC_CHECKSPEEDHACKSECONDTEST__CREATUREOBJECT_FLOAT_FLOAT_FLOAT_INT_SCENEOBJECT_,RPC_EXISTSNAME__STRING_,RPC_GETOBJECTID__STRING_,RPC_GETPLAYER__STRING_,RPC_UPDATEPERMISSIONLEVEL__CREATUREOBJECT_INT_,RPC_UPDATEPERMISSIONNAME__CREATUREOBJECT_INT_,RPC_GENERATEHOLOGRINDSKILLS__CREATUREOBJECT_,RPC_ADDPLAYER__CREATUREOBJECT_,RPC_REMOVEPLAYER__STRING_,RPC_GETBADGEKEY__INT_,RPC_GETNEARBYCRAFTINGSTATION__CREATUREOBJECT_INT_,RPC_FINISHHOLOGRIND__CREATUREOBJECT_,RPC_GETACCOUNT__STRING_,RPC_GETACCOUNT__INT_,RPC_BANACCOUNT__PLAYEROBJECT_ACCOUNT_INT_STRING_,RPC_UNBANACCOUNT__PLAYEROBJECT_ACCOUNT_STRING_,RPC_BANFROMGALAXY__PLAYEROBJECT_ACCOUNT_INT_INT_STRING_,RPC_UNBANFROMGALAXY__PLAYEROBJECT_ACCOUNT_INT_STRING_,RPC_BANCHARACTER__PLAYEROBJECT_ACCOUNT_STRING_INT_INT_STRING_,RPC_UNBANCHARACTER__PLAYEROBJECT_ACCOUNT_STRING_INT_STRING_,RPC_PROMPTTEACHABLESKILLS__CREATUREOBJECT_SCENEOBJECT_,RPC_DECREASEONLINECHARCOUNT__ZONECLIENTSESSION_,RPC_INCREASEONLINECHARCOUNTIFPOSSIBLE__ZONECLIENTSESSION_,RPC_FIXHAM__CREATUREOBJECT_,}; PlayerManager::PlayerManager(ZoneServer* zoneServer, ZoneProcessServer* impl) : Observer(DummyConstructorParameter::instance()) { PlayerManagerImplementation* _implementation = new PlayerManagerImplementation(zoneServer, impl); _impl = _implementation; _impl->_setStub(this); _setClassName("PlayerManager"); } PlayerManager::PlayerManager(DummyConstructorParameter* param) : Observer(param) { _setClassName("PlayerManager"); } PlayerManager::~PlayerManager() { } void PlayerManager::loadNameMap() { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_LOADNAMEMAP__); method.executeWithVoidReturn(); } else _implementation->loadNameMap(); } int PlayerManager::getHighestBadgeIndex() { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETHIGHESTBADGEINDEX__); return method.executeWithSignedIntReturn(); } else return _implementation->getHighestBadgeIndex(); } void PlayerManager::sendStartingLocationsTo(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->sendStartingLocationsTo(player); } StartingLocation* PlayerManager::getStartingLocation(const String& city) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->getStartingLocation(city); } bool PlayerManager::kickUser(const String& name, const String& admin, String& reason, bool doBan) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_KICKUSER__STRING_STRING_STRING_BOOL_); method.addAsciiParameter(name); method.addAsciiParameter(admin); method.addAsciiParameter(reason); method.addBooleanParameter(doBan); return method.executeWithBooleanReturn(); } else return _implementation->kickUser(name, admin, reason, doBan); } bool PlayerManager::createPlayer(MessageCallback* callback) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->createPlayer(callback); } bool PlayerManager::checkPlayerName(MessageCallback* callback) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->checkPlayerName(callback); } int PlayerManager::notifyObserverEvent(unsigned int eventType, Observable* observable, ManagedObject* arg1, long long arg2) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYOBSERVEREVENT__INT_OBSERVABLE_MANAGEDOBJECT_LONG_); method.addUnsignedIntParameter(eventType); method.addObjectParameter(observable); method.addObjectParameter(arg1); method.addSignedLongParameter(arg2); return method.executeWithSignedIntReturn(); } else return _implementation->notifyObserverEvent(eventType, observable, arg1, arg2); } int PlayerManager::notifyDestruction(TangibleObject* destructor, TangibleObject* destructedObject, int condition) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_NOTIFYDESTRUCTION__TANGIBLEOBJECT_TANGIBLEOBJECT_INT_); method.addObjectParameter(destructor); method.addObjectParameter(destructedObject); method.addSignedIntParameter(condition); return method.executeWithSignedIntReturn(); } else return _implementation->notifyDestruction(destructor, destructedObject, condition); } bool PlayerManager::shouldRescheduleCorpseDestruction(CreatureObject* player, CreatureObject* ai) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SHOULDRESCHEDULECORPSEDESTRUCTION__CREATUREOBJECT_CREATUREOBJECT_); method.addObjectParameter(player); method.addObjectParameter(ai); return method.executeWithBooleanReturn(); } else return _implementation->shouldRescheduleCorpseDestruction(player, ai); } void PlayerManager::rescheduleCorpseDestruction(CreatureObject* player, CreatureObject* ai) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_RESCHEDULECORPSEDESTRUCTION__CREATUREOBJECT_CREATUREOBJECT_); method.addObjectParameter(player); method.addObjectParameter(ai); method.executeWithVoidReturn(); } else _implementation->rescheduleCorpseDestruction(player, ai); } bool PlayerManager::canGroupMemberHarvestCorpse(CreatureObject* player, Creature* creature) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CANGROUPMEMBERHARVESTCORPSE__CREATUREOBJECT_CREATURE_); method.addObjectParameter(player); method.addObjectParameter(creature); return method.executeWithBooleanReturn(); } else return _implementation->canGroupMemberHarvestCorpse(player, creature); } void PlayerManager::killPlayer(TangibleObject* attacker, CreatureObject* player, int typeofdeath) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_KILLPLAYER__TANGIBLEOBJECT_CREATUREOBJECT_INT_); method.addObjectParameter(attacker); method.addObjectParameter(player); method.addSignedIntParameter(typeofdeath); method.executeWithVoidReturn(); } else _implementation->killPlayer(attacker, player, typeofdeath); } byte PlayerManager::calculateIncapacitationTimer(CreatureObject* player, int condition) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CALCULATEINCAPACITATIONTIMER__CREATUREOBJECT_INT_); method.addObjectParameter(player); method.addSignedIntParameter(condition); return method.executeWithByteReturn(); } else return _implementation->calculateIncapacitationTimer(player, condition); } bool PlayerManager::checkEncumbrancies(CreatureObject* player, ArmorObject* armor) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CHECKENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_); method.addObjectParameter(player); method.addObjectParameter(armor); return method.executeWithBooleanReturn(); } else return _implementation->checkEncumbrancies(player, armor); } void PlayerManager::applyEncumbrancies(CreatureObject* player, ArmorObject* armor) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_APPLYENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_); method.addObjectParameter(player); method.addObjectParameter(armor); method.executeWithVoidReturn(); } else _implementation->applyEncumbrancies(player, armor); } void PlayerManager::removeEncumbrancies(CreatureObject* player, ArmorObject* armor) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_REMOVEENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_); method.addObjectParameter(player); method.addObjectParameter(armor); method.executeWithVoidReturn(); } else _implementation->removeEncumbrancies(player, armor); } void PlayerManager::awardBadge(PlayerObject* ghost, unsigned int badge) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_AWARDBADGE__PLAYEROBJECT_INT_); method.addObjectParameter(ghost); method.addUnsignedIntParameter(badge); method.executeWithVoidReturn(); } else _implementation->awardBadge(ghost, badge); } void PlayerManager::setExperienceMultiplier(float globalMultiplier) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SETEXPERIENCEMULTIPLIER__FLOAT_); method.addFloatParameter(globalMultiplier); method.executeWithVoidReturn(); } else _implementation->setExperienceMultiplier(globalMultiplier); } void PlayerManager::awardExperience(CreatureObject* player, const String& xpType, int amount, bool sendSystemMessage, float localMultiplier) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_AWARDEXPERIENCE__CREATUREOBJECT_STRING_INT_BOOL_FLOAT_); method.addObjectParameter(player); method.addAsciiParameter(xpType); method.addSignedIntParameter(amount); method.addBooleanParameter(sendSystemMessage); method.addFloatParameter(localMultiplier); method.executeWithVoidReturn(); } else _implementation->awardExperience(player, xpType, amount, sendSystemMessage, localMultiplier); } SortedVector > PlayerManager::getInsurableItems(CreatureObject* player, bool onlyInsurable) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->getInsurableItems(player, onlyInsurable); } void PlayerManager::addInsurableItemsRecursive(SceneObject* obj, SortedVector >* items, bool onlyInsurable) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->addInsurableItemsRecursive(obj, items, onlyInsurable); } void PlayerManager::handleAbortTradeMessage(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_HANDLEABORTTRADEMESSAGE__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->handleAbortTradeMessage(player); } void PlayerManager::handleAddItemToTradeWindow(CreatureObject* player, unsigned long long itemID) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_HANDLEADDITEMTOTRADEWINDOW__CREATUREOBJECT_LONG_); method.addObjectParameter(player); method.addUnsignedLongParameter(itemID); method.executeWithVoidReturn(); } else _implementation->handleAddItemToTradeWindow(player, itemID); } void PlayerManager::handleGiveMoneyMessage(CreatureObject* player, unsigned int value) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_HANDLEGIVEMONEYMESSAGE__CREATUREOBJECT_INT_); method.addObjectParameter(player); method.addUnsignedIntParameter(value); method.executeWithVoidReturn(); } else _implementation->handleGiveMoneyMessage(player, value); } void PlayerManager::handleAcceptTransactionMessage(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_HANDLEACCEPTTRANSACTIONMESSAGE__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->handleAcceptTransactionMessage(player); } void PlayerManager::handleUnAcceptTransactionMessage(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_HANDLEUNACCEPTTRANSACTIONMESSAGE__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->handleUnAcceptTransactionMessage(player); } void PlayerManager::handleVerifyTradeMessage(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_HANDLEVERIFYTRADEMESSAGE__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->handleVerifyTradeMessage(player); } bool PlayerManager::checkTradeItems(CreatureObject* player, CreatureObject* receiver) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CHECKTRADEITEMS__CREATUREOBJECT_CREATUREOBJECT_); method.addObjectParameter(player); method.addObjectParameter(receiver); return method.executeWithBooleanReturn(); } else return _implementation->checkTradeItems(player, receiver); } SceneObject* PlayerManager::getInRangeStructureWithAdminRights(CreatureObject* creature, unsigned long long targetID) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETINRANGESTRUCTUREWITHADMINRIGHTS__CREATUREOBJECT_LONG_); method.addObjectParameter(creature); method.addUnsignedLongParameter(targetID); return static_cast(method.executeWithObjectReturn()); } else return _implementation->getInRangeStructureWithAdminRights(creature, targetID); } StructureObject* PlayerManager::getInRangeOwnedStructure(CreatureObject* creature, float range) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETINRANGEOWNEDSTRUCTURE__CREATUREOBJECT_FLOAT_); method.addObjectParameter(creature); method.addFloatParameter(range); return static_cast(method.executeWithObjectReturn()); } else return _implementation->getInRangeOwnedStructure(creature, range); } void PlayerManager::sendBattleFatigueMessage(CreatureObject* player, CreatureObject* target) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SENDBATTLEFATIGUEMESSAGE__CREATUREOBJECT_CREATUREOBJECT_); method.addObjectParameter(player); method.addObjectParameter(target); method.executeWithVoidReturn(); } else _implementation->sendBattleFatigueMessage(player, target); } void PlayerManager::stopWatch(CreatureObject* creature, unsigned long long entid, bool doSendPackets, bool forced, bool doLock, bool outOfRange) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_STOPWATCH__CREATUREOBJECT_LONG_BOOL_BOOL_BOOL_BOOL_); method.addObjectParameter(creature); method.addUnsignedLongParameter(entid); method.addBooleanParameter(doSendPackets); method.addBooleanParameter(forced); method.addBooleanParameter(doLock); method.addBooleanParameter(outOfRange); method.executeWithVoidReturn(); } else _implementation->stopWatch(creature, entid, doSendPackets, forced, doLock, outOfRange); } void PlayerManager::stopListen(CreatureObject* creature, unsigned long long entid, bool doSendPackets, bool forced, bool doLock, bool outOfRange) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_STOPLISTEN__CREATUREOBJECT_LONG_BOOL_BOOL_BOOL_BOOL_); method.addObjectParameter(creature); method.addUnsignedLongParameter(entid); method.addBooleanParameter(doSendPackets); method.addBooleanParameter(forced); method.addBooleanParameter(doLock); method.addBooleanParameter(outOfRange); method.executeWithVoidReturn(); } else _implementation->stopListen(creature, entid, doSendPackets, forced, doLock, outOfRange); } void PlayerManager::startWatch(CreatureObject* creature, unsigned long long entid) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_STARTWATCH__CREATUREOBJECT_LONG_); method.addObjectParameter(creature); method.addUnsignedLongParameter(entid); method.executeWithVoidReturn(); } else _implementation->startWatch(creature, entid); } void PlayerManager::startListen(CreatureObject* creature, unsigned long long entid) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_STARTLISTEN__CREATUREOBJECT_LONG_); method.addObjectParameter(creature); method.addUnsignedLongParameter(entid); method.executeWithVoidReturn(); } else _implementation->startListen(creature, entid); } void PlayerManager::lootAll(CreatureObject* player, CreatureObject* creature) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_LOOTALL__CREATUREOBJECT_CREATUREOBJECT_); method.addObjectParameter(player); method.addObjectParameter(creature); method.executeWithVoidReturn(); } else _implementation->lootAll(player, creature); } int PlayerManager::healEnhance(CreatureObject* enhancer, CreatureObject* patient, byte attribute, int buffvalue, float duration) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_HEALENHANCE__CREATUREOBJECT_CREATUREOBJECT_BYTE_INT_FLOAT_); method.addObjectParameter(enhancer); method.addObjectParameter(patient); method.addByteParameter(attribute); method.addSignedIntParameter(buffvalue); method.addFloatParameter(duration); return method.executeWithSignedIntReturn(); } else return _implementation->healEnhance(enhancer, patient, attribute, buffvalue, duration); } void PlayerManager::disseminateExperience(TangibleObject* destructedObject, ThreatMap* threatMap) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else _implementation->disseminateExperience(destructedObject, threatMap); } int PlayerManager::calculatePlayerLevel(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CALCULATEPLAYERLEVEL__CREATUREOBJECT_); method.addObjectParameter(player); return method.executeWithSignedIntReturn(); } else return _implementation->calculatePlayerLevel(player); } void PlayerManager::sendLoginMessage(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SENDLOGINMESSAGE__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->sendLoginMessage(player); } void PlayerManager::resendLoginMessageToAll() { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_RESENDLOGINMESSAGETOALL__); method.executeWithVoidReturn(); } else _implementation->resendLoginMessageToAll(); } void PlayerManager::sendActivateCloneRequest(CreatureObject* player, int typeofdeath) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SENDACTIVATECLONEREQUEST__CREATUREOBJECT_INT_); method.addObjectParameter(player); method.addSignedIntParameter(typeofdeath); method.executeWithVoidReturn(); } else _implementation->sendActivateCloneRequest(player, typeofdeath); } void PlayerManager::sendPlayerToCloner(CreatureObject* player, unsigned long long clonerID, int typeofdeath) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_SENDPLAYERTOCLONER__CREATUREOBJECT_LONG_INT_); method.addObjectParameter(player); method.addUnsignedLongParameter(clonerID); method.addSignedIntParameter(typeofdeath); method.executeWithVoidReturn(); } else _implementation->sendPlayerToCloner(player, clonerID, typeofdeath); } bool PlayerManager::checkExistentNameInDatabase(const String& firstName) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CHECKEXISTENTNAMEINDATABASE__STRING_); method.addAsciiParameter(firstName); return method.executeWithBooleanReturn(); } else return _implementation->checkExistentNameInDatabase(firstName); } TangibleObject* PlayerManager::createHairObject(const String& hairObjectFile, const String& hairCustomization) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CREATEHAIROBJECT__STRING_STRING_); method.addAsciiParameter(hairObjectFile); method.addAsciiParameter(hairCustomization); return static_cast(method.executeWithObjectReturn()); } else return _implementation->createHairObject(hairObjectFile, hairCustomization); } bool PlayerManager::createAllPlayerObjects(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CREATEALLPLAYEROBJECTS__CREATUREOBJECT_); method.addObjectParameter(player); return method.executeWithBooleanReturn(); } else return _implementation->createAllPlayerObjects(player); } void PlayerManager::createDefaultPlayerItems(CreatureObject* player, const String& profession, const String& templateFile) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CREATEDEFAULTPLAYERITEMS__CREATUREOBJECT_STRING_STRING_); method.addObjectParameter(player); method.addAsciiParameter(profession); method.addAsciiParameter(templateFile); method.executeWithVoidReturn(); } else _implementation->createDefaultPlayerItems(player, profession, templateFile); } void PlayerManager::createTutorialBuilding(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CREATETUTORIALBUILDING__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->createTutorialBuilding(player); } void PlayerManager::createSkippedTutorialBuilding(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CREATESKIPPEDTUTORIALBUILDING__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->createSkippedTutorialBuilding(player); } void PlayerManager::updateSwimmingState(CreatureObject* player, float newZ) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UPDATESWIMMINGSTATE__CREATUREOBJECT_FLOAT_); method.addObjectParameter(player); method.addFloatParameter(newZ); method.executeWithVoidReturn(); } else _implementation->updateSwimmingState(player, newZ); } int PlayerManager::checkSpeedHackFirstTest(CreatureObject* player, float parsedSpeed, ValidatedPosition& teleportPosition, float errorMultiplier) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->checkSpeedHackFirstTest(player, parsedSpeed, teleportPosition, errorMultiplier); } int PlayerManager::checkSpeedHackSecondTest(CreatureObject* player, float newX, float newZ, float newY, unsigned int newStamp, SceneObject* newParent) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_CHECKSPEEDHACKSECONDTEST__CREATUREOBJECT_FLOAT_FLOAT_FLOAT_INT_SCENEOBJECT_); method.addObjectParameter(player); method.addFloatParameter(newX); method.addFloatParameter(newZ); method.addFloatParameter(newY); method.addUnsignedIntParameter(newStamp); method.addObjectParameter(newParent); return method.executeWithSignedIntReturn(); } else return _implementation->checkSpeedHackSecondTest(player, newX, newZ, newY, newStamp, newParent); } bool PlayerManager::existsName(const String& name) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_EXISTSNAME__STRING_); method.addAsciiParameter(name); return method.executeWithBooleanReturn(); } else return _implementation->existsName(name); } unsigned long long PlayerManager::getObjectID(const String& name) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETOBJECTID__STRING_); method.addAsciiParameter(name); return method.executeWithUnsignedLongReturn(); } else return _implementation->getObjectID(name); } CreatureObject* PlayerManager::getPlayer(const String& name) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETPLAYER__STRING_); method.addAsciiParameter(name); return static_cast(method.executeWithObjectReturn()); } else return _implementation->getPlayer(name); } void PlayerManager::updatePermissionLevel(CreatureObject* player, int adminLevel) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UPDATEPERMISSIONLEVEL__CREATUREOBJECT_INT_); method.addObjectParameter(player); method.addSignedIntParameter(adminLevel); method.executeWithVoidReturn(); } else _implementation->updatePermissionLevel(player, adminLevel); } void PlayerManager::updatePermissionName(CreatureObject* player, int adminLevel) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UPDATEPERMISSIONNAME__CREATUREOBJECT_INT_); method.addObjectParameter(player); method.addSignedIntParameter(adminLevel); method.executeWithVoidReturn(); } else _implementation->updatePermissionName(player, adminLevel); } void PlayerManager::generateHologrindSkills(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GENERATEHOLOGRINDSKILLS__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->generateHologrindSkills(player); } void PlayerManager::addPlayer(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_ADDPLAYER__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->addPlayer(player); } void PlayerManager::removePlayer(String& playerName) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_REMOVEPLAYER__STRING_); method.addAsciiParameter(playerName); method.executeWithVoidReturn(); } else _implementation->removePlayer(playerName); } String PlayerManager::getBadgeKey(int idx) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETBADGEKEY__INT_); method.addSignedIntParameter(idx); String _return_getBadgeKey; method.executeWithAsciiReturn(_return_getBadgeKey); return _return_getBadgeKey; } else return _implementation->getBadgeKey(idx); } CraftingStation* PlayerManager::getNearbyCraftingStation(CreatureObject* player, int type) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETNEARBYCRAFTINGSTATION__CREATUREOBJECT_INT_); method.addObjectParameter(player); method.addSignedIntParameter(type); return static_cast(method.executeWithObjectReturn()); } else return _implementation->getNearbyCraftingStation(player, type); } void PlayerManager::finishHologrind(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_FINISHHOLOGRIND__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->finishHologrind(player); } Account* PlayerManager::getAccount(const String& username) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETACCOUNT__STRING_); method.addAsciiParameter(username); return static_cast(method.executeWithObjectReturn()); } else return _implementation->getAccount(username); } Account* PlayerManager::getAccount(unsigned int accountID) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_GETACCOUNT__INT_); method.addUnsignedIntParameter(accountID); return static_cast(method.executeWithObjectReturn()); } else return _implementation->getAccount(accountID); } String PlayerManager::banAccount(PlayerObject* admin, Account* account, unsigned int seconds, const String& reason) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_BANACCOUNT__PLAYEROBJECT_ACCOUNT_INT_STRING_); method.addObjectParameter(admin); method.addObjectParameter(account); method.addUnsignedIntParameter(seconds); method.addAsciiParameter(reason); String _return_banAccount; method.executeWithAsciiReturn(_return_banAccount); return _return_banAccount; } else return _implementation->banAccount(admin, account, seconds, reason); } String PlayerManager::unbanAccount(PlayerObject* admin, Account* account, const String& reason) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UNBANACCOUNT__PLAYEROBJECT_ACCOUNT_STRING_); method.addObjectParameter(admin); method.addObjectParameter(account); method.addAsciiParameter(reason); String _return_unbanAccount; method.executeWithAsciiReturn(_return_unbanAccount); return _return_unbanAccount; } else return _implementation->unbanAccount(admin, account, reason); } String PlayerManager::banFromGalaxy(PlayerObject* admin, Account* account, unsigned const int galaxy, unsigned int seconds, const String& reason) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_BANFROMGALAXY__PLAYEROBJECT_ACCOUNT_INT_INT_STRING_); method.addObjectParameter(admin); method.addObjectParameter(account); method.addUnsignedIntParameter(galaxy); method.addUnsignedIntParameter(seconds); method.addAsciiParameter(reason); String _return_banFromGalaxy; method.executeWithAsciiReturn(_return_banFromGalaxy); return _return_banFromGalaxy; } else return _implementation->banFromGalaxy(admin, account, galaxy, seconds, reason); } String PlayerManager::unbanFromGalaxy(PlayerObject* admin, Account* account, unsigned const int galaxy, const String& reason) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UNBANFROMGALAXY__PLAYEROBJECT_ACCOUNT_INT_STRING_); method.addObjectParameter(admin); method.addObjectParameter(account); method.addUnsignedIntParameter(galaxy); method.addAsciiParameter(reason); String _return_unbanFromGalaxy; method.executeWithAsciiReturn(_return_unbanFromGalaxy); return _return_unbanFromGalaxy; } else return _implementation->unbanFromGalaxy(admin, account, galaxy, reason); } String PlayerManager::banCharacter(PlayerObject* admin, Account* account, const String& name, unsigned int galaxyID, unsigned int seconds, const String& reason) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_BANCHARACTER__PLAYEROBJECT_ACCOUNT_STRING_INT_INT_STRING_); method.addObjectParameter(admin); method.addObjectParameter(account); method.addAsciiParameter(name); method.addUnsignedIntParameter(galaxyID); method.addUnsignedIntParameter(seconds); method.addAsciiParameter(reason); String _return_banCharacter; method.executeWithAsciiReturn(_return_banCharacter); return _return_banCharacter; } else return _implementation->banCharacter(admin, account, name, galaxyID, seconds, reason); } String PlayerManager::unbanCharacter(PlayerObject* admin, Account* account, const String& name, unsigned int galaxyID, const String& reason) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_UNBANCHARACTER__PLAYEROBJECT_ACCOUNT_STRING_INT_STRING_); method.addObjectParameter(admin); method.addObjectParameter(account); method.addAsciiParameter(name); method.addUnsignedIntParameter(galaxyID); method.addAsciiParameter(reason); String _return_unbanCharacter; method.executeWithAsciiReturn(_return_unbanCharacter); return _return_unbanCharacter; } else return _implementation->unbanCharacter(admin, account, name, galaxyID, reason); } bool PlayerManager::promptTeachableSkills(CreatureObject* teacher, SceneObject* target) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_PROMPTTEACHABLESKILLS__CREATUREOBJECT_SCENEOBJECT_); method.addObjectParameter(teacher); method.addObjectParameter(target); return method.executeWithBooleanReturn(); } else return _implementation->promptTeachableSkills(teacher, target); } void PlayerManager::decreaseOnlineCharCount(ZoneClientSession* client) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_DECREASEONLINECHARCOUNT__ZONECLIENTSESSION_); method.addObjectParameter(client); method.executeWithVoidReturn(); } else _implementation->decreaseOnlineCharCount(client); } bool PlayerManager::increaseOnlineCharCountIfPossible(ZoneClientSession* client) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_INCREASEONLINECHARCOUNTIFPOSSIBLE__ZONECLIENTSESSION_); method.addObjectParameter(client); return method.executeWithBooleanReturn(); } else return _implementation->increaseOnlineCharCountIfPossible(client); } void PlayerManager::fixHAM(CreatureObject* player) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { if (!deployed) throw ObjectNotDeployedException(this); DistributedMethod method(this, RPC_FIXHAM__CREATUREOBJECT_); method.addObjectParameter(player); method.executeWithVoidReturn(); } else _implementation->fixHAM(player); } bool PlayerManager::offerTeaching(CreatureObject* teacher, CreatureObject* student, Skill* skill) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->offerTeaching(teacher, student, skill); } bool PlayerManager::acceptTeachingOffer(CreatureObject* teacher, CreatureObject* student, Skill* skill) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->acceptTeachingOffer(teacher, student, skill); } SortedVector PlayerManager::getTeachableSkills(CreatureObject* teacher, CreatureObject* student) { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->getTeachableSkills(teacher, student); } OnlineZoneClientMap* PlayerManager::getOnlineZoneClientMap() { PlayerManagerImplementation* _implementation = static_cast(_getImplementation()); if (_implementation == NULL) { throw ObjectNotLocalException(this); } else return _implementation->getOnlineZoneClientMap(); } DistributedObjectServant* PlayerManager::_getImplementation() { if (!_updated) _updated = true; return _impl; } void PlayerManager::_setImplementation(DistributedObjectServant* servant) { _impl = servant; } /* * PlayerManagerImplementation */ PlayerManagerImplementation::PlayerManagerImplementation(DummyConstructorParameter* param) : ObserverImplementation(param) { _initializeImplementation(); } PlayerManagerImplementation::~PlayerManagerImplementation() { PlayerManagerImplementation::finalize(); } void PlayerManagerImplementation::_initializeImplementation() { _setClassHelper(PlayerManagerHelper::instance()); _this = NULL; _serializationHelperMethod(); } void PlayerManagerImplementation::_setStub(DistributedObjectStub* stub) { _this = static_cast(stub); ObserverImplementation::_setStub(stub); } DistributedObjectStub* PlayerManagerImplementation::_getStub() { return _this.get(); } PlayerManagerImplementation::operator const PlayerManager*() { return _this.get(); } void PlayerManagerImplementation::lock(bool doLock) { _this.getReferenceUnsafeStaticCast()->lock(doLock); } void PlayerManagerImplementation::lock(ManagedObject* obj) { _this.getReferenceUnsafeStaticCast()->lock(obj); } void PlayerManagerImplementation::rlock(bool doLock) { _this.getReferenceUnsafeStaticCast()->rlock(doLock); } void PlayerManagerImplementation::wlock(bool doLock) { _this.getReferenceUnsafeStaticCast()->wlock(doLock); } void PlayerManagerImplementation::wlock(ManagedObject* obj) { _this.getReferenceUnsafeStaticCast()->wlock(obj); } void PlayerManagerImplementation::unlock(bool doLock) { _this.getReferenceUnsafeStaticCast()->unlock(doLock); } void PlayerManagerImplementation::runlock(bool doLock) { _this.getReferenceUnsafeStaticCast()->runlock(doLock); } void PlayerManagerImplementation::_serializationHelperMethod() { ObserverImplementation::_serializationHelperMethod(); _setClassName("PlayerManager"); } void PlayerManagerImplementation::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(PlayerManagerImplementation::readObjectMember(stream, _name)) { } stream->setOffset(_currentOffset + _varSize); } initializeTransientMembers(); } bool PlayerManagerImplementation::readObjectMember(ObjectInputStream* stream, const String& _name) { if (ObserverImplementation::readObjectMember(stream, _name)) return true; if (_name == "PlayerManager.highestBadgeIndex") { TypeInfo::parseFromBinaryStream(&highestBadgeIndex, stream); return true; } if (_name == "PlayerManager.server") { TypeInfo >::parseFromBinaryStream(&server, stream); return true; } if (_name == "PlayerManager.globalExpMultiplier") { TypeInfo::parseFromBinaryStream(&globalExpMultiplier, stream); return true; } return false; } void PlayerManagerImplementation::writeObject(ObjectOutputStream* stream) { int _currentOffset = stream->getOffset(); stream->writeShort(0); int _varCount = PlayerManagerImplementation::writeObjectMembers(stream); stream->writeShort(_currentOffset, _varCount); } int PlayerManagerImplementation::writeObjectMembers(ObjectOutputStream* stream) { int _count = ObserverImplementation::writeObjectMembers(stream); String _name; int _offset; uint32 _totalSize; _name = "PlayerManager.highestBadgeIndex"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo::toBinaryStream(&highestBadgeIndex, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "PlayerManager.server"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo >::toBinaryStream(&server, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); _name = "PlayerManager.globalExpMultiplier"; _name.toBinaryStream(stream); _offset = stream->getOffset(); stream->writeInt(0); TypeInfo::toBinaryStream(&globalExpMultiplier, stream); _totalSize = (uint32) (stream->getOffset() - (_offset + 4)); stream->writeInt(_offset, _totalSize); return _count + 3; } int PlayerManagerImplementation::getHighestBadgeIndex() { // server/zone/managers/player/PlayerManager.idl(): return highestBadgeIndex; return highestBadgeIndex; } void PlayerManagerImplementation::addPlayer(CreatureObject* player) { // server/zone/managers/player/PlayerManager.idl(): nameMap.put(player); nameMap->put(player); } void PlayerManagerImplementation::removePlayer(String& playerName) { // server/zone/managers/player/PlayerManager.idl(): nameMap.remove(playerName); nameMap->remove(playerName); } OnlineZoneClientMap* PlayerManagerImplementation::getOnlineZoneClientMap() { // server/zone/managers/player/PlayerManager.idl(): return onlineZoneClientMap; return (&onlineZoneClientMap); } /* * PlayerManagerAdapter */ #include "engine/orb/messages/InvokeMethodMessage.h" PlayerManagerAdapter::PlayerManagerAdapter(PlayerManager* obj) : ObserverAdapter(obj) { } void PlayerManagerAdapter::invokeMethod(uint32 methid, DistributedMethod* inv) { DOBMessage* resp = inv->getInvocationMessage(); switch (methid) { case RPC_LOADNAMEMAP__: { loadNameMap(); } break; case RPC_GETHIGHESTBADGEINDEX__: { resp->insertSignedInt(getHighestBadgeIndex()); } break; case RPC_FINALIZE__: { finalize(); } break; case RPC_KICKUSER__STRING_STRING_STRING_BOOL_: { String name; String admin; String reason; resp->insertBoolean(kickUser(inv->getAsciiParameter(name), inv->getAsciiParameter(admin), inv->getAsciiParameter(reason), inv->getBooleanParameter())); } break; case RPC_NOTIFYOBSERVEREVENT__INT_OBSERVABLE_MANAGEDOBJECT_LONG_: { resp->insertSignedInt(notifyObserverEvent(inv->getUnsignedIntParameter(), static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getSignedLongParameter())); } break; case RPC_NOTIFYDESTRUCTION__TANGIBLEOBJECT_TANGIBLEOBJECT_INT_: { resp->insertSignedInt(notifyDestruction(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getSignedIntParameter())); } break; case RPC_SHOULDRESCHEDULECORPSEDESTRUCTION__CREATUREOBJECT_CREATUREOBJECT_: { resp->insertBoolean(shouldRescheduleCorpseDestruction(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()))); } break; case RPC_RESCHEDULECORPSEDESTRUCTION__CREATUREOBJECT_CREATUREOBJECT_: { rescheduleCorpseDestruction(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter())); } break; case RPC_CANGROUPMEMBERHARVESTCORPSE__CREATUREOBJECT_CREATURE_: { resp->insertBoolean(canGroupMemberHarvestCorpse(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()))); } break; case RPC_KILLPLAYER__TANGIBLEOBJECT_CREATUREOBJECT_INT_: { killPlayer(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getSignedIntParameter()); } break; case RPC_CALCULATEINCAPACITATIONTIMER__CREATUREOBJECT_INT_: { resp->insertByte(calculateIncapacitationTimer(static_cast(inv->getObjectParameter()), inv->getSignedIntParameter())); } break; case RPC_CHECKENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_: { resp->insertBoolean(checkEncumbrancies(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()))); } break; case RPC_APPLYENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_: { applyEncumbrancies(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter())); } break; case RPC_REMOVEENCUMBRANCIES__CREATUREOBJECT_ARMOROBJECT_: { removeEncumbrancies(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter())); } break; case RPC_AWARDBADGE__PLAYEROBJECT_INT_: { awardBadge(static_cast(inv->getObjectParameter()), inv->getUnsignedIntParameter()); } break; case RPC_SETEXPERIENCEMULTIPLIER__FLOAT_: { setExperienceMultiplier(inv->getFloatParameter()); } break; case RPC_AWARDEXPERIENCE__CREATUREOBJECT_STRING_INT_BOOL_FLOAT_: { String xpType; awardExperience(static_cast(inv->getObjectParameter()), inv->getAsciiParameter(xpType), inv->getSignedIntParameter(), inv->getBooleanParameter(), inv->getFloatParameter()); } break; case RPC_HANDLEABORTTRADEMESSAGE__CREATUREOBJECT_: { handleAbortTradeMessage(static_cast(inv->getObjectParameter())); } break; case RPC_HANDLEADDITEMTOTRADEWINDOW__CREATUREOBJECT_LONG_: { handleAddItemToTradeWindow(static_cast(inv->getObjectParameter()), inv->getUnsignedLongParameter()); } break; case RPC_HANDLEGIVEMONEYMESSAGE__CREATUREOBJECT_INT_: { handleGiveMoneyMessage(static_cast(inv->getObjectParameter()), inv->getUnsignedIntParameter()); } break; case RPC_HANDLEACCEPTTRANSACTIONMESSAGE__CREATUREOBJECT_: { handleAcceptTransactionMessage(static_cast(inv->getObjectParameter())); } break; case RPC_HANDLEUNACCEPTTRANSACTIONMESSAGE__CREATUREOBJECT_: { handleUnAcceptTransactionMessage(static_cast(inv->getObjectParameter())); } break; case RPC_HANDLEVERIFYTRADEMESSAGE__CREATUREOBJECT_: { handleVerifyTradeMessage(static_cast(inv->getObjectParameter())); } break; case RPC_CHECKTRADEITEMS__CREATUREOBJECT_CREATUREOBJECT_: { resp->insertBoolean(checkTradeItems(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()))); } break; case RPC_GETINRANGESTRUCTUREWITHADMINRIGHTS__CREATUREOBJECT_LONG_: { resp->insertLong(getInRangeStructureWithAdminRights(static_cast(inv->getObjectParameter()), inv->getUnsignedLongParameter())->_getObjectID()); } break; case RPC_GETINRANGEOWNEDSTRUCTURE__CREATUREOBJECT_FLOAT_: { resp->insertLong(getInRangeOwnedStructure(static_cast(inv->getObjectParameter()), inv->getFloatParameter())->_getObjectID()); } break; case RPC_SENDBATTLEFATIGUEMESSAGE__CREATUREOBJECT_CREATUREOBJECT_: { sendBattleFatigueMessage(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter())); } break; case RPC_STOPWATCH__CREATUREOBJECT_LONG_BOOL_BOOL_BOOL_BOOL_: { stopWatch(static_cast(inv->getObjectParameter()), inv->getUnsignedLongParameter(), inv->getBooleanParameter(), inv->getBooleanParameter(), inv->getBooleanParameter(), inv->getBooleanParameter()); } break; case RPC_STOPLISTEN__CREATUREOBJECT_LONG_BOOL_BOOL_BOOL_BOOL_: { stopListen(static_cast(inv->getObjectParameter()), inv->getUnsignedLongParameter(), inv->getBooleanParameter(), inv->getBooleanParameter(), inv->getBooleanParameter(), inv->getBooleanParameter()); } break; case RPC_STARTWATCH__CREATUREOBJECT_LONG_: { startWatch(static_cast(inv->getObjectParameter()), inv->getUnsignedLongParameter()); } break; case RPC_STARTLISTEN__CREATUREOBJECT_LONG_: { startListen(static_cast(inv->getObjectParameter()), inv->getUnsignedLongParameter()); } break; case RPC_LOOTALL__CREATUREOBJECT_CREATUREOBJECT_: { lootAll(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter())); } break; case RPC_HEALENHANCE__CREATUREOBJECT_CREATUREOBJECT_BYTE_INT_FLOAT_: { resp->insertSignedInt(healEnhance(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getByteParameter(), inv->getSignedIntParameter(), inv->getFloatParameter())); } break; case RPC_CALCULATEPLAYERLEVEL__CREATUREOBJECT_: { resp->insertSignedInt(calculatePlayerLevel(static_cast(inv->getObjectParameter()))); } break; case RPC_SENDLOGINMESSAGE__CREATUREOBJECT_: { sendLoginMessage(static_cast(inv->getObjectParameter())); } break; case RPC_RESENDLOGINMESSAGETOALL__: { resendLoginMessageToAll(); } break; case RPC_SENDACTIVATECLONEREQUEST__CREATUREOBJECT_INT_: { sendActivateCloneRequest(static_cast(inv->getObjectParameter()), inv->getSignedIntParameter()); } break; case RPC_SENDPLAYERTOCLONER__CREATUREOBJECT_LONG_INT_: { sendPlayerToCloner(static_cast(inv->getObjectParameter()), inv->getUnsignedLongParameter(), inv->getSignedIntParameter()); } break; case RPC_CHECKEXISTENTNAMEINDATABASE__STRING_: { String firstName; resp->insertBoolean(checkExistentNameInDatabase(inv->getAsciiParameter(firstName))); } break; case RPC_CREATEHAIROBJECT__STRING_STRING_: { String hairObjectFile; String hairCustomization; resp->insertLong(createHairObject(inv->getAsciiParameter(hairObjectFile), inv->getAsciiParameter(hairCustomization))->_getObjectID()); } break; case RPC_CREATEALLPLAYEROBJECTS__CREATUREOBJECT_: { resp->insertBoolean(createAllPlayerObjects(static_cast(inv->getObjectParameter()))); } break; case RPC_CREATEDEFAULTPLAYERITEMS__CREATUREOBJECT_STRING_STRING_: { String profession; String templateFile; createDefaultPlayerItems(static_cast(inv->getObjectParameter()), inv->getAsciiParameter(profession), inv->getAsciiParameter(templateFile)); } break; case RPC_CREATETUTORIALBUILDING__CREATUREOBJECT_: { createTutorialBuilding(static_cast(inv->getObjectParameter())); } break; case RPC_CREATESKIPPEDTUTORIALBUILDING__CREATUREOBJECT_: { createSkippedTutorialBuilding(static_cast(inv->getObjectParameter())); } break; case RPC_UPDATESWIMMINGSTATE__CREATUREOBJECT_FLOAT_: { updateSwimmingState(static_cast(inv->getObjectParameter()), inv->getFloatParameter()); } break; case RPC_CHECKSPEEDHACKSECONDTEST__CREATUREOBJECT_FLOAT_FLOAT_FLOAT_INT_SCENEOBJECT_: { resp->insertSignedInt(checkSpeedHackSecondTest(static_cast(inv->getObjectParameter()), inv->getFloatParameter(), inv->getFloatParameter(), inv->getFloatParameter(), inv->getUnsignedIntParameter(), static_cast(inv->getObjectParameter()))); } break; case RPC_EXISTSNAME__STRING_: { String name; resp->insertBoolean(existsName(inv->getAsciiParameter(name))); } break; case RPC_GETOBJECTID__STRING_: { String name; resp->insertLong(getObjectID(inv->getAsciiParameter(name))); } break; case RPC_GETPLAYER__STRING_: { String name; resp->insertLong(getPlayer(inv->getAsciiParameter(name))->_getObjectID()); } break; case RPC_UPDATEPERMISSIONLEVEL__CREATUREOBJECT_INT_: { updatePermissionLevel(static_cast(inv->getObjectParameter()), inv->getSignedIntParameter()); } break; case RPC_UPDATEPERMISSIONNAME__CREATUREOBJECT_INT_: { updatePermissionName(static_cast(inv->getObjectParameter()), inv->getSignedIntParameter()); } break; case RPC_GENERATEHOLOGRINDSKILLS__CREATUREOBJECT_: { generateHologrindSkills(static_cast(inv->getObjectParameter())); } break; case RPC_ADDPLAYER__CREATUREOBJECT_: { addPlayer(static_cast(inv->getObjectParameter())); } break; case RPC_REMOVEPLAYER__STRING_: { String playerName; removePlayer(inv->getAsciiParameter(playerName)); } break; case RPC_GETBADGEKEY__INT_: { resp->insertAscii(getBadgeKey(inv->getSignedIntParameter())); } break; case RPC_GETNEARBYCRAFTINGSTATION__CREATUREOBJECT_INT_: { resp->insertLong(getNearbyCraftingStation(static_cast(inv->getObjectParameter()), inv->getSignedIntParameter())->_getObjectID()); } break; case RPC_FINISHHOLOGRIND__CREATUREOBJECT_: { finishHologrind(static_cast(inv->getObjectParameter())); } break; case RPC_GETACCOUNT__STRING_: { String username; resp->insertLong(getAccount(inv->getAsciiParameter(username))->_getObjectID()); } break; case RPC_GETACCOUNT__INT_: { resp->insertLong(getAccount(inv->getUnsignedIntParameter())->_getObjectID()); } break; case RPC_BANACCOUNT__PLAYEROBJECT_ACCOUNT_INT_STRING_: { String reason; resp->insertAscii(banAccount(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getUnsignedIntParameter(), inv->getAsciiParameter(reason))); } break; case RPC_UNBANACCOUNT__PLAYEROBJECT_ACCOUNT_STRING_: { String reason; resp->insertAscii(unbanAccount(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getAsciiParameter(reason))); } break; case RPC_BANFROMGALAXY__PLAYEROBJECT_ACCOUNT_INT_INT_STRING_: { String reason; resp->insertAscii(banFromGalaxy(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getUnsignedIntParameter(), inv->getUnsignedIntParameter(), inv->getAsciiParameter(reason))); } break; case RPC_UNBANFROMGALAXY__PLAYEROBJECT_ACCOUNT_INT_STRING_: { String reason; resp->insertAscii(unbanFromGalaxy(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getUnsignedIntParameter(), inv->getAsciiParameter(reason))); } break; case RPC_BANCHARACTER__PLAYEROBJECT_ACCOUNT_STRING_INT_INT_STRING_: { String name; String reason; resp->insertAscii(banCharacter(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getAsciiParameter(name), inv->getUnsignedIntParameter(), inv->getUnsignedIntParameter(), inv->getAsciiParameter(reason))); } break; case RPC_UNBANCHARACTER__PLAYEROBJECT_ACCOUNT_STRING_INT_STRING_: { String name; String reason; resp->insertAscii(unbanCharacter(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()), inv->getAsciiParameter(name), inv->getUnsignedIntParameter(), inv->getAsciiParameter(reason))); } break; case RPC_PROMPTTEACHABLESKILLS__CREATUREOBJECT_SCENEOBJECT_: { resp->insertBoolean(promptTeachableSkills(static_cast(inv->getObjectParameter()), static_cast(inv->getObjectParameter()))); } break; case RPC_DECREASEONLINECHARCOUNT__ZONECLIENTSESSION_: { decreaseOnlineCharCount(static_cast(inv->getObjectParameter())); } break; case RPC_INCREASEONLINECHARCOUNTIFPOSSIBLE__ZONECLIENTSESSION_: { resp->insertBoolean(increaseOnlineCharCountIfPossible(static_cast(inv->getObjectParameter()))); } break; case RPC_FIXHAM__CREATUREOBJECT_: { fixHAM(static_cast(inv->getObjectParameter())); } break; default: throw Exception("Method does not exists"); } } void PlayerManagerAdapter::loadNameMap() { (static_cast(stub))->loadNameMap(); } int PlayerManagerAdapter::getHighestBadgeIndex() { return (static_cast(stub))->getHighestBadgeIndex(); } void PlayerManagerAdapter::finalize() { (static_cast(stub))->finalize(); } bool PlayerManagerAdapter::kickUser(const String& name, const String& admin, String& reason, bool doBan) { return (static_cast(stub))->kickUser(name, admin, reason, doBan); } int PlayerManagerAdapter::notifyObserverEvent(unsigned int eventType, Observable* observable, ManagedObject* arg1, long long arg2) { return (static_cast(stub))->notifyObserverEvent(eventType, observable, arg1, arg2); } int PlayerManagerAdapter::notifyDestruction(TangibleObject* destructor, TangibleObject* destructedObject, int condition) { return (static_cast(stub))->notifyDestruction(destructor, destructedObject, condition); } bool PlayerManagerAdapter::shouldRescheduleCorpseDestruction(CreatureObject* player, CreatureObject* ai) { return (static_cast(stub))->shouldRescheduleCorpseDestruction(player, ai); } void PlayerManagerAdapter::rescheduleCorpseDestruction(CreatureObject* player, CreatureObject* ai) { (static_cast(stub))->rescheduleCorpseDestruction(player, ai); } bool PlayerManagerAdapter::canGroupMemberHarvestCorpse(CreatureObject* player, Creature* creature) { return (static_cast(stub))->canGroupMemberHarvestCorpse(player, creature); } void PlayerManagerAdapter::killPlayer(TangibleObject* attacker, CreatureObject* player, int typeofdeath) { (static_cast(stub))->killPlayer(attacker, player, typeofdeath); } byte PlayerManagerAdapter::calculateIncapacitationTimer(CreatureObject* player, int condition) { return (static_cast(stub))->calculateIncapacitationTimer(player, condition); } bool PlayerManagerAdapter::checkEncumbrancies(CreatureObject* player, ArmorObject* armor) { return (static_cast(stub))->checkEncumbrancies(player, armor); } void PlayerManagerAdapter::applyEncumbrancies(CreatureObject* player, ArmorObject* armor) { (static_cast(stub))->applyEncumbrancies(player, armor); } void PlayerManagerAdapter::removeEncumbrancies(CreatureObject* player, ArmorObject* armor) { (static_cast(stub))->removeEncumbrancies(player, armor); } void PlayerManagerAdapter::awardBadge(PlayerObject* ghost, unsigned int badge) { (static_cast(stub))->awardBadge(ghost, badge); } void PlayerManagerAdapter::setExperienceMultiplier(float globalMultiplier) { (static_cast(stub))->setExperienceMultiplier(globalMultiplier); } void PlayerManagerAdapter::awardExperience(CreatureObject* player, const String& xpType, int amount, bool sendSystemMessage, float localMultiplier) { (static_cast(stub))->awardExperience(player, xpType, amount, sendSystemMessage, localMultiplier); } void PlayerManagerAdapter::handleAbortTradeMessage(CreatureObject* player) { (static_cast(stub))->handleAbortTradeMessage(player); } void PlayerManagerAdapter::handleAddItemToTradeWindow(CreatureObject* player, unsigned long long itemID) { (static_cast(stub))->handleAddItemToTradeWindow(player, itemID); } void PlayerManagerAdapter::handleGiveMoneyMessage(CreatureObject* player, unsigned int value) { (static_cast(stub))->handleGiveMoneyMessage(player, value); } void PlayerManagerAdapter::handleAcceptTransactionMessage(CreatureObject* player) { (static_cast(stub))->handleAcceptTransactionMessage(player); } void PlayerManagerAdapter::handleUnAcceptTransactionMessage(CreatureObject* player) { (static_cast(stub))->handleUnAcceptTransactionMessage(player); } void PlayerManagerAdapter::handleVerifyTradeMessage(CreatureObject* player) { (static_cast(stub))->handleVerifyTradeMessage(player); } bool PlayerManagerAdapter::checkTradeItems(CreatureObject* player, CreatureObject* receiver) { return (static_cast(stub))->checkTradeItems(player, receiver); } SceneObject* PlayerManagerAdapter::getInRangeStructureWithAdminRights(CreatureObject* creature, unsigned long long targetID) { return (static_cast(stub))->getInRangeStructureWithAdminRights(creature, targetID); } StructureObject* PlayerManagerAdapter::getInRangeOwnedStructure(CreatureObject* creature, float range) { return (static_cast(stub))->getInRangeOwnedStructure(creature, range); } void PlayerManagerAdapter::sendBattleFatigueMessage(CreatureObject* player, CreatureObject* target) { (static_cast(stub))->sendBattleFatigueMessage(player, target); } void PlayerManagerAdapter::stopWatch(CreatureObject* creature, unsigned long long entid, bool doSendPackets, bool forced, bool doLock, bool outOfRange) { (static_cast(stub))->stopWatch(creature, entid, doSendPackets, forced, doLock, outOfRange); } void PlayerManagerAdapter::stopListen(CreatureObject* creature, unsigned long long entid, bool doSendPackets, bool forced, bool doLock, bool outOfRange) { (static_cast(stub))->stopListen(creature, entid, doSendPackets, forced, doLock, outOfRange); } void PlayerManagerAdapter::startWatch(CreatureObject* creature, unsigned long long entid) { (static_cast(stub))->startWatch(creature, entid); } void PlayerManagerAdapter::startListen(CreatureObject* creature, unsigned long long entid) { (static_cast(stub))->startListen(creature, entid); } void PlayerManagerAdapter::lootAll(CreatureObject* player, CreatureObject* creature) { (static_cast(stub))->lootAll(player, creature); } int PlayerManagerAdapter::healEnhance(CreatureObject* enhancer, CreatureObject* patient, byte attribute, int buffvalue, float duration) { return (static_cast(stub))->healEnhance(enhancer, patient, attribute, buffvalue, duration); } int PlayerManagerAdapter::calculatePlayerLevel(CreatureObject* player) { return (static_cast(stub))->calculatePlayerLevel(player); } void PlayerManagerAdapter::sendLoginMessage(CreatureObject* player) { (static_cast(stub))->sendLoginMessage(player); } void PlayerManagerAdapter::resendLoginMessageToAll() { (static_cast(stub))->resendLoginMessageToAll(); } void PlayerManagerAdapter::sendActivateCloneRequest(CreatureObject* player, int typeofdeath) { (static_cast(stub))->sendActivateCloneRequest(player, typeofdeath); } void PlayerManagerAdapter::sendPlayerToCloner(CreatureObject* player, unsigned long long clonerID, int typeofdeath) { (static_cast(stub))->sendPlayerToCloner(player, clonerID, typeofdeath); } bool PlayerManagerAdapter::checkExistentNameInDatabase(const String& firstName) { return (static_cast(stub))->checkExistentNameInDatabase(firstName); } TangibleObject* PlayerManagerAdapter::createHairObject(const String& hairObjectFile, const String& hairCustomization) { return (static_cast(stub))->createHairObject(hairObjectFile, hairCustomization); } bool PlayerManagerAdapter::createAllPlayerObjects(CreatureObject* player) { return (static_cast(stub))->createAllPlayerObjects(player); } void PlayerManagerAdapter::createDefaultPlayerItems(CreatureObject* player, const String& profession, const String& templateFile) { (static_cast(stub))->createDefaultPlayerItems(player, profession, templateFile); } void PlayerManagerAdapter::createTutorialBuilding(CreatureObject* player) { (static_cast(stub))->createTutorialBuilding(player); } void PlayerManagerAdapter::createSkippedTutorialBuilding(CreatureObject* player) { (static_cast(stub))->createSkippedTutorialBuilding(player); } void PlayerManagerAdapter::updateSwimmingState(CreatureObject* player, float newZ) { (static_cast(stub))->updateSwimmingState(player, newZ); } int PlayerManagerAdapter::checkSpeedHackSecondTest(CreatureObject* player, float newX, float newZ, float newY, unsigned int newStamp, SceneObject* newParent) { return (static_cast(stub))->checkSpeedHackSecondTest(player, newX, newZ, newY, newStamp, newParent); } bool PlayerManagerAdapter::existsName(const String& name) { return (static_cast(stub))->existsName(name); } unsigned long long PlayerManagerAdapter::getObjectID(const String& name) { return (static_cast(stub))->getObjectID(name); } CreatureObject* PlayerManagerAdapter::getPlayer(const String& name) { return (static_cast(stub))->getPlayer(name); } void PlayerManagerAdapter::updatePermissionLevel(CreatureObject* player, int adminLevel) { (static_cast(stub))->updatePermissionLevel(player, adminLevel); } void PlayerManagerAdapter::updatePermissionName(CreatureObject* player, int adminLevel) { (static_cast(stub))->updatePermissionName(player, adminLevel); } void PlayerManagerAdapter::generateHologrindSkills(CreatureObject* player) { (static_cast(stub))->generateHologrindSkills(player); } void PlayerManagerAdapter::addPlayer(CreatureObject* player) { (static_cast(stub))->addPlayer(player); } void PlayerManagerAdapter::removePlayer(String& playerName) { (static_cast(stub))->removePlayer(playerName); } String PlayerManagerAdapter::getBadgeKey(int idx) { return (static_cast(stub))->getBadgeKey(idx); } CraftingStation* PlayerManagerAdapter::getNearbyCraftingStation(CreatureObject* player, int type) { return (static_cast(stub))->getNearbyCraftingStation(player, type); } void PlayerManagerAdapter::finishHologrind(CreatureObject* player) { (static_cast(stub))->finishHologrind(player); } Account* PlayerManagerAdapter::getAccount(const String& username) { return (static_cast(stub))->getAccount(username); } Account* PlayerManagerAdapter::getAccount(unsigned int accountID) { return (static_cast(stub))->getAccount(accountID); } String PlayerManagerAdapter::banAccount(PlayerObject* admin, Account* account, unsigned int seconds, const String& reason) { return (static_cast(stub))->banAccount(admin, account, seconds, reason); } String PlayerManagerAdapter::unbanAccount(PlayerObject* admin, Account* account, const String& reason) { return (static_cast(stub))->unbanAccount(admin, account, reason); } String PlayerManagerAdapter::banFromGalaxy(PlayerObject* admin, Account* account, unsigned const int galaxy, unsigned int seconds, const String& reason) { return (static_cast(stub))->banFromGalaxy(admin, account, galaxy, seconds, reason); } String PlayerManagerAdapter::unbanFromGalaxy(PlayerObject* admin, Account* account, unsigned const int galaxy, const String& reason) { return (static_cast(stub))->unbanFromGalaxy(admin, account, galaxy, reason); } String PlayerManagerAdapter::banCharacter(PlayerObject* admin, Account* account, const String& name, unsigned int galaxyID, unsigned int seconds, const String& reason) { return (static_cast(stub))->banCharacter(admin, account, name, galaxyID, seconds, reason); } String PlayerManagerAdapter::unbanCharacter(PlayerObject* admin, Account* account, const String& name, unsigned int galaxyID, const String& reason) { return (static_cast(stub))->unbanCharacter(admin, account, name, galaxyID, reason); } bool PlayerManagerAdapter::promptTeachableSkills(CreatureObject* teacher, SceneObject* target) { return (static_cast(stub))->promptTeachableSkills(teacher, target); } void PlayerManagerAdapter::decreaseOnlineCharCount(ZoneClientSession* client) { (static_cast(stub))->decreaseOnlineCharCount(client); } bool PlayerManagerAdapter::increaseOnlineCharCountIfPossible(ZoneClientSession* client) { return (static_cast(stub))->increaseOnlineCharCountIfPossible(client); } void PlayerManagerAdapter::fixHAM(CreatureObject* player) { (static_cast(stub))->fixHAM(player); } /* * PlayerManagerHelper */ PlayerManagerHelper* PlayerManagerHelper::staticInitializer = PlayerManagerHelper::instance(); PlayerManagerHelper::PlayerManagerHelper() { className = "PlayerManager"; Core::getObjectBroker()->registerClass(className, this); } void PlayerManagerHelper::finalizeHelper() { PlayerManagerHelper::finalize(); } DistributedObject* PlayerManagerHelper::instantiateObject() { return new PlayerManager(DummyConstructorParameter::instance()); } DistributedObjectServant* PlayerManagerHelper::instantiateServant() { return new PlayerManagerImplementation(DummyConstructorParameter::instance()); } DistributedObjectAdapter* PlayerManagerHelper::createAdapter(DistributedObjectStub* obj) { DistributedObjectAdapter* adapter = new PlayerManagerAdapter(static_cast(obj)); obj->_setClassName(className); obj->_setClassHelper(this); adapter->setStub(obj); return adapter; }