Ejemplo n.º 1
0
  public static byte[] cancelMonsterStatus(int oid, MonsterStatus stat) {
    if (ServerProperties.ShowPacket()) {
      System.out.println("调用: " + new java.lang.Throwable().getStackTrace()[0]);
    }
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

    mplew.write(SendPacketOpcode.CANCEL_MONSTER_STATUS.getValue());
    mplew.writeInt(oid);
    PacketHelper.writeMonsterStatusMask(mplew, stat);
    mplew.write(1);
    mplew.write(2);

    return mplew.getPacket();
  }
Ejemplo n.º 2
0
  public static byte[] cancelMonsterPoisonStatus(int oid, MonsterStatusEffect m) {
    if (ServerProperties.ShowPacket()) {
      System.out.println("调用: " + new java.lang.Throwable().getStackTrace()[0]);
    }
    MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

    mplew.write(SendPacketOpcode.CANCEL_MONSTER_STATUS.getValue());
    mplew.writeInt(oid);
    //        PacketHelper.writeMonsterStatusMask(mplew, MonsterStatus.持续掉血);
    mplew.writeInt(0);
    mplew.writeInt(1);
    mplew.writeInt(m.getFromID());
    if (m.isMonsterSkill()) {
      mplew.writeShort(m.getMobSkill().getSkillId());
      mplew.writeShort(m.getMobSkill().getSkillLevel());
    } else if (m.getSkill() > 0) {
      mplew.writeInt(m.getSkill());
    }
    mplew.write(3);

    return mplew.getPacket();
  }