Browse Source

Mirror field in client

combat-2
MagicBot 7 months ago
parent
commit
16d17798be
  1. 4
      src/engine/net/client/handlers/ItemProductionMsgHandler.java
  2. 22
      src/engine/net/client/msg/ItemProductionMsg.java

4
src/engine/net/client/handlers/ItemProductionMsgHandler.java

@ -463,11 +463,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler { @@ -463,11 +463,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
int emptySlots = vendorNPC.getRank() - vendorNPC.getRolling().size();
if (emptySlots > 0) {
for (int i = 0; i < emptySlots; i++) {
vendorNPC.produceItem(player.getObjectUUID(), msg.getTotalProduction(), isRandom, msg.getpToken(), msg.getsToken(), msg.getName(), msg.getTemplateID());
vendorNPC.produceItem(player.getObjectUUID(), msg.getTotal_to_produce(), isRandom, msg.getpToken(), msg.getsToken(), msg.getName(), msg.getTemplateID());
}
}
} else
vendorNPC.produceItem(player.getObjectUUID(), msg.getTotalProduction(), isRandom, msg.getpToken(), msg.getsToken(), msg.getName(), msg.getTemplateID());
vendorNPC.produceItem(player.getObjectUUID(), msg.getTotal_to_produce(), isRandom, msg.getpToken(), msg.getsToken(), msg.getName(), msg.getTemplateID());
break;
case ACTION_JUNK:
junkItem(msg.getTemplateID(), vendorNPC, origin);

22
src/engine/net/client/msg/ItemProductionMsg.java

@ -40,7 +40,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -40,7 +40,7 @@ public class ItemProductionMsg extends ClientNetMsg {
private int unknown01;
private int templateID;
private int itemType;
private int totalProduction;
private int total_to_produce;
private int unknown03;
private int pToken;
private int sToken;
@ -62,7 +62,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -62,7 +62,7 @@ public class ItemProductionMsg extends ClientNetMsg {
this.buildingUUID = 0;
this.unknown01 = 0;
this.templateID = 0;
this.totalProduction = 0;
this.total_to_produce = 0;
this.unknown03 = 0;
this.pToken = 0;
this.sToken = 0;
@ -83,7 +83,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -83,7 +83,7 @@ public class ItemProductionMsg extends ClientNetMsg {
this.itemType = item.getObjectType().ordinal();
this.templateID = item.getObjectUUID();
this.unknown01 = 0;
this.totalProduction = 0;
this.total_to_produce = 0;
this.unknown03 = 0;
this.pToken = 0;
this.sToken = 0;
@ -323,7 +323,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -323,7 +323,7 @@ public class ItemProductionMsg extends ClientNetMsg {
case ACTION_COMPLETE:
writer.putInt(this.itemType);
writer.putInt(this.templateID);
writer.putInt(this.totalProduction);
writer.putInt(this.total_to_produce);
writer.putInt(this.unknown03);
writer.putInt(this.pToken);
writer.putInt(this.sToken);
@ -335,7 +335,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -335,7 +335,7 @@ public class ItemProductionMsg extends ClientNetMsg {
case ACTION_JUNK:
writer.putInt(this.itemType);
writer.putInt(this.templateID);
writer.putInt(this.totalProduction);
writer.putInt(this.total_to_produce);
writer.putInt(this.unknown03);
writer.putInt(this.pToken);
writer.putInt(this.sToken);
@ -418,7 +418,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -418,7 +418,7 @@ public class ItemProductionMsg extends ClientNetMsg {
case ACTION_JUNK:
this.itemType = reader.getInt();
this.templateID = reader.getInt();
this.totalProduction = reader.getInt();
this.total_to_produce = reader.getInt();
this.unknown03 = reader.getInt();
this.pToken = reader.getInt();
this.sToken = reader.getInt();
@ -430,7 +430,7 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -430,7 +430,7 @@ public class ItemProductionMsg extends ClientNetMsg {
default:
this.itemType = reader.getInt();
this.templateID = reader.getInt();
this.totalProduction = reader.getInt();
this.total_to_produce = reader.getInt();
this.unknown03 = reader.getInt();
this.pToken = reader.getInt();
this.sToken = reader.getInt();
@ -459,12 +459,12 @@ public class ItemProductionMsg extends ClientNetMsg { @@ -459,12 +459,12 @@ public class ItemProductionMsg extends ClientNetMsg {
this.unknown01 = unknown01;
}
public int getTotalProduction() {
return totalProduction;
public int getTotal_to_produce() {
return total_to_produce;
}
public void setTotalProduction(int unknown02) {
this.totalProduction = unknown02;
public void setTotal_to_produce(int unknown02) {
this.total_to_produce = unknown02;
}
public int getUnknown03() {

Loading…
Cancel
Save