本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: serialize
bool ConditionOutfit::serialize(PropWriteStream& propWriteStream)
{
if (!Condition::serialize(propWriteStream)) {
return false;
}
propWriteStream.ADD_UCHAR(CONDITIONATTR_OUTFIT);
propWriteStream.ADD_VALUE(outfit);
return true;
}
示例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;
}
示例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;
}
示例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;
}