diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-01-30 12:55:06 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 12:55:06 -0300 |
commit | 7d6c8f5ad4267051bf71518523b473e188383e1a (patch) | |
tree | fefdaa918072e5621dd5a173c79b6b091dfa6f7d | |
parent | c1baf23ec065038f88752256e91217ca860b39f5 (diff) | |
download | classic-serverdata-7d6c8f5ad4267051bf71518523b473e188383e1a.tar.gz classic-serverdata-7d6c8f5ad4267051bf71518523b473e188383e1a.tar.bz2 classic-serverdata-7d6c8f5ad4267051bf71518523b473e188383e1a.tar.xz classic-serverdata-7d6c8f5ad4267051bf71518523b473e188383e1a.zip |
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.
-rw-r--r-- | world/map/npc/commands/gm.txt | 4 |
1 files 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."; |