DispatchManager is now an official manager singleton.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
package engine.InterestManagement;
|
||||
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.GroupManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.job.JobScheduler;
|
||||
@@ -17,7 +18,6 @@ import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.net.AbstractNetMsg;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.LoadCharacterMsg;
|
||||
import engine.net.client.msg.LoadStructureMsg;
|
||||
@@ -88,7 +88,7 @@ public enum InterestManager implements Runnable {
|
||||
if (send) {
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -270,7 +270,7 @@ public enum InterestManager implements Runnable {
|
||||
}
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, uom);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
loadedStaticObjects.removeAll(toRemove);
|
||||
@@ -292,7 +292,7 @@ public enum InterestManager implements Runnable {
|
||||
lcm = new LoadCharacterMsg(corpse, PlayerCharacter.hideNonAscii());
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, lcm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
} else if (awo.getObjectType().equals(GameObjectType.NPC)) {
|
||||
NPC npc = (NPC) awo;
|
||||
@@ -304,13 +304,13 @@ public enum InterestManager implements Runnable {
|
||||
|
||||
if (lsm.getStructureList().size() > 0) {
|
||||
Dispatch dispatch = Dispatch.borrow(player, lsm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
for (LoadCharacterMsg lc : lcmList) {
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(player, lc);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
loadedStaticObjects.addAll(toLoad);
|
||||
@@ -414,7 +414,7 @@ public enum InterestManager implements Runnable {
|
||||
|
||||
if (!uom.getObjectList().isEmpty()) {
|
||||
Dispatch dispatch = Dispatch.borrow(player, uom);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ public enum InterestManager implements Runnable {
|
||||
|
||||
if (lcm != null) {
|
||||
Dispatch dispatch = Dispatch.borrow(player, lcm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
|
||||
package engine.InterestManagement;
|
||||
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.msg.TerritoryChangeMessage;
|
||||
import engine.objects.City;
|
||||
import engine.objects.PlayerCharacter;
|
||||
@@ -91,17 +91,17 @@ public enum RealmMap {
|
||||
if (city != null) {
|
||||
TerritoryChangeMessage tcm = new TerritoryChangeMessage((PlayerCharacter) realm.getRulingCity().getOwner(), realm);
|
||||
Dispatch dispatch = Dispatch.borrow(player, tcm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
} else {
|
||||
TerritoryChangeMessage tcm = new TerritoryChangeMessage(null, realm);
|
||||
Dispatch dispatch = Dispatch.borrow(player, tcm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
} else {
|
||||
TerritoryChangeMessage tcm = new TerritoryChangeMessage(null, realm);
|
||||
Dispatch dispatch = Dispatch.borrow(player, tcm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
package engine.InterestManagement;
|
||||
|
||||
import engine.mbEnums.GridObjectType;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.math.FastMath;
|
||||
import engine.math.Vector3f;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.mbEnums.GridObjectType;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.LoadCharacterMsg;
|
||||
import engine.net.client.msg.LoadStructureMsg;
|
||||
@@ -201,7 +201,7 @@ public class WorldGrid {
|
||||
|
||||
UnloadObjectsMsg uom = new UnloadObjectsMsg();
|
||||
uom.addObject(awo);
|
||||
DispatchMessage.sendToAllInRange(awo, uom);
|
||||
DispatchManager.sendToAllInRange(awo, uom);
|
||||
}
|
||||
|
||||
public static void loadObject(AbstractWorldObject awo) {
|
||||
@@ -213,15 +213,15 @@ public class WorldGrid {
|
||||
case Building:
|
||||
lsm = new LoadStructureMsg();
|
||||
lsm.addObject((Building) awo);
|
||||
DispatchMessage.sendToAllInRange(awo, lsm);
|
||||
DispatchManager.sendToAllInRange(awo, lsm);
|
||||
break;
|
||||
case NPC:
|
||||
lcm = new LoadCharacterMsg((NPC) awo, false);
|
||||
DispatchMessage.sendToAllInRange(awo, lcm);
|
||||
DispatchManager.sendToAllInRange(awo, lcm);
|
||||
break;
|
||||
case Mob:
|
||||
lcm = new LoadCharacterMsg((Mob) awo, false);
|
||||
DispatchMessage.sendToAllInRange(awo, lcm);
|
||||
DispatchManager.sendToAllInRange(awo, lcm);
|
||||
break;
|
||||
default:
|
||||
// *** Refactor: Log error?
|
||||
@@ -239,19 +239,19 @@ public class WorldGrid {
|
||||
case Building:
|
||||
lsm = new LoadStructureMsg();
|
||||
lsm.addObject((Building) awo);
|
||||
DispatchMessage.sendToAllInRange(awo, lsm);
|
||||
DispatchManager.sendToAllInRange(awo, lsm);
|
||||
break;
|
||||
case NPC:
|
||||
lcm = new LoadCharacterMsg((NPC) awo, false);
|
||||
DispatchMessage.sendToAllInRange(awo, lcm);
|
||||
DispatchManager.sendToAllInRange(awo, lcm);
|
||||
break;
|
||||
case Mob:
|
||||
lcm = new LoadCharacterMsg((Mob) awo, false);
|
||||
DispatchMessage.sendToAllInRange(awo, lcm);
|
||||
DispatchManager.sendToAllInRange(awo, lcm);
|
||||
break;
|
||||
case PlayerCharacter:
|
||||
lcm = new LoadCharacterMsg((PlayerCharacter) awo, false);
|
||||
DispatchMessage.sendToAllInRange(awo, lcm);
|
||||
DispatchManager.sendToAllInRange(awo, lcm);
|
||||
break;
|
||||
default:
|
||||
// *** Refactor: Log error?
|
||||
@@ -263,7 +263,7 @@ public class WorldGrid {
|
||||
ClientConnection origin) {
|
||||
UnloadObjectsMsg uom = new UnloadObjectsMsg();
|
||||
uom.addObject(awo);
|
||||
DispatchMessage.sendToAllInRange(awo, uom);
|
||||
DispatchManager.sendToAllInRange(awo, uom);
|
||||
}
|
||||
|
||||
public static void addObject(AbstractWorldObject awo, PlayerCharacter pc) {
|
||||
|
||||
@@ -11,7 +11,7 @@ package engine.devcmd.cmds;
|
||||
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.devcmd.AbstractDevCmd;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.msg.TargetedActionMsg;
|
||||
import engine.objects.AbstractGameObject;
|
||||
import engine.objects.PlayerCharacter;
|
||||
@@ -41,7 +41,7 @@ public class SetHealthCmd extends AbstractDevCmd {
|
||||
|
||||
// Update all surrounding clients.
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(pc);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, cmm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(pc, cmm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, "Supplied data: " + words[0]
|
||||
|
||||
@@ -2,7 +2,7 @@ package engine.devcmd.cmds;
|
||||
|
||||
import engine.devcmd.AbstractDevCmd;
|
||||
import engine.mbEnums;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.msg.TargetedActionMsg;
|
||||
import engine.objects.AbstractGameObject;
|
||||
import engine.objects.PlayerCharacter;
|
||||
@@ -32,7 +32,7 @@ public class SetManaCmd extends AbstractDevCmd {
|
||||
|
||||
//Update all surrounding clients. - NOT for Mana?
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(pc);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, cmm, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(pc, cmm, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, "Supplied data: " + words[0]
|
||||
|
||||
@@ -4,7 +4,7 @@ import engine.mbEnums.DispatchChannel;
|
||||
import engine.InterestManagement.InterestManager;
|
||||
import engine.devcmd.AbstractDevCmd;
|
||||
import engine.gameManager.ChatManager;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.msg.ApplyRuneMsg;
|
||||
import engine.objects.AbstractGameObject;
|
||||
import engine.objects.PlayerCharacter;
|
||||
@@ -54,7 +54,7 @@ public class SetPromotionClassCmd extends AbstractDevCmd {
|
||||
PromotionClass promo = pc.getPromotionClass();
|
||||
if (promo != null) {
|
||||
ApplyRuneMsg arm = new ApplyRuneMsg(pc.getObjectType().ordinal(), pc.getObjectUUID(), promo.getObjectUUID(), promo.getObjectType().ordinal(), promo.getObjectUUID(), true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, arm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(pc, arm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ package engine.devcmd.cmds;
|
||||
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.devcmd.AbstractDevCmd;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.msg.TargetedActionMsg;
|
||||
import engine.objects.AbstractGameObject;
|
||||
import engine.objects.PlayerCharacter;
|
||||
@@ -42,7 +42,7 @@ public class SetStaminaCmd extends AbstractDevCmd {
|
||||
|
||||
// Update all surrounding clients.
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(pc);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(pc, cmm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
} catch (NumberFormatException e) {
|
||||
this.throwbackError(pc, "Supplied data: " + words[0]
|
||||
|
||||
@@ -12,7 +12,7 @@ package engine.devcmd.cmds;
|
||||
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.devcmd.AbstractDevCmd;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.net.client.msg.ApplyBuildingEffectMsg;
|
||||
import engine.net.client.msg.UpdateCharOrMobMessage;
|
||||
import engine.objects.*;
|
||||
@@ -39,13 +39,13 @@ public class SetSubRaceCmd extends AbstractDevCmd {
|
||||
if (raceID == 0)
|
||||
raceID = player.getRaceID();
|
||||
UpdateCharOrMobMessage ucm = new UpdateCharOrMobMessage(player, 1, raceID);
|
||||
DispatchMessage.sendToAllInRange(player, ucm);
|
||||
DispatchManager.sendToAllInRange(player, ucm);
|
||||
return;
|
||||
}
|
||||
if (words[0].equals("all")) {
|
||||
for (int i = 15999; i < 16337; i++) {
|
||||
ApplyBuildingEffectMsg applyBuildingEffectMsg = new ApplyBuildingEffectMsg(4, 0, target.getObjectType().ordinal(), target.getObjectUUID(), i);
|
||||
DispatchMessage.sendToAllInRange((AbstractWorldObject) target, applyBuildingEffectMsg);
|
||||
DispatchManager.sendToAllInRange((AbstractWorldObject) target, applyBuildingEffectMsg);
|
||||
try {
|
||||
Thread.sleep(500);
|
||||
} catch (InterruptedException e) {
|
||||
@@ -56,7 +56,7 @@ public class SetSubRaceCmd extends AbstractDevCmd {
|
||||
|
||||
} else {
|
||||
ApplyBuildingEffectMsg applyBuildingEffectMsg = new ApplyBuildingEffectMsg(4, 0, target.getObjectType().ordinal(), target.getObjectUUID(), Integer.parseInt(words[0]));
|
||||
DispatchMessage.sendToAllInRange((AbstractWorldObject) target, applyBuildingEffectMsg);
|
||||
DispatchManager.sendToAllInRange((AbstractWorldObject) target, applyBuildingEffectMsg);
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
@@ -17,7 +17,6 @@ import engine.mbEnums.GameObjectType;
|
||||
import engine.mbEnums.ModType;
|
||||
import engine.mbEnums.SourceType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.MessageDispatcher;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.handlers.ClientAdminCommandMsgHandler;
|
||||
@@ -87,7 +86,7 @@ public enum ChatManager {
|
||||
for (AbstractWorldObject abstractWorldObject : distroList) {
|
||||
PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject;
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +160,7 @@ public enum ChatManager {
|
||||
|
||||
// Make the Message
|
||||
ChatSayMsg chatSayMsg = new ChatSayMsg(player, text);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pcSender, chatSayMsg, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.SAY_RANGE, true, true);
|
||||
DispatchManager.dispatchMsgToInterestArea(pcSender, chatSayMsg, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.SAY_RANGE, true, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -171,7 +170,7 @@ public enum ChatManager {
|
||||
msg.setMessageType(4);
|
||||
msg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID());
|
||||
Dispatch dispatch = Dispatch.borrow(targetPlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -195,7 +194,7 @@ public enum ChatManager {
|
||||
|
||||
// Make the Message
|
||||
ChatShoutMsg msg = new ChatShoutMsg(sender, text);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pcSender, msg, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.SHOUT_RANGE, true, true);
|
||||
DispatchManager.dispatchMsgToInterestArea(pcSender, msg, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.SHOUT_RANGE, true, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -217,7 +216,7 @@ public enum ChatManager {
|
||||
|
||||
// Make the Message
|
||||
ChatGlobalMsg msg = new ChatGlobalMsg(sender, text);
|
||||
DispatchMessage.dispatchMsgToAll(sender, msg, true);
|
||||
DispatchManager.dispatchMsgToAll(sender, msg, true);
|
||||
|
||||
}
|
||||
|
||||
@@ -284,13 +283,13 @@ public enum ChatManager {
|
||||
// Send dispatch to each player
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(pcRecip, chatTellMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
// Also send /tell to sender
|
||||
if (pcSender != null) {
|
||||
Dispatch dispatch = Dispatch.borrow(pcSender, chatTellMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
} else
|
||||
@@ -349,7 +348,7 @@ public enum ChatManager {
|
||||
for (AbstractWorldObject abstractWorldObject : distroList) {
|
||||
PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject;
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, chatGuildMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -404,7 +403,7 @@ public enum ChatManager {
|
||||
for (AbstractWorldObject abstractWorldObject : distroList) {
|
||||
PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject;
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, chatICMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -463,7 +462,7 @@ public enum ChatManager {
|
||||
for (AbstractWorldObject abstractWorldObject : distroList) {
|
||||
PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject;
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, chatGroupMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -497,7 +496,7 @@ public enum ChatManager {
|
||||
for (AbstractWorldObject abstractWorldObject : distroList) {
|
||||
PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject;
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -733,7 +732,7 @@ public enum ChatManager {
|
||||
public static void chatPVP(String text) {
|
||||
// Create message
|
||||
ChatPvPMsg msg = new ChatPvPMsg(null, text);
|
||||
DispatchMessage.dispatchMsgToAll(msg);
|
||||
DispatchManager.dispatchMsgToAll(msg);
|
||||
}
|
||||
|
||||
public static ChatSystemMsg CombatInfo(AbstractWorldObject source, AbstractWorldObject target) {
|
||||
@@ -844,7 +843,7 @@ public enum ChatManager {
|
||||
for (AbstractWorldObject abstractWorldObject : distroList) {
|
||||
PlayerCharacter playerCharacter = (PlayerCharacter) abstractWorldObject;
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, chatSystemMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -993,7 +992,7 @@ public enum ChatManager {
|
||||
chatSystemMsg.setChannel(channel);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, chatSystemMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,6 @@ import engine.job.JobScheduler;
|
||||
import engine.jobs.AttackJob;
|
||||
import engine.jobs.DeferredPowerJob;
|
||||
import engine.mbEnums;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.TargetedActionMsg;
|
||||
import engine.net.client.msg.UpdateStateMsg;
|
||||
@@ -272,9 +271,9 @@ public enum CombatManager {
|
||||
TargetedActionMsg msg = new TargetedActionMsg(attacker, target, 0f, passiveAnim);
|
||||
|
||||
if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter)
|
||||
DispatchMessage.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
else
|
||||
DispatchMessage.sendToAllInRange(attacker, msg);
|
||||
DispatchManager.sendToAllInRange(attacker, msg);
|
||||
|
||||
//set auto attack job
|
||||
setAutoAttackJob(attacker, slot, delay);
|
||||
@@ -309,9 +308,9 @@ public enum CombatManager {
|
||||
TargetedActionMsg msg = new TargetedActionMsg(attacker, passiveAnim, target, passiveType.value);
|
||||
|
||||
if (target.getObjectType() == mbEnums.GameObjectType.PlayerCharacter)
|
||||
DispatchMessage.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(target, msg, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
else
|
||||
DispatchMessage.sendToAllInRange(attacker, msg);
|
||||
DispatchManager.sendToAllInRange(attacker, msg);
|
||||
|
||||
//set auto attack job
|
||||
setAutoAttackJob(attacker, slot, delay);
|
||||
@@ -382,7 +381,7 @@ public enum CombatManager {
|
||||
//apply Damage back
|
||||
attacker.modifyHealth(-total, absTarget, true);
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, attacker, total, 0);
|
||||
DispatchMessage.sendToAllInRange(target, cmm);
|
||||
DispatchManager.sendToAllInRange(target, cmm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,7 +419,7 @@ public enum CombatManager {
|
||||
}
|
||||
}
|
||||
TargetedActionMsg cmm = new TargetedActionMsg(attacker, target, (float) damage, attackAnim);
|
||||
DispatchMessage.sendToAllInRange(target, cmm);
|
||||
DispatchManager.sendToAllInRange(target, cmm);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -457,7 +456,7 @@ public enum CombatManager {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public static void toggleSit(boolean toggle, ClientConnection origin) {
|
||||
@@ -470,7 +469,7 @@ public enum CombatManager {
|
||||
playerCharacter.setSit(toggle);
|
||||
UpdateStateMsg rwss = new UpdateStateMsg();
|
||||
rwss.setPlayer(playerCharacter);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, rwss, mbEnums.DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,13 +7,15 @@
|
||||
// www.magicbane.com
|
||||
|
||||
|
||||
package engine.net;
|
||||
package engine.gameManager;
|
||||
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.InterestManagement.WorldGrid;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.net.AbstractNetMsg;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.MessageDispatcher;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.objects.Item;
|
||||
@@ -31,7 +33,9 @@ import static engine.net.MessageDispatcher.maxRecipients;
|
||||
* async message delivery system.
|
||||
*/
|
||||
|
||||
public class DispatchMessage {
|
||||
public enum DispatchManager {
|
||||
|
||||
DISPATCH_MANAGER;
|
||||
|
||||
public static void startMessagePump() {
|
||||
|
||||
@@ -83,7 +87,7 @@ public class DispatchMessage {
|
||||
sourcePlayer = (PlayerCharacter) sourceObject;
|
||||
if (sourcePlayer.getClientConnection() != null && sendToSelf) {
|
||||
Dispatch dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
|
||||
@@ -151,7 +155,7 @@ public class DispatchMessage {
|
||||
|
||||
if (sourcePlayer.getClientConnection() != null && sendToSelf) {
|
||||
Dispatch dispatch = Dispatch.borrow(sourcePlayer, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
|
||||
@@ -280,7 +284,7 @@ public class DispatchMessage {
|
||||
|
||||
}
|
||||
|
||||
protected static void serializeDispatch(Dispatch messageDispatch) {
|
||||
public static void serializeDispatch(Dispatch messageDispatch) {
|
||||
ClientConnection connection;
|
||||
|
||||
if (messageDispatch.player == null) {
|
||||
@@ -12,7 +12,6 @@ import engine.loot.ModTableEntry;
|
||||
import engine.loot.ModTypeTableEntry;
|
||||
import engine.loot.WorkOrder;
|
||||
import engine.mbEnums;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.msg.ItemProductionMsg;
|
||||
import engine.objects.City;
|
||||
import engine.objects.Item;
|
||||
@@ -81,7 +80,7 @@ public enum ForgeManager implements Runnable {
|
||||
for (Item workOrderItem : workOrder.cooking) {
|
||||
workOrderItem.flags.add(mbEnums.ItemFlags.Identified);
|
||||
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, workOrderItem, mbEnums.ProductionActionType.CONFIRM_PRODUCE, true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
}
|
||||
|
||||
// Set this workOrder to completed and update on disk
|
||||
@@ -322,9 +321,9 @@ public enum ForgeManager implements Runnable {
|
||||
workOrder.vendor.charItemManager.addItemToInventory(completedItem);
|
||||
|
||||
ItemProductionMsg outMsg1 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completedItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg1, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(workOrder.vendor, outMsg1, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
ItemProductionMsg outMsg2 = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, completedItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(workOrder.vendor, outMsg2, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
|
||||
toRemove.add(virutalItem);
|
||||
}
|
||||
@@ -334,7 +333,7 @@ public enum ForgeManager implements Runnable {
|
||||
// Remove virtual items from the forge window
|
||||
|
||||
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 virtual item from all collections
|
||||
|
||||
@@ -357,7 +356,7 @@ public enum ForgeManager implements Runnable {
|
||||
// Update NPC window
|
||||
|
||||
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, forged_item, mbEnums.ProductionActionType.CONFIRM_PRODUCE, true);
|
||||
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
|
||||
workOrder.total_produced = workOrder.total_produced + 1;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,10 +8,9 @@
|
||||
|
||||
package engine.gameManager;
|
||||
|
||||
import engine.mbEnums;
|
||||
import engine.exception.MsgSendException;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.UpdateGoldMsg;
|
||||
import engine.net.client.msg.group.GroupUpdateMsg;
|
||||
@@ -80,7 +79,7 @@ public enum GroupManager {
|
||||
groupUpdateMsg.setMessageType(3);
|
||||
groupUpdateMsg.setPlayer(groupMember);
|
||||
Dispatch dispatch = Dispatch.borrow(source, groupUpdateMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
|
||||
@@ -160,7 +159,7 @@ public enum GroupManager {
|
||||
gum.setPlayerUUID(groupMember.getObjectUUID());
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(groupMember, gum);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -189,7 +188,7 @@ public enum GroupManager {
|
||||
gum.setMessageType(1);
|
||||
gum.setPlayer(groupMember);
|
||||
Dispatch dispatch = Dispatch.borrow(groupMember, gum);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -217,7 +216,7 @@ public enum GroupManager {
|
||||
gum.setPlayer(playerToRefresh);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(source, gum);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
public static void RefreshOthersGroupList(PlayerCharacter source) {
|
||||
@@ -372,12 +371,12 @@ public enum GroupManager {
|
||||
ugm.configure();
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(splitPlayer, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
|
||||
UpdateGoldMsg updateTargetGold = new UpdateGoldMsg(tar);
|
||||
updateTargetGold.configure();
|
||||
DispatchMessage.dispatchMsgToInterestArea(tar, updateTargetGold, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(tar, updateTargetGold, mbEnums.DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
// //TODO send group split message
|
||||
String text = "Group Split: " + amount;
|
||||
|
||||
@@ -12,7 +12,6 @@ import engine.mbEnums;
|
||||
import engine.mbEnums.BuildingGroup;
|
||||
import engine.mbEnums.GuildHistoryType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.guild.AcceptInviteToGuildMsg;
|
||||
import engine.net.client.msg.guild.GuildInfoMsg;
|
||||
@@ -89,14 +88,14 @@ public enum GuildManager {
|
||||
|
||||
if (fromTeleportScreen) {
|
||||
dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
if (DbManager.GuildQueries.ADD_TO_GUILDHISTORY(guild.getObjectUUID(), playerCharacter, DateTime.now(), historyType)) {
|
||||
GuildHistory guildHistory = new GuildHistory(guild.getObjectUUID(), guild.getName(), DateTime.now(), historyType);
|
||||
playerCharacter.getGuildHistory().add(guildHistory);
|
||||
}
|
||||
|
||||
DispatchMessage.sendToAllInRange(playerCharacter, new GuildInfoMsg(playerCharacter, guild, 2));
|
||||
DispatchManager.sendToAllInRange(playerCharacter, new GuildInfoMsg(playerCharacter, guild, 2));
|
||||
|
||||
// Send guild join message
|
||||
|
||||
@@ -190,7 +189,7 @@ public enum GuildManager {
|
||||
|
||||
for (PlayerCharacter player : SessionManager.getAllActivePlayerCharacters())
|
||||
if (player.getGuild().equals(guild))
|
||||
DispatchMessage.sendToAllInRange(player, new GuildInfoMsg(player, guild, 2));
|
||||
DispatchManager.sendToAllInRange(player, new GuildInfoMsg(player, guild, 2));
|
||||
}
|
||||
|
||||
public static Boolean meetsLoreRequirements(Guild guild, PlayerCharacter player) {
|
||||
|
||||
@@ -10,7 +10,6 @@ package engine.gameManager;
|
||||
|
||||
import engine.loot.*;
|
||||
import engine.mbEnums;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.msg.ErrorPopupMsg;
|
||||
import engine.net.client.msg.chat.ChatSystemMsg;
|
||||
import engine.objects.*;
|
||||
@@ -96,7 +95,7 @@ public enum LootManager {
|
||||
ChatSystemMsg chatMsg = new ChatSystemMsg(null, mob.getName() + " in " + mob.getParentZone().zoneName + " has found the " + item.template.item_base_name + ". Are you tough enough to take it?");
|
||||
chatMsg.setMessageType(10);
|
||||
chatMsg.setChannel(mbEnums.ChatChannelType.SYSTEM.getChannelID());
|
||||
DispatchMessage.dispatchMsgToAll(chatMsg);
|
||||
DispatchManager.dispatchMsgToAll(chatMsg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
import engine.mbEnums.ModType;
|
||||
import engine.mbEnums.SourceType;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.MoveToPointMsg;
|
||||
import engine.net.client.msg.TeleportToPointMsg;
|
||||
@@ -50,9 +49,9 @@ public enum MovementManager {
|
||||
UpdateStateMsg rssm = new UpdateStateMsg();
|
||||
rssm.setPlayer(ac);
|
||||
if (ac.getObjectType() == GameObjectType.PlayerCharacter)
|
||||
DispatchMessage.dispatchMsgToInterestArea(ac, rssm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(ac, rssm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
else
|
||||
DispatchMessage.sendToAllInRange(ac, rssm);
|
||||
DispatchManager.sendToAllInRange(ac, rssm);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -241,7 +240,7 @@ public enum MovementManager {
|
||||
// If it's not a player moving just send the message
|
||||
|
||||
if ((toMove.getObjectType() == GameObjectType.PlayerCharacter) == false) {
|
||||
DispatchMessage.sendToAllInRange(toMove, msg);
|
||||
DispatchManager.sendToAllInRange(toMove, msg);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -253,9 +252,9 @@ public enum MovementManager {
|
||||
player.setTimeStamp("lastMoveGate", System.currentTimeMillis());
|
||||
|
||||
if (collide)
|
||||
DispatchMessage.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
else
|
||||
DispatchMessage.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(player, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
|
||||
|
||||
// Handle formation movement if needed
|
||||
@@ -443,7 +442,7 @@ public enum MovementManager {
|
||||
groupMsg.setStartCoord(member.getLoc());
|
||||
groupMsg.setEndCoord(destination);
|
||||
groupMsg.clearTarget();
|
||||
DispatchMessage.sendToAllInRange(member, groupMsg);
|
||||
DispatchManager.sendToAllInRange(member, groupMsg);
|
||||
|
||||
// update group member
|
||||
member.setFaceDir(destination.subtract2D(member.getLoc()).normalize());
|
||||
@@ -463,7 +462,7 @@ public enum MovementManager {
|
||||
InterestManager.INTERESTMANAGER.HandleLoadForTeleport((PlayerCharacter) teleporter);
|
||||
|
||||
TeleportToPointMsg msg = new TeleportToPointMsg(teleporter, teleporter.loc.getX(), teleporter.loc.getY(), teleporter.loc.getZ(), 0, -1, -1);
|
||||
DispatchMessage.dispatchMsgToInterestArea(oldLoc, teleporter, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(oldLoc, teleporter, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@ import engine.math.Vector3f;
|
||||
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.ErrorPopupMsg;
|
||||
import engine.net.client.msg.PetMsg;
|
||||
@@ -69,7 +68,7 @@ public enum NPCManager {
|
||||
|
||||
PetMsg petMsg = new PetMsg(5, null);
|
||||
Dispatch dispatch = Dispatch.borrow(petOwner, petMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,6 @@ import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums.*;
|
||||
import engine.net.ByteBufferWriter;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.msg.*;
|
||||
import engine.objects.*;
|
||||
@@ -191,7 +190,7 @@ public enum PowersManager {
|
||||
|
||||
RecyclePowerMsg recyclePowerMsg = new RecyclePowerMsg(msg.getPowerUsedID());
|
||||
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), recyclePowerMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
// Send Fail to cast message
|
||||
PlayerCharacter pc = SessionManager
|
||||
@@ -244,7 +243,7 @@ public enum PowersManager {
|
||||
|
||||
RecyclePowerMsg recyclePowerMsg = new RecyclePowerMsg(msg.getPowerUsedID());
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, recyclePowerMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -488,7 +487,7 @@ public enum PowersManager {
|
||||
0f, 0f, 0, null,
|
||||
9999, 0);
|
||||
mhm.setOmitFromChat(1);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, mhm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, mhm, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
}
|
||||
else if (pb.useMana())
|
||||
if (playerCharacter.getMana() < cost)
|
||||
@@ -519,7 +518,7 @@ public enum PowersManager {
|
||||
// else send recycle message to unlock power
|
||||
RecyclePowerMsg recyclePowerMsg = new RecyclePowerMsg(msg.getPowerUsedID());
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, recyclePowerMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
|
||||
//what the fuck?
|
||||
@@ -529,7 +528,7 @@ public enum PowersManager {
|
||||
// else
|
||||
// msg.setUnknown04(1); // Regular Race, use mana?
|
||||
int tr = msg.getNumTrains();
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, sendCastToSelf, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, sendCastToSelf, false);
|
||||
|
||||
//Make new msg..
|
||||
PerformActionMsg copyMsg = new PerformActionMsg(msg);
|
||||
@@ -540,7 +539,7 @@ public enum PowersManager {
|
||||
playerCharacter.update();
|
||||
playerCharacter.setSit(false);
|
||||
UpdateStateMsg updateStateMsg = new UpdateStateMsg(playerCharacter);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, updateStateMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, updateStateMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
}
|
||||
|
||||
@@ -683,8 +682,8 @@ public enum PowersManager {
|
||||
|
||||
msg.setNumTrains(9999);
|
||||
|
||||
DispatchMessage.sendToAllInRange(caster, msg);
|
||||
DispatchMessage.sendToAllInRange(caster, msg);
|
||||
DispatchManager.sendToAllInRange(caster, msg);
|
||||
DispatchManager.sendToAllInRange(caster, msg);
|
||||
|
||||
msg.setNumTrains(tr);
|
||||
|
||||
@@ -751,7 +750,7 @@ public enum PowersManager {
|
||||
performActionMsg.setUnknown04(2);
|
||||
|
||||
dispatch = Dispatch.borrow(playerCharacter, performActionMsg);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, performActionMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, performActionMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -992,7 +991,7 @@ public enum PowersManager {
|
||||
PerformActionMsg castMsg = new PerformActionMsg(msg);
|
||||
castMsg.setNumTrains(9999);
|
||||
castMsg.setUnknown04(2);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, castMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, castMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
msgCasted = true;
|
||||
}
|
||||
}
|
||||
@@ -1002,7 +1001,7 @@ public enum PowersManager {
|
||||
PerformActionMsg castMsg = new PerformActionMsg(msg);
|
||||
castMsg.setNumTrains(9999);
|
||||
castMsg.setUnknown04(2);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, castMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, castMsg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
msgCasted = true;
|
||||
}
|
||||
|
||||
@@ -1063,7 +1062,7 @@ public enum PowersManager {
|
||||
|
||||
msg.setNumTrains(9999);
|
||||
msg.setUnknown04(2);
|
||||
DispatchMessage.sendToAllInRange(caster, msg);
|
||||
DispatchManager.sendToAllInRange(caster, msg);
|
||||
|
||||
// get target loc
|
||||
Vector3fImmutable targetLoc = msg.getTargetLoc();
|
||||
@@ -1170,7 +1169,7 @@ public enum PowersManager {
|
||||
// TODO echo power use to everyone else
|
||||
msg.setNumTrains(9999);
|
||||
msg.setUnknown04(2);
|
||||
DispatchMessage.sendToAllInRange(caster, msg);
|
||||
DispatchManager.sendToAllInRange(caster, msg);
|
||||
|
||||
}
|
||||
|
||||
@@ -1248,7 +1247,7 @@ public enum PowersManager {
|
||||
RecyclePowerMsg recyclePowerMsg = new RecyclePowerMsg(token);
|
||||
|
||||
Dispatch dispatch = Dispatch.borrow(origin.getPlayerCharacter(), recyclePowerMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
}
|
||||
|
||||
@@ -1374,7 +1373,7 @@ public enum PowersManager {
|
||||
PerformActionMsg msg = new PerformActionMsg(pb.getToken(),
|
||||
trains, ac.getObjectType().ordinal(), ac.getObjectUUID(), tarType, tarID, 0,
|
||||
0, 0, 1, 0);
|
||||
DispatchMessage.sendToAllInRange(target, msg);
|
||||
DispatchManager.sendToAllInRange(target, msg);
|
||||
|
||||
|
||||
ConcurrentHashMap<String, JobContainer> timers = ac.getTimers();
|
||||
@@ -1492,7 +1491,7 @@ public enum PowersManager {
|
||||
.getObjectType().ordinal(), ac.getObjectUUID(), target.getObjectType().ordinal(),
|
||||
target.getObjectUUID(), 0, 0, 0, 2, 0);
|
||||
|
||||
DispatchMessage.sendToAllInRange(ac, msg);
|
||||
DispatchManager.sendToAllInRange(ac, msg);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1943,7 +1942,7 @@ public enum PowersManager {
|
||||
|
||||
RecyclePowerMsg recyclePowerMsg = new RecyclePowerMsg(token);
|
||||
Dispatch dispatch = Dispatch.borrow(pc, recyclePowerMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
|
||||
}
|
||||
|
||||
@@ -2103,12 +2102,12 @@ public enum PowersManager {
|
||||
case 3:
|
||||
case 4:
|
||||
msg.setUnknown04(2);
|
||||
DispatchMessage.dispatchMsgToInterestArea(playerCharacter, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(playerCharacter, msg, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
break;
|
||||
default:
|
||||
msg.setUnknown04(1);
|
||||
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.PRIMARY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2126,7 +2125,7 @@ public enum PowersManager {
|
||||
|
||||
ApplyEffectMsg aem = new ApplyEffectMsg(pc, pc, 0, eb.getToken(), 9, pb.getToken(), pb.getName());
|
||||
aem.setUnknown03(type);
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, aem, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(pc, aem, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -2147,7 +2146,7 @@ public enum PowersManager {
|
||||
aem.setUnknown03(type);
|
||||
aem.setUnknown05(1);
|
||||
|
||||
DispatchMessage.dispatchMsgToInterestArea(pc, aem, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(pc, aem, DispatchChannel.PRIMARY, MBServerStatics.CHARACTER_LOAD_RANGE, true, false);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
@@ -2162,7 +2161,7 @@ public enum PowersManager {
|
||||
switch (type) {
|
||||
case 3:
|
||||
case 4:
|
||||
DispatchMessage.sendToAllInRange(mob, msg);
|
||||
DispatchManager.sendToAllInRange(mob, msg);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -2401,7 +2400,7 @@ public enum PowersManager {
|
||||
if (pam != null) {
|
||||
pam.setNumTrains(9999);
|
||||
pam.setUnknown04(2);
|
||||
DispatchMessage.sendToAllInRange(ac, pam);
|
||||
DispatchManager.sendToAllInRange(ac, pam);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2465,7 +2464,7 @@ public enum PowersManager {
|
||||
PerformActionMsg pam = new PerformActionMsg(pb.getToken(), 9999, ac
|
||||
.getObjectType().ordinal(), ac.getObjectUUID(), target.getObjectType().ordinal(),
|
||||
target.getObjectUUID(), 0, 0, 0, 2, 0);
|
||||
DispatchMessage.sendToAllInRange(ac, pam);
|
||||
DispatchManager.sendToAllInRange(ac, pam);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
package engine.jobs;
|
||||
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.job.AbstractScheduleJob;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.ChatChannelType;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.msg.chat.ChatSystemMsg;
|
||||
import engine.objects.City;
|
||||
import org.pmw.tinylog.Logger;
|
||||
@@ -66,7 +66,7 @@ public class ActivateBaneJob extends AbstractScheduleJob {
|
||||
msg.setMessageType(4); // Error message
|
||||
msg.setChannel(ChatChannelType.SYSTEM.getChannelID());
|
||||
|
||||
DispatchMessage.dispatchMsgToAll(msg);
|
||||
DispatchManager.dispatchMsgToAll(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
|
||||
package engine.jobs;
|
||||
|
||||
import engine.mbEnums.DoorState;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.job.AbstractScheduleJob;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.mbEnums.DoorState;
|
||||
import engine.net.client.msg.DoorTryOpenMsg;
|
||||
import engine.objects.Blueprint;
|
||||
import engine.objects.Building;
|
||||
@@ -40,7 +40,7 @@ public class DoorCloseJob extends AbstractScheduleJob {
|
||||
this.building.setDoorState(doorNumber, DoorState.CLOSED);
|
||||
|
||||
DoorTryOpenMsg msg = new DoorTryOpenMsg(door, this.building.getObjectUUID(), 0, (byte) 0);
|
||||
DispatchMessage.sendToAllInRange(building, msg);
|
||||
DispatchManager.sendToAllInRange(building, msg);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
|
||||
package engine.jobs;
|
||||
|
||||
import engine.mbEnums;
|
||||
import engine.gameManager.DispatchManager;
|
||||
import engine.gameManager.PowersManager;
|
||||
import engine.math.Vector3fImmutable;
|
||||
import engine.mbEnums;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.msg.TrackArrowMsg;
|
||||
import engine.objects.AbstractWorldObject;
|
||||
import engine.objects.PlayerCharacter;
|
||||
@@ -84,7 +84,7 @@ public class TrackJob extends AbstractEffectJob {
|
||||
|
||||
TrackArrowMsg tam = new TrackArrowMsg(rotation);
|
||||
Dispatch dispatch = Dispatch.borrow(pc, tam);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.PRIMARY);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ import engine.mbEnums.DispatchChannel;
|
||||
import engine.mobileAI.Threads.MobAIThread;
|
||||
import engine.mobileAI.Threads.ReSpawner;
|
||||
import engine.mobileAI.utilities.MovementUtilities;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.msg.PerformActionMsg;
|
||||
import engine.net.client.msg.PowerProjectileMsg;
|
||||
import engine.objects.*;
|
||||
@@ -161,7 +160,7 @@ public class MobAI {
|
||||
if (mob.isSiege()) {
|
||||
PowerProjectileMsg ppm = new PowerProjectileMsg(mob, target);
|
||||
ppm.setRange(50);
|
||||
DispatchMessage.dispatchMsgToInterestArea(mob, ppm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
DispatchManager.dispatchMsgToInterestArea(mob, ppm, DispatchChannel.SECONDARY, MBServerStatics.CHARACTER_LOAD_RANGE, false, false);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user