本文整理汇总了C++中InPacket::readlong方法的典型用法代码示例。如果您正苦于以下问题:C++ InPacket::readlong方法的具体用法?C++ InPacket::readlong怎么用?C++ InPacket::readlong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InPacket
的用法示例。
在下文中一共展示了InPacket::readlong方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handle
void BuffHandler::handle(InPacket& recv) const
{
int64_t firstmask = recv.readlong();
int64_t secondmask = recv.readlong();
for (size_t i = 0; i < Buffstat::FIRST_BUFFS; i++)
{
Buffstat::Value buffvalue = Buffstat::firstbyid(i);
if (firstmask & buffvalue)
handlebuff(recv, buffvalue);
}
for (size_t i = 0; i < Buffstat::SECOND_BUFFS; i++)
{
Buffstat::Value buffvalue = Buffstat::secondbyid(i);
if (secondmask & buffvalue)
handlebuff(recv, buffvalue);
}
Stage::get().getplayer().recalcstats(false);
}
示例2: parseaccount
void Login::parseaccount(InPacket& recv)
{
recv.readshort();
account.accid = recv.readint();
account.female = recv.readbool();
recv.readbool(); //is admin
account.gmlevel = recv.readbyte();
recv.readbyte();
account.name = recv.readascii();
recv.readbyte();
account.muted = recv.readbool();
recv.readlong(); //muted until
recv.readlong(); //creation date
recv.readint();
account.pin = recv.readshort();
account.selected = 0;
}
示例3:
Account::Account(InPacket& recv)
{
recv.readshort();
accid = recv.readint();
female = recv.readbool();
recv.readbool(); //is admin
gmlevel = recv.readbyte();
recv.readbyte();
name = recv.readascii();
recv.readbyte();
muted = recv.readbool();
recv.readlong(); //muted until
recv.readlong(); //creation date
recv.readint();
pin = recv.readshort();
selected = 0;
}
示例4: 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;
}