From 7d6c8f5ad4267051bf71518523b473e188383e1a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 30 Jan 2020 12:55:06 -0300 Subject: Fix a possible bug when casting @showgm (or @hidegm) twice (if admin) (#538) If you cast eg. @hidegm twice, A GM level 99 would fall under special rule (and go to 98) on the first time, but on second time, it would fall under general rule, get GM 91, and BREAK THINGS. --- world/map/npc/commands/gm.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/world/map/npc/commands/gm.txt b/world/map/npc/commands/gm.txt index b4d8c349..075ceea0 100644 --- a/world/map/npc/commands/gm.txt +++ b/world/map/npc/commands/gm.txt @@ -5,7 +5,7 @@ OnHide: if (GM < 10 && GM < G_SYSOP) end; - if (GM == 99) set GM, 98; + if (GM >= 98) set GM, 98; else set GM, (GM - (GM % 10)) + 1; message strcharinfo(0), "hidelevel : Your GM level is now hidden."; @@ -14,7 +14,7 @@ OnHide: OnShow: if (GM < 10 && GM < G_SYSOP) end; - if (GM == 98) set GM, 99; + if (GM >= 98) set GM, 99; else set GM, GM - (GM % 10); message strcharinfo(0), "showlevel : Your GM level is now visible."; -- cgit v1.2.3-60-g2f50