Explorar o código

- Removed the check to prevent equipped items from being traded as pc_delitem will take care of unequipping it on trade.
- Added a missing abort when the arrow's script re-calls status_calc_pc


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7436 54d463be-8e91-2dee-dedb-b68131a5f0ec

skotlex %!s(int64=19) %!d(string=hai) anos
pai
achega
8577e86c85
Modificáronse 2 ficheiros con 2 adicións e 3 borrados
  1. 2 0
      src/map/status.c
  2. 0 3
      src/map/trade.c

+ 2 - 0
src/map/status.c

@@ -1702,6 +1702,8 @@ int status_calc_pc(struct map_session_data* sd,int first)
 			sd->state.lr_flag = 2;
 			run_script(sd->inventory_data[index]->script,0,sd->bl.id,0);
 			sd->state.lr_flag = 0;
+			if (!calculating) //Abort, run_script retriggered status_calc_pc. [Skotlex]
+				return 1;
 			sd->arrow_atk += sd->inventory_data[index]->atk;
 		}
 	}

+ 0 - 3
src/map/trade.c

@@ -324,9 +324,6 @@ void trade_tradeadditem(struct map_session_data *sd, int index, int amount) {
 	if (amount < 0 || amount > sd->status.inventory[index].amount)
 		return;
 
-	if (sd->status.inventory[index].equip)
-		return; //must not be able to trade equipped items.
-
 	nameid = sd->inventory_data[index]->nameid;
 
 	if (!itemdb_cantrade(nameid, pc_isGM(sd), pc_isGM(target_sd)) &&	//Can't trade