本文整理汇总了C++中CharacterData::getAccountID方法的典型用法代码示例。如果您正苦于以下问题:C++ CharacterData::getAccountID方法的具体用法?C++ CharacterData::getAccountID怎么用?C++ CharacterData::getAccountID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CharacterData
的用法示例。
在下文中一共展示了CharacterData::getAccountID方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processMessage
//.........这里部分代码省略.........
int mapId = ptr->getMapId();
if (GameServer *s = getGameServerFromMap(mapId))
{
registerGameClient(s, magic_token, ptr);
MessageOut result(AGMSG_REDIRECT_RESPONSE);
result.writeInt32(id);
result.writeString(magic_token, MAGIC_TOKEN_LENGTH);
result.writeString(s->address);
result.writeInt16(s->port);
comp->send(result);
}
else
{
LOG_ERROR("Server Change: No game server for map " <<
mapId << '.');
}
delete ptr;
}
else
{
LOG_ERROR("Received data for non-existing character "
<< id << '.');
}
} break;
case GAMSG_PLAYER_RECONNECT:
{
LOG_DEBUG("GAMSG_PLAYER_RECONNECT");
int id = msg.readInt32();
std::string magic_token = msg.readString(MAGIC_TOKEN_LENGTH);
if (CharacterData *ptr = storage->getCharacter(id, nullptr))
{
int accountID = ptr->getAccountID();
AccountClientHandler::prepareReconnect(magic_token, accountID);
delete ptr;
}
else
{
LOG_ERROR("Received data for non-existing character "
<< id << '.');
}
} break;
case GAMSG_GET_VAR_CHR:
{
int id = msg.readInt32();
std::string name = msg.readString();
std::string value = storage->getQuestVar(id, name);
MessageOut result(AGMSG_GET_VAR_CHR_RESPONSE);
result.writeInt32(id);
result.writeString(name);
result.writeString(value);
comp->send(result);
} break;
case GAMSG_SET_VAR_CHR:
{
int id = msg.readInt32();
std::string name = msg.readString();
std::string value = msg.readString();
storage->setQuestVar(id, name, value);
} break;
case GAMSG_SET_VAR_WORLD:
{