本文整理汇总了C++中PropWriteStream::ADD_INT32方法的典型用法代码示例。如果您正苦于以下问题:C++ PropWriteStream::ADD_INT32方法的具体用法?C++ PropWriteStream::ADD_INT32怎么用?C++ PropWriteStream::ADD_INT32使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PropWriteStream
的用法示例。
在下文中一共展示了PropWriteStream::ADD_INT32方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: serialize
bool ConditionAttributes::serialize(PropWriteStream& propWriteStream)
{
if (!Condition::serialize(propWriteStream))
{
return false;
}
for (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i)
{
propWriteStream.ADD_UINT8(CONDITIONATTR_SKILLS);
propWriteStream.ADD_INT32(skills[i]);
}
for (int32_t i = SKILL_FIRST; i <= SKILL_LAST; ++i)
{
propWriteStream.ADD_UINT8(CONDITIONATTR_SKILLSPERCENT);
propWriteStream.ADD_INT32(skillsPercent[i]);
}
for (int32_t i = STAT_FIRST; i <= STAT_LAST; ++i)
{
propWriteStream.ADD_UINT8(CONDITIONATTR_STATS);
propWriteStream.ADD_INT32(stats[i]);
}
return true;
}
示例2: serialize
bool ConditionDamage::serialize(PropWriteStream& propWriteStream)
{
if(!Condition::serialize(propWriteStream)){
return false;
}
propWriteStream.ADD_UINT8(CONDITIONATTR_DELAYED);
propWriteStream.ADD_UINT8((uint8_t)delayed);
propWriteStream.ADD_UINT8(CONDITIONATTR_PERIODDAMAGE);
propWriteStream.ADD_INT32(periodDamage);
propWriteStream.ADD_UINT8(CONDITIONATTR_OWNER);
propWriteStream.ADD_UINT32(owner);
for(DamageList::const_iterator it = damageList.begin(); it != damageList.end(); ++it){
propWriteStream.ADD_UINT8(CONDITIONATTR_INTERVALDATA);
propWriteStream.ADD_INT32((*it).timeLeft);
propWriteStream.ADD_INT32((*it).value);
propWriteStream.ADD_INT32((*it).interval);
}
return true;
}