bool ConditionAttributes::unserializeProp(ConditionAttr_t attr, PropStream& propStream) { switch(attr) { case CONDITIONATTR_SKILLS: { int32_t value = 0; if(!propStream.getType(value)) return false; skills[currentSkill++] = value; return true; } case CONDITIONATTR_STATS: { int32_t value = 0; if(!propStream.getType(value)) return false; stats[currentStat++] = value; return true; } default: break; } return ConditionGeneric::unserializeProp(attr, propStream); }
bool ConditionSoul::unserializeProp(ConditionAttr_t attr, PropStream& propStream) { switch(attr) { case CONDITIONATTR_SOULGAIN: { uint32_t value = 0; if(!propStream.getType(value)) return false; soulGain = value; return true; } case CONDITIONATTR_SOULTICKS: { uint32_t value = 0; if(!propStream.getType(value)) return false; soulTicks = value; return true; } default: break; } return ConditionGeneric::unserializeProp(attr, propStream); }
bool ConditionSpeed::unserializeProp(ConditionAttr_t attr, PropStream& propStream) { switch(attr) { case CONDITIONATTR_SPEEDDELTA: { int32_t value = 0; if(!propStream.getType(value)) return false; speedDelta = value; return true; } case CONDITIONATTR_FORMULA_MINA: { float value = 0; if(!propStream.getType(value)) return false; mina = value; return true; } case CONDITIONATTR_FORMULA_MINB: { float value = 0; if(!propStream.getType(value)) return false; minb = value; return true; } case CONDITIONATTR_FORMULA_MAXA: { float value = 0; if(!propStream.getType(value)) return false; maxa = value; return true; } case CONDITIONATTR_FORMULA_MAXB: { float value = 0; if(!propStream.getType(value)) return false; maxb = value; return true; } default: break; } return ConditionOutfit::unserializeProp(attr, propStream); }
bool ConditionDamage::unserializeProp(ConditionAttr_t attr, PropStream& propStream) { switch(attr) { case CONDITIONATTR_DELAYED: { bool value = false; if(!propStream.getType(value)) return false; delayed = value; return true; } case CONDITIONATTR_PERIODDAMAGE: { int32_t value = 0; if(!propStream.getType(value)) return false; periodDamage = value; return true; } case CONDITIONATTR_OWNER: { uint32_t value = 0; if(!propStream.getType(value)) return false; owner = value; return true; } case CONDITIONATTR_INTERVALDATA: { IntervalInfo damageInfo; if(!propStream.getType(damageInfo)) return false; damageList.push_back(damageInfo); if(getTicks() != -1) setTicks(getTicks() + damageInfo.interval); return true; } default: break; } return Condition::unserializeProp(attr, propStream); }
bool ConditionRegeneration::unserializeProp(ConditionAttr_t attr, PropStream& propStream) { switch(attr) { case CONDITIONATTR_HEALTHTICKS: { uint32_t value = 0; if(!propStream.getType(value)) return false; healthTicks = value; return true; } case CONDITIONATTR_HEALTHGAIN: { uint32_t value = 0; if(!propStream.getType(value)) return false; healthGain = value; return true; } case CONDITIONATTR_MANATICKS: { uint32_t value = 0; if(!propStream.getType(value)) return false; manaTicks = value; return true; } case CONDITIONATTR_MANAGAIN: { uint32_t value = 0; if(!propStream.getType(value)) return false; manaGain = value; return true; } default: break; } return ConditionGeneric::unserializeProp(attr, propStream); }
bool ConditionLight::unserializeProp(ConditionAttr_t attr, PropStream& propStream) { switch(attr) { case CONDITIONATTR_LIGHTCOLOR: { uint32_t value = 0; if(!propStream.getType(value)) return false; lightInfo.color = value; return true; } case CONDITIONATTR_LIGHTLEVEL: { uint32_t value = 0; if(!propStream.getType(value)) return false; lightInfo.level = value; return true; } case CONDITIONATTR_LIGHTTICKS: { uint32_t value = 0; if(!propStream.getType(value)) return false; internalLightTicks = value; return true; } case CONDITIONATTR_LIGHTINTERVAL: { uint32_t value = 0; if(!propStream.getType(value)) return false; lightChangeInterval = value; return true; } default: break; } return Condition::unserializeProp(attr, propStream); }
bool ConditionOutfit::unserializeProp(ConditionAttr_t attr, PropStream& propStream) { Outfit_t outfit; switch(attr) { case CONDITIONATTR_OUTFIT: { if(!propStream.getType(outfit)) return false; outfits.push_back(outfit); return true; } default: break; } return Condition::unserializeProp(attr, propStream); }
bool Condition::unserializeProp(ConditionAttr_t attr, PropStream& propStream) { switch(attr) { case CONDITIONATTR_TYPE: { int32_t value = 0; if(!propStream.getType(value)) return false; conditionType = (ConditionType_t)value; return true; } case CONDITIONATTR_ID: { int32_t value = 0; if(!propStream.getType(value)) return false; id = (ConditionId_t)value; return true; } case CONDITIONATTR_TICKS: { int32_t value = 0; if(!propStream.getType(value)) return false; ticks = value; return true; } case CONDITIONATTR_BUFF: { int32_t value = 0; if(!propStream.getType(value)) return false; buff = value; return true; } case CONDITIONATTR_SUBID: { int32_t value = 0; if(!propStream.getType(value)) return false; subId = value; return true; } case CONDITIONATTR_END: return true; default: break; } return false; }