@ -107,10 +107,30 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -107,10 +107,30 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
DispatchMessage . dispatchMsgDispatch ( dispatch , mbEnums . DispatchChannel . SECONDARY ) ;
break ;
case COMPLETE :
Item virtualItem = ForgeManager . inMemoryItemLookup . get ( msg . itemUUID ) ;
completeItem ( msg . itemUUID , vendor , origin ) ;
break ;
case DEPOSIT :
depositItem ( msg . itemUUID , vendor , origin ) ;
break ;
case SETPRICE :
setItemPrice ( msg . itemType , msg . itemUUID , msg . itemPrice , vendor , origin ) ;
break ;
case TAKE :
takeItem ( msg . items , vendor , origin ) ;
dispatch = Dispatch . borrow ( player , msg ) ;
DispatchMessage . dispatchMsgDispatch ( dispatch , mbEnums . DispatchChannel . SECONDARY ) ;
break ;
}
return true ;
}
private static void completeItem ( int itemUUID , NPC vendor , ClientConnection origin ) {
Item virtualItem = ForgeManager . inMemoryItemLookup . get ( itemUUID ) ;
if ( virtualItem = = null )
return true ;
return ;
//remove from client forge window
@ -125,20 +145,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -125,20 +145,6 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
ForgeManager . vendorItemLookup . get ( vendor ) . remove ( virtualItem ) ;
ForgeManager . itemWorkOrderLookup . remove ( virtualItem ) ;
break ;
case DEPOSIT :
depositItem ( msg . itemUUID , vendor , origin ) ;
break ;
case SETPRICE :
setItemPrice ( msg . itemType , msg . itemUUID , msg . itemPrice , vendor , origin ) ;
break ;
case TAKE :
takeItem ( msg . items , vendor , origin ) ;
dispatch = Dispatch . borrow ( player , msg ) ;
DispatchMessage . dispatchMsgDispatch ( dispatch , mbEnums . DispatchChannel . SECONDARY ) ;
break ;
}
return true ;
}
private static void setItemPrice ( int itemType , int itemUUID , int itemPrice , NPC vendor , ClientConnection origin ) {