fixed Emotion flood (fix from Freya)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1198 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
d379d3ade3
commit
73879f7131
@ -1,7 +1,7 @@
|
|||||||
Date Added
|
Date Added
|
||||||
|
|
||||||
03/02
|
03/02
|
||||||
|
* Fixed Emotion Flood (by Yor) [Lupus]
|
||||||
* SQL: Fixed temporary ban. Now banned players can enter the server when the ban time is over. [Lupus]
|
* SQL: Fixed temporary ban. Now banned players can enter the server when the ban time is over. [Lupus]
|
||||||
It wasn't working because STATE hasn't been cleared properly.
|
It wasn't working because STATE hasn't been cleared properly.
|
||||||
Also fixed wrong client messages (ban reasons: Banned by GM / Temp ban till DATE).
|
Also fixed wrong client messages (ban reasons: Banned by GM / Temp ban till DATE).
|
||||||
|
@ -8163,10 +8163,20 @@ void clif_parse_Emotion(int fd, struct map_session_data *sd) {
|
|||||||
nullpo_retv(sd);
|
nullpo_retv(sd);
|
||||||
|
|
||||||
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 2) {
|
if (battle_config.basic_skill_check == 0 || pc_checkskill(sd, NV_BASIC) >= 2) {
|
||||||
|
if (RFIFOB(fd,2) == 34) {// prevent use of the mute emote [Valaris]
|
||||||
|
clif_skill_fail(sd, 1, 0, 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// fix flood of emotion icon (ro-proxy): flood only the hacker player
|
||||||
|
if (sd->emotionlasttime >= time(NULL)) {
|
||||||
|
sd->emotionlasttime = time(NULL) + 2; // not more than 1 every 2 seconds (normal client is every 3-4 seconds)
|
||||||
|
clif_skill_fail(sd, 1, 0, 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
sd->emotionlasttime = time(NULL) + 2; // not more than 1 every 2 seconds (normal client is every 3-4 seconds)
|
||||||
|
|
||||||
WBUFW(buf,0) = 0xc0;
|
WBUFW(buf,0) = 0xc0;
|
||||||
WBUFL(buf,2) = sd->bl.id;
|
WBUFL(buf,2) = sd->bl.id;
|
||||||
if(RFIFOB(fd,2)==34) // prevent use of the mute emote [Valaris]
|
|
||||||
return;
|
|
||||||
WBUFB(buf,6) = RFIFOB(fd,2);
|
WBUFB(buf,6) = RFIFOB(fd,2);
|
||||||
clif_send(buf, packet_len_table[0xc0], &sd->bl, AREA);
|
clif_send(buf, packet_len_table[0xc0], &sd->bl, AREA);
|
||||||
} else
|
} else
|
||||||
|
@ -200,6 +200,8 @@ struct map_session_data {
|
|||||||
int followtimer; // [MouseJstr]
|
int followtimer; // [MouseJstr]
|
||||||
int followtarget;
|
int followtarget;
|
||||||
|
|
||||||
|
time_t emotionlasttime; // to limit flood with emotion packets
|
||||||
|
|
||||||
short attackrange,attackrange_;
|
short attackrange,attackrange_;
|
||||||
int skilltimer;
|
int skilltimer;
|
||||||
int skilltarget;
|
int skilltarget;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user