beenii
Well-Known Member
- Joined
- Jul 26, 2010
- Messages
- 580
- Solutions
- 1
- Reaction score
- 57
Hi, I'm trying to add immunity to paralyze when wearing an outfit.
I found the function that does it, but I don't know how to add it
Example:
Demon.lua
This line add paralize to players
in src monsters.cpp I found:
any way to verify, that if the player has equipped outfit id 128, don't add paralyze
I found the function that does it, but I don't know how to add it
Example:
Demon.lua
This line add paralize to players
Lua:
{name ="speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000}
in src monsters.cpp I found:
Code:
if ((attr = node.attribute("speedchange"))) {
speedChange = pugi::cast<int32_t>(attr.value());
if (speedChange < -1000) {
//cant be slower than 100%
speedChange = -1000;
}
}
ConditionType_t conditionType;
if (speedChange > 0) {
conditionType = CONDITION_HASTE;
combat->setParam(COMBAT_PARAM_AGGRESSIVE, 0);
} else {
conditionType = CONDITION_PARALYZE;
}
ConditionSpeed* condition = static_cast<ConditionSpeed*>(Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0));
condition->setFormulaVars(speedChange / 1000.0, 0, speedChange / 1000.0, 0);
combat->addCondition(condition);
any way to verify, that if the player has equipped outfit id 128, don't add paralyze