Example #1
0
  public static PlayerBankPanel getInstance(Character owner) {
    PlayerBankPanel packet = (PlayerBankPanel) instance.newInstance();

    packet.name = owner.getName();
    packet.objectId = owner.getObjectId();
    packet.subId = owner.getSubId();

    return packet;
  }
Example #2
0
  public static TargetHp getInstance(Character target, int type) {
    TargetHp packet = (TargetHp) instance.newInstance();

    packet.objectId = target.getObjectId();
    packet.subId = target.getSubId();
    packet.hp = target.getCurrentHp() / (float) target.getMaxHp();
    packet.type = type;

    return packet;
  }
Example #3
0
  @Override
  public void onDie(Character killer, Character killed) {

    if (!isCheckDieState() || !killed.isPlayer()) {
      return;
    }

    Player player = killed.getPlayer();

    if (!player.isEvent() || !players.containsKey(killed.getObjectId())) {
      return;
    }

    onDie(player, killer);
  }
Example #4
0
  @Override
  protected void writeImpl() {
    writeOpcode();
    writeInt(actor.getObjectId());
    writeInt(actor.getSubId());
    writeFloat(actor.getX());
    writeFloat(actor.getY());
    writeFloat(actor.getZ());
    writeShort(actor.getHeading());
    writeInt(actor.getModelId());

    writeInt(actor.getOwerturnId());

    writeInt(0);
    writeInt(0);
  }