if (teleport || oldPos.z != newPos.z) {
int32_t ticks = g_config.getNumber(ConfigManager::STAIRHOP_DELAY);
if (ticks > 0) {
if (Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_PACIFIED, ticks, 0)) {
addCondition(condition);
}
}
}
Yea im sure i can spam floor change like crazy there is 0 cooldownAre you sure about that? Had a look in onCreatureMove in player.cpp, and it seems to be adding this exhaust if you change floor regardless of stairs, ramp or ladders:
C++:if (teleport || oldPos.z != newPos.z) { int32_t ticks = g_config.getNumber(ConfigManager::STAIRHOP_DELAY); if (ticks > 0) { if (Condition* condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_PACIFIED, ticks, 0)) { addCondition(condition); } } }
Explain what you mean, you want to get exhausted from walking up and down? Or do you mean exhausted in attacking?
Yea just overall stair/ramp hopping exhaustHe wants block stairhopping, not spells exhaust i guess
if (!teleport) {
if (oldPos.z != newPos.z) {
//floor change extra cost
lastStepCost = 2;
} else if (Position::getDistanceX(newPos, oldPos) >= 1 && Position::getDistanceY(newPos, oldPos) >= 1) {
//diagonal extra cost
lastStepCost = 3;
}
} else {
stopEventWalk();
}
if (teleport) {
stopEventWalk();
}
if (oldPos.z != newPos.z) {
//floor change extra cost
lastStepCost = 2;
} else if (Position::getDistanceX(newPos, oldPos) >= 1 && Position::getDistanceY(newPos, oldPos) >= 1) {
//diagonal extra cost
lastStepCost = 3;
}
No errors but still zero cooldowns can change floors instantlyin onCreatureMove in creature.cpp, try change this:
C++:if (!teleport) { if (oldPos.z != newPos.z) { //floor change extra cost lastStepCost = 2; } else if (Position::getDistanceX(newPos, oldPos) >= 1 && Position::getDistanceY(newPos, oldPos) >= 1) { //diagonal extra cost lastStepCost = 3; } } else { stopEventWalk(); }
With:
C++:if (teleport) { stopEventWalk(); } if (oldPos.z != newPos.z) { //floor change extra cost lastStepCost = 2; } else if (Position::getDistanceX(newPos, oldPos) >= 1 && Position::getDistanceY(newPos, oldPos) >= 1) { //diagonal extra cost lastStepCost = 3; }