本文整理汇总了C++中InPacket::readpadascii方法的典型用法代码示例。如果您正苦于以下问题:C++ InPacket::readpadascii方法的具体用法?C++ InPacket::readpadascii怎么用?C++ InPacket::readpadascii使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InPacket
的用法示例。
在下文中一共展示了InPacket::readpadascii方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: parsestats
StatsEntry Login::parsestats(InPacket& recv) const
{
StatsEntry statsentry;
statsentry.name = recv.readpadascii(13);
recv.readbool(); //gender
recv.readbyte(); //skin
recv.readint(); //face
recv.readint(); //hair
for (size_t i = 0; i < 3; i++)
{
statsentry.petids.push_back(recv.readlong());
}
statsentry.stats[Maplestat::LEVEL] = recv.readbyte();
statsentry.stats[Maplestat::JOB] = recv.readshort();
statsentry.stats[Maplestat::STR] = recv.readshort();
statsentry.stats[Maplestat::DEX] = recv.readshort();
statsentry.stats[Maplestat::INT] = recv.readshort();
statsentry.stats[Maplestat::LUK] = recv.readshort();
statsentry.stats[Maplestat::HP] = recv.readshort();
statsentry.stats[Maplestat::MAXHP] = recv.readshort();
statsentry.stats[Maplestat::MP] = recv.readshort();
statsentry.stats[Maplestat::MAXMP] = recv.readshort();
statsentry.stats[Maplestat::AP] = recv.readshort();
statsentry.stats[Maplestat::SP] = recv.readshort();
statsentry.exp = recv.readint();
statsentry.stats[Maplestat::FAME] = recv.readshort();
recv.skip(4); //gachaexp
statsentry.mapid = recv.readint();
statsentry.portal = recv.readbyte();
recv.skip(4); //timestamp
statsentry.job = CharJob(statsentry.stats[Maplestat::JOB]);
return statsentry;
}