mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 23:04:08 +00:00
Bank packet
This commit is contained in:
1 parent
30e58dc049
commit
864e1cb8c7
5 files changed
+146
-36
No files matched your search
@@ -158,27 +158,27 @@ public class PacketHandlerPlayer{
|
||||
return;
|
||||
NoppesUtilPlayer.transport(player, npc, ByteBufUtils.readString(buffer));
|
||||
}
|
||||
else if(type == EnumPlayerPacket.BankUpgrade){
|
||||
EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
if(npc == null || npc.advanced.role != EnumRoleType.Bank)
|
||||
return;
|
||||
NoppesUtilPlayer.bankUpgrade(player, npc);
|
||||
}
|
||||
else if(type == EnumPlayerPacket.BankUnlock){
|
||||
EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
if(npc == null || npc.advanced.role != EnumRoleType.Bank)
|
||||
return;
|
||||
NoppesUtilPlayer.bankUnlock(player, npc);
|
||||
}
|
||||
else if(type == EnumPlayerPacket.BankSlotOpen){
|
||||
EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
if(npc == null || npc.advanced.role != EnumRoleType.Bank)
|
||||
return;
|
||||
int slot = buffer.readInt();
|
||||
int bankId = buffer.readInt();
|
||||
BankData data = PlayerDataController.Instance.getBankData(player,bankId).getBankOrDefault(bankId);
|
||||
data.openBankGui(player, npc, bankId, slot);
|
||||
}
|
||||
// else if(type == EnumPlayerPacket.BankUpgrade){
|
||||
// EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
// if(npc == null || npc.advanced.role != EnumRoleType.Bank)
|
||||
// return;
|
||||
// NoppesUtilPlayer.bankUpgrade(player, npc);
|
||||
// }
|
||||
// else if(type == EnumPlayerPacket.BankUnlock){
|
||||
// EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
// if(npc == null || npc.advanced.role != EnumRoleType.Bank)
|
||||
// return;
|
||||
// NoppesUtilPlayer.bankUnlock(player, npc);
|
||||
// }
|
||||
// else if(type == EnumPlayerPacket.BankSlotOpen){
|
||||
// EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
// if(npc == null || npc.advanced.role != EnumRoleType.Bank)
|
||||
// return;
|
||||
// int slot = buffer.readInt();
|
||||
// int bankId = buffer.readInt();
|
||||
// BankData data = PlayerDataController.Instance.getBankData(player,bankId).getBankOrDefault(bankId);
|
||||
// data.openBankGui(player, npc, bankId, slot);
|
||||
// }
|
||||
else if(type == EnumPlayerPacket.Dialog){
|
||||
EntityNPCInterface npc = NoppesUtilServer.getEditingNpc(player);
|
||||
if(npc == null)
|
||||
|
||||
Reference in new issue
Block a user