summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-11-18 23:24:17 -0200
committershennetsind <ind@henn.et>2013-11-18 23:24:17 -0200
commitdd2cd7c0f1c1f675ece09e95d0e5f910e494f092 (patch)
treef6ca796903bfaade23b75057f27d36749bb95639 /src/map/clif.c
parente4badec47d849fb597f2dcec05f50862a78105d6 (diff)
downloadhercules-dd2cd7c0f1c1f675ece09e95d0e5f910e494f092.tar.gz
hercules-dd2cd7c0f1c1f675ece09e95d0e5f910e494f092.tar.bz2
hercules-dd2cd7c0f1c1f675ece09e95d0e5f910e494f092.tar.xz
hercules-dd2cd7c0f1c1f675ece09e95d0e5f910e494f092.zip
Fixed the erroneously redirected GM Full Strip Packet
Implemented in 2009-10-27, the packet was being redirected to a account name req packet, while it was a entirely different feature. this fixes the (GM-Suit) 'right click' option 'remove all equipment'. Special Thanks to Yommy. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index c509da7dd..32f29b73c 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17966,6 +17966,22 @@ void clif_notify_bounditem(struct map_session_data *sd, unsigned short index) {
clif->send(&p,sizeof(p), &sd->bl, SELF);
}
+
+/* (GM) right click -> 'remove all equipment' */
+void clif_parse_GMFullStrip(int fd, struct map_session_data *sd) {
+ struct map_session_data *tsd = map->id2sd(RFIFOL(fd,2));
+ int i;
+
+ /* TODO maybe this could be a new permission? using gm level in the meantime */
+ if( !tsd || pc->get_group_level(tsd) >= pc->get_group_level(sd) )
+ return;
+
+ for( i = 0; i < EQI_MAX; i++ ) {
+ if( tsd->equip_index[ i ] >= 0 )
+ pc->unequipitem( tsd , tsd->equip_index[ i ] , 2 );
+ }
+}
+
/* */
unsigned short clif_decrypt_cmd( int cmd, struct map_session_data *sd ) {
if( sd ) {
@@ -18914,6 +18930,7 @@ void clif_defaults(void) {
clif->pGMRc = clif_parse_GMRc;
clif->pGMReqAccountName = clif_parse_GMReqAccountName;
clif->pGMChangeMapType = clif_parse_GMChangeMapType;
+ clif->pGMFullStrip = clif_parse_GMFullStrip;
clif->pPMIgnore = clif_parse_PMIgnore;
clif->pPMIgnoreAll = clif_parse_PMIgnoreAll;
clif->pPMIgnoreList = clif_parse_PMIgnoreList;