From 48d96bc41a4791b6cb0bc2cf514a6cc1f06c4dd8 Mon Sep 17 00:00:00 2001
From: Jared Adams <jaxad0127@gmail.com>
Date: Mon, 28 Sep 2009 13:05:53 -0600
Subject: Revert "Prevent trading with other players who are shoping"

This reverts commit b3939b91deda8081c5b144109829599b05e81272.
---
 src/map/trade.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/map/trade.c b/src/map/trade.c
index 9e99ef1..31f29ce 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -28,7 +28,7 @@ void trade_traderequest(struct map_session_data *sd,int target_id)
 				return;
 			}
 		}
-		if (target_sd->npc_id || target_sd->npc_shopid)
+		if (target_sd->npc_id)
 		{
 			//Trade fails if you are using an NPC.
 			clif_tradestart(sd, 2);
-- 
cgit v1.2.3-70-g09d2


From 565bad1041b46f40c843121f1db915d95c76a9ad Mon Sep 17 00:00:00 2001
From: Jared Adams <jaxad0127@gmail.com>
Date: Sat, 3 Oct 2009 10:42:20 -0600
Subject: Make failed skill ups respond with right value

---
 src/map/pc.c | 49 +++++++++++++++++++++++--------------------------
 1 file changed, 23 insertions(+), 26 deletions(-)

diff --git a/src/map/pc.c b/src/map/pc.c
index e2f8eec..5bb0009 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4610,52 +4610,49 @@ int pc_statusup(struct map_session_data *sd,int type)
 
 	nullpo_retr(0, sd);
 
+	switch(type){
+	case SP_STR:
+		val= sd->status.str;
+		break;
+	case SP_AGI:
+		val= sd->status.agi;
+		break;
+	case SP_VIT:
+		val= sd->status.vit;
+		break;
+	case SP_INT:
+		val= sd->status.int_;
+		break;
+	case SP_DEX:
+		val= sd->status.dex;
+		break;
+	case SP_LUK:
+		val= sd->status.luk;
+		break;
+	}
+
 	need=pc_need_status_point(sd,type);
-	if(type<SP_STR || type>SP_LUK || need<0 || need>sd->status.status_point){
-		clif_statusupack(sd,type,0,0);
+	if(type<SP_STR || type>SP_LUK || need<0 || need>sd->status.status_point || val >= battle_config.max_parameter){
+		clif_statusupack(sd,type,0,val);
 		return 1;
 	}
 	switch(type){
 	case SP_STR:
-		if(sd->status.str >= battle_config.max_parameter) {
-			clif_statusupack(sd,type,0,0);
-			return 1;
-		}
 		val= ++sd->status.str;
 		break;
 	case SP_AGI:
-		if(sd->status.agi >= battle_config.max_parameter) {
-			clif_statusupack(sd,type,0,0);
-			return 1;
-		}
 		val= ++sd->status.agi;
 		break;
 	case SP_VIT:
-		if(sd->status.vit >= battle_config.max_parameter) {
-			clif_statusupack(sd,type,0,0);
-			return 1;
-		}
 		val= ++sd->status.vit;
 		break;
 	case SP_INT:
-		if(sd->status.int_ >= battle_config.max_parameter) {
-			clif_statusupack(sd,type,0,0);
-			return 1;
-		}
 		val= ++sd->status.int_;
 		break;
 	case SP_DEX:
-		if(sd->status.dex >= battle_config.max_parameter) {
-			clif_statusupack(sd,type,0,0);
-			return 1;
-		}
 		val= ++sd->status.dex;
 		break;
 	case SP_LUK:
-		if(sd->status.luk >= battle_config.max_parameter) {
-			clif_statusupack(sd,type,0,0);
-			return 1;
-		}
 		val= ++sd->status.luk;
 		break;
 	}
-- 
cgit v1.2.3-70-g09d2


From 40792ad45c1929f999602dd386483ce99b0ed30a Mon Sep 17 00:00:00 2001
From: Jared Adams <jaxad0127@gmail.com>
Date: Sat, 3 Oct 2009 12:08:30 -0600
Subject: Make sure the announce packet includes the nick

Also remove @kamib, as it's difference doesn't affect our client.
---
 src/map/atcommand.c | 3 +--
 src/map/clif.c      | 7 ++++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 510026b..3668d98 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -241,7 +241,6 @@ static AtCommandInfo atcommand_info[] = {
 	{ AtCommand_Kill,                "@kill",            60, atcommand_kill },
 	{ AtCommand_Alive,               "@alive",           60, atcommand_alive },
 	{ AtCommand_Kami,                "@kami",            40, atcommand_kami },
-	{ AtCommand_KamiB,               "@kamib",           40, atcommand_kami },
 	{ AtCommand_Heal,                "@heal",            40, atcommand_heal },
 	{ AtCommand_Item,                "@item",            60, atcommand_item },
 	{ AtCommand_ItemReset,           "@itemreset",       40, atcommand_itemreset },
@@ -1732,7 +1731,7 @@ int atcommand_kami(
 	}
 
 	sscanf(message, "%199[^\n]", output);
-	intif_GMmessage(output, strlen(output) + 1, (*(command + 5) == 'b') ? 0x10 : 0);
+	intif_GMmessage(output, strlen(output) + 1, 0);
 
 	return 0;
 }
diff --git a/src/map/clif.c b/src/map/clif.c
index 76c38e5..f168ae5 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -6833,15 +6833,20 @@ void clif_parse_Wis(int fd, struct map_session_data *sd) { // S 0096 <len>.w <ni
  */
 void clif_parse_GMmessage(int fd, struct map_session_data *sd) {
 	char m[512];
+	char output[200];
 	nullpo_retv(sd);
 
 	if ((battle_config.atc_gmonly == 0 || pc_isGM(sd)) &&
 	    (pc_isGM(sd) >= get_atcommand_level(AtCommand_Broadcast)))
 	{
-		intif_GMmessage(RFIFOP(fd,4), RFIFOW(fd,2)-4, 0);
 		strncpy(m, RFIFOP(fd,4), RFIFOW(fd,2) - 4);
 		m[RFIFOW(fd,2) - 4] = 0;
 		log_atcommand(sd, "/announce %s", m);
+
+		memset(output, '\0', sizeof(output));
+		snprintf(output, 199, "%s : %s", sd->status.name, m);
+
+		intif_GMmessage(output, strlen(output) + 1, 0);
 	}
 }
 
-- 
cgit v1.2.3-70-g09d2