summaryrefslogtreecommitdiff
path: root/src/map/pc.cpp
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-02-17 00:54:07 -0500
committergumi <git@gumi.ca>2018-02-17 00:54:07 -0500
commit6f999732ba46c8c1ba413a1ee0f54de63a8a051e (patch)
treeb0450ef0e19000e2bb3ff87191a8e6972dea08d6 /src/map/pc.cpp
parentd6d87bb62f067aac5a02372163fe5c74250d9270 (diff)
downloadtmwa-6f999732ba46c8c1ba413a1ee0f54de63a8a051e.tar.gz
tmwa-6f999732ba46c8c1ba413a1ee0f54de63a8a051e.tar.bz2
tmwa-6f999732ba46c8c1ba413a1ee0f54de63a8a051e.tar.xz
tmwa-6f999732ba46c8c1ba413a1ee0f54de63a8a051e.zip
allow to set GM level from script
Diffstat (limited to 'src/map/pc.cpp')
-rw-r--r--src/map/pc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index f854ccd..3784566 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -3780,6 +3780,12 @@ int pc_setparam(dumb_ptr<block_list> bl, SP type, int val)
else if (nd)
npc_enable(nd->name, (val > 0) ? false : true);
break;
+ case SP::GM:
+ nullpo_retz(sd);
+ pc_set_gm_level(sd->status_key.account_id, GmLevel::from(static_cast<uint32_t>(val)));
+ clif_updatestatus(sd, SP::GM); // propagate to self
+ clif_fixpcpos(sd); // propagate to others
+ break;
case SP::HIDDEN:
nullpo_retz(sd);
if (val == 1)