diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-02-21 00:51:22 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2010-02-21 00:51:22 +0000 |
commit | af5b388d15012339101c2028bb55f9798b185f17 (patch) | |
tree | e356b28405e00f51abe6912d076b3f8901e37ac1 /src | |
parent | d9dd828fb28802edf9573179826fdbaca50e4828 (diff) | |
download | hercules-af5b388d15012339101c2028bb55f9798b185f17.tar.gz hercules-af5b388d15012339101c2028bb55f9798b185f17.tar.bz2 hercules-af5b388d15012339101c2028bb55f9798b185f17.tar.xz hercules-af5b388d15012339101c2028bb55f9798b185f17.zip |
Changes to how right-click gm kick checks gm privileges:
* moved @kick gm level check to the part that kicks players
* added @killmonster gm level check to the part that kills monsters
* added missing reply to client in the part that unloads npcs
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14250 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.h | 1 | ||||
-rw-r--r-- | src/map/clif.c | 29 |
2 files changed, 22 insertions, 8 deletions
diff --git a/src/map/atcommand.h b/src/map/atcommand.h index 30ef3f297..37ce87ca3 100644 --- a/src/map/atcommand.h +++ b/src/map/atcommand.h @@ -37,6 +37,7 @@ int atcommand_broadcast(const int fd, struct map_session_data* sd,const char* co int atcommand_localbroadcast(const int fd, struct map_session_data* sd,const char* command, const char* message); int atcommand_reset(const int fd, struct map_session_data* sd,const char* command, const char* message); int atcommand_unloadnpc(const int fd, struct map_session_data* sd, const char* command, const char* message); +int atcommand_killmonster(const int fd, struct map_session_data* sd, const char* command, const char* message); #define MAX_MSG 1000 extern char* msg_table[MAX_MSG]; diff --git a/src/map/clif.c b/src/map/clif.c index 1eed2fd91..1d8c2e752 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10912,9 +10912,6 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) if( battle_config.atc_gmonly && !pc_isGM(sd) ) return; - if( pc_isGM(sd) < (lv=get_atcommand_level(atcommand_kick)) ) - return; - tid = RFIFOL(fd,2); target = map_id2bl(tid); if (!target) { @@ -10926,7 +10923,15 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) case BL_PC: { struct map_session_data *tsd = (struct map_session_data *)target; - if (pc_isGM(sd) <= pc_isGM(tsd)) { + if (pc_isGM(sd) <= pc_isGM(tsd)) + { + clif_GM_kickack(sd, 0); + return; + } + + lv = get_atcommand_level(atcommand_kick); + if( pc_isGM(sd) < lv ) + { clif_GM_kickack(sd, 0); return; } @@ -10942,6 +10947,13 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) break; case BL_MOB: { + lv = get_atcommand_level(atcommand_killmonster); + if( pc_isGM(sd) < lv ) + { + clif_GM_kickack(sd, 0); + return; + } + if(log_config.gm && lv >= log_config.gm) { char message[256]; sprintf(message, "/kick %s (%d)", status_get_name(target), status_get_class(target)); @@ -10956,7 +10968,10 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd) struct npc_data* nd = (struct npc_data *)target; lv = get_atcommand_level(atcommand_unloadnpc); if( pc_isGM(sd) < lv ) + { + clif_GM_kickack(sd, 0); return; + } if( log_config.gm && lv >= log_config.gm ) { char message[256]; @@ -13447,10 +13462,8 @@ void clif_party_show_picker(struct map_session_data * sd, struct item * item_dat WBUFW(buf,13) = item_data->card[1]; WBUFW(buf,15) = item_data->card[2]; WBUFW(buf,17) = item_data->card[3]; - //Unknown - //WBUFB(buf,19) = 0; - //WBUFB(buf,20) = 0; - //WBUFB(buf,21) = 0; + //WBUFW(buf,19) = 0; // equip location? 32+2 for left/right hand, 0x8000 for 'throw' (verify this) + //WBUFB(buf,21) = 0; // item type clif_send(buf, packet_len(0x2b8), &sd->bl, PARTY_SAMEMAP_WOS); #endif } |