|
|
@ -10,6 +10,7 @@ |
|
|
|
package engine.net.client.msg; |
|
|
|
package engine.net.client.msg; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import engine.Enum; |
|
|
|
import engine.exception.SerializationException; |
|
|
|
import engine.exception.SerializationException; |
|
|
|
import engine.net.AbstractConnection; |
|
|
|
import engine.net.AbstractConnection; |
|
|
|
import engine.net.ByteBufferReader; |
|
|
|
import engine.net.ByteBufferReader; |
|
|
@ -25,7 +26,8 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { |
|
|
|
private int itemBase; |
|
|
|
private int itemBase; |
|
|
|
private int type; |
|
|
|
private int type; |
|
|
|
private int objectUUID; |
|
|
|
private int objectUUID; |
|
|
|
private int slotNumber; |
|
|
|
|
|
|
|
|
|
|
|
public Enum.EquipSlotType slot; |
|
|
|
private int pad2; |
|
|
|
private int pad2; |
|
|
|
private float unknown1, unknown2; |
|
|
|
private float unknown1, unknown2; |
|
|
|
|
|
|
|
|
|
|
@ -36,11 +38,11 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { |
|
|
|
super(Protocol.EQUIP); |
|
|
|
super(Protocol.EQUIP); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public TransferItemFromInventoryToEquipMsg(AbstractCharacter source, int slot, int itemBaseID) { |
|
|
|
public TransferItemFromInventoryToEquipMsg(AbstractCharacter source, Enum.EquipSlotType slot, int itemBaseID) { |
|
|
|
super(Protocol.EQUIP); |
|
|
|
super(Protocol.EQUIP); |
|
|
|
this.sourceType = source.getObjectType().ordinal(); |
|
|
|
this.sourceType = source.getObjectType().ordinal(); |
|
|
|
this.sourceID = source.getObjectUUID(); |
|
|
|
this.sourceID = source.getObjectUUID(); |
|
|
|
this.slotNumber = slot; |
|
|
|
this.slot = slot; |
|
|
|
this.itemBase = itemBaseID; |
|
|
|
this.itemBase = itemBaseID; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -65,7 +67,7 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { |
|
|
|
itemBase = reader.getInt(); |
|
|
|
itemBase = reader.getInt(); |
|
|
|
type = reader.getInt(); |
|
|
|
type = reader.getInt(); |
|
|
|
objectUUID = reader.getInt(); |
|
|
|
objectUUID = reader.getInt(); |
|
|
|
slotNumber = reader.getInt(); |
|
|
|
slot = Enum.EquipSlotType.values()[reader.getInt()]; |
|
|
|
pad2 = reader.getInt(); |
|
|
|
pad2 = reader.getInt(); |
|
|
|
unknown1 = reader.getFloat(); |
|
|
|
unknown1 = reader.getFloat(); |
|
|
|
unknown2 = reader.getFloat(); |
|
|
|
unknown2 = reader.getFloat(); |
|
|
@ -82,27 +84,12 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { |
|
|
|
writer.putInt(itemBase); |
|
|
|
writer.putInt(itemBase); |
|
|
|
writer.putInt(type); |
|
|
|
writer.putInt(type); |
|
|
|
writer.putInt(objectUUID); |
|
|
|
writer.putInt(objectUUID); |
|
|
|
writer.putInt(slotNumber); |
|
|
|
writer.putInt(slot.ordinal()); |
|
|
|
writer.putInt(pad2); |
|
|
|
writer.putInt(pad2); |
|
|
|
writer.putFloat(unknown1); |
|
|
|
writer.putFloat(unknown1); |
|
|
|
writer.putFloat(unknown1); |
|
|
|
writer.putFloat(unknown1); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return the pad1 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public int getPad1() { |
|
|
|
|
|
|
|
return pad1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param pad1 the pad1 to set |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void setPad1(int pad1) { |
|
|
|
|
|
|
|
this.pad1 = pad1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @return the itemBase |
|
|
|
* @return the itemBase |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -138,34 +125,6 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { |
|
|
|
return objectUUID; |
|
|
|
return objectUUID; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return the slotNumber |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public int getSlotNumber() { |
|
|
|
|
|
|
|
return slotNumber; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param slotNumber the slotNumber to set |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void setSlotNumber(int slotNumber) { |
|
|
|
|
|
|
|
this.slotNumber = slotNumber; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return the pad2 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public int getPad2() { |
|
|
|
|
|
|
|
return pad2; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param pad2 the pad2 to set |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void setPad2(int pad2) { |
|
|
|
|
|
|
|
this.pad2 = pad2; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @return the unknown1 |
|
|
|
* @return the unknown1 |
|
|
|
*/ |
|
|
|
*/ |
|
|
@ -180,20 +139,6 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg { |
|
|
|
this.unknown1 = unknown1; |
|
|
|
this.unknown1 = unknown1; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return the unknown2 |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public float getUnknown2() { |
|
|
|
|
|
|
|
return unknown2; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @param unknown2 the unknown2 to set |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public void setUnknown2(float unknown2) { |
|
|
|
|
|
|
|
this.unknown2 = unknown2; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getSourceType() { |
|
|
|
public int getSourceType() { |
|
|
|
return sourceType; |
|
|
|
return sourceType; |
|
|
|
} |
|
|
|
} |
|
|
|