From 8367c024ef4276b531e1a6f73b6979ec4b78872f Mon Sep 17 00:00:00 2001 From: gumi Date: Fri, 9 Mar 2018 14:57:57 -0500 Subject: make the @class command automatically fix headstyles --- client-data | 2 +- world/map/npc/commands/class.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/client-data b/client-data index c35ce1e6..1ad7efa7 160000 --- a/client-data +++ b/client-data @@ -1 +1 @@ -Subproject commit c35ce1e64f90589afb8683b9511e7d156352f025 +Subproject commit 1ad7efa7169c566f4f5d0b4df1b1154d1023b6cc diff --git a/world/map/npc/commands/class.txt b/world/map/npc/commands/class.txt index 9143e08a..339f6226 100644 --- a/world/map/npc/commands/class.txt +++ b/world/map/npc/commands/class.txt @@ -11,10 +11,15 @@ set .@c, 1; // default to human if (@argv[0] >= 1 || @argv[0] <= 32767) set .@c, @argv[0]; set Class, .@c, .@target_id; + if (.@c < 10) addtimer 0, strnpcinfo(0) + "::OnFixHead", .@target_id; gmlog "@"+.@n$+" " + @args$; message strcharinfo(0), .@n$+" : The operation succeeded."; end; +OnFixHead: + callfunc "fixHeadStyles"; + end; + L_Failed: // XXX: should we allow GMs to change class of users that are not logged in? message strcharinfo(0), .@n$+" : Impossible to attach to the target player. Did you try putting the name in \"quotation marks\"?"; -- cgit v1.2.3-70-g09d2