@ -373,7 +373,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -373,7 +373,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
// Grab reference to vendor we are interacting with
vendorNPC = ( NPC ) DbManager . getObject ( mbEnums . GameObjectType . NPC , msg . getNpcUUID ( ) ) ;
vendorNPC = ( NPC ) DbManager . getObject ( mbEnums . GameObjectType . NPC , msg . npcUUID ) ;
// Oops?
@ -386,39 +386,39 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -386,39 +386,39 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
case PRODUCE :
boolean isRandom = false ;
if ( msg . getUnknown03 ( ) ! = 0 & & msg . get pToken( ) = = 0 & & msg . get sToken( ) = = 0 )
if ( msg . unknown03 ! = 0 & & msg . pToken = = 0 & & msg . sToken = = 0 )
isRandom = true ;
//Create Multiple Item Function.. Fill all empty slots
if ( msg . getSize ( ) > 0 ) {
if ( msg . size > 0 ) {
int emptySlots = vendorNPC . getRank ( ) - vendorNPC . getRolling ( ) . size ( ) ;
if ( emptySlots > 0 ) {
for ( int i = 0 ; i < emptySlots ; i + + ) {
vendorNPC . produceItem ( player . getObjectUUID ( ) , msg . ge tT otal_to_produce( ) , isRandom , msg . get pToken( ) , msg . get sToken( ) , msg . getName ( ) , msg . ge tT emplateID( ) ) ;
vendorNPC . produceItem ( player . getObjectUUID ( ) , msg . total_to_produce , isRandom , msg . pToken , msg . sToken , msg . name , msg . templateID ) ;
}
}
} else
vendorNPC . produceItem ( player . getObjectUUID ( ) , msg . ge tT otal_to_produce( ) , isRandom , msg . get pToken( ) , msg . get sToken( ) , msg . getName ( ) , msg . ge tT emplateID( ) ) ;
vendorNPC . produceItem ( player . getObjectUUID ( ) , msg . total_to_produce , isRandom , msg . pToken , msg . sToken , msg . name , msg . templateID ) ;
break ;
case JUNK :
junkItem ( msg . ge tT emplateID( ) , vendorNPC , origin ) ;
junkItem ( msg . templateID , vendorNPC , origin ) ;
break ;
case RECYCLE :
recycleItem ( msg . getItems ( ) , vendorNPC , origin ) ;
recycleItem ( msg . items , vendorNPC , origin ) ;
msg . actionType = mbEnums . ProductionActionType . TAKE ;
dispatch = Dispatch . borrow ( player , msg ) ;
DispatchMessage . dispatchMsgDispatch ( dispatch , mbEnums . DispatchChannel . SECONDARY ) ;
break ;
case COMPLETE :
vendorNPC . completeItem ( msg . ge tT emplateID( ) ) ;
vendorNPC . completeItem ( msg . templateID ) ;
break ;
case DEPOSIT :
depositItem ( msg . ge tT emplateID( ) , vendorNPC , origin ) ;
depositItem ( msg . templateID , vendorNPC , origin ) ;
break ;
case SETPRICE :
setItemPrice ( msg . getItemType ( ) , msg . ge tT emplateID( ) , msg . getItemPrice ( ) , vendorNPC , origin ) ;
setItemPrice ( msg . itemType , msg . templateID , msg . itemPrice , vendorNPC , origin ) ;
break ;
case TAKE :
takeItem ( msg . getItems ( ) , vendorNPC , origin ) ;
takeItem ( msg . items , vendorNPC , origin ) ;
dispatch = Dispatch . borrow ( player , msg ) ;
DispatchMessage . dispatchMsgDispatch ( dispatch , mbEnums . DispatchChannel . SECONDARY ) ;
break ;