summaryrefslogtreecommitdiff
path: root/src/mra.patch
blob: b8ae365bc90e4c72ce71759c6c1362a2e4e1ff09 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
diff -u -r athena/src/map/clif.c athenanew/src/map/clif.c
--- athena/src/map/clif.c	2005-04-16 17:07:03.000000000 +0000
+++ athenanew/src/map/clif.c	2005-05-21 18:25:01.121659080 +0000
@@ -3208,17 +3208,19 @@
  * �A�C�e���lj�����/���s
  *------------------------------------------
  */
-int clif_tradeitemok(struct map_session_data *sd,int index,int fail)
+int clif_tradeitemok(struct map_session_data *sd,int index,int amount,int fail)
 {
 	int fd;
 
 	nullpo_retr(0, sd);
 
 	fd=sd->fd;
-	WFIFOW(fd,0)=0xea;
+    WFIFOW(fd,0)=0x1b1;
+	//WFIFOW(fd,0)=0xea;
 	WFIFOW(fd,2)=index;
-	WFIFOB(fd,4)=fail;
-	WFIFOSET(fd,packet_len_table[0xea]);
+	WFIFOW(fd,4)=amount;
+    WFIFOB(fd,6)=fail;
+	WFIFOSET(fd,packet_len_table[0x1b1]);
 
 	return 0;
 }
diff -u -r athena/src/map/clif.h athenanew/src/map/clif.h
--- athena/src/map/clif.h	2005-04-16 17:06:56.000000000 +0000
+++ athenanew/src/map/clif.h	2005-05-21 18:25:33.040806632 +0000
@@ -97,7 +97,7 @@
 int clif_traderequest(struct map_session_data *sd,char *name);
 int clif_tradestart(struct map_session_data *sd,int type);
 int clif_tradeadditem(struct map_session_data *sd,struct map_session_data *tsd,int index,int amount);
-int clif_tradeitemok(struct map_session_data *sd,int index,int fail);
+int clif_tradeitemok(struct map_session_data *sd,int index,int amount,int fail);
 int clif_tradedeal_lock(struct map_session_data *sd,int fail);
 int clif_tradecancelled(struct map_session_data *sd);
 int clif_tradecompleted(struct map_session_data *sd,int fail);
diff -u -r athena/src/map/trade.c athenanew/src/map/trade.c
--- athena/src/map/trade.c	2005-04-16 17:08:06.000000000 +0000
+++ athenanew/src/map/trade.c	2005-05-21 18:26:46.750601040 +0000
@@ -98,7 +98,7 @@
 				if(sd->deal_item_amount[trade_i] == 0){
 					trade_weight+=sd->inventory_data[index-2]->weight*amount;
 					if(target_sd->weight + trade_weight > target_sd->max_weight){
-						clif_tradeitemok(sd,index,1); //fail to add item -- the player was over weighted.
+						clif_tradeitemok(sd,index,0,1); //fail to add item -- the player was over weighted.
                                                 amount = 0; // [MouseJstr]
 					}else{
 						for(c=0; c==trade_i-1;c++){ // re-deal exploit protection [Valaris]
@@ -109,7 +109,7 @@
 						}
 						sd->deal_item_index[trade_i] =index;
 						sd->deal_item_amount[trade_i]+=amount;
-						clif_tradeitemok(sd,index,0); //success to add item
+						clif_tradeitemok(sd,index,amount,0); //success to add item
 						clif_tradeadditem(sd,target_sd,index,amount);
 					}
 					break;
@@ -143,7 +143,7 @@
 	
 	if((target_sd = map_id2sd(sd->trade_partner)) != NULL){
 		sd->deal_locked=1;
-		clif_tradeitemok(sd,0,0);
+		clif_tradeitemok(sd,0,0,0);
 		clif_tradedeal_lock(sd,0);
 		clif_tradedeal_lock(target_sd,1);
 	}