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://svn.code.sf.net/p/rathena/svn/trunk@14250 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
d167c3422b
commit
1ac0e13994
@ -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_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_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_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
|
#define MAX_MSG 1000
|
||||||
extern char* msg_table[MAX_MSG];
|
extern char* msg_table[MAX_MSG];
|
||||||
|
@ -10912,9 +10912,6 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd)
|
|||||||
if( battle_config.atc_gmonly && !pc_isGM(sd) )
|
if( battle_config.atc_gmonly && !pc_isGM(sd) )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( pc_isGM(sd) < (lv=get_atcommand_level(atcommand_kick)) )
|
|
||||||
return;
|
|
||||||
|
|
||||||
tid = RFIFOL(fd,2);
|
tid = RFIFOL(fd,2);
|
||||||
target = map_id2bl(tid);
|
target = map_id2bl(tid);
|
||||||
if (!target) {
|
if (!target) {
|
||||||
@ -10926,7 +10923,15 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd)
|
|||||||
case BL_PC:
|
case BL_PC:
|
||||||
{
|
{
|
||||||
struct map_session_data *tsd = (struct map_session_data *)target;
|
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);
|
clif_GM_kickack(sd, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -10942,6 +10947,13 @@ void clif_parse_GMKick(int fd, struct map_session_data *sd)
|
|||||||
break;
|
break;
|
||||||
case BL_MOB:
|
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) {
|
if(log_config.gm && lv >= log_config.gm) {
|
||||||
char message[256];
|
char message[256];
|
||||||
sprintf(message, "/kick %s (%d)", status_get_name(target), status_get_class(target));
|
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;
|
struct npc_data* nd = (struct npc_data *)target;
|
||||||
lv = get_atcommand_level(atcommand_unloadnpc);
|
lv = get_atcommand_level(atcommand_unloadnpc);
|
||||||
if( pc_isGM(sd) < lv )
|
if( pc_isGM(sd) < lv )
|
||||||
|
{
|
||||||
|
clif_GM_kickack(sd, 0);
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if( log_config.gm && lv >= log_config.gm ) {
|
if( log_config.gm && lv >= log_config.gm ) {
|
||||||
char message[256];
|
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,13) = item_data->card[1];
|
||||||
WBUFW(buf,15) = item_data->card[2];
|
WBUFW(buf,15) = item_data->card[2];
|
||||||
WBUFW(buf,17) = item_data->card[3];
|
WBUFW(buf,17) = item_data->card[3];
|
||||||
//Unknown
|
//WBUFW(buf,19) = 0; // equip location? 32+2 for left/right hand, 0x8000 for 'throw' (verify this)
|
||||||
//WBUFB(buf,19) = 0;
|
//WBUFB(buf,21) = 0; // item type
|
||||||
//WBUFB(buf,20) = 0;
|
|
||||||
//WBUFB(buf,21) = 0;
|
|
||||||
clif_send(buf, packet_len(0x2b8), &sd->bl, PARTY_SAMEMAP_WOS);
|
clif_send(buf, packet_len(0x2b8), &sd->bl, PARTY_SAMEMAP_WOS);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user