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


C++ PropWriteStream::ADD_VALUE方法代码示例

本文整理汇总了C++中PropWriteStream::ADD_VALUE方法的典型用法代码示例。如果您正苦于以下问题:C++ PropWriteStream::ADD_VALUE方法的具体用法?C++ PropWriteStream::ADD_VALUE怎么用?C++ PropWriteStream::ADD_VALUE使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PropWriteStream的用法示例。


在下文中一共展示了PropWriteStream::ADD_VALUE方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: serialize

bool Condition::serialize(PropWriteStream& propWriteStream)
{
	propWriteStream.ADD_UCHAR(*CONDITIONATTRIBUTE_MECHANIC);
	propWriteStream.ADD_VALUE(mechanicType.value());

	propWriteStream.ADD_UCHAR(*CONDITIONATTRIBUTE_COMBAT);
	propWriteStream.ADD_VALUE(combatType.value());

	propWriteStream.ADD_UCHAR(*CONDITIONATTRIBUTE_SOURCE);
	propWriteStream.ADD_VALUE(sourceId);

	propWriteStream.ADD_UCHAR(*CONDITIONATTRIBUTE_TICKS);
	propWriteStream.ADD_VALUE(ticks);

	propWriteStream.ADD_UCHAR(*CONDITIONATTRIBUTE_NAME);
	propWriteStream.ADD_STRING(name);

	propWriteStream.ADD_UCHAR(*CONDITIONATTRIBUTE_FLAGS);
	propWriteStream.ADD_VALUE(flags);

	for(std::list<ConditionEffect>::iterator it = effectList.begin(); it != effectList.end(); ++it){
		ConditionEffect& effect = (*it);
		effect.serialize(propWriteStream);
	}

	return true;
}
开发者ID:Ablankzin,项目名称:server,代码行数:27,代码来源:condition.cpp

示例2: serialize

bool Condition::serialize(PropWriteStream& propWriteStream)
{
	propWriteStream.ADD_UCHAR(CONDITIONATTR_TYPE);
	propWriteStream.ADD_VALUE((int32_t)conditionType);

	propWriteStream.ADD_UCHAR(CONDITIONATTR_ID);
	propWriteStream.ADD_VALUE((int32_t)id);

	propWriteStream.ADD_UCHAR(CONDITIONATTR_TICKS);
	propWriteStream.ADD_VALUE((int32_t)ticks);
	return true;
}
开发者ID:gianflogao,项目名称:divinity-ots,代码行数:12,代码来源:condition.cpp

示例3: serialize

bool ConditionSoul::serialize(PropWriteStream& propWriteStream)
{
	if(!Condition::serialize(propWriteStream))
		return false;

	propWriteStream.ADD_UCHAR(CONDITIONATTR_SOULGAIN);
	propWriteStream.ADD_VALUE(soulGain);

	propWriteStream.ADD_UCHAR(CONDITIONATTR_SOULTICKS);
	propWriteStream.ADD_VALUE(soulTicks);

	return true;
}
开发者ID:armadaazteca,项目名称:tfs0.2.15,代码行数:13,代码来源:condition.cpp

示例4: serialize

bool ConditionOutfit::serialize(PropWriteStream& propWriteStream)
{
	if (!Condition::serialize(propWriteStream)) {
		return false;
	}

	propWriteStream.ADD_UCHAR(CONDITIONATTR_OUTFIT);
	propWriteStream.ADD_VALUE(outfit);
	return true;
}
开发者ID:sheen123,项目名称:forgottenserver,代码行数:10,代码来源:condition.cpp

示例5: serialize

bool ConditionDamage::serialize(PropWriteStream& propWriteStream)
{
	if (!Condition::serialize(propWriteStream)) {
		return false;
	}

	propWriteStream.ADD_UCHAR(CONDITIONATTR_DELAYED);
	propWriteStream.ADD_VALUE(delayed);

	propWriteStream.ADD_UCHAR(CONDITIONATTR_PERIODDAMAGE);
	propWriteStream.ADD_VALUE(periodDamage);

	// propWriteStream.ADD_UCHAR(CONDITIONATTR_OWNER);
	// propWriteStream.ADD_VALUE(owner);

	for (const IntervalInfo& intervalInfo : damageList) {
		propWriteStream.ADD_UCHAR(CONDITIONATTR_INTERVALDATA);
		propWriteStream.ADD_VALUE(intervalInfo);
	}
	return true;
}
开发者ID:A-Dirty-Rag,项目名称:forgottenserver,代码行数:21,代码来源:condition.cpp

示例6: serializeAttr

bool Teleport::serializeAttr(PropWriteStream& propWriteStream) const
{
	bool ret = Item::serializeAttr(propWriteStream);
	propWriteStream.ADD_UCHAR(ATTR_TELE_DEST);

	TeleportDest dest;
	dest._x = destination.x;
	dest._y = destination.y;
	dest._z = destination.z;

	propWriteStream.ADD_VALUE(dest);
	return ret;
}
开发者ID:A-Syntax,项目名称:cryingdamson-0.3.6-8.60-V8.2,代码行数:13,代码来源:teleport.cpp

示例7: serializeAttr

bool Teleport::serializeAttr(PropWriteStream& propWriteStream) const
{
	bool ret = Item::serializeAttr(propWriteStream);

	propWriteStream.ADD_UCHAR(ATTR_TELE_DEST);

	TeleportDest tele_dest;
	tele_dest._x = destPos.x;
	tele_dest._y = destPos.y;
	tele_dest._z = (uint8_t)destPos.z;
	propWriteStream.ADD_VALUE(tele_dest);

	return ret;
}
开发者ID:oneshot-git,项目名称:forgottenserver,代码行数:14,代码来源:teleport.cpp


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