diff options
author | Fate <fate-tmw@googlemail.com> | 2009-05-14 10:20:57 +0000 |
---|---|---|
committer | Fate <fate-tmw@googlemail.com> | 2009-05-14 10:20:57 +0000 |
commit | 4e7a458308e2c3c6670489da43d06bd25c2db92c (patch) | |
tree | a24e10e4e4a7c2bfc2c298b85440347816cc04a7 /src/map/pc.c | |
parent | 226d345c10e5271f026584083090e46ebc580f3e (diff) | |
download | tmwa-4e7a458308e2c3c6670489da43d06bd25c2db92c.tar.gz tmwa-4e7a458308e2c3c6670489da43d06bd25c2db92c.tar.bz2 tmwa-4e7a458308e2c3c6670489da43d06bd25c2db92c.tar.xz tmwa-4e7a458308e2c3c6670489da43d06bd25c2db92c.zip |
Added pc_logout() hook to process players who are logging out
When poisoned and logging out, set hp to 1 to avoid cheap poison cure exploit
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index 8933000..64e66d7 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -7704,3 +7704,14 @@ pc_invisibility(struct map_session_data *sd, int enabled) pc_setpos(sd, map[sd->bl.m].name, sd->bl.x, sd->bl.y, 3); } } + +int pc_logout(struct map_session_data *sd) // [fate] Player logs out +{ + if (!sd) + return 0; + + if (sd->sc_data[SC_POISON].timer != -1) + sd->status.hp = 1; // Logging out while poisoned -> bad + + return 0; +} |