summaryrefslogtreecommitdiff
path: root/src/map/clif.c
diff options
context:
space:
mode:
authorMadCamel <madcamel@gmail.com>2009-08-18 16:49:39 -0400
committerMadCamel <madcamel@gmail.com>2009-08-18 16:49:39 -0400
commitf7059966bd6a06c3697e0d0721be6b4c08acce22 (patch)
treedf5646843b2b0492b1c16a7519bec9b451315c83 /src/map/clif.c
parentbe14846f81942b7965212d71446aa6ae91ee8dc7 (diff)
parente2f3dc61d7f2720f80d247354604b1ebdc15aad6 (diff)
downloadtmwa-f7059966bd6a06c3697e0d0721be6b4c08acce22.tar.gz
tmwa-f7059966bd6a06c3697e0d0721be6b4c08acce22.tar.bz2
tmwa-f7059966bd6a06c3697e0d0721be6b4c08acce22.tar.xz
tmwa-f7059966bd6a06c3697e0d0721be6b4c08acce22.zip
Merge branch 'master' of git://gitorious.org/tmw-eathena/mainline
Diffstat (limited to 'src/map/clif.c')
-rw-r--r--src/map/clif.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 908e9ff..14f2770 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -756,8 +756,7 @@ static int clif_set0078(struct map_session_data *sd, unsigned char *buf) {
WBUFB(buf,45)=sd->sex;
WBUFPOS(buf,46,sd->bl.x,sd->bl.y);
WBUFB(buf,48)|=sd->dir&0x0f;
- WBUFB(buf,49)=5;
- WBUFB(buf,50)=5;
+ WBUFW(buf,49)=pc_isGM(sd) >= 60 ? 0x80 : 0;
WBUFB(buf,51)=sd->state.dead_sit;
WBUFW(buf,52)=((level = battle_get_lv(&sd->bl)) > battle_config.max_lv) ? battle_config.max_lv : level;
@@ -830,8 +829,7 @@ static int clif_set007b(struct map_session_data *sd,unsigned char *buf) {
WBUFB(buf,48)=sd->status.karma;
WBUFB(buf,49)=sd->sex;
WBUFPOS2(buf,50,sd->bl.x,sd->bl.y,sd->to_x,sd->to_y);
- WBUFB(buf,55)=0;
- WBUFB(buf,56)=5;
+ WBUFW(buf,55)=pc_isGM(sd) >= 60 ? 0x80 : 0;
WBUFB(buf,57)=5;
WBUFW(buf,58)=(sd->status.base_level>battle_config.max_lv)?battle_config.max_lv:sd->status.base_level;
@@ -6505,7 +6503,8 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c <
memcpy(WBUFP(buf,8), RFIFOP(fd,4), RFIFOW(fd,2) - 4);
if (malformed || !magic_message(sd, buf, msg_len)) {
- tmw_CheckChatSpam(sd, RFIFOP(fd,4));
+ if (tmw_CheckChatSpam(sd, RFIFOP(fd,4)))
+ return;
if ((malformed)||(pc_isdead(sd))) {
free(buf);
@@ -6676,6 +6675,8 @@ void clif_parse_ActionRequest(int fd, struct map_session_data *sd) {
break;
case 0x02: // sitdown
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 3) {
+ if (tmw_CheckSitSpam(sd))
+ break;
pc_stop_walking(sd, 1);
skill_gangsterparadise(sd, 1); // �M�����O�X�^�[�p���_�C�X�ݒ�
pc_setsit(sd);
@@ -6750,7 +6751,8 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni
return;
}
- tmw_CheckChatSpam(sd, RFIFOP(fd,28));
+ if (tmw_CheckChatSpam(sd, RFIFOP(fd,28)))
+ return;
if (strlen(RFIFOP(fd,28)) >= battle_config.chat_maxline)
return;
@@ -7084,7 +7086,8 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd)
nullpo_retv(sd);
if(battle_config.basic_skill_check == 0 || pc_checkskill(sd,NV_BASIC) >= 1){
- tmw_CheckTradeSpam(sd);
+ if (tmw_CheckTradeSpam(sd))
+ return;
trade_traderequest(sd,RFIFOL(sd->fd,2));
} else
clif_skill_fail(sd,1,0,0);