|
@@ -59,10 +59,12 @@ int mail_removezeny(struct map_session_data *sd, short flag)
|
|
|
return 1;
|
|
|
}
|
|
|
|
|
|
-unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount)
|
|
|
-{
|
|
|
- if( idx == 0 )
|
|
|
- { // Zeny Transfer
|
|
|
+unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount) {
|
|
|
+
|
|
|
+ if( pc_istrading(sd) )
|
|
|
+ return 1;
|
|
|
+
|
|
|
+ if( idx == 0 ) { // Zeny Transfer
|
|
|
if( amount < 0 || !pc_can_give_items(sd) )
|
|
|
return 1;
|
|
|
|
|
@@ -72,9 +74,7 @@ unsigned char mail_setitem(struct map_session_data *sd, int idx, int amount)
|
|
|
sd->mail.zeny = amount;
|
|
|
// clif_updatestatus(sd, SP_ZENY);
|
|
|
return 0;
|
|
|
- }
|
|
|
- else
|
|
|
- { // Item Transfer
|
|
|
+ } else { // Item Transfer
|
|
|
idx -= 2;
|
|
|
mail_removeitem(sd, 0);
|
|
|
|