@ -1389,7 +1389,15 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1389,7 +1389,15 @@ public class ClientMessagePump implements NetMsgHandler {
return ;
Item buy = null ;
if ( npc . getName ( ) . equals ( "Resource Merchant" ) ) {
MobLoot resource = new MobLoot ( npc , ItemBase . getItemBase ( msg . getItemID ( ) ) , 1 , true ) ;
resource . setValue ( Warehouse . getCostForResource ( msg . getItemID ( ) ) ) ;
npc . getCharItemManager ( ) . addItemToInventory ( resource ) ;
npc . getCharItemManager ( ) . updateInventory ( resource , true ) ;
Dispatch dispatch = Dispatch . borrow ( sourcePlayer , msg ) ;
DispatchMessage . dispatchMsgDispatch ( dispatch , DispatchChannel . SECONDARY ) ;
itemMan . updateInventory ( ) ;
}
if ( msg . getItemType ( ) = = GameObjectType . MobEquipment . ordinal ( ) ) {
ArrayList < MobEquipment > sellInventory = npc . getContract ( ) . getSellInventory ( ) ;
if ( sellInventory = = null )
@ -1583,15 +1591,9 @@ public class ClientMessagePump implements NetMsgHandler {
@@ -1583,15 +1591,9 @@ public class ClientMessagePump implements NetMsgHandler {
// msg.setItemID(buy.getObjectUUID());
Dispatch dispatch = Dispatch . borrow ( sourcePlayer , msg ) ;
DispatchMessage . dispatchMsgDispatch ( dispatch , DispatchChannel . SECONDARY ) ;
itemMan . updateInventory ( ) ;
}
if ( npc . getName ( ) . equals ( "Resource Merchant" ) ) {
MobLoot resource = new MobLoot ( npc , ItemBase . getItemBase ( buy . getItemBaseID ( ) ) , 1 , true ) ;
resource . setValue ( Warehouse . getCostForResource ( buy . getItemBaseID ( ) ) ) ;
npc . getCharItemManager ( ) . addItemToInventory ( resource ) ;
npc . getCharItemManager ( ) . updateInventory ( resource , true ) ;
}
} finally {
origin . buyLock . unlock ( ) ;
}