Browse Source

structure for petition received handler

master
FatBoy-DOTC 1 year ago
parent
commit
490a1bd8e5
  1. 2
      src/engine/net/client/Protocol.java
  2. 81
      src/engine/net/client/handlers/PetitionReceivedMsgHandler.java

2
src/engine/net/client/Protocol.java

@ -85,7 +85,7 @@ public enum Protocol { @@ -85,7 +85,7 @@ public enum Protocol {
COSTTOOPENBANK(0x135BE5E8, AckBankWindowOpenedMsg.class, null), // ACK Bank Window Opened
CREATECHAR(0x5D18B5C8, CommitNewCharacterMsg.class, null), // Commit New Character,
CREATEPETITION(0xD489CFED, GuildCreationFinalizeMsg.class, GuildCreationFinalizeHandler.class), //Confirm guild creation
CUSTOMERPETITION(0x7F9D7D6D, PetitionReceivedMsg.class, null),
CUSTOMERPETITION(0x7F9D7D6D, PetitionReceivedMsg.class, PetitionReceivedMsgHandler.class),
DELETEOBJECT(0x57F069D8, DeleteItemMsg.class, null), //Delete Item from Inventory
DESTROYBUILDING(0x3CB6FAD3, DestroyBuildingMsg.class, DestroyBuildingHandler.class), // Destroy Building
DISBANDGUILD(0x77AABD64, DisbandGuildMsg.class, DisbandGuildHandler.class), //Disband Guild

81
src/engine/net/client/handlers/PetitionReceivedMsgHandler.java

@ -0,0 +1,81 @@ @@ -0,0 +1,81 @@
package engine.net.client.handlers;
import engine.exception.MsgSendException;
import engine.net.client.ClientConnection;
import engine.net.client.msg.ClientNetMsg;
import engine.net.client.msg.PetitionReceivedMsg;
public class PetitionReceivedMsgHandler extends AbstractClientMsgHandler {
public PetitionReceivedMsgHandler(Class<? extends ClientNetMsg> handler) {
super(handler);
}
@Override
protected boolean _handleNetMsg(ClientNetMsg msg, ClientConnection origin) throws MsgSendException {
switch(((PetitionReceivedMsg) msg).getType()){
case 1: // TYPE_GENERAL_HELP
break;
case 2: // TYPE_FEEDBACK
break;
case 3: // TYPE_STUCK
break;
case 4: // TYPE_HARASSMENT
break;
case 5: // TYPE_EXPLOIT
break;
case 6: // TYPE_BUG
break;
case 7: // TYPE_GAME_STOPPER
break;
case 8: // TYPE_TECH_SUPPORT
break;
default: // INVALID_TYPE cannot process this
return false;
}
switch (((PetitionReceivedMsg)msg).getSubType()) {
case 1: // SUBTYPE_EXPLOIT_DUPE
break;
case 2: // SUBTYPE_EXPLOIT_LEVELING
break;
case 3: // SUBTYPE_EXPLOIT_SKILL_GAIN
break;
case 4: // SUBTYPE_EXPLOIT_KILLING
break;
case 5: // SUBTYPE_EXPLOIT_POLICY
break;
case 6: // SUBTYPE_EXPLOIT_OTHER
break;
case 7: // SUBTYPE_TECH_VIDEO
break;
case 8: // SUBTYPE_TECH_SOUND
break;
case 9: // SUBTYPE_TECH_NETWORK
break;
case 10: // SUBTYPE_TECH_OTHER
break;
default: // INVALID_SUB_TYPE
break;
}
return true;
}
}
Loading…
Cancel
Save