From 2a93e0b7396b78d5a09927a552dd05e862277b50 Mon Sep 17 00:00:00 2001 From: Freeyorp Date: Mon, 20 Jul 2009 17:32:14 +1200 Subject: Alter fun_is_gm_invisible to a more generic fun_status_option This function now accepts an integer as a second argument for a bitmask, and should be able to be used for other status options now too. --- src/map/magic-expr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/map/magic-expr.c b/src/map/magic-expr.c index 2f52be5..c136a17 100644 --- a/src/map/magic-expr.c +++ b/src/map/magic-expr.c @@ -954,9 +954,9 @@ fun_running_status_update(env_t *env, int args_nr, val_t *result, val_t *args) } static int -fun_is_gm_invisible(env_t *env, int args_nr, val_t *result, val_t *args) +fun_status_option(env_t *env, int args_nr, val_t *result, val_t *args) { - RESULTINT = ((((struct map_session_data *)ARGENTITY(0))->status.option & 4096) != 0); + RESULTINT = ((((struct map_session_data *)ARGENTITY(0))->status.option & ARGINT(0)) != 0); return 0; } @@ -1186,7 +1186,7 @@ static fun_t functions[] = { { "count_item", "e.", 'i', fun_count_item }, { "line_of_sight", "ll", 'i', fun_line_of_sight }, { "running_status_update", "ei", 'i', fun_running_status_update }, - { "is_gm_invisible", "e", 'i', fun_is_gm_invisible }, + { "status_option", "ei", 'i', fun_status_option }, { "element", "e", 'i', fun_element }, { "element_level", "e", 'i', fun_element_level }, { "has_shroud", "e", 'i', fun_has_shroud }, -- cgit v1.2.3-70-g09d2 From 3b44872c6d1601abe33115a92cbb8e3e13d2bea5 Mon Sep 17 00:00:00 2001 From: Maximilian Philipps Date: Sun, 26 Jul 2009 00:27:41 +0200 Subject: prevent dead players from talking cause it is annoying when a skull kills them and they keep talking like nothing happend. --- src/map/clif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/clif.c b/src/map/clif.c index 9357084..908e9ff 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -6507,7 +6507,7 @@ void clif_parse_GlobalMessage(int fd, struct map_session_data *sd) { // S 008c < if (malformed || !magic_message(sd, buf, msg_len)) { tmw_CheckChatSpam(sd, RFIFOP(fd,4)); - if (malformed) { + if ((malformed)||(pc_isdead(sd))) { free(buf); return; } -- cgit v1.2.3-70-g09d2 From 37bdc8e72ec43e6e8f827ed77a1f93f5a8b0007f Mon Sep 17 00:00:00 2001 From: Maximilian Philipps Date: Thu, 30 Jul 2009 13:48:17 +0200 Subject: fix 2 error messages for char.log --- src/char/char.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/char/char.c b/src/char/char.c index 37580b6..38c1f4a 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -816,12 +816,12 @@ int make_new_char(int fd, unsigned char *dat) { for(i = 0; i < char_num; i++) { if ((name_ignoring_case != 0 && strcmp(char_dat[i].name, dat) == 0) || (name_ignoring_case == 0 && strcmpi(char_dat[i].name, dat) == 0)) { - char_log("Make new char error (name already exists): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE, + char_log("Make new char error (name already exists): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %s), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE, fd, sd->account_id, dat[30], dat, char_dat[i].name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]); return -1; } if (char_dat[i].account_id == sd->account_id && char_dat[i].char_num == dat[30]) { - char_log("Make new char error (slot already used): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %d), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE, + char_log("Make new char error (slot already used): (connection #%d, account: %d) slot %d, name: %s (actual name of other char: %s), stats: %d+%d+%d+%d+%d+%d=%d, hair: %d, hair color: %d." RETCODE, fd, sd->account_id, dat[30], dat, char_dat[i].name, dat[24], dat[25], dat[26], dat[27], dat[28], dat[29], dat[24] + dat[25] + dat[26] + dat[27] + dat[28] + dat[29], dat[33], dat[31]); return -1; } -- cgit v1.2.3-70-g09d2