当前位置: 首页>>代码示例>>C++>>正文


C++ InPacket::readlong方法代码示例

本文整理汇总了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);
	}
开发者ID:eaxvac,项目名称:JourneyClient,代码行数:20,代码来源:PlayerHandlers.cpp

示例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;
	}
开发者ID:eaxvac,项目名称:JourneyClient,代码行数:17,代码来源:Login.cpp

示例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;
	}
开发者ID:pandaforks,项目名称:JourneyClient,代码行数:17,代码来源:Account.cpp

示例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;
	}
开发者ID:eaxvac,项目名称:JourneyClient,代码行数:40,代码来源:Login.cpp


注:本文中的InPacket::readlong方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。