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