From b32fa6c1cb4f0c494432a7ef0d95a7f410d64d06 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 6 Oct 2006 13:28:36 +0000 Subject: [PATCH] - Now you can trade while in a chatroom. - Fixed homun-txt reading when the file has DOS line-type delimiters (\r\n) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8944 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-Trunk.txt | 4 ++++ src/char/int_homun.c | 2 +- src/map/clif.c | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 556ac8a98f..4593d81953 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,10 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +2006/10/06 + * Now you can trade while in a chatroom. [Skotlex] + * Fixed homun-txt reading when the file has DOS line-type delimiters (\r\n) + [Skotlex] 2006/10/05 * skill_blown will now trigger on-touch npcs on the landing tile. [Skotlex] * Max trade distance has been reduced from 5 to 2. [Skotlex] diff --git a/src/char/int_homun.c b/src/char/int_homun.c index fc06995c6c..886c56f06a 100644 --- a/src/char/int_homun.c +++ b/src/char/int_homun.c @@ -92,7 +92,7 @@ int inter_homun_fromstr(char *str,struct s_homunculus *p) p->luk = tmp_int[17]; //Read skills. - while(str[next] && str[next] != '\n') { + while(str[next] && str[next] != '\n' && str[next] != '\r') { if (sscanf(str+next, "%d,%d,%n", &tmp_int[0], &tmp_int[1], &len) != 2) return 2; diff --git a/src/map/clif.c b/src/map/clif.c index 3164fe9501..35ade7ce37 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9533,8 +9533,8 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd) RFIFOHEAD(fd); t_sd = map_id2sd(RFIFOL(sd->fd,2)); - if(clif_cant_act(sd)) - return; + if(!sd->chatID && clif_cant_act(sd)) + return; //You can trade while in a chatroom. // @noask [LuzZza] if(t_sd) { @@ -9542,7 +9542,7 @@ void clif_parse_TradeRequest(int fd,struct map_session_data *sd) clif_noask_sub(sd, t_sd, 0); return; } - if(clif_cant_act(t_sd)) + if(!t_sd->chatID && clif_cant_act(t_sd)) return; }