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; }
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; }
@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); }
@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); }