From b4be9224f1ed8e5751b7447198c984dc7da759ff Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 16 Jun 2021 08:26:52 -0300 Subject: Force stats recalculation after changing focus skills. Close #54 --- npc/commands/debug.txt | 3 --- npc/magic/config.txt | 9 ++++----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/npc/commands/debug.txt b/npc/commands/debug.txt index 64b4ad57..f62b4a97 100644 --- a/npc/commands/debug.txt +++ b/npc/commands/debug.txt @@ -497,9 +497,6 @@ L_AddAll: goto L_Begin; L_ResetAll: - cleararray @skilllist_name$[0], "", 8; - cleararray @skilllist_id[0], 0, 8; - cleararray @skilllist_count[0], 0, 8; //adddefaultskills(); updateskill SKILL_POOL, 0; updateskill SKILL_MALLARDS_EYE, 0; diff --git a/npc/magic/config.txt b/npc/magic/config.txt index e55833bc..f8135b43 100644 --- a/npc/magic/config.txt +++ b/npc/magic/config.txt @@ -337,15 +337,12 @@ function script massprovoke { // getactivatedpoolskilllist(?) function script getactivatedpoolskilllist { - @skilllist_count=bitmask_count(FOCUSING); - // FIXME @skilllist_name$ @skilllist_id? Or just rewrite Luca - return @skilllist_count; + return bitmask_count(FOCUSING); } // getdeactivatedpoolskilllist(?) function script getdeactivatedpoolskilllist { - @skilllist_count=bitmask_count(FOCUSING)-FSKILL_TOTAL; - return @skilllist_count; + return (bitmask_count(FOCUSING)-FSKILL_TOTAL); } // getpoolskillFID(ID) @@ -365,6 +362,7 @@ function script getpoolskillFID { function script poolskill { if (bitmask_count(FOCUSING) < getskilllv(SKILL_POOL)) { FOCUSING=FOCUSING | getpoolskillFID(getarg(0)); + recalcstatus(); return true; } return false; @@ -375,6 +373,7 @@ function script unpoolskill { .@f=getpoolskillFID(getarg(0)); if (FOCUSING & .@f) FOCUSING=FOCUSING ^ .@f; + recalcstatus(); return; } -- cgit v1.2.3-60-g2f50