• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

C++ To create new condition

Up
In other files a CONDITION_PARALYZE2 has already been created;

Code:
ConditionType_t2 conditionType2 = CONDITION_PARALYZE2;
if(speedChange > 0){
   conditionType2 = CONDITION_HASTE;
   if(aggressive == AUTO)
       aggressive = NO;
}
else if(aggressive == AUTO)
   aggressive = YES;

if(ConditionSpeed* condition = dynamic_cast<ConditionSpeed*>(Condition::createCondition(
   CONDITIONID_COMBAT, conditionType2, duration))) {
   condition->setFormulaVars((speedChange / 1000.), 0, (speedChange / 1000.), 0);
   if(!outfits.empty())
       condition->setOutfits(outfits);

   combat->setCondition(condition);
   combat->setParam(COMBATPARAM_AGGRESSIVE, aggressive);
}
 
Back
Top