• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

C++ To create new condition

zika12345

New Member
Joined
Aug 29, 2016
Messages
13
Solutions
1
Reaction score
0
To create new condition, if I just copy one that already exists and change only its name will work?

What else do I need to do?

I use trunk.r3884
 
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