Fix skill cooldown promise issues

When Earthiverse made their changes to the skill system, they inadvertently change a piece of the code that made it so that when a skill was attempted to be used on cooldown, the response would be sent with `place: "skill"`, and the result would be a hung promise, as the client is waiting for a `place: "curse"`, or some other `place` value, depending on the skill they used.
This commit is contained in:
FreezePhoenix
2023-12-09 14:02:18 -05:00
committed by GitHub
parent a4f928f6aa
commit 92d2016c61
+2 -2
View File
@@ -8085,7 +8085,7 @@ function init_io() {
lastUse = player.last[data.name];
}
if (cooldown && lastUse && mssince(lastUse) < cooldown) {
return fail_response("cooldown", {
return fail_response("cooldown", data.name, {
skill: data.name,
id: data.id,
ms: cooldown - mssince(lastUse),
@@ -8204,7 +8204,7 @@ function init_io() {
const dist = distance(player, target);
if (dist > range + player.xrange) {
return fail_response("too_far", data.name, { dist: dist, id: target.id, place: data.name });
return fail_response("too_far", data.name, { dist: dist, id: target.id });
}
if (dist > range) {
// xrange was used, reduce it by however much we used