@ -16,6 +16,7 @@ import engine.Enum.ItemType;
@@ -16,6 +16,7 @@ import engine.Enum.ItemType;
import engine.exception.MsgSendException ;
import engine.gameManager.ChatManager ;
import engine.gameManager.DbManager ;
import engine.loot.WorkOrder ;
import engine.net.Dispatch ;
import engine.net.DispatchMessage ;
import engine.net.client.ClientConnection ;
@ -455,9 +456,17 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
@@ -455,9 +456,17 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
switch ( msg . getActionType ( ) ) {
case ACTION_PRODUCE :
boolean isRandom = false ;
if ( msg . getUnknown03 ( ) ! = 0 & & msg . getpToken ( ) = = 0 & & msg . getsToken ( ) = = 0 )
isRandom = true ;
boolean isRandom = msg . getUnknown03 ( ) ! = 0 & & msg . getpToken ( ) = = 0 & & msg . getsToken ( ) = = 0 ;
WorkOrder workOrder = new WorkOrder ( ) ;
workOrder . vendor = vendorNPC ;
workOrder . isRandom = isRandom ;
workOrder . itemBase = msg . getItemUUID ( ) ;
workOrder . itemCount = msg . getTotalProduction ( ) ;
workOrder . prefixToken = msg . getpToken ( ) ;
workOrder . suffixToken = msg . getsToken ( ) ;
//Create Multiple Item Function.. Fill all empty slots
if ( msg . isMultiple ( ) ) {
int emptySlots = vendorNPC . getRank ( ) - vendorNPC . getRolling ( ) . size ( ) ;