Removed two variables
This commit is contained in:
@@ -105,22 +105,18 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler {
|
|||||||
|
|
||||||
//get goldItem cost to sell
|
//get goldItem cost to sell
|
||||||
|
|
||||||
|
|
||||||
cost = sell.template.item_value;
|
cost = sell.template.item_value;
|
||||||
|
|
||||||
//apply damaged value reduction
|
//apply damaged value reduction
|
||||||
float durabilityCurrent = (short) sell.durabilityCurrent;
|
float damagedModifier = sell.durabilityCurrent / sell.template.item_health_full;
|
||||||
float durabilityMax = sell.template.item_health_full;
|
|
||||||
float damagedModifier = durabilityCurrent / durabilityMax;
|
|
||||||
cost *= damagedModifier;
|
cost *= damagedModifier;
|
||||||
float bargain = player.getBargain();
|
|
||||||
|
|
||||||
|
float bargain = player.getBargain();
|
||||||
float profit = npc.getBuyPercent(player) + bargain;
|
float profit = npc.getBuyPercent(player) + bargain;
|
||||||
|
|
||||||
if (profit > 1)
|
if (profit > 1)
|
||||||
profit = 1;
|
profit = 1;
|
||||||
|
|
||||||
|
|
||||||
cost *= profit;
|
cost *= profit;
|
||||||
|
|
||||||
if (gold.getNumOfItems() + cost > 10000000)
|
if (gold.getNumOfItems() + cost > 10000000)
|
||||||
|
|||||||
Reference in New Issue
Block a user