forked from MagicBane/Server
DispatchManager is now an official manager singleton.
This commit is contained in:
@@ -9,15 +9,11 @@
|
||||
|
||||
package engine.objects;
|
||||
|
||||
import engine.gameManager.ConfigManager;
|
||||
import engine.gameManager.DbManager;
|
||||
import engine.gameManager.NPCManager;
|
||||
import engine.gameManager.SessionManager;
|
||||
import engine.gameManager.*;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.DispatchChannel;
|
||||
import engine.mbEnums.ItemContainerType;
|
||||
import engine.net.Dispatch;
|
||||
import engine.net.DispatchMessage;
|
||||
import engine.net.client.ClientConnection;
|
||||
import engine.net.client.handlers.ItemFromVaultMsgHandler;
|
||||
import engine.net.client.handlers.ItemToVaultMsgHandler;
|
||||
@@ -228,7 +224,7 @@ public class Account extends AbstractGameObject {
|
||||
if (player.charItemManager.moveItemToVault(item)) {
|
||||
this.vault.add(item);
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
} else
|
||||
ItemToVaultMsgHandler.forceTransferFromVaultToInventory(msg, origin, "Failed to transfer item.");
|
||||
}
|
||||
@@ -274,7 +270,7 @@ public class Account extends AbstractGameObject {
|
||||
this.vault.remove(item);
|
||||
|
||||
dispatch = Dispatch.borrow(player, msg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
} else
|
||||
ItemFromVaultMsgHandler.forceTransferFromInventoryToVault(msg, origin, "Failed to transfer item.");
|
||||
@@ -319,17 +315,17 @@ public class Account extends AbstractGameObject {
|
||||
UpdateGoldMsg ugm = new UpdateGoldMsg(player);
|
||||
ugm.configure();
|
||||
dispatch = Dispatch.borrow(player, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
UpdateVaultMsg uvm = new UpdateVaultMsg(account);
|
||||
dispatch = Dispatch.borrow(player, uvm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
dispatch = Dispatch.borrow(player, open);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
dispatch = Dispatch.borrow(player, show);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
|
||||
@@ -373,20 +369,20 @@ public class Account extends AbstractGameObject {
|
||||
UpdateGoldMsg ugm = new UpdateGoldMsg(player);
|
||||
ugm.configure();
|
||||
dispatch = Dispatch.borrow(player, ugm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
UpdateVaultMsg uvm = new UpdateVaultMsg(account);
|
||||
dispatch = Dispatch.borrow(player, uvm);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
OpenVaultMsg open = new OpenVaultMsg(player, npc);
|
||||
dispatch = Dispatch.borrow(player, open);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
//
|
||||
//
|
||||
ShowVaultInventoryMsg show = new ShowVaultInventoryMsg(player, account, npc); // 37??
|
||||
dispatch = Dispatch.borrow(player, show);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
DispatchManager.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user