DispatchManager is now an official manager singleton.
This commit is contained in:
@@ -1,312 +0,0 @@
|
||||
// • ▌ ▄ ·. ▄▄▄· ▄▄ • ▪ ▄▄· ▄▄▄▄· ▄▄▄· ▐▄▄▄ ▄▄▄ .
|
||||
// ·██ ▐███▪▐█ ▀█ ▐█ ▀ ▪██ ▐█ ▌▪▐█ ▀█▪▐█ ▀█ •█▌ ▐█▐▌·
|
||||
// ▐█ ▌▐▌▐█·▄█▀▀█ ▄█ ▀█▄▐█·██ ▄▄▐█▀▀█▄▄█▀▀█ ▐█▐ ▐▌▐▀▀▀
|
||||
// ██ ██▌▐█▌▐█ ▪▐▌▐█▄▪▐█▐█▌▐███▌██▄▪▐█▐█ ▪▐▌██▐ █▌▐█▄▄▌
|
||||
// ▀▀ █▪▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀·▀▀▀ ·▀▀▀▀ ▀ ▀ ▀▀ █▪ ▀▀▀
|
||||
// Magicbane Emulator Project © 2013 - 2022
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
package engine.net;
|
||||
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.objects.Item;
|
||||
import engine.objects.PlayerCharacter;
|
||||
import engine.server.MBServerStatics;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
||||
import static engine.net.MessageDispatcher.dispatchCount;
|
||||
import static engine.net.MessageDispatcher.maxRecipients;
|
||||
|
||||
/*
|
||||
* Dispatch Message is the main interface to Magicbane's threaded
|
||||
* async message delivery system.
|
||||
*/
|
||||
|
||||
public class DispatchMessage {
|
||||
|
||||
public static void startMessagePump() {
|
||||
|
||||
Thread messageDispatcher;
|
||||
messageDispatcher = new Thread(new MessageDispatcher());
|
||||
|
||||
messageDispatcher.setName("MessageDispatcher");
|
||||
messageDispatcher.start();
|
||||
}
|
||||
|
||||
|
||||
public static void sendToAllInRange(AbstractWorldObject obj,
|
||||
AbstractNetMsg msg) {
|
||||
|
||||
if (obj == null)
|
||||
return;
|
||||
|
||||
if (obj.getObjectType() == GameObjectType.PlayerCharacter || obj.getObjectType() == GameObjectType.Mob || obj.getObjectType() == GameObjectType.NPC || obj.getObjectType() == GameObjectType.Corpse)
|
||||
dispatchMsgToInterestArea(obj, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
else
|
||||
dispatchMsgToInterestArea(obj, msg, DispatchChannel.PRIMARY, MBServerStatics.STRUCTURE_LOAD_RANGE, false, false);
|
||||
|
||||
}
|
||||
|
||||
// Dispatches a message to a playercharacter's interest area
|
||||
// Method includes handling of exclusion rules for visibility, self, etc.
|
||||
|
||||
public static void dispatchMsgToInterestArea(AbstractWorldObject sourceObject, AbstractNetMsg msg, DispatchChannel dispatchChannel, int interestRange, boolean sendToSelf, boolean useIgnore) {
|
||||
|
||||
Dispatch messageDispatch;
|
||||
HashSet<AbstractWorldObject> gridList;
|
||||
PlayerCharacter gridPlayer;
|
||||
AbstractWorldObject dispatchSource;
|
||||
PlayerCharacter sourcePlayer = null;
|
||||
long recipientCount = 0;
|
||||
|
||||
if (sourceObject == null)
|
||||
return;
|
||||
|
||||
// If the source of the message is a structure, item or player
|
||||
// setup our method variables accordingly.
|
||||
|
||||
switch (sourceObject.getObjectType()) {
|
||||
case Item:
|
||||
dispatchSource = (AbstractWorldObject) ((Item) sourceObject).getOwner();
|
||||
break;
|
||||
case PlayerCharacter:
|
||||
dispatchSource = sourceObject;
|
||||
sourcePlayer = (PlayerCharacter) sourceObject;
|
||||
if (sourcePlayer.getClientConnection() != null && sendToSelf) {
|
||||
Dispatch dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
default:
|
||||
dispatchSource = sourceObject;
|
||||
}
|
||||
|
||||
gridList = WorldGrid.getObjectsInRangePartial(dispatchSource.getLoc(), interestRange, MBServerStatics.MASK_PLAYER);
|
||||
|
||||
for (AbstractWorldObject gridObject : gridList) {
|
||||
|
||||
gridPlayer = (PlayerCharacter) gridObject;
|
||||
|
||||
// Apply filter options if source of dispatch is a player
|
||||
|
||||
if ((dispatchSource.getObjectType() == GameObjectType.PlayerCharacter) &&
|
||||
(sourcePlayer != null)) {
|
||||
|
||||
if (gridPlayer.getObjectUUID() == sourcePlayer.getObjectUUID())
|
||||
continue;
|
||||
|
||||
if ((useIgnore == true) && (gridPlayer.isIgnoringPlayer(sourcePlayer) == true))
|
||||
continue;
|
||||
|
||||
if (gridPlayer.canSee(sourcePlayer) == false)
|
||||
continue;
|
||||
}
|
||||
|
||||
messageDispatch = Dispatch.borrow(gridPlayer, msg);
|
||||
MessageDispatcher.send(messageDispatch, dispatchChannel);
|
||||
recipientCount++;
|
||||
}
|
||||
|
||||
// Update metrics
|
||||
|
||||
if (recipientCount > maxRecipients[dispatchChannel.getChannelID()])
|
||||
maxRecipients[dispatchChannel.getChannelID()] = recipientCount;
|
||||
|
||||
dispatchCount[dispatchChannel.getChannelID()].increment();
|
||||
}
|
||||
|
||||
public static void dispatchMsgToInterestArea(Vector3fImmutable targetLoc, AbstractWorldObject sourceObject, AbstractNetMsg msg, DispatchChannel dispatchChannel, int interestRange, boolean sendToSelf, boolean useIgnore) {
|
||||
|
||||
Dispatch messageDispatch;
|
||||
HashSet<AbstractWorldObject> gridList;
|
||||
PlayerCharacter gridPlayer;
|
||||
AbstractWorldObject dispatchSource;
|
||||
PlayerCharacter sourcePlayer = null;
|
||||
long recipientCount = 0;
|
||||
|
||||
if (sourceObject == null)
|
||||
return;
|
||||
|
||||
// If the source of the message is a structure, item or player
|
||||
// setup our method variables accordingly.
|
||||
|
||||
switch (sourceObject.getObjectType()) {
|
||||
case Item:
|
||||
dispatchSource = (AbstractWorldObject) ((Item) sourceObject).getOwner();
|
||||
break;
|
||||
case PlayerCharacter:
|
||||
dispatchSource = sourceObject;
|
||||
sourcePlayer = (PlayerCharacter) sourceObject;
|
||||
|
||||
if (sourcePlayer.getClientConnection() != null && sendToSelf) {
|
||||
Dispatch dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
|
||||
break;
|
||||
default:
|
||||
dispatchSource = sourceObject;
|
||||
}
|
||||
|
||||
gridList = WorldGrid.getObjectsInRangePartial(targetLoc, interestRange, MBServerStatics.MASK_PLAYER);
|
||||
|
||||
for (AbstractWorldObject gridObject : gridList) {
|
||||
|
||||
gridPlayer = (PlayerCharacter) gridObject;
|
||||
|
||||
// Apply filter options if source of dispatch is a player
|
||||
|
||||
if ((dispatchSource.getObjectType() == GameObjectType.PlayerCharacter) &&
|
||||
(sourcePlayer != null)) {
|
||||
|
||||
if (gridPlayer.getObjectUUID() == sourcePlayer.getObjectUUID())
|
||||
continue;
|
||||
|
||||
if ((useIgnore == true) && (gridPlayer.isIgnoringPlayer(sourcePlayer) == true))
|
||||
continue;
|
||||
|
||||
if (gridPlayer.canSee(sourcePlayer) == false)
|
||||
continue;
|
||||
}
|
||||
|
||||
messageDispatch = Dispatch.borrow(gridPlayer, msg);
|
||||
MessageDispatcher.send(messageDispatch, dispatchChannel);
|
||||
recipientCount++;
|
||||
}
|
||||
|
||||
// Update metrics
|
||||
|
||||
if (recipientCount > maxRecipients[dispatchChannel.getChannelID()])
|
||||
maxRecipients[dispatchChannel.getChannelID()] = recipientCount;
|
||||
|
||||
dispatchCount[dispatchChannel.getChannelID()].increment();
|
||||
}
|
||||
|
||||
// Sends a message to all players in the game
|
||||
|
||||
public static void dispatchMsgToAll(AbstractNetMsg msg) {
|
||||
|
||||
Dispatch messageDispatch;
|
||||
long recipientCount = 0;
|
||||
|
||||
// Send message to nobody? No thanks!
|
||||
|
||||
if (SessionManager.getAllActivePlayerCharacters().isEmpty())
|
||||
return;
|
||||
|
||||
// Messages to all we will default to the secondary dispatch
|
||||
// delivery channel. They are generally large, or inconsequential.
|
||||
|
||||
for (PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) {
|
||||
messageDispatch = Dispatch.borrow(player, msg);
|
||||
MessageDispatcher.send(messageDispatch, DispatchChannel.SECONDARY);
|
||||
recipientCount++;
|
||||
}
|
||||
|
||||
// Update metrics
|
||||
|
||||
if (recipientCount > maxRecipients[DispatchChannel.SECONDARY.getChannelID()])
|
||||
maxRecipients[DispatchChannel.SECONDARY.getChannelID()] = recipientCount;
|
||||
|
||||
dispatchCount[DispatchChannel.SECONDARY.getChannelID()].increment();
|
||||
|
||||
}
|
||||
|
||||
public static void dispatchMsgToAll(PlayerCharacter source, AbstractNetMsg msg, boolean ignore) {
|
||||
|
||||
Dispatch messageDispatch;
|
||||
long recipientCount = 0;
|
||||
|
||||
// Send message to nobody? No thanks!
|
||||
|
||||
if (SessionManager.getAllActivePlayerCharacters().isEmpty())
|
||||
return;
|
||||
|
||||
// Messages to all we will default to the secondary dispatch
|
||||
// delivery channel. They are generally large, or inconsequential.
|
||||
|
||||
for (PlayerCharacter player : SessionManager.getAllActivePlayerCharacters()) {
|
||||
|
||||
if (ignore && player.isIgnoringPlayer(source))
|
||||
continue;
|
||||
|
||||
messageDispatch = Dispatch.borrow(player, msg);
|
||||
MessageDispatcher.send(messageDispatch, DispatchChannel.SECONDARY);
|
||||
recipientCount++;
|
||||
}
|
||||
|
||||
// Update metrics
|
||||
|
||||
if (recipientCount > maxRecipients[DispatchChannel.SECONDARY.getChannelID()])
|
||||
maxRecipients[DispatchChannel.SECONDARY.getChannelID()] = recipientCount;
|
||||
|
||||
dispatchCount[DispatchChannel.SECONDARY.getChannelID()].increment();
|
||||
|
||||
}
|
||||
|
||||
// Sends a message to an arbitrary distribution list
|
||||
|
||||
public static void dispatchMsgDispatch(Dispatch messageDispatch, DispatchChannel dispatchChannel) {
|
||||
|
||||
if (messageDispatch == null) {
|
||||
Logger.info("DISPATCH Null for DispatchMessage!");
|
||||
return;
|
||||
}
|
||||
|
||||
// No need to serialize an empty list
|
||||
|
||||
if (messageDispatch.player == null) {
|
||||
Logger.info("Player Null for Dispatch!");
|
||||
messageDispatch.release();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
MessageDispatcher.send(messageDispatch, dispatchChannel);
|
||||
|
||||
dispatchCount[dispatchChannel.getChannelID()].increment();
|
||||
|
||||
}
|
||||
|
||||
protected static void serializeDispatch(Dispatch messageDispatch) {
|
||||
ClientConnection connection;
|
||||
|
||||
if (messageDispatch.player == null) {
|
||||
Logger.info("Player null in serializeDispatch");
|
||||
messageDispatch.release();
|
||||
return;
|
||||
}
|
||||
|
||||
connection = messageDispatch.player.getClientConnection();
|
||||
|
||||
if ((connection == null) || (connection.isConnected() == false)) {
|
||||
messageDispatch.release();
|
||||
return;
|
||||
}
|
||||
|
||||
if (messageDispatch.msg == null) {
|
||||
Logger.error("null message sent to " + messageDispatch.player.getName());
|
||||
messageDispatch.release();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!connection.sendMsg(messageDispatch.msg))
|
||||
Logger.error(messageDispatch.msg.getProtocolMsg() + " failed sending to " + messageDispatch.player.getName());
|
||||
|
||||
messageDispatch.release();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
package engine.net;
|
||||
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import org.pmw.tinylog.Logger;
|
||||
|
||||
@@ -21,12 +22,11 @@ import java.util.regex.Pattern;
|
||||
// All outgoing Protocol messages to the player are managed through the MessageDispatcher.class.
|
||||
// All incoming Protocol messages from the player are managed by the Protocol.class.
|
||||
//
|
||||
// A DispatchMessage is configured (Protocol messsage) and wrapped in a Dispatch (distribution list).
|
||||
// A Dispatch can be submitted to the MessageDispatcher for delivery from any thread.
|
||||
// A Dispatch is configured wrapping a Protocol message and a distribution list is built.
|
||||
//
|
||||
// Dispatches are interleaved between channels. This is to ensure
|
||||
// a combat or movement message is not delayed by spam clicking a
|
||||
// larger message. Choose your channel wisely.
|
||||
// The system interleaves dispatches between two channels. This is to ensure that
|
||||
// a critical combat or movement message will not be delayed by spam clicking a larger
|
||||
// message with no temporal immediacy. Pick the correct channel will this in mind.
|
||||
|
||||
public class MessageDispatcher implements Runnable {
|
||||
|
||||
@@ -73,7 +73,7 @@ public class MessageDispatcher implements Runnable {
|
||||
this.messageDispatch = _messageQueue[dispatchChannel.getChannelID()].poll();
|
||||
|
||||
if (this.messageDispatch != null) {
|
||||
DispatchMessage.serializeDispatch(this.messageDispatch);
|
||||
DispatchManager.serializeDispatch(this.messageDispatch);
|
||||
shouldBlock = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,15 +10,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.GuildManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.mbEnums.GuildHistoryType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -86,9 +82,9 @@ public class AcceptInviteToGuildHandler extends AbstractClientMsgHandler {
|
||||
player.resetGuildStatuses();
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
DispatchMessage.sendToAllInRange(player, new GuildInfoMsg(player, guild, 2));
|
||||
DispatchManager.sendToAllInRange(player, new GuildInfoMsg(player, guild, 2));
|
||||
|
||||
player.incVer();
|
||||
|
||||
|
||||
@@ -12,12 +12,12 @@ package engine.net.client.handlers;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.mbEnums.GuildState;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -98,7 +98,7 @@ public class AcceptSubInviteHandler extends AbstractClientMsgHandler {
|
||||
msg.setUnknown02(1);
|
||||
msg.setResponse("Your guild is now a " + sourceGuild.getGuildState().name() + '.');
|
||||
dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
ChatManager.chatSystemInfo(sourcePlayer, "Your guild is now a " + sourceGuild.getGuildState().name() + '.');
|
||||
return true;
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.AcceptTradeRequestMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -92,10 +92,10 @@ public class AcceptTradeRequestMsgHandler extends AbstractClientMsgHandler {
|
||||
UpdateVaultMsg uvmTarget = new UpdateVaultMsg(targetAccount);
|
||||
|
||||
dispatch = Dispatch.borrow(source, uvmSource);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
|
||||
dispatch = Dispatch.borrow(target, uvmTarget);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
|
||||
source.charItemManager.setVaultOpen(false);
|
||||
toTradeWith.setVaultOpen(false);
|
||||
@@ -118,10 +118,10 @@ public class AcceptTradeRequestMsgHandler extends AbstractClientMsgHandler {
|
||||
toTradeWith.tradeID = msg.getUnknown01();
|
||||
|
||||
dispatch = Dispatch.borrow(source, otwm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
|
||||
dispatch = Dispatch.borrow(target, otwm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,6 @@ import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.ItemType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ActivateNPCMessage;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -66,7 +65,7 @@ public class ActivateNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
anm.setSize(ItemLists.size());
|
||||
anm.setItemList(ItemLists);
|
||||
Dispatch dispatch = Dispatch.borrow(player, anm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
if (msg.getUnknown01() == 0) {
|
||||
@@ -125,7 +124,7 @@ public class ActivateNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
mca1.setAssetName1(building.getName());
|
||||
mca1.setUnknown54(1);
|
||||
Dispatch dispatch = Dispatch.borrow(player, mca1);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.AddGoldToTradeWindowMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -95,13 +95,13 @@ public class AddGoldToTradeWindowMsgHandler extends AbstractClientMsgHandler {
|
||||
source.charItemManager.modifyCommitToTrade();
|
||||
|
||||
dispatch = Dispatch.borrow(source, utwm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
dispatch = Dispatch.borrow(source, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
dispatch = Dispatch.borrow(other, utwmOther);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.AddItemToTradeWindowMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -81,7 +81,7 @@ public class AddItemToTradeWindowMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
if (!tradingWith.hasRoomTrade(item.template.item_wt)) {
|
||||
dispatch = Dispatch.borrow(source, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -93,12 +93,12 @@ public class AddItemToTradeWindowMsgHandler extends AbstractClientMsgHandler {
|
||||
source.charItemManager.addItemToTrade(item);
|
||||
|
||||
dispatch = Dispatch.borrow(other, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
|
||||
source.charItemManager.modifyCommitToTrade();
|
||||
|
||||
dispatch = Dispatch.borrow(other, utwm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.AllianceType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.AllianceChangeMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -40,20 +40,20 @@ public class AllianceChangeMsgHandler extends AbstractClientMsgHandler {
|
||||
if (!Guild.sameGuild(origin.getPlayerCharacter().getGuild(), fromGuild)) {
|
||||
msg.setMsgType(AllianceChangeMsg.ERROR_NOT_SAME_GUILD);
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!GuildStatusController.isInnerCouncil(origin.getPlayerCharacter().getGuildStatus()) && !GuildStatusController.isGuildLeader(origin.getPlayerCharacter().getGuildStatus())) {
|
||||
msg.setMsgType(AllianceChangeMsg.ERROR_NOT_AUTHORIZED);
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
|
||||
}
|
||||
@@ -72,7 +72,7 @@ public class AllianceChangeMsgHandler extends AbstractClientMsgHandler {
|
||||
return;
|
||||
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
|
||||
}
|
||||
@@ -91,7 +91,7 @@ public class AllianceChangeMsgHandler extends AbstractClientMsgHandler {
|
||||
return;
|
||||
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public class AllianceChangeMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
msg.setMsgType(AllianceChangeMsg.INFO_SUCCESS);
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,10 +1,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.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.AllyEnemyListMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -35,7 +35,7 @@ public class AllyEnemyListMsgHandler extends AbstractClientMsgHandler {
|
||||
if (toGuild == null)
|
||||
return;
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
// UpdateClientAlliancesMsg ucam = new UpdateClientAlliancesMsg();
|
||||
//
|
||||
|
||||
@@ -11,11 +11,11 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.GroupManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.group.AppointGroupLeaderMsg;
|
||||
@@ -52,7 +52,7 @@ public class AppointGroupLeaderHandler extends AbstractClientMsgHandler {
|
||||
AppointGroupLeaderMsg reply = new AppointGroupLeaderMsg();
|
||||
reply.setResponse(1);
|
||||
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), reply);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import engine.job.JobScheduler;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.HotzoneChangeMsg;
|
||||
@@ -129,7 +128,7 @@ public class ArcLoginNotifyMsgHandler extends AbstractClientMsgHandler {
|
||||
if (player.getPet() != null) {
|
||||
PetMsg pm = new PetMsg(5, player.getPet());
|
||||
Dispatch dispatch = Dispatch.borrow(player, pm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
//Send current hotzone
|
||||
@@ -137,7 +136,7 @@ public class ArcLoginNotifyMsgHandler extends AbstractClientMsgHandler {
|
||||
if (ZoneManager.hotZone != null) {
|
||||
HotzoneChangeMsg hcm = new HotzoneChangeMsg(mbEnums.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID());
|
||||
Dispatch dispatch = Dispatch.borrow(player, hcm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
if (player.getGuild() != null && !player.getGuild().isEmptyGuild()) {
|
||||
|
||||
@@ -1,10 +1,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.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ArcMineChangeProductionMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -60,7 +60,7 @@ public class ArcMineChangeProductionMsgHandler extends AbstractClientMsgHandler
|
||||
|
||||
mine.changeProductionType(resource);
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, changeProductionMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ArcMineWindowAvailableTimeMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -55,7 +55,7 @@ public class ArcMineWindowAvailableTimeHandler extends AbstractClientMsgHandler
|
||||
ArcMineWindowAvailableTimeMsg outMsg = new ArcMineWindowAvailableTimeMsg(treeOfLife, 10);
|
||||
outMsg.configure();
|
||||
dispatch = Dispatch.borrow(playerCharacter, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ArcOwnedMinesListMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -37,7 +37,7 @@ public class ArcOwnedMinesListHandler extends AbstractClientMsgHandler {
|
||||
|
||||
msg.setMineList(Mine.getMinesForGuild(playerCharacter.getGuild().getObjectUUID()));
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ArcViewAssetTransactionsMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -55,7 +55,7 @@ public class ArcViewAssetTransactionsMsgHandler extends AbstractClientMsgHandler
|
||||
newMsg.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(player, newMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,13 +2,13 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.NPCManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.SupportMsgType;
|
||||
import engine.mbEnums.TaxType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -96,7 +96,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
outMsg = new ManageNPCMsg(vendor);
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
private static void unprotectAsset(Building targetBuilding, NPC vendor, ClientConnection origin) {
|
||||
@@ -179,7 +179,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
|
||||
case REMOVETAX:
|
||||
@@ -202,7 +202,7 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler {
|
||||
mca.setAssetName1(targetBuilding.getName());
|
||||
mca.setUnknown54(1);
|
||||
dispatch = Dispatch.borrow(player, mca);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
case ACCEPTTAX: //AcceptTax
|
||||
@@ -226,12 +226,12 @@ public class AssetSupportMsgHandler extends AbstractClientMsgHandler {
|
||||
mca.setUnknown54(1);
|
||||
|
||||
dispatch = Dispatch.borrow(player, mca);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
dispatch = Dispatch.borrow(player, baseMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
@@ -12,11 +12,11 @@ package engine.net.client.handlers;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GuildHistoryType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -115,7 +115,7 @@ public class BanishUnbanishHandler extends AbstractClientMsgHandler {
|
||||
targetName + " has been banished from " + guild.getName() + '.');
|
||||
GuildListMsg guildListMsg = new GuildListMsg(guild);
|
||||
dispatch = Dispatch.borrow(source, guildListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
} else {
|
||||
ErrorPopupMsg.sendErrorPopup(source, 103); // You may not banish this char
|
||||
}
|
||||
|
||||
@@ -10,14 +10,10 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.GuildManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -97,7 +93,7 @@ public class BreakFealtyHandler extends AbstractClientMsgHandler {
|
||||
|
||||
SendGuildEntryMsg msg = new SendGuildEntryMsg(player);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
//Update Map.
|
||||
|
||||
@@ -164,7 +160,7 @@ public class BreakFealtyHandler extends AbstractClientMsgHandler {
|
||||
|
||||
SendGuildEntryMsg msg = new SendGuildEntryMsg(player);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
//Update Map.
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ChangeAltitudeMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -171,7 +171,7 @@ public class ChangeAltitudeHandler extends AbstractClientMsgHandler {
|
||||
// Add flight timer job to check stam and ground you when you run out
|
||||
//MovementManager.addFlightTimer(pc, msg, MBServerStatics.FLY_FREQUENCY_MS);
|
||||
//Send change altitude to all in range
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(pc, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
|
||||
return true;
|
||||
|
||||
@@ -12,10 +12,10 @@ package engine.net.client.handlers;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ChangeGuildLeaderMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -115,17 +115,17 @@ public class ChangeGuildLeaderHandler extends AbstractClientMsgHandler {
|
||||
|
||||
GuildInfoMsg guildInfoMsg = new GuildInfoMsg(sourcePlayer, sourcePlayer.getGuild(), 2);
|
||||
Dispatch dispatch = Dispatch.borrow(sourcePlayer, guildInfoMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
GuildListMsg guildListMsg = new GuildListMsg(sourcePlayer.getGuild());
|
||||
|
||||
dispatch = Dispatch.borrow(sourcePlayer, guildListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
|
||||
if (targetPlayer != null) {
|
||||
if (updateTarget)
|
||||
DispatchMessage.sendToAllInRange(targetPlayer, new GuildInfoMsg(targetPlayer, targetPlayer.getGuild(), 2));
|
||||
DispatchManager.sendToAllInRange(targetPlayer, new GuildInfoMsg(targetPlayer, targetPlayer.getGuild(), 2));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -12,10 +12,10 @@ package engine.net.client.handlers;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.guild.ChangeRankMsg;
|
||||
@@ -146,16 +146,16 @@ public class ChangeRankHandler extends AbstractClientMsgHandler {
|
||||
if (targetPlayer != null) {
|
||||
targetPlayer.incVer();
|
||||
if (updateTarget)
|
||||
DispatchMessage.sendToAllInRange(targetPlayer, new GuildInfoMsg(targetPlayer, targetPlayer.getGuild(), 2));
|
||||
DispatchManager.sendToAllInRange(targetPlayer, new GuildInfoMsg(targetPlayer, targetPlayer.getGuild(), 2));
|
||||
}
|
||||
|
||||
if (updateSource) {
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(sourcePlayer, new GuildInfoMsg(sourcePlayer, sourcePlayer.getGuild(), 2));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
dispatch = Dispatch.borrow(sourcePlayer, new GuildListMsg(sourcePlayer.getGuild()));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.GuildManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.CityChoiceMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -42,7 +42,7 @@ public class CityChoiceMsgHandler extends AbstractClientMsgHandler {
|
||||
TeleportRepledgeListMsg trlm = new TeleportRepledgeListMsg(player, false);
|
||||
trlm.configure();
|
||||
dispatch = Dispatch.borrow(player, trlm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
break;
|
||||
case 3:
|
||||
City city = City.getCity(msg.getCityID());
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.ZoneManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.CityDataMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -62,14 +62,14 @@ public class CityDataHandler extends AbstractClientMsgHandler {
|
||||
cityDataMsg.updateCities(updateCities);
|
||||
|
||||
dispatch = Dispatch.borrow(playerCharacter, cityDataMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
// If the hotZone has changed then update the client's map accordingly.
|
||||
|
||||
if (playerCharacter.getTimeStamp("hotzoneupdate") <= ZoneManager.hotZoneLastUpdate.toEpochMilli() && ZoneManager.hotZone != null) {
|
||||
HotzoneChangeMsg hotzoneChangeMsg = new HotzoneChangeMsg(mbEnums.GameObjectType.Zone.ordinal(), ZoneManager.hotZone.getObjectUUID());
|
||||
dispatch = Dispatch.borrow(playerCharacter, hotzoneChangeMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
playerCharacter.setTimeStamp("hotzoneupdate", System.currentTimeMillis() - 100);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class CityDataHandler extends AbstractClientMsgHandler {
|
||||
|
||||
WorldRealmMsg worldRealmMsg = new WorldRealmMsg();
|
||||
dispatch = Dispatch.borrow(playerCharacter, worldRealmMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -12,10 +12,10 @@ package engine.net.client.handlers;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.BuildingGroup;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -115,10 +115,10 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler {
|
||||
GuildTreeStatusMsg gtsm = new GuildTreeStatusMsg(building, sourcePlayer);
|
||||
gtsm.configure();
|
||||
dispatch = Dispatch.borrow(sourcePlayer, gtsm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
CityZoneMsg czm = new CityZoneMsg(2, playerZone.getLoc().x, playerZone.getLoc().y, playerZone.getLoc().z, playerCity.getCityName(), playerZone, mbEnums.CityBoundsType.ZONE.halfExtents, mbEnums.CityBoundsType.ZONE.halfExtents);
|
||||
DispatchMessage.dispatchMsgToAll(czm);
|
||||
DispatchManager.dispatchMsgToAll(czm);
|
||||
|
||||
break;
|
||||
case BIND_TREE:
|
||||
@@ -152,7 +152,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
sourcePlayer.setBindBuildingID(building.getObjectUUID());
|
||||
dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
case OPEN_CITY:
|
||||
case CLOSE_CITY:
|
||||
@@ -171,7 +171,7 @@ public class ClaimGuildTreeMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.CloseTradeWindowMsg;
|
||||
@@ -51,7 +51,7 @@ public class CloseTradeWindowMsgHandler extends AbstractClientMsgHandler {
|
||||
CloseTradeWindowMsg closeMsg = new CloseTradeWindowMsg(source, tradeID);
|
||||
|
||||
dispatch = Dispatch.borrow(source, closeMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
ClientConnection cc2 = sourceItemMan.getTradingWith();
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.DeleteItemMsg;
|
||||
@@ -60,7 +60,7 @@ public class DeleteItemMsgHandler extends AbstractClientMsgHandler {
|
||||
if (item.isCanDestroy())
|
||||
if (itemManager.delete(item) == true) {
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -15,11 +15,11 @@ import engine.db.archive.GuildRecord;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GuildHistoryType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -112,7 +112,7 @@ public class DisbandGuildHandler extends AbstractClientMsgHandler {
|
||||
LeaveGuildMsg leaveGuildMsg = new LeaveGuildMsg();
|
||||
leaveGuildMsg.setMessage("You guild has been disbanded!");
|
||||
dispatch = Dispatch.borrow(player, leaveGuildMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,10 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.GuildManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -122,7 +118,7 @@ public class DismissGuildHandler extends AbstractClientMsgHandler {
|
||||
|
||||
SendGuildEntryMsg msg = new SendGuildEntryMsg(player);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
final Session s = SessionManager.getSession(player);
|
||||
|
||||
|
||||
@@ -3,10 +3,10 @@ package engine.net.client.handlers;
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DoorState;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.DoorTryOpenMsg;
|
||||
@@ -62,7 +62,7 @@ public class DoorTryOpenMsgHandler extends AbstractClientMsgHandler {
|
||||
if ((targetBuilding.isDoorLocked(doorNumber) == true) && msg.getToggle() == 0x01) {
|
||||
msg.setUnk1(2);
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return true; //don't open a locked door
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public class DoorTryOpenMsgHandler extends AbstractClientMsgHandler {
|
||||
for (AbstractWorldObject awo : container) {
|
||||
PlayerCharacter playerCharacter = (PlayerCharacter) awo;
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -11,10 +11,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.AcceptFriendMsg;
|
||||
import engine.net.client.msg.AddFriendMessage;
|
||||
@@ -45,11 +45,11 @@ public class FriendAcceptHandler extends AbstractClientMsgHandler {
|
||||
AddFriendMessage outMsg = new AddFriendMessage(player);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(sourceFriend, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
outMsg = new AddFriendMessage(sourceFriend);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
ChatManager.chatSystemInfo(sourceFriend, player.getFirstName() + " has agreed to be your friend.");
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.DeclineFriendMsg;
|
||||
@@ -36,7 +36,7 @@ public class FriendDeclineHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(sourceFriend, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -40,7 +40,7 @@ public class FriendRequestHandler extends AbstractClientMsgHandler {
|
||||
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(targetFriend, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
ChatManager.chatSystemInfo(player, "Your friend request has been sent.");
|
||||
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.FurnitureMsg;
|
||||
@@ -41,7 +41,7 @@ public class FurnitureHandler extends AbstractClientMsgHandler {
|
||||
if (msg.getType() == 3)
|
||||
msg.setType(2);
|
||||
Dispatch dispatch = Dispatch.borrow(pc, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,12 +11,12 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ConfigManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.GroupManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.group.GroupInviteMsg;
|
||||
@@ -47,7 +47,7 @@ public class GroupInviteHandler extends AbstractClientMsgHandler {
|
||||
msg.setPlayer(pc);
|
||||
msg.setMessageType(1);
|
||||
Dispatch dispatch = Dispatch.borrow(pc, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
group.addUpdateGroupJob();
|
||||
|
||||
@@ -128,7 +128,7 @@ public class GroupInviteHandler extends AbstractClientMsgHandler {
|
||||
msg.setName(source.getFirstName());
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(target, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.GroupManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.group.GroupInviteResponseMsg;
|
||||
@@ -86,7 +86,7 @@ public class GroupInviteResponseHandler extends AbstractClientMsgHandler {
|
||||
groupUpdateMsg.setPlayer(groupMember);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, groupUpdateMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,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.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -47,11 +47,11 @@ public class GuildControlHandler extends AbstractClientMsgHandler {
|
||||
msg.setGM((byte) (GuildStatusController.isGuildLeader(player.getGuildStatus()) ? 1 : 0));
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
if (GuildStatusController.isInnerCouncil(player.getGuildStatus()) || GuildStatusController.isGuildLeader(player.getGuildStatus())) {
|
||||
dispatch = Dispatch.borrow(player, new GuildListMsg(player.getGuild()));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
} else
|
||||
ErrorPopupMsg.sendErrorMsg(player, "Only guild leader and inner council have such authority!");
|
||||
|
||||
@@ -64,7 +64,7 @@ public class GuildControlHandler extends AbstractClientMsgHandler {
|
||||
|
||||
if (pc != null) {
|
||||
dispatch = Dispatch.borrow(player, new GuildListMsg(pc));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,17 +10,13 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.GuildManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.GuildHistoryType;
|
||||
import engine.mbEnums.ItemType;
|
||||
import engine.mbEnums.OwnerType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -122,7 +118,7 @@ public class GuildCreationFinalizeHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
GuildManager.joinGuild(player, newGuild, GuildHistoryType.CREATE);
|
||||
|
||||
@@ -135,7 +131,7 @@ public class GuildCreationFinalizeHandler extends AbstractClientMsgHandler {
|
||||
player.charItemManager.updateInventory();
|
||||
player.incVer();
|
||||
|
||||
DispatchMessage.sendToAllInRange(player, new GuildInfoMsg(player, newGuild, 2));
|
||||
DispatchManager.sendToAllInRange(player, new GuildInfoMsg(player, newGuild, 2));
|
||||
|
||||
ChatManager.chatSystemInfo(player, msg.getName() + " has arrived on Grief server!");
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.guild.GuildCreationOptionsMsg;
|
||||
@@ -40,7 +40,7 @@ public class GuildCreationOptionsHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
|
||||
dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.guild.GuildInfoMsg;
|
||||
@@ -40,18 +40,18 @@ public class GuildInfoHandler extends AbstractClientMsgHandler {
|
||||
|
||||
if (msg.getMsgType() == 1) {
|
||||
dispatch = Dispatch.borrow(sourcePlayer, new GuildInfoMsg(sourcePlayer, sourcePlayer.getGuild(), 4));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
} else if (msg.getMsgType() == 5) {
|
||||
|
||||
if (msg.getObjectType() == GameObjectType.PlayerCharacter.ordinal()) {
|
||||
PlayerCharacter pc = PlayerCharacter.getPlayerCharacter(msg.getObjectID());
|
||||
dispatch = Dispatch.borrow(sourcePlayer, new GuildInfoMsg(pc, pc.getGuild(), 5));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
} else {
|
||||
//TODO Change this to a null object when we make a null object.
|
||||
|
||||
dispatch = Dispatch.borrow(sourcePlayer, new GuildInfoMsg(sourcePlayer, sourcePlayer.getGuild(), 1));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.GuildTreeStatusMsg;
|
||||
@@ -52,7 +52,7 @@ public class GuildTreeStatusMsgHandler extends AbstractClientMsgHandler {
|
||||
guildTreeStatusMsg.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(player, guildTreeStatusMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.HirelingServiceMsg;
|
||||
@@ -65,10 +65,10 @@ public class HirelingServiceMsgHandler extends AbstractClientMsgHandler {
|
||||
ManageNPCMsg outMsg = new ManageNPCMsg(npc);
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.InvalidTradeRequestMsg;
|
||||
@@ -39,7 +39,7 @@ public class InvalidTradeRequestMsgHandler extends AbstractClientMsgHandler {
|
||||
Dispatch dispatch;
|
||||
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11,14 +11,10 @@ package engine.net.client.handlers;
|
||||
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.ConfigManager;
|
||||
import engine.gameManager.GuildManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -149,7 +145,7 @@ public class InviteToGuildHandler extends AbstractClientMsgHandler {
|
||||
msg.setTargetName("");
|
||||
|
||||
dispatch = Dispatch.borrow(targetPlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,10 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.ConfigManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -127,7 +123,7 @@ public class InviteToSubHandler extends AbstractClientMsgHandler {
|
||||
msg.setUnknown02(1);
|
||||
|
||||
dispatch = Dispatch.borrow(target, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
} else {
|
||||
sendChat(source, "Failed to send sub invite to target.");
|
||||
|
||||
@@ -10,9 +10,9 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ItemFromVaultMsg;
|
||||
@@ -36,7 +36,7 @@ public class ItemFromVaultMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
ItemToVaultMsg back = new ItemToVaultMsg(msg);
|
||||
dispatch = Dispatch.borrow(player, back);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
ChatManager.chatInfoError(player, "Can't transfer to inventory: " + reason);
|
||||
}
|
||||
|
||||
@@ -10,15 +10,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.ForgeManager;
|
||||
import engine.gameManager.ItemManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.loot.WorkOrder;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.ItemType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -104,7 +100,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
recycleItem(msg.items, vendor, origin);
|
||||
msg.actionType = mbEnums.ProductionActionType.TAKE;
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
case COMPLETE:
|
||||
completeItem(msg.itemUUID, vendor);
|
||||
@@ -118,7 +114,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
case TAKE:
|
||||
takeItem(msg.items, vendor, origin);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -142,7 +138,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
// (Add / Completed / Remove)
|
||||
|
||||
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, virtualItem, mbEnums.ProductionActionType.CONFIRM_SETPRICE, true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
|
||||
// Remove virtualItem from collections
|
||||
|
||||
@@ -177,9 +173,9 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
// Add persisted items to the vendor inventory window
|
||||
|
||||
ItemProductionMsg outMsg1 = new ItemProductionMsg(vendor.building, vendor, completedItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(vendor, outMsg1, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(vendor, outMsg1, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
ItemProductionMsg outMsg2 = new ItemProductionMsg(vendor.building, vendor, completedItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
@@ -214,11 +210,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.SETPRICE, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
|
||||
@@ -275,11 +271,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
origin.getPlayerCharacter().charItemManager.updateInventory();
|
||||
} catch (Exception e) {
|
||||
@@ -356,7 +352,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.TAKE, true);
|
||||
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
// Refund a portion of the gold
|
||||
@@ -446,7 +442,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg = new ManageNPCMsg(vendor);
|
||||
outMsg.setMessageType(1);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
} finally {
|
||||
|
||||
@@ -10,9 +10,9 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ItemFromVaultMsg;
|
||||
@@ -36,7 +36,7 @@ public class ItemToVaultMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
ItemFromVaultMsg back = new ItemFromVaultMsg(msg);
|
||||
dispatch = Dispatch.borrow(player, back);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
ChatManager.chatInfoError(player, "Can't transfer to vault: " + reason);
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.KeepAliveServerClientMsg;
|
||||
@@ -39,7 +39,7 @@ public class KeepAliveServerClientHandler extends AbstractClientMsgHandler {
|
||||
// Send ping to client
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,14 +10,10 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.ConfigManager;
|
||||
import engine.gameManager.GroupManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GuildHistoryType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.guild.LeaveGuildMsg;
|
||||
@@ -49,7 +45,7 @@ public class LeaveGuildHandler extends AbstractClientMsgHandler {
|
||||
if (GuildStatusController.isGuildLeader(playerCharacter.getGuildStatus())) {
|
||||
msg.setMessage("You must switch leadership of your guild before leaving!");
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -75,7 +71,7 @@ public class LeaveGuildHandler extends AbstractClientMsgHandler {
|
||||
// Send message back to client
|
||||
msg.setMessage("You have left the guild.");
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,10 +2,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.LockUnlockDoorMsg;
|
||||
@@ -82,7 +82,7 @@ public class LockUnlockDoorMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,11 +10,11 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.GroupManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -125,11 +125,11 @@ public class LootMsgHandler extends AbstractClientMsgHandler {
|
||||
for (Item equip : mobTarget.charItemManager.equipped.values()) {
|
||||
|
||||
TransferItemFromEquipToInventoryMsg back = new TransferItemFromEquipToInventoryMsg(mobTarget, equip.equipSlot);
|
||||
DispatchMessage.dispatchMsgToInterestArea(mobTarget, back, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(mobTarget, back, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
|
||||
LootMsg lootMsg = new LootMsg(0, 0, tar.getObjectType().ordinal(), tar.getObjectUUID(), equip);
|
||||
Dispatch dispatch = Dispatch.borrow(player, lootMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -172,17 +172,17 @@ public class LootMsgHandler extends AbstractClientMsgHandler {
|
||||
updateTargetGold = new UpdateGoldMsg(corpse);
|
||||
|
||||
updateTargetGold.configure();
|
||||
DispatchMessage.dispatchMsgToInterestArea(corpse, updateTargetGold, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(corpse, updateTargetGold, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
|
||||
UpdateGoldMsg ugm = new UpdateGoldMsg(player);
|
||||
ugm.configure();
|
||||
Dispatch dispatch = Dispatch.borrow(player, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
// respond back loot message. Try sending to everyone.
|
||||
|
||||
} else
|
||||
DispatchMessage.dispatchMsgToInterestArea(corpse, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, true);
|
||||
DispatchManager.dispatchMsgToInterestArea(corpse, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, true);
|
||||
|
||||
|
||||
//TODO send group loot message if player is grouped and visible
|
||||
@@ -215,12 +215,12 @@ public class LootMsgHandler extends AbstractClientMsgHandler {
|
||||
updateTargetGold = new UpdateGoldMsg(corpse);
|
||||
|
||||
updateTargetGold.configure();
|
||||
DispatchMessage.dispatchMsgToInterestArea(tar, updateTargetGold, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(tar, updateTargetGold, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
UpdateGoldMsg ugm = new UpdateGoldMsg(player);
|
||||
ugm.configure();
|
||||
Dispatch dispatch = Dispatch.borrow(player, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
// respond back loot message. Try sending to everyone.
|
||||
|
||||
@@ -231,10 +231,10 @@ public class LootMsgHandler extends AbstractClientMsgHandler {
|
||||
msg.setSourceID2(0);
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
//DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchMessage.dispatchMsgToInterestArea(tar, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, true);
|
||||
DispatchManager.dispatchMsgToInterestArea(tar, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, true);
|
||||
LootMsg newItemMsg = new LootMsg(mbEnums.GameObjectType.PlayerCharacter.ordinal(), player.getObjectUUID(), 0, 0, itemRet);
|
||||
dispatch = Dispatch.borrow(player, newItemMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
//player.getCharItemManager().updateInventory();
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -131,9 +131,9 @@ public class LootWindowRequestMsgHandler extends AbstractClientMsgHandler {
|
||||
if (lwrm == null)
|
||||
return true;
|
||||
|
||||
DispatchMessage.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
Dispatch dispatch = Dispatch.borrow(player, lwrm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.guild.MOTDCommitMsg;
|
||||
@@ -74,7 +74,7 @@ public class MOTDCommitHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
}
|
||||
dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -10,10 +10,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.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -57,7 +57,7 @@ public class MOTDEditHandler extends AbstractClientMsgHandler {
|
||||
LeaveGuildMsg leaveGuildMsg = new LeaveGuildMsg();
|
||||
leaveGuildMsg.setMessage("You do not belong to a guild!");
|
||||
dispatch = Dispatch.borrow(playerCharacter, leaveGuildMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ public class MOTDEditHandler extends AbstractClientMsgHandler {
|
||||
msg.setMessage(nation.getMOTD());
|
||||
}
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -2,6 +2,7 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.ZoneManager;
|
||||
import engine.math.Bounds;
|
||||
@@ -9,7 +10,6 @@ import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -99,7 +99,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
ManageCityAssetsMsg mca = new ManageCityAssetsMsg(player, building);
|
||||
mca.actionType = 15;
|
||||
Dispatch dispatch = Dispatch.borrow(player, mca);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.setTargetID(building.getObjectUUID());
|
||||
outMsg.setAssetName(building.getName());
|
||||
Dispatch dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
msg.actionType = 4;
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
outMsg.actionType = 4;
|
||||
@@ -206,14 +206,14 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
}
|
||||
Dispatch dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (msg.actionType == 13) {
|
||||
outMsg.actionType = 13;
|
||||
Dispatch dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -235,7 +235,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.setUnknown54(1);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -248,7 +248,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
ManageCityAssetsMsg mca = new ManageCityAssetsMsg(player, building);
|
||||
mca.actionType = 15;
|
||||
Dispatch dispatch = Dispatch.borrow(player, mca);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ public class ManageCityAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.actionType = 18;
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -9,7 +9,6 @@ import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GuildHistoryType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -230,7 +229,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
|
||||
trlm.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(pc, trlm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
private static void teleportRepledge(MerchantMsg msg, ClientConnection origin, PlayerCharacter player, boolean isTeleport, NPC npc) {
|
||||
@@ -294,7 +293,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
|
||||
if ((!isTeleport && joinedGuild) || (isTeleport)) {
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
//teleport player to city
|
||||
@@ -401,7 +400,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
|
||||
case 5:
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
requestSwearAsSubGuild(msg, origin, player, npc);
|
||||
break;
|
||||
case 10:
|
||||
@@ -425,7 +424,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
|
||||
case 15:
|
||||
LeaderboardMessage lbm = new LeaderboardMessage();
|
||||
dispatch = Dispatch.borrow(player, lbm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
case 16:
|
||||
ViewResourcesMsg vrm = new ViewResourcesMsg(player);
|
||||
@@ -434,7 +433,7 @@ public class MerchantMsgHandler extends AbstractClientMsgHandler {
|
||||
vrm.setWarehouseBuilding(warehouse);
|
||||
vrm.configure();
|
||||
dispatch = Dispatch.borrow(player, vrm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
case 17:
|
||||
Warehouse.warehouseWithdraw(msg, player, npc);
|
||||
|
||||
@@ -2,14 +2,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.NPCManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -80,7 +76,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
toRemove.guardCaptain = null;
|
||||
PetMsg petMsg = new PetMsg(5, null);
|
||||
Dispatch dispatch = Dispatch.borrow(petOwner, petMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,11 +91,11 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
mca1.setUnknown54(1);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, mca1);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
ManageNPCMsg mnm = new ManageNPCMsg(npc);
|
||||
dispatch = Dispatch.borrow(playerCharacter, mnm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
//Add Minion
|
||||
} else {
|
||||
@@ -153,7 +149,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
ManageNPCMsg mnm = new ManageNPCMsg(npc);
|
||||
mnm.setMessageType(1);
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, mnm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
} finally {
|
||||
npc.minionLock.writeLock().unlock();
|
||||
@@ -206,7 +202,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
toRemove.guardCaptain = null;
|
||||
PetMsg petMsg = new PetMsg(5, null);
|
||||
Dispatch dispatch = Dispatch.borrow(trebOwner, petMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -221,11 +217,11 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
mca1.setUnknown54(1);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, mca1);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
ManageNPCMsg mnm = new ManageNPCMsg(npc);
|
||||
dispatch = Dispatch.borrow(playerCharacter, mnm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
//Add Minion
|
||||
} else {
|
||||
@@ -287,7 +283,7 @@ public class MinionTrainingMsgHandler extends AbstractClientMsgHandler {
|
||||
ManageNPCMsg mnm = new ManageNPCMsg(npc);
|
||||
mnm.setMessageType(1);
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, mnm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
} catch (Exception e) {
|
||||
Logger.error(e);
|
||||
|
||||
@@ -6,7 +6,6 @@ import engine.math.Bounds;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -104,7 +103,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
pam.addPlacementInfo(item.template.deed_structure_id);
|
||||
|
||||
dispatch = Dispatch.borrow(player, pam);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
//itemMan.consume(item); //temporary fix for dupe.. TODO Make Item Unusable after This message is sent.
|
||||
break;
|
||||
@@ -248,7 +247,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
VisualUpdateMessage vum = new VisualUpdateMessage(player, 16323);
|
||||
vum.configure();
|
||||
DispatchMessage.sendToAllInRange(player, vum);
|
||||
DispatchManager.sendToAllInRange(player, vum);
|
||||
}
|
||||
|
||||
if (waterbucketBypass == false) {
|
||||
@@ -262,7 +261,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
itemMan.consume(item);
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
player.cancelOnSpell();
|
||||
break;
|
||||
case RUNE:
|
||||
@@ -271,7 +270,7 @@ public class ObjectActionMsgHandler extends AbstractClientMsgHandler {
|
||||
break;
|
||||
default: //shouldn't be here, consume item
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
// itemMan.consume(item);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -3,12 +3,12 @@ package engine.net.client.handlers;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -60,7 +60,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.setOrigin(origin);
|
||||
outMsg.setMessageType(2);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
break;
|
||||
|
||||
case ADDHERALDRY:
|
||||
@@ -93,7 +93,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.setOrigin(origin);
|
||||
outMsg.setMessageType(2);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
break;
|
||||
case REMOVEHERALDRY:
|
||||
@@ -105,20 +105,20 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.setOrigin(origin);
|
||||
outMsg.setMessageType(2);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
break;
|
||||
|
||||
case DEALTHS: // Death List
|
||||
openFriendsCondemnListMsg.updateMsg(8, new ArrayList<>(player.pvpDeaths));
|
||||
dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
|
||||
case KILLS: // Kill List
|
||||
openFriendsCondemnListMsg.updateMsg(10, new ArrayList<>(player.pvpKills));
|
||||
dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
|
||||
case VIEWCONDEMN:
|
||||
@@ -131,7 +131,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
openFriendsCondemnListMsg = new OpenFriendsCondemnListMsg(12, sourceBuilding.getCondemned(), sourceBuilding.reverseKOS);
|
||||
openFriendsCondemnListMsg.configure();
|
||||
dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
//msg.updateMsg(12, DbManager.GuildQueries.)
|
||||
break;
|
||||
@@ -156,7 +156,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
sourceBuilding.getCondemned().remove(msg.getRemoveFriendID());
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
|
||||
case TOGGLEACTIVE:
|
||||
@@ -177,7 +177,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
condemn.setActive(msg.isReverseKOS());
|
||||
openFriendsCondemnListMsg.setReverseKOS(condemn.active);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
case REVERSEKOS:
|
||||
|
||||
@@ -276,7 +276,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
openFriendsCondemnListMsg = new OpenFriendsCondemnListMsg(12, sourceBuilding.getCondemned(), sourceBuilding.reverseKOS);
|
||||
openFriendsCondemnListMsg.configure();
|
||||
dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
|
||||
//ADD FRIEND BUILDING
|
||||
@@ -337,7 +337,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
openFriendsCondemnListMsg.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
//REMOVE from friends list.
|
||||
case REMOVEFRIEND:
|
||||
@@ -363,7 +363,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
openFriendsCondemnListMsg = new OpenFriendsCondemnListMsg(26, sourceBuilding.getFriends());
|
||||
openFriendsCondemnListMsg.configure();
|
||||
dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
break;
|
||||
//view Friends
|
||||
@@ -384,7 +384,7 @@ public class OpenFriendsCondemnListMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
|
||||
dispatch = Dispatch.borrow(player, openFriendsCondemnListMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -3,6 +3,7 @@ package engine.net.client.handlers;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.math.FastMath;
|
||||
import engine.math.Vector3fImmutable;
|
||||
@@ -11,7 +12,6 @@ import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.mbEnums.ProfitType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -429,7 +429,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
manageCityAssetsMsg.setTargetID(building.getObjectUUID());
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, manageCityAssetsMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -452,7 +452,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.setUnknown54(1);
|
||||
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
break;
|
||||
case CLIENT_REDEED_REQUEST:
|
||||
@@ -472,7 +472,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
modifySellProfit(orderNPCMsg, origin);
|
||||
dispatch = Dispatch.borrow(player, orderNPCMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 10:
|
||||
case 11:
|
||||
@@ -483,7 +483,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
modifyBuyProfit(orderNPCMsg, origin);
|
||||
dispatch = Dispatch.borrow(player, orderNPCMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
ManageNPCMsg manageNPCMsg = new ManageNPCMsg(npc);
|
||||
Dispatch dispatch = Dispatch.borrow(player, manageNPCMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
} else if (orderNPCMsg.getObjectType() == GameObjectType.Mob.ordinal()) {
|
||||
@@ -535,7 +535,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
manageCityAssetsMsg.setTargetType(building.getObjectType().ordinal());
|
||||
manageCityAssetsMsg.setTargetID(building.getObjectUUID());
|
||||
Dispatch dispatch = Dispatch.borrow(player, manageCityAssetsMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
break;
|
||||
case 3:
|
||||
|
||||
@@ -556,7 +556,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.setUnknown54(1);
|
||||
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
break;
|
||||
case 6:
|
||||
|
||||
@@ -583,7 +583,7 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
ManageNPCMsg manageNPCMsg = new ManageNPCMsg(mob);
|
||||
Dispatch dispatch = Dispatch.borrow(player, manageNPCMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -10,7 +10,7 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.PetCmdMsg;
|
||||
@@ -75,7 +75,7 @@ public class PetCmdMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
UpdateStateMsg rwss = new UpdateStateMsg();
|
||||
rwss.setPlayer(pet);
|
||||
DispatchMessage.sendToAllInRange(pet, rwss);
|
||||
DispatchManager.sendToAllInRange(pet, rwss);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -2,9 +2,9 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.PetitionReceivedMsg;
|
||||
@@ -53,7 +53,7 @@ public class PetitionReceivedMsgHandler extends AbstractClientMsgHandler {
|
||||
petitionReceivedMsg.unknown04 = 0;
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, petitionReceivedMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,6 @@ import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.*;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.CityZoneMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -62,7 +61,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
PlaceAssetMsg pam = new PlaceAssetMsg();
|
||||
pam.setActionType(4);
|
||||
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), pam);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
// Default method: Validates and places all buildings that do not
|
||||
@@ -786,7 +785,7 @@ public class PlaceAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
//load the new city on the clients
|
||||
|
||||
CityZoneMsg czm = new CityZoneMsg(1, treeObject.getLoc().x, treeObject.getLoc().y, treeObject.getLoc().z, cityObject.getCityName(), zoneObject, mbEnums.CityBoundsType.ZONE.halfExtents, mbEnums.CityBoundsType.ZONE.halfExtents);
|
||||
DispatchMessage.dispatchMsgToAll(czm);
|
||||
DispatchManager.dispatchMsgToAll(czm);
|
||||
|
||||
// Set maintenance date
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.RandomMsg;
|
||||
@@ -59,7 +59,7 @@ public class RandomMsgHandler extends AbstractClientMsgHandler {
|
||||
msg.setSourceID(source.getObjectUUID());
|
||||
|
||||
//send to all in range
|
||||
DispatchMessage.dispatchMsgToInterestArea(source, msg, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, true);
|
||||
DispatchManager.dispatchMsgToInterestArea(source, msg, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.RefineMsg;
|
||||
@@ -69,7 +69,7 @@ public class RefineMsgHandler extends AbstractClientMsgHandler {
|
||||
//echo refine message back
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
// if (type == 0 && token == 1488335491){
|
||||
// dispatch = Dispatch.borrow(pc, msg);
|
||||
@@ -80,7 +80,7 @@ public class RefineMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
RefinerScreenMsg refinerScreenMsg = new RefinerScreenMsg(skillPower, npc.getSellPercent(playerCharacter)); //TODO set npc cost
|
||||
dispatch = Dispatch.borrow(playerCharacter, refinerScreenMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
playerCharacter.recalculate();
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.RefinerScreenMsg;
|
||||
@@ -43,7 +43,7 @@ public class RefinerScreenMsgHandler extends AbstractClientMsgHandler {
|
||||
msg.setUnknown02(0); //cost to refine?
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.RemoveFriendMessage;
|
||||
@@ -33,12 +33,12 @@ public class RemoveFriendHandler extends AbstractClientMsgHandler {
|
||||
PlayerFriends.RemoveFromFriends(msg.friendID, player.getObjectUUID());
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
msg = new RemoveFriendMessage(msg.friendID);
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,11 +11,11 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.GroupManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.group.GroupUpdateMsg;
|
||||
@@ -71,7 +71,7 @@ public class RemoveFromGroupHandler extends AbstractClientMsgHandler {
|
||||
RemoveFromGroupMsg reply = new RemoveFromGroupMsg();
|
||||
reply.setResponse(1);
|
||||
Dispatch dispatch = Dispatch.borrow(source, reply);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class RemoveFromGroupHandler extends AbstractClientMsgHandler {
|
||||
gim.setMessageType(3);
|
||||
gim.setPlayer(groupMember);
|
||||
Dispatch dispatch = Dispatch.borrow(target, gim);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.ZoneManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.BuildingGroup;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.RepairBuildingMsg;
|
||||
@@ -70,14 +70,14 @@ public class RepairBuildingMsgHandler extends AbstractClientMsgHandler {
|
||||
UpdateObjectMsg uom = new UpdateObjectMsg(targetBuilding, 3);
|
||||
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), uom);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
|
||||
RepairBuildingMsg rbm = new RepairBuildingMsg(targetBuilding.getObjectUUID(), maxHP, missingHealth, repairCost, targetBuilding.getStrongboxValue());
|
||||
|
||||
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), rbm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,11 +10,11 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -56,7 +56,7 @@ public class RepairMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
repairMsg.setRepairWindowAck(npc);
|
||||
dispatch = Dispatch.borrow(player, repairMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
} else if (repairMsg.getMsgType() == 0) { //Request RepairObject
|
||||
|
||||
@@ -98,7 +98,7 @@ public class RepairMsgHandler extends AbstractClientMsgHandler {
|
||||
toRepair.setCombat_health_current(max);
|
||||
repairMsg.setupRepairAck(max - dur);
|
||||
dispatch = Dispatch.borrow(player, repairMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class RepairMsgHandler extends AbstractClientMsgHandler {
|
||||
ugm.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(player, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
//update durability to database
|
||||
|
||||
@@ -148,7 +148,7 @@ public class RepairMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
repairMsg.setupRepairAck(max - dur);
|
||||
dispatch = Dispatch.borrow(player, repairMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -11,7 +11,7 @@ import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.Account;
|
||||
@@ -70,7 +70,7 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler {
|
||||
if (player.getLevel() == 1 && player.getBindBuildingID() == -1) {
|
||||
SelectCityMsg scm = new SelectCityMsg(player, true);
|
||||
dispatch = Dispatch.borrow(player, scm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler {
|
||||
try {
|
||||
WorldDataMsg wdm = new WorldDataMsg();
|
||||
dispatch = Dispatch.borrow(player, wdm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
Logger.error("WORLDDATAMESSAGE" + e.getMessage());
|
||||
@@ -92,7 +92,7 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler {
|
||||
try {
|
||||
WorldRealmMsg wrm = new WorldRealmMsg();
|
||||
dispatch = Dispatch.borrow(player, wrm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
} catch (Exception e) {
|
||||
// TODO Auto-generated catch block
|
||||
Logger.error("REALMMESSAGE" + e.getMessage());
|
||||
@@ -101,7 +101,7 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler {
|
||||
// Object Data
|
||||
CityDataMsg wom = new CityDataMsg(session, true);
|
||||
dispatch = Dispatch.borrow(player, wom);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
player.getTimestamps().put("EnterWorld", System.currentTimeMillis());
|
||||
|
||||
@@ -153,7 +153,7 @@ public class RequestEnterWorldHandler extends AbstractClientMsgHandler {
|
||||
|
||||
SendOwnPlayerMsg sopm = new SendOwnPlayerMsg(SessionManager.getSession(origin));
|
||||
dispatch = Dispatch.borrow(player, sopm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import engine.exception.MsgSendException;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -46,7 +46,7 @@ public class RequestGuildListHandler extends AbstractClientMsgHandler {
|
||||
|
||||
|
||||
dispatch = Dispatch.borrow(pc, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import engine.job.JobScheduler;
|
||||
import engine.jobs.RefreshGroupJob;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.MoveToPointMsg;
|
||||
@@ -72,7 +72,7 @@ public class RespawnMsgHandler extends AbstractClientMsgHandler {
|
||||
// TODO calculate any experience loss before this point
|
||||
msg.setPlayerExp(playerCharacter.getExp() + playerCharacter.getOverFlowEXP());
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
MoveToPointMsg moveMsg = new MoveToPointMsg();
|
||||
moveMsg.setPlayer(playerCharacter);
|
||||
@@ -82,7 +82,7 @@ public class RespawnMsgHandler extends AbstractClientMsgHandler {
|
||||
moveMsg.setInBuildingFloor(-1);
|
||||
|
||||
dispatch = Dispatch.borrow(playerCharacter, moveMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
MovementManager.sendRWSSMsg(playerCharacter);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.mbEnums;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.SetCombatModeMsg;
|
||||
@@ -49,7 +49,7 @@ public class SetCombatModeMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
UpdateStateMsg rwss = new UpdateStateMsg();
|
||||
rwss.setPlayer(playerCharacter);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import engine.exception.MsgSendException;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ShowMsg;
|
||||
@@ -64,7 +64,7 @@ public class ShowMsgHandler extends AbstractClientMsgHandler {
|
||||
msg.setRange01(tar.getRange());
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.SocialMsg;
|
||||
@@ -35,7 +35,7 @@ public class SocialMsgHandler extends AbstractClientMsgHandler {
|
||||
if (player == null)
|
||||
return true;
|
||||
|
||||
DispatchMessage.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, true);
|
||||
DispatchManager.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,15 +10,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.GuildManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.mbEnums.GuildState;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -112,7 +108,7 @@ public class SwearInGuildHandler extends AbstractClientMsgHandler {
|
||||
|
||||
SendGuildEntryMsg msg = new SendGuildEntryMsg(player);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
City.lastCityUpdate = System.currentTimeMillis();
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -69,8 +69,8 @@ public class SwearInHandler extends AbstractClientMsgHandler {
|
||||
ChatManager.chatGuildInfo(source, target.getFirstName() + " has been sworn in as a full member!");
|
||||
|
||||
dispatch = Dispatch.borrow(source, new GuildListMsg(source.getGuild()));
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchMessage.sendToAllInRange(target, new GuildInfoMsg(target, target.getGuild(), 2));
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.sendToAllInRange(target, new GuildInfoMsg(target, target.getGuild(), 2));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ package engine.net.client.handlers;
|
||||
import engine.InterestManagement.RealmMap;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -115,9 +115,9 @@ public class TaxCityMsgHandler extends AbstractClientMsgHandler {
|
||||
vrm.setWarehouseBuilding(BuildingManager.getBuildingFromCache(building.getCity().warehouse.building.getObjectUUID()));
|
||||
vrm.configure();
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
dispatch = Dispatch.borrow(player, vrm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ToggleCombatMsg;
|
||||
@@ -49,7 +49,7 @@ public class ToggleCombatMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
UpdateStateMsg rwss = new UpdateStateMsg();
|
||||
rwss.setPlayer(playerCharacter);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ToggleLfgRecruitingMsg;
|
||||
@@ -51,7 +51,7 @@ public class ToggleLfgRecruitingMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
UpdateStateMsg rwss = new UpdateStateMsg();
|
||||
rwss.setPlayer(playerCharacter);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, rwss, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ToggleSitStandMsg;
|
||||
@@ -58,7 +58,7 @@ public class ToggleSitStandMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
rwss.setPlayer(playerCharacter);
|
||||
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, rwss, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ package engine.net.client.handlers;
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.PowersManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.TrackWindowMsg;
|
||||
@@ -176,7 +176,7 @@ public class TrackWindowMsgHandler extends AbstractClientMsgHandler {
|
||||
trackWindowMsg.setCharacters(trackChars);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, trackWindowMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.TradeRequestMsg;
|
||||
@@ -51,7 +51,7 @@ public class TradeRequestMsgHandler extends AbstractClientMsgHandler {
|
||||
return false;
|
||||
|
||||
dispatch = Dispatch.borrow(target, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@@ -9,13 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.PowersManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -196,7 +192,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler {
|
||||
playerCharacter.charItemManager.buyFromNPC(building, (int) profitCost, (int) (profitCost - cost));
|
||||
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
//update trainer window
|
||||
|
||||
@@ -204,7 +200,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler {
|
||||
TrainerInfoMsg tim = new TrainerInfoMsg(msg.npcType, msg.npcID, npc.getSellPercent(playerCharacter));
|
||||
tim.setTrainPercent(npc.getSellPercent(playerCharacter));
|
||||
dispatch = Dispatch.borrow(playerCharacter, tim);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,7 +259,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler {
|
||||
//train succeeded
|
||||
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
//update trainer window
|
||||
|
||||
@@ -271,7 +267,7 @@ public class TrainMsgHandler extends AbstractClientMsgHandler {
|
||||
TrainerInfoMsg tim = new TrainerInfoMsg(msg.npcType, msg.npcID, npc.getSellPercent(playerCharacter));
|
||||
tim.setTrainPercent(npc.getSellPercent(playerCharacter));
|
||||
dispatch = Dispatch.borrow(playerCharacter, tim);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.TrainerInfoMsg;
|
||||
@@ -51,7 +51,7 @@ public class TrainerInfoMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,11 +2,11 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.PlaceAssetMsg;
|
||||
@@ -58,7 +58,7 @@ public class TransferGoldToFromBuildingMsgHandler extends AbstractClientMsgHandl
|
||||
return true;
|
||||
if (building.setReserve(msg.getUnknown01(), player)) {
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -94,7 +94,7 @@ public class TransferGoldToFromBuildingMsgHandler extends AbstractClientMsgHandl
|
||||
UpdateGoldMsg ugm = new UpdateGoldMsg(player);
|
||||
ugm.configure();
|
||||
dispatch = Dispatch.borrow(player, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
// Refresh the player's inventory if it's currently open
|
||||
|
||||
@@ -103,7 +103,7 @@ public class TransferGoldToFromBuildingMsgHandler extends AbstractClientMsgHandl
|
||||
|
||||
msg.setAmount(building.getStrongboxValue());
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
} catch (Exception e) {
|
||||
PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "A Serious error has occurred. Please post details for to ensure transaction integrity");
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.NPCManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.TransferItemFromBankMsg;
|
||||
@@ -79,7 +79,7 @@ public class TransferItemFromBankMsgHandler extends AbstractClientMsgHandler {
|
||||
goldMes.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(player, goldMes);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class TransferItemFromBankMsgHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ApplyEffectMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -86,13 +86,13 @@ public class TransferItemFromEquipToInventoryHandler extends AbstractClientMsgHa
|
||||
pum.setEffectSourceID(ItemID);
|
||||
pum.setDuration(-1);
|
||||
|
||||
DispatchMessage.dispatchMsgToInterestArea(player, pum, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(player, pum, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
}
|
||||
|
||||
// Update player formulas
|
||||
player.applyBonuses();
|
||||
DispatchMessage.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@ package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ApplyEffectMsg;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
@@ -74,7 +74,7 @@ public class TransferItemFromInventoryToEquipHandler extends AbstractClientMsgHa
|
||||
|
||||
// Update player formulas
|
||||
playerCharacter.applyBonuses();
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, transferMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, transferMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
|
||||
for (String name : item.getEffects().keySet()) {
|
||||
Effect eff = item.getEffects().get(name);
|
||||
@@ -95,7 +95,7 @@ public class TransferItemFromInventoryToEquipHandler extends AbstractClientMsgHa
|
||||
pum.setEffectSourceID(item.getObjectUUID());
|
||||
pum.setDuration(-1);
|
||||
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, pum, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, pum, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -110,7 +110,7 @@ public class TransferItemFromInventoryToEquipHandler extends AbstractClientMsgHa
|
||||
|
||||
TransferItemFromEquipToInventoryMsg back = new TransferItemFromEquipToInventoryMsg(player, msg.slot);
|
||||
Dispatch dispatch = Dispatch.borrow(player, back);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
ChatManager.chatInfoError(player, "Can't equip item: " + reason);
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.NPCManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -73,7 +73,7 @@ public class TransferItemToBankMsgHandler extends AbstractClientMsgHandler {
|
||||
goldMes.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(player, goldMes);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
} else {
|
||||
|
||||
@@ -84,7 +84,7 @@ public class TransferItemToBankMsgHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.FriendStatus;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.UpdateFriendStatusMessage;
|
||||
@@ -57,7 +57,7 @@ public class UpdateFriendStatusHandler extends AbstractClientMsgHandler {
|
||||
if (playerFriend == null)
|
||||
return;
|
||||
Dispatch dispatch = Dispatch.borrow(playerFriend, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.UpdateStateMsg;
|
||||
@@ -41,7 +41,7 @@ public class UpdateStateMsgHandler extends AbstractClientMsgHandler {
|
||||
else
|
||||
player.setWalkMode(true);
|
||||
|
||||
DispatchMessage.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ package engine.net.client.handlers;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.Building;
|
||||
@@ -142,7 +142,7 @@ public class UpgradeAssetMsgHandler extends AbstractClientMsgHandler {
|
||||
outMsg.setUnknown54(1);
|
||||
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
} catch (Exception e) {
|
||||
PlaceAssetMsg.sendPlaceAssetError(player.getClientConnection(), 1, "A Serious error has occurred. Please post details for to ensure transaction integrity");
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.UseCharterMsg;
|
||||
@@ -29,7 +29,7 @@ public class UseCharterMsgHandler extends AbstractClientMsgHandler {
|
||||
msg.setUnknown02(1);
|
||||
msg.configure();
|
||||
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -51,7 +51,7 @@ public class VendorBuyWindowMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -9,15 +9,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.GuildManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -42,35 +38,35 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
case 0: // Close Dialog
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 180: // Promote to class
|
||||
promote(playerCharacter, npc);
|
||||
msg.updateMessage(4, 0); // <-0 closes dialog
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 1000: // TrainSkill skills and powers
|
||||
msg.updateMessage(4, 2); // <-2 sends trainer screen
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 1001: // Open Bank
|
||||
getBank(playerCharacter, npc, origin);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 1002: // Open Vault
|
||||
getVault(playerCharacter, npc, origin);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 1003: //Refine
|
||||
msg.updateMessage(4, 3); // <-3 sends refine screen
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
// Mainland Teleports
|
||||
@@ -80,7 +76,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 10, 75, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100012: // teleport me to SDR
|
||||
city = City.getCity(24);
|
||||
@@ -88,7 +84,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 10, 75, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100013: // teleport me to Erkeng Hold
|
||||
city = City.getCity(26);
|
||||
@@ -96,7 +92,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 10, 75, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100014: // teleport me to Khan
|
||||
city = City.getCity(36);
|
||||
@@ -104,7 +100,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 1, 75, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
case 100015: // teleport me to Maelstrom
|
||||
@@ -112,28 +108,28 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, loc, 10, 75, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100016: // teleport me to Oblivion
|
||||
loc = new Vector3fImmutable(108921f, 167f, -51590f);
|
||||
handleTeleport(playerCharacter, loc, 10, 75, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100017: // teleport me to Vander's Doom
|
||||
loc = new Vector3fImmutable(42033f, 46f, -54471f);
|
||||
handleTeleport(playerCharacter, loc, 10, 75, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100018: // teleport me to The Sinking Isle
|
||||
loc = new Vector3fImmutable(67177f, 36f, -31940f);
|
||||
handleTeleport(playerCharacter, loc, 10, 75, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
// MainLand Repledges
|
||||
@@ -143,7 +139,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleRepledge(playerCharacter, city, 10, 55, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100031: // repledge me to Sea Dog's Rest
|
||||
city = City.getCity(24);
|
||||
@@ -151,7 +147,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleRepledge(playerCharacter, city, 10, 75, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100032: // repledge me to Erkeng Hold
|
||||
city = City.getCity(26);
|
||||
@@ -159,7 +155,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleRepledge(playerCharacter, city, 10, 55, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100033: // repledge me to Khan\'Of Srekel
|
||||
city = City.getCity(36);
|
||||
@@ -167,7 +163,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleRepledge(playerCharacter, city, 1, 75, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100035: // repledge me to Starkholm
|
||||
city = City.getCity(27);
|
||||
@@ -175,7 +171,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleRepledge(playerCharacter, city, 1, 20, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
// Noob Isle Teleports
|
||||
@@ -185,7 +181,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 1, 20, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100041: // teleport me to All-Father's Rest
|
||||
city = City.getCity(28);
|
||||
@@ -193,7 +189,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 1, 20, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100042: // teleport me to Hengest
|
||||
city = City.getCity(33);
|
||||
@@ -201,7 +197,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 1, 20, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100043: // teleport me to Hrimdal
|
||||
city = City.getCity(30);
|
||||
@@ -209,14 +205,14 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 1, 20, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100044: // teleport me to Hothor's Doom
|
||||
city = City.getCity(29);
|
||||
if (city != null)
|
||||
handleTeleport(playerCharacter, city.getLoc(), 1, 20, true);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100045: // teleport me to Scraefahl
|
||||
city = City.getCity(32);
|
||||
@@ -224,7 +220,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 1, 20, false);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
case 100046: // teleport me to Valkirch
|
||||
city = City.getCity(31);
|
||||
@@ -232,7 +228,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
handleTeleport(playerCharacter, city.getLoc(), 1, 20, true);
|
||||
msg.updateMessage(4, 0);
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
|
||||
|
||||
@@ -244,7 +240,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
private static boolean finishMessage(VendorDialogMsg msg, ClientConnection origin) throws MsgSendException {
|
||||
msg.updateMessage(4, 0);
|
||||
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -415,7 +411,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
// send the rune application to the clients
|
||||
ApplyRuneMsg arm = new ApplyRuneMsg(pc.getObjectType().ordinal(), pc.getObjectUUID(), promo.getObjectUUID(), promo.getObjectType().ordinal(), promo
|
||||
.getObjectUUID(), true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, arm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(pc, arm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
|
||||
}
|
||||
@@ -462,11 +458,11 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
|
||||
OpenVaultMsg openVaultMsg = new OpenVaultMsg(playerCharacter, target);
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, openVaultMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
ShowVaultInventoryMsg showVaultInventoryMsg = new ShowVaultInventoryMsg(playerCharacter, ac, target); // 37??
|
||||
dispatch = Dispatch.borrow(playerCharacter, showVaultInventoryMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
// All recordings have "open - show - open."
|
||||
// Seems to work fine with just "show - open" as well.
|
||||
@@ -513,15 +509,15 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
CostOpenBankMsg costOpenBankMsg = new CostOpenBankMsg(playerCharacter, 0L, 0L);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, costOpenBankMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
ReqBankInventoryMsg reqBankInventoryMsg = new ReqBankInventoryMsg(playerCharacter, 0L);
|
||||
dispatch = Dispatch.borrow(playerCharacter, reqBankInventoryMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
ShowBankInventoryMsg showBankInventoryMsg = new ShowBankInventoryMsg(playerCharacter, 0L);
|
||||
dispatch = Dispatch.borrow(playerCharacter, showBankInventoryMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
|
||||
@@ -594,7 +590,7 @@ public class VendorDialogMsgHandler extends AbstractClientMsgHandler {
|
||||
}
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -172,7 +172,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler {
|
||||
ugm.configure();
|
||||
|
||||
dispatch = Dispatch.borrow(player, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
//send the sell message back to update player
|
||||
vendorSellMsg.setItemType(sell.getObjectType().ordinal());
|
||||
@@ -180,7 +180,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler {
|
||||
vendorSellMsg.setUnknown01(cost); //not sure if this is correct
|
||||
|
||||
dispatch = Dispatch.borrow(player, vendorSellMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
} finally {
|
||||
origin.sellLock.unlock();
|
||||
@@ -192,7 +192,7 @@ public class VendorSellMsgHandler extends AbstractClientMsgHandler {
|
||||
// Send ping to client
|
||||
|
||||
dispatch = Dispatch.borrow(pc, vendorSellMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
package engine.net.client.handlers;
|
||||
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.ClientNetMsg;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
@@ -72,7 +72,7 @@ public class VendorSellWindowMsgHandler extends AbstractClientMsgHandler {
|
||||
msg.setUnknownArray(contract.getBuyUnknownToken());
|
||||
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user