Browse Source

Petition window work.

master
MagicBot 1 year ago
parent
commit
cf78e6c2a4
  1. 7
      src/engine/net/client/handlers/PetitionReceivedMsgHandler.java
  2. 3
      src/engine/net/client/msg/PetitionReceivedMsg.java

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

@ -45,8 +45,11 @@ public class PetitionReceivedMsgHandler extends AbstractClientMsgHandler { @@ -45,8 +45,11 @@ public class PetitionReceivedMsgHandler extends AbstractClientMsgHandler {
// Close the petition window
petitionReceivedMsg.petition = 1;
Dispatch dispatch = Dispatch.borrow(playerCharacter, msg);
petitionReceivedMsg.petition = 4;
petitionReceivedMsg.unknownByte01 = 0;
petitionReceivedMsg.unknown04 = 0;
Dispatch dispatch = Dispatch.borrow(playerCharacter, petitionReceivedMsg);
DispatchMessage.dispatchMsgDispatch(dispatch, Enum.DispatchChannel.SECONDARY);
} catch (Exception e) {

3
src/engine/net/client/msg/PetitionReceivedMsg.java

@ -53,6 +53,7 @@ public class PetitionReceivedMsg extends ClientNetMsg { @@ -53,6 +53,7 @@ public class PetitionReceivedMsg extends ClientNetMsg {
@Override
protected void _serialize(ByteBufferWriter writer) {
writer.putInt(this.petition);
if (this.petition == PETITION_NEW) {
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
@ -67,7 +68,7 @@ public class PetitionReceivedMsg extends ClientNetMsg { @@ -67,7 +68,7 @@ public class PetitionReceivedMsg extends ClientNetMsg {
writer.putString(this.language);
writer.putInt(this.unknown07);
writer.putUnicodeString(message);
} else if (this.petition == PETITION_CANCEL) {
} else {
writer.putInt(this.unknown01);
writer.putInt(this.unknown02);
writer.put(this.unknownByte01);

Loading…
Cancel
Save