本文整理汇总了C++中net::MessageIn::getVersionRe方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageIn::getVersionRe方法的具体用法?C++ MessageIn::getVersionRe怎么用?C++ MessageIn::getVersionRe使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net::MessageIn
的用法示例。
在下文中一共展示了MessageIn::getVersionRe方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: processPartyMemberInfo
void PartyRecv::processPartyMemberInfo(Net::MessageIn &msg)
{
const BeingId id = msg.readBeingId("account id");
if (msg.getVersion() >= 20171207)
msg.readBeingId("char id");
const bool leader = msg.readInt32("leader") == 0U;
int level = 0;
if (msg.getVersionMain() >= 20170524 ||
msg.getVersionRe() >= 20170502 ||
packets_zero == true)
{
msg.readInt16("class");
level = msg.readInt16("level");
}
const int x = msg.readInt16("x");
const int y = msg.readInt16("y");
const bool online = msg.readInt8("online") == 0U;
msg.readString(24, "party name");
const std::string nick = msg.readString(24, "player name");
const std::string map = msg.readString(16, "map name");
msg.readInt8("pickup item share (&1)");
msg.readInt8("get item share (&2)");
if (Ea::taParty == nullptr)
return;
PartyMember *const member = Ea::taParty->addMember(id, nick);
if (member != nullptr)
{
if ((partyTab != nullptr) && member->getOnline() != online)
partyTab->showOnline(nick, fromBool(online, Online));
member->setLeader(leader);
member->setOnline(online);
member->setMap(map);
member->setX(x);
member->setY(y);
if (level != 0)
member->setLevel(level);
}
}