diff options
author | Haru <haru@dotalux.com> | 2019-08-25 20:06:38 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2019-08-26 01:45:37 +0200 |
commit | 375e9a54f5e8aaef083f60cb36bad59f37e40905 (patch) | |
tree | 264ad1dd6cb01b15a948c7d8052518e7fe05763f /src/map | |
parent | f0b91a79a0f8031d3cd6289ceafead93817bc4a7 (diff) | |
download | hercules-375e9a54f5e8aaef083f60cb36bad59f37e40905.tar.gz hercules-375e9a54f5e8aaef083f60cb36bad59f37e40905.tar.bz2 hercules-375e9a54f5e8aaef083f60cb36bad59f37e40905.tar.xz hercules-375e9a54f5e8aaef083f60cb36bad59f37e40905.zip |
Prevent MVP tombstones from showing their message multiple times when clicked
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/npc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 1e9e13b42..868b8711a 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1258,6 +1258,9 @@ static void run_tomb(struct map_session_data *sd, struct npc_data *nd) char time[10]; nullpo_retv(nd); + + sd->npc_id = nd->bl.id; + strftime(time, sizeof(time), "%H:%M", localtime(&nd->u.tomb.kill_time)); // TODO: Find exact color? @@ -1373,8 +1376,10 @@ static int npc_scriptcont(struct map_session_data *sd, int id, bool closing) if( sd->progressbar.npc_id && DIFF_TICK(sd->progressbar.timeout,timer->gettick()) > 0 ) return 1; - if( !sd->st ) + if( !sd->st ) { + sd->npc_id = 0; return 1; + } if( closing && sd->st->state == CLOSE ) sd->st->state = END; |