本文整理汇总了C++中PlayerManager::getAccount方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerManager::getAccount方法的具体用法?C++ PlayerManager::getAccount怎么用?C++ PlayerManager::getAccount使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerManager
的用法示例。
在下文中一共展示了PlayerManager::getAccount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createCharacter
//.........这里部分代码省略.........
ManagedReference<PlayerObject*> ghost = playerCreature->getPlayerObject();
if (ghost != NULL) {
//Set skillpoints before adding any skills.
ghost->setSkillPoints(skillPoints);
ghost->setStarterProfession(profession);
}
addCustomization(playerCreature, customization,
playerTemplate->getAppearanceFilename());
addHair(playerCreature, hairTemplate, hairCustomization);
if (!doTutorial) {
addProfessionStartingItems(playerCreature, profession, clientTemplate,
false);
addStartingItems(playerCreature, clientTemplate, false);
addRacialMods(playerCreature, fileName,
playerTemplate->getStartingSkills(),
playerTemplate->getStartingItems(), false);
} else {
addProfessionStartingItems(playerCreature, profession, clientTemplate,
true);
addStartingItems(playerCreature, clientTemplate, true);
addRacialMods(playerCreature, fileName,
playerTemplate->getStartingSkills(),
playerTemplate->getStartingItems(), true);
}
// Set starting cash and starting bank
playerCreature->setCashCredits(startingCash, false);
playerCreature->setBankCredits(startingBank, false);
if (ghost != NULL) {
ghost->setAccountID(client->getAccountID());
if (!freeGodMode) {
try {
uint32 accID = client->getAccountID();
ManagedReference<Account*> playerAccount = playerManager->getAccount(accID);
if (playerAccount == NULL) {
playerCreature->destroyPlayerCreatureFromDatabase(true);
return false;
}
int accountPermissionLevel = playerAccount->getAdminLevel();
String accountName = playerAccount->getUsername();
if(accountPermissionLevel > 0 && (accountPermissionLevel == 9 || accountPermissionLevel == 10 || accountPermissionLevel == 12 || accountPermissionLevel == 15)) {
playerManager->updatePermissionLevel(playerCreature, accountPermissionLevel);
/*
Reference<ShipControlDevice*> shipControlDevice = zoneServer->createObject(STRING_HASHCODE("object/intangible/ship/sorosuub_space_yacht_pcd.iff"), 1).castTo<ShipControlDevice*>();
//ShipObject* ship = (ShipObject*) server->createObject(STRING_HASHCODE("object/ship/player/player_sorosuub_space_yacht.iff"), 1);
Reference<ShipObject*> ship = zoneServer->createObject(STRING_HASHCODE("object/ship/player/player_basic_tiefighter.iff"), 1).castTo<ShipObject*>();
shipControlDevice->setControlledObject(ship);
if (!shipControlDevice->transferObject(ship, 4))
info("Adding of ship to device failed");
ManagedReference<SceneObject*> datapad = playerCreature->getSlottedObject("datapad");
if (datapad != NULL) {
if (!datapad->transferObject(shipControlDevice, -1)) {