summaryrefslogtreecommitdiff
path: root/misc/src/mra.patch
diff options
context:
space:
mode:
Diffstat (limited to 'misc/src/mra.patch')
-rw-r--r--misc/src/mra.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/misc/src/mra.patch b/misc/src/mra.patch
new file mode 100644
index 0000000..b8ae365
--- /dev/null
+++ b/misc/src/mra.patch
@@ -0,0 +1,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 @@
+ * アイテム追加成功/失敗
+ *------------------------------------------
+ */
+-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);
+ }