mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:28 -05:00
Merge pull request #76 from FreezePhoenix/patch-7
Fix skill cooldown promise issues
This commit is contained in:
+2
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user