forked from MagicBane/Server
Removed custom exception candy
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.server.MBServerStatics;
|
||||
import engine.util.StringUtils;
|
||||
import org.pmw.tinylog.Logger;
|
||||
@@ -95,7 +94,7 @@ public abstract class AbstractNetMsg {
|
||||
* @throws Exception
|
||||
*/
|
||||
protected abstract void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException;
|
||||
;
|
||||
|
||||
/**
|
||||
* Attempts to serialize this NetMsg into a ByteBuffer. ByteBuffer is
|
||||
|
||||
@@ -265,7 +265,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
player.cancelOnSpell();
|
||||
break;
|
||||
case RUNE:
|
||||
ApplyRuneMsg.applyRune(uuid,origin,player);
|
||||
ApplyRuneMsg.applyRune(uuid, origin, player);
|
||||
itemMan.consume(item);
|
||||
break;
|
||||
default: //shouldn't be here, consume item
|
||||
|
||||
@@ -6,12 +6,12 @@ import engine.db.archive.CharacterRecord;
|
||||
import engine.db.archive.DataWarehouse;
|
||||
import engine.db.archive.PvpRecord;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.Account;
|
||||
|
||||
@@ -11,10 +11,10 @@ package engine.net.client.handlers;
|
||||
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.MovementManager;
|
||||
import engine.job.JobScheduler;
|
||||
import engine.jobs.RefreshGroupJob;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.MoveToPointMsg;
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.mbEnums;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.SetCombatModeMsg;
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ShowMsg;
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.SocialMsg;
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -46,7 +45,7 @@ public class AbandonAssetMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.pad);
|
||||
writer.putInt(this.objectType);
|
||||
writer.putInt(this.objectUUID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -70,8 +69,7 @@ public class AcceptTradeRequestMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(playerType);
|
||||
writer.putInt(playerID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -57,8 +56,7 @@ public class AddGoldToTradeWindowMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putLong(playerCompID);
|
||||
writer.putInt(amount);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -64,8 +63,7 @@ public class AddItemToTradeWindowMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(playerType);
|
||||
writer.putInt(playerID);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -97,7 +96,7 @@ public class AllianceChangeMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.put(this.msgType);
|
||||
if (this.msgType == ERROR_TO0_EARLY)
|
||||
writer.putInt(this.secondsToWait);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -67,7 +66,7 @@ public class AllyEnemyListMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(GameObjectType.Guild.ordinal());
|
||||
writer.putInt(this.guildID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -44,7 +43,7 @@ public class ArcMineChangeProductionMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.mineID);
|
||||
writer.putInt(this.resourceHash);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -88,7 +87,7 @@ public class ArcMineWindowAvailableTimeMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(MBServerStatics.MINE_EARLY_WINDOW); //15);
|
||||
writer.putInt(late);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -46,7 +45,7 @@ public class ArcMineWindowChangeMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.time);
|
||||
writer.putInt(this.buildingType);
|
||||
writer.putInt(this.buildingID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -45,7 +44,7 @@ public class ArcOwnedMinesListMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(mineList.size());
|
||||
for (Mine mine : mineList) {
|
||||
mine.serializeForMineProduction(writer);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -48,7 +47,7 @@ public class ArcSiegeSpireMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.mbEnums.TransactionType;
|
||||
@@ -75,7 +74,7 @@ public class ArcViewAssetTransactionsMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(this.transactionID);
|
||||
writer.putInt(this.warehouse.building.getObjectUUID());
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -152,7 +151,7 @@ public class AssetSupportMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(this.messageType);
|
||||
this.supportMsgType = mbEnums.SupportMsgType.typeLookup.get(this.messageType);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -50,7 +49,7 @@ public class ChangeGuildLeaderMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(0);
|
||||
writer.putInt(0);
|
||||
writer.putInt(0);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
@@ -141,7 +140,7 @@ public class CityAssetMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
String buildingName;
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -53,7 +52,7 @@ public class ClaimAssetMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.pad);
|
||||
writer.putInt(this.objectType);
|
||||
writer.putInt(this.objectUUID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.*;
|
||||
|
||||
public abstract class ClientNetMsg extends AbstractNetMsg {
|
||||
@@ -49,7 +48,7 @@ public abstract class ClientNetMsg extends AbstractNetMsg {
|
||||
*/
|
||||
@Override
|
||||
protected abstract void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException;
|
||||
;
|
||||
|
||||
/*
|
||||
* return the header size of 4 for ClientMsgs
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -59,8 +58,7 @@ public class CloseTradeWindowMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(playerType);
|
||||
writer.putInt(playerID);
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -56,8 +55,7 @@ public class CommitToTradeMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putLong(playerCompID);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -65,7 +64,7 @@ public class CostOpenBankMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(playerType);
|
||||
writer.putInt(playerID);
|
||||
writer.putLong(unknown01);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -55,7 +54,7 @@ public class DeleteItemMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.type);
|
||||
writer.putInt(this.objectUUID);
|
||||
writer.putInt(this.unknown1);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -46,7 +45,7 @@ public class DestroyBuildingMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.pad);
|
||||
writer.putInt(this.objectType);
|
||||
writer.putInt(this.objectUUID);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
@@ -89,7 +88,7 @@ public class FurnitureMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
if (this.type == 3 || this.type == 4) {
|
||||
writer.putInt(this.type);
|
||||
writer.putInt(GameObjectType.Building.ordinal());
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -63,8 +62,7 @@ public class GoldFromVaultMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putLong(unknown01);
|
||||
writer.putLong(playerCompID);
|
||||
writer.putLong(accountCompID);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -74,8 +73,7 @@ public class GoldToVaultMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(GameObjectType.PlayerCharacter.ordinal());
|
||||
writer.putInt(this.playerID);
|
||||
writer.putInt(GameObjectType.Account.ordinal());
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -66,8 +65,7 @@ public class InvalidTradeRequestMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(busyType);
|
||||
writer.putInt(busyID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -94,8 +93,7 @@ public class ItemFromVaultMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(unknown02);
|
||||
writer.putLong(playerCompID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -95,8 +94,7 @@ public class ItemToVaultMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putLong(playerCompID);
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(unknown02);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.mbEnums.ShrineType;
|
||||
import engine.net.AbstractConnection;
|
||||
@@ -49,7 +48,7 @@ public class LeaderboardMessage extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(ShrineType.values().length);//??
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.*;
|
||||
import engine.objects.AbstractCharacter;
|
||||
import engine.objects.Corpse;
|
||||
@@ -63,7 +62,7 @@ public class LoadCharacterMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
if (absChar != null) {
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -85,7 +84,7 @@ public class MinionTrainingMessage extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -68,8 +67,7 @@ public class ModifyCommitToTradeMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(playerType);
|
||||
writer.putInt(playerID);
|
||||
writer.putInt(targetType);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -64,8 +63,7 @@ public class ObjectActionMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(unknown02);
|
||||
for (int i = 0; i < unknown01; i++)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -65,8 +64,7 @@ public class OpenTradeWindowMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(playerType);
|
||||
writer.putInt(playerID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -66,8 +65,7 @@ public class OpenVaultMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(playerType);
|
||||
writer.putInt(playerID);
|
||||
writer.putInt(npcType);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -68,7 +67,7 @@ public class PowerProjectileMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
engine.math.Vector3fImmutable faceDir = this.source.getLoc().subtract2D(target.getLoc()).normalize();
|
||||
engine.math.Vector3fImmutable newLoc = faceDir.scaleAdd(range, target.getLoc());
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -67,7 +66,7 @@ public class RecommendNationMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(GameObjectType.Guild.ordinal());
|
||||
writer.putInt(guildID);
|
||||
writer.put(this.ally);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -59,8 +58,7 @@ public class RejectTradeRequestMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putLong(playerCompID);
|
||||
writer.putLong(targetCompID);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -77,7 +76,7 @@ public class RepairBuildingMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(0);
|
||||
writer.putInt(GameObjectType.Building.ordinal());
|
||||
writer.putInt(this.buildingID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -108,8 +107,7 @@ public class RepairMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.msgType);
|
||||
writer.putInt(0);
|
||||
writer.putInt(this.unknown01);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -62,7 +61,7 @@ public class ReqBankInventoryMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(playerType);
|
||||
writer.putInt(playerID);
|
||||
writer.putLong(unknown01);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.*;
|
||||
import engine.objects.Building;
|
||||
import engine.objects.PlayerCharacter;
|
||||
@@ -87,7 +86,7 @@ public class SendOwnPlayerMsg extends ClientNetMsg {
|
||||
writer.putVector3f(ch.getLoc());
|
||||
try {
|
||||
PlayerCharacter.serializeForClientMsgFull(this.ch, writer);
|
||||
} catch (SerializationException e) {
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -61,7 +60,7 @@ public class SetObjectValueMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.targetType);
|
||||
writer.putInt(this.targetID);
|
||||
writer.putInt(0);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -55,7 +54,7 @@ public class ShowBankInventoryMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
ArrayList<Item> bank = pc.charItemManager.getBank();
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -58,8 +57,7 @@ public class ShowVaultInventoryMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(accountType);
|
||||
writer.putInt(accountID);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
@@ -84,7 +83,7 @@ public class TaxCityMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(0);
|
||||
writer.putInt(GameObjectType.Building.ordinal());
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -82,7 +81,7 @@ public class TaxResourcesMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(0);
|
||||
writer.putInt(GameObjectType.Building.ordinal());
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -59,7 +58,7 @@ public class TerritoryChangeMessage extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putString(realm.getRealmName());
|
||||
if (this.realmOwner != null) {
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -67,8 +66,7 @@ public class TradeRequestMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putInt(this.sourceType);
|
||||
writer.putInt(this.sourceID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -51,7 +50,7 @@ public class TransferAssetMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.pad);
|
||||
writer.putInt(this.objectType);
|
||||
writer.putInt(this.objectID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -50,7 +49,7 @@ public class TransferBuildingMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.pad);
|
||||
writer.putInt(this.objectType);
|
||||
writer.putInt(this.objectID);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -75,8 +74,7 @@ public class TransferGoldToFromBuildingMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.direction);
|
||||
writer.putInt(this.failReason);
|
||||
writer.putInt(this.objectType);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -99,8 +98,7 @@ public class TransferItemFromBankMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putLong(playerCompID1);
|
||||
writer.putLong(playerCompID2);
|
||||
writer.putInt(type);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -58,7 +57,7 @@ public class TransferItemFromEquipToInventoryMsg extends ClientNetMsg {
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.playerType);
|
||||
writer.putInt(this.playerUUID);
|
||||
writer.putInt(this.slot.ordinal());
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -77,7 +76,7 @@ public class TransferItemFromInventoryToEquipMsg extends ClientNetMsg {
|
||||
* Deserializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.sourceType);
|
||||
writer.putInt(this.sourceID);
|
||||
writer.putInt(pad1);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -99,8 +98,7 @@ public class TransferItemToBankMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putLong(playerCompID1);
|
||||
writer.putLong(playerCompID2);
|
||||
writer.putInt(type);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -56,8 +55,7 @@ public class UncommitToTradeMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(unknown01);
|
||||
writer.putLong(playerCompID);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -62,7 +61,7 @@ public class UpdateCharOrMobMessage extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.type);
|
||||
if (this.type == 2) {
|
||||
writer.putInt(this.playerType);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -67,7 +66,7 @@ public class UpdateClientAlliancesMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
Guild guild = Guild.getGuild(this.guildID);
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -91,8 +90,7 @@ public class UpdateGoldMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
if (looter == null) {
|
||||
writer.putInt(0);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -58,7 +57,7 @@ public class UpdateObjectMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.msgType);
|
||||
switch (this.msgType) {
|
||||
case 2:
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -51,8 +50,7 @@ public class UpdateTradeWindowMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(pc1.getObjectType().ordinal());
|
||||
writer.putInt(pc1.getObjectUUID());
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -49,8 +48,7 @@ public class UpdateVaultMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(accountType);
|
||||
writer.putInt(accountID);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -60,8 +59,7 @@ public class VendorBuyMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
writer.putInt(this.npcType);
|
||||
writer.putInt(this.npcID);
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
package engine.net.client.msg;
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.ItemType;
|
||||
import engine.net.*;
|
||||
import engine.net.client.ClientConnection;
|
||||
@@ -76,8 +75,7 @@ public class VendorBuyWindowMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
ClientConnection clientConnection = (ClientConnection) this.getOrigin();
|
||||
PlayerCharacter player = null;
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -62,8 +61,7 @@ public class VendorSellMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.npcType);
|
||||
writer.putInt(this.npcID);
|
||||
writer.putInt(this.itemType);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -115,8 +114,7 @@ public class VendorSellWindowMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items from the supplied NetMsgReader.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
writer.putInt(this.npcType);
|
||||
writer.putInt(this.npcID);
|
||||
writer.put(this.unknownByte01);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
@@ -70,7 +69,7 @@ public class VisualUpdateMessage extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer) throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
if (this.building == null) {
|
||||
writer.putInt(4);
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.gameManager.ConfigManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.ZoneManager;
|
||||
@@ -60,8 +59,7 @@ public class WorldDataMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied NetMsgWriter.
|
||||
*/
|
||||
@Override
|
||||
protected void _serialize(ByteBufferWriter writer)
|
||||
throws SerializationException {
|
||||
protected void _serialize(ByteBufferWriter writer) {
|
||||
|
||||
|
||||
// TODO replace this return with SerializationException
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg.chat;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.AbstractConnection;
|
||||
import engine.net.ByteBufferReader;
|
||||
import engine.net.ByteBufferWriter;
|
||||
@@ -79,7 +78,7 @@ public abstract class AbstractChatMsg extends ClientNetMsg {
|
||||
* Serializes the subclass specific items to the supplied ByteBufferWriter.
|
||||
*/
|
||||
@Override
|
||||
protected abstract void _serialize(ByteBufferWriter writer) throws SerializationException;
|
||||
protected abstract void _serialize(ByteBufferWriter writer);
|
||||
|
||||
/**
|
||||
* @return the unknown01
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
package engine.net.client.msg.login;
|
||||
|
||||
|
||||
import engine.exception.SerializationException;
|
||||
import engine.net.*;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.objects.Account;
|
||||
@@ -161,7 +160,7 @@ public class CharSelectScreenMsg extends ClientNetMsg {
|
||||
PlayerCharacter.serializeForClientMsgLogin(this.chars.get(i), writer);
|
||||
else
|
||||
PlayerCharacter.serializeForClientMsgCommit(this.chars.get(i), writer);
|
||||
} catch (SerializationException e) {
|
||||
} catch (Exception e) {
|
||||
Logger.error("failed to serialize character " + this.chars.get(i).getObjectUUID());
|
||||
// Handled already.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user