Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExActivateHomunculusResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExActivateHomunculusResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExActivateHomunculusResult.java (working copy)
- @@ -0,0 +1,55 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * This program is free software: you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation, either version 3 of the License, or
- + * (at your option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + * General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
- +
- +/**
- + * @author Mobius
- + */
- +public class ExActivateHomunculusResult implements IClientOutgoingPacket
- +{
- + private final boolean _activate;
- +
- + public ExActivateHomunculusResult(boolean activate)
- + {
- + _activate = activate;
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_ACTIVATE_HOMUNCULUS_RESULT.writeId(packet);
- +
- + if (!_activate)
- + {
- + packet.writeD(1); // success
- + packet.writeC(0); // activate
- + packet.writeD(SystemMessage.THE_RELATIONS_ARE_BROKEN);
- + }
- + else
- + {
- + packet.writeD(1);
- + packet.writeC(1);
- + packet.writeD(SystemMessage.THE_RELATIONS_ARE_BEING_ESTABLISHED);
- + }
- + return true;
- + }
- +}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExDeleteHomunculusDataResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExDeleteHomunculusDataResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExDeleteHomunculusDataResult.java (working copy)
- @@ -0,0 +1,29 @@
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
- +
- +/**
- + * @author nexvill
- + */
- +public class ExDeleteHomunculusDataResult implements IClientOutgoingPacket
- +{
- +
- + public ExDeleteHomunculusDataResult()
- + {
- +
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_ACTIVATE_HOMUNCULUS_RESULT.writeId(packet);
- + {
- + packet.writeD(1); // 1 - success
- + packet.writeD(SystemMessage.THE_HOMUNCULUS_IS_DESTROYED); // SystemMessageId
- + }
- + return true;
- + }
- +}
- \ No newline at end of file
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExEnchantHomunculusSkillResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExEnchantHomunculusSkillResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExEnchantHomunculusSkillResult.java (working copy)
- @@ -0,0 +1,87 @@
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.commons.util.Rnd;
- +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- +import org.l2jmobius.gameserver.model.homunculus.Homunculus;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +
- +/**
- + * @author nexvill
- + */
- +public class ExEnchantHomunculusSkillResult implements IClientOutgoingPacket
- +{
- + private final PlayerInstance _player;
- + private final int _slot, _skillNumber;
- +
- + public ExEnchantHomunculusSkillResult(PlayerInstance player, int slot, int skillNumber)
- + {
- + _player = player;
- + _slot = slot;
- + _skillNumber = skillNumber;
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_ENCHANT_HOMUNCULUS_SKILL_RESULT.writeId(packet);
- + {
- + int playerNumber = Rnd.get(6) + 1;
- + int homunculusNumber = Rnd.get(6) + 1;
- + int systemNumber = Rnd.get(6) + 1;
- +
- + Homunculus homunculus = _player.getHomunculusList().get(_slot);
- + int boundLevel = 1;
- + if ((playerNumber == homunculusNumber) && (playerNumber == systemNumber))
- + {
- + boundLevel = 3;
- + }
- + else if ((playerNumber == homunculusNumber) || (playerNumber == systemNumber)//
- + || (homunculusNumber == systemNumber))
- + {
- + boundLevel = 2;
- + }
- +
- + switch (_skillNumber)
- + {
- + case 1:
- + {
- + homunculus.setSkill1Level(boundLevel);
- + break;
- + }
- + case 2:
- + {
- + homunculus.setSkill2Level(boundLevel);
- + break;
- + }
- + case 3:
- + {
- + homunculus.setSkill3Level(boundLevel);
- + break;
- + }
- + case 4:
- + {
- + homunculus.setSkill4Level(boundLevel);
- + break;
- + }
- + case 5:
- + {
- + homunculus.setSkill5Level(boundLevel);
- + break;
- + }
- + }
- + _player.getHomunculusList().update(homunculus);
- + _player.getHomunculusList().refreshStats(true);
- +
- + packet.writeD(boundLevel); // skill bound level result
- + packet.writeD(homunculus.getId()); // homunculus id? random value on JP
- + packet.writeD(_slot); // slot
- + packet.writeD(_skillNumber); // skill number
- + packet.writeD(playerNumber); // player number
- + packet.writeD(homunculusNumber); // homunculus number
- + packet.writeD(systemNumber); // system number
- + }
- + return true;
- + }
- +}
- \ No newline at end of file
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusActivateResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusActivateResult.java (revision 8811)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusActivateResult.java (nonexistent)
- @@ -1,53 +0,0 @@
- -/*
- - * This file is part of the L2J Mobius project.
- - *
- - * This program is free software: you can redistribute it and/or modify
- - * it under the terms of the GNU General Public License as published by
- - * the Free Software Foundation, either version 3 of the License, or
- - * (at your option) any later version.
- - *
- - * This program is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * General Public License for more details.
- - *
- - * You should have received a copy of the GNU General Public License
- - * along with this program. If not, see <http://www.gnu.org/licenses/>.
- - */
- -package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- -
- -import org.l2jmobius.commons.network.PacketWriter;
- -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- -import org.l2jmobius.gameserver.network.OutgoingPackets;
- -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- -
- -/**
- - * @author Mobius
- - */
- -public class ExHomonculusActivateResult implements IClientOutgoingPacket
- -{
- - @SuppressWarnings("unused")
- - private final PlayerInstance _player;
- -
- - public ExHomonculusActivateResult(PlayerInstance player)
- - {
- - _player = player;
- - }
- -
- - @Override
- - public boolean write(PacketWriter packet)
- - {
- - OutgoingPackets.EX_ACTIVATE_HOMUNCULUS_RESULT.writeId(packet);
- -
- - // struct _C_EX_REQUEST_ACTIVATE_HOMUNCULUS
- - // {
- - // var int nIdx;
- - // var byte bActivate;
- - // };
- -
- - packet.writeD(0x01);
- - packet.writeC(0x01);
- -
- - return true;
- - }
- -}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusBirthInfo.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusBirthInfo.java (revision 8811)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusBirthInfo.java (nonexistent)
- @@ -1,58 +0,0 @@
- -/*
- - * This file is part of the L2J Mobius project.
- - *
- - * This program is free software: you can redistribute it and/or modify
- - * it under the terms of the GNU General Public License as published by
- - * the Free Software Foundation, either version 3 of the License, or
- - * (at your option) any later version.
- - *
- - * This program is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * General Public License for more details.
- - *
- - * You should have received a copy of the GNU General Public License
- - * along with this program. If not, see <http://www.gnu.org/licenses/>.
- - */
- -package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- -
- -import org.l2jmobius.commons.network.PacketWriter;
- -import org.l2jmobius.commons.util.Chronos;
- -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- -import org.l2jmobius.gameserver.model.variables.PlayerVariables;
- -import org.l2jmobius.gameserver.network.OutgoingPackets;
- -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- -
- -/**
- - * @author Mobius
- - */
- -public class ExHomonculusBirthInfo implements IClientOutgoingPacket
- -{
- - private final PlayerInstance _player;
- -
- - public ExHomonculusBirthInfo(PlayerInstance player)
- - {
- - _player = player;
- - }
- -
- - @Override
- - public boolean write(PacketWriter packet)
- - {
- - OutgoingPackets.EX_SHOW_BIRTH_INFO.writeId(packet);
- -
- - final int status = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_STATUS, 0);
- - final int hp = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_HP, 0);
- - final int sp = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_SP, 0);
- - final int vp = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_VP, 0);
- - final int time = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_TIME, 0);
- - final long currentTime = Chronos.currentTimeMillis();
- -
- - packet.writeD(status); // 0 = time idle, 1 = time updating, 2 = summon enabled
- - packet.writeD(hp); // hp 100
- - packet.writeD(sp); // sp 10
- - packet.writeD(vp); // vitality 5
- - packet.writeQ((currentTime / 1000) + (86400 - Math.min(86400, (currentTime / 1000) - time)));
- -
- - return true;
- - }
- -}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusCreateStartResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusCreateStartResult.java (revision 8811)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusCreateStartResult.java (nonexistent)
- @@ -1,47 +0,0 @@
- -/*
- - * This file is part of the L2J Mobius project.
- - *
- - * This program is free software: you can redistribute it and/or modify
- - * it under the terms of the GNU General Public License as published by
- - * the Free Software Foundation, either version 3 of the License, or
- - * (at your option) any later version.
- - *
- - * This program is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * General Public License for more details.
- - *
- - * You should have received a copy of the GNU General Public License
- - * along with this program. If not, see <http://www.gnu.org/licenses/>.
- - */
- -package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- -
- -import org.l2jmobius.commons.network.PacketWriter;
- -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- -import org.l2jmobius.gameserver.network.OutgoingPackets;
- -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- -
- -/**
- - * @author Mobius
- - */
- -public class ExHomonculusCreateStartResult implements IClientOutgoingPacket
- -{
- - @SuppressWarnings("unused")
- - private final PlayerInstance _player;
- -
- - public ExHomonculusCreateStartResult(PlayerInstance player)
- - {
- - _player = player;
- - }
- -
- - @Override
- - public boolean write(PacketWriter packet)
- - {
- - OutgoingPackets.EX_HOMUNCULUS_CREATE_START_RESULT.writeId(packet);
- -
- - packet.writeD(0x00);
- - packet.writeD(0x00);
- -
- - return true;
- - }
- -}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusInsertResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusInsertResult.java (revision 8811)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusInsertResult.java (nonexistent)
- @@ -1,49 +0,0 @@
- -/*
- - * This file is part of the L2J Mobius project.
- - *
- - * This program is free software: you can redistribute it and/or modify
- - * it under the terms of the GNU General Public License as published by
- - * the Free Software Foundation, either version 3 of the License, or
- - * (at your option) any later version.
- - *
- - * This program is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * General Public License for more details.
- - *
- - * You should have received a copy of the GNU General Public License
- - * along with this program. If not, see <http://www.gnu.org/licenses/>.
- - */
- -package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- -
- -import org.l2jmobius.commons.network.PacketWriter;
- -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- -import org.l2jmobius.gameserver.network.OutgoingPackets;
- -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- -
- -/**
- - * @author Mobius
- - */
- -public class ExHomonculusInsertResult implements IClientOutgoingPacket
- -{
- - @SuppressWarnings("unused")
- - private final PlayerInstance _player;
- - private final int _type;
- -
- - public ExHomonculusInsertResult(PlayerInstance player, int type)
- - {
- - _player = player;
- - _type = type;
- - }
- -
- - @Override
- - public boolean write(PacketWriter packet)
- - {
- - OutgoingPackets.EX_HOMUNCULUS_INSERT_RESULT.writeId(packet);
- -
- - packet.writeD(0x01);
- - packet.writeD(_type);
- -
- - return true;
- - }
- -}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusList.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusList.java (revision 8811)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusList.java (nonexistent)
- @@ -1,82 +0,0 @@
- -/*
- - * This file is part of the L2J Mobius project.
- - *
- - * This program is free software: you can redistribute it and/or modify
- - * it under the terms of the GNU General Public License as published by
- - * the Free Software Foundation, either version 3 of the License, or
- - * (at your option) any later version.
- - *
- - * This program is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * General Public License for more details.
- - *
- - * You should have received a copy of the GNU General Public License
- - * along with this program. If not, see <http://www.gnu.org/licenses/>.
- - */
- -package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- -
- -import org.l2jmobius.commons.network.PacketWriter;
- -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- -import org.l2jmobius.gameserver.model.variables.PlayerVariables;
- -import org.l2jmobius.gameserver.network.OutgoingPackets;
- -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- -
- -/**
- - * @author Mobius
- - */
- -public class ExHomonculusList implements IClientOutgoingPacket
- -{
- - private final PlayerInstance _player;
- -
- - public ExHomonculusList(PlayerInstance player)
- - {
- - _player = player;
- - }
- -
- - @Override
- - public boolean write(PacketWriter packet)
- - {
- - OutgoingPackets.EX_SHOW_HOMUNCULUS_LIST.writeId(packet);
- -
- - final int homunculus = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_ID, 0);
- - if (homunculus > 0)
- - {
- - final int quality = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_QUALITY, 0);
- -
- - packet.writeD(0x01); // Size.
- -
- - packet.writeD(0x00); // nIdx
- - packet.writeD(homunculus); // nID
- - packet.writeD(quality); // eType
- - packet.writeC(0x01); // bActivate
- -
- - packet.writeD(0x00); // m_nSkillID 0
- - packet.writeD(0x00); // m_nSkillID 1
- - packet.writeD(0x00); // m_nSkillID 2
- - packet.writeD(0x00); // m_nSkillID 3
- - packet.writeD(0x00); // m_nSkillID 4
- - packet.writeD(0x00); // m_nSkillID 5
- -
- - packet.writeD(0x00); // m_nSkillLevel 0
- - packet.writeD(0x00); // m_nSkillLevel 1
- - packet.writeD(0x00); // m_nSkillLevel 2
- - packet.writeD(0x00); // m_nSkillLevel 3
- - packet.writeD(0x00); // m_nSkillLevel 4
- - packet.writeD(0x00); // m_nSkillLevel 5
- -
- - packet.writeD(0x01); // m_nLevel
- - packet.writeD(0x00); // m_nExp
- - packet.writeD(_player.getHomunculusHpBonus()); // m_nHP
- - packet.writeD(_player.getHomunculusAtkBonus()); // m_nAttack
- - packet.writeD(_player.getHomunculusDefBonus()); // m_nDefence
- - packet.writeD((int) (_player.getHomunculusCritBonus() * 100)); // m_nCritical
- - }
- - else
- - {
- - packet.writeD(0); // Size.
- - }
- -
- - return true;
- - }
- -}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusSummonResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusSummonResult.java (revision 8811)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomonculusSummonResult.java (nonexistent)
- @@ -1,45 +0,0 @@
- -/*
- - * This file is part of the L2J Mobius project.
- - *
- - * This program is free software: you can redistribute it and/or modify
- - * it under the terms of the GNU General Public License as published by
- - * the Free Software Foundation, either version 3 of the License, or
- - * (at your option) any later version.
- - *
- - * This program is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * General Public License for more details.
- - *
- - * You should have received a copy of the GNU General Public License
- - * along with this program. If not, see <http://www.gnu.org/licenses/>.
- - */
- -package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- -
- -import org.l2jmobius.commons.network.PacketWriter;
- -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- -import org.l2jmobius.gameserver.network.OutgoingPackets;
- -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- -
- -public class ExHomonculusSummonResult implements IClientOutgoingPacket
- -{
- - @SuppressWarnings("unused")
- - private final PlayerInstance _player;
- -
- - public ExHomonculusSummonResult(PlayerInstance player)
- - {
- - _player = player;
- - }
- -
- - @Override
- - public boolean write(PacketWriter packet)
- - {
- - OutgoingPackets.EX_SHOW_HOMUNCULUS_LIST.writeId(packet);
- -
- - packet.writeD(1);
- - packet.writeD(2);
- - packet.writeD(1); // Homunculus client id?
- -
- - return true;
- - }
- -}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusCreateStartResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusCreateStartResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusCreateStartResult.java (working copy)
- @@ -0,0 +1,46 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * This program is free software: you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation, either version 3 of the License, or
- + * (at your option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + * General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
- +
- +/**
- + * @author Mobius
- + */
- +public class ExHomunculusCreateStartResult implements IClientOutgoingPacket
- +{
- +
- + public ExHomunculusCreateStartResult(PlayerInstance player)
- + {
- +
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_HOMUNCULUS_CREATE_START_RESULT.writeId(packet);
- +
- + packet.writeD(1); // 1 - success
- + packet.writeD(SystemMessage.YOUVE_SEALED_A_HOMUNCULUS_HEART_IN_ORDER_TO_CREATE_IT_YOUR_BLOOD_SPIRIT_AND_TEARS_ARE_REQUIRED); // SystemMessageId
- +
- + return true;
- + }
- +}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusEnchantEXPResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusEnchantEXPResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusEnchantEXPResult.java (working copy)
- @@ -0,0 +1,42 @@
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
- +
- +/**
- + * @author nexvill
- + */
- +public class ExHomunculusEnchantEXPResult implements IClientOutgoingPacket
- +{
- + private final boolean _success, _newLevel;
- +
- + public ExHomunculusEnchantEXPResult(boolean success, boolean newLevel)
- + {
- + _success = success;
- + _newLevel = newLevel;
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_HOMUNCULUS_ENCHANT_EXP_RESULT.writeId(packet);
- + if (!_success)
- + {
- + packet.writeD(0);
- + packet.writeD(SystemMessage.NOT_ENOUGH_UPGRADE_POINTS);
- + }
- + else if (!_newLevel)
- + {
- + packet.writeD(1); // success
- + packet.writeD(0); // SystemMessageId
- + }
- + else
- + {
- + packet.writeD(1);
- + packet.writeD(SystemMessage.THE_HOMUNCULUS_LEVEL_IS_INCREASED);
- + }
- + return true;
- + }
- +}
- \ No newline at end of file
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusGetEnchantPointResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusGetEnchantPointResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusGetEnchantPointResult.java (working copy)
- @@ -0,0 +1,38 @@
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
- +
- +/**
- + * @author nexvill
- + */
- +public class ExHomunculusGetEnchantPointResult implements IClientOutgoingPacket
- +{
- + private final int _enchantType;
- +
- + public ExHomunculusGetEnchantPointResult(int enchantType)
- + {
- + _enchantType = enchantType;
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_HOMUNCULUS_GET_ENCHANT_POINT_RESULT.writeId(packet);
- + if (_enchantType != 2)
- + {
- + packet.writeD(1); // success
- + packet.writeD(_enchantType);
- + packet.writeD(SystemMessage.YOUVE_OBTAINED_UPGRADE_POINTS);
- + }
- + else
- + {
- + packet.writeD(1);
- + packet.writeD(_enchantType);
- + packet.writeD(SystemMessage.VP_ADDED);
- + }
- + return true;
- + }
- +}
- \ No newline at end of file
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusHPSPVP.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusHPSPVP.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusHPSPVP.java (working copy)
- @@ -0,0 +1,51 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * This program is free software: you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation, either version 3 of the License, or
- + * (at your option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + * General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +
- +/**
- + * @author Mobius
- + */
- +public class ExHomunculusHPSPVP implements IClientOutgoingPacket
- +{
- + private final int _hp;
- + private final long _sp;
- + private final int _vp;
- +
- + public ExHomunculusHPSPVP(PlayerInstance player)
- + {
- + _hp = (int) player.getCurrentHp();
- + _sp = player.getSp();
- + _vp = player.getVitalityPoints();
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_HOMUNCULUS_HPSPVP.writeId(packet);
- +
- + packet.writeD(_hp);
- + packet.writeQ(_sp);
- + packet.writeD(_vp);
- +
- + return true;
- + }
- +}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInitPointResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInitPointResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInitPointResult.java (working copy)
- @@ -0,0 +1,40 @@
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
- +
- +/**
- + * @author nexvill
- + */
- +public class ExHomunculusInitPointResult implements IClientOutgoingPacket
- +{
- + private final boolean _success;
- + private final int _type;
- +
- + public ExHomunculusInitPointResult(boolean success, int type)
- + {
- + _success = success;
- + _type = type;
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_HOMUNCULUS_INIT_POINT_RESULT.writeId(packet);
- + if (_success)
- + {
- + packet.writeD(1); // success
- + packet.writeD(_type); // init type
- + packet.writeD(SystemMessage.THE_RECEIVED_UPGRADE_POINTS_ARE_RESET); // SystemMessageId
- + }
- + else
- + {
- + packet.writeD(0);
- + packet.writeD(_type);
- + packet.writeD(SystemMessage.NOT_ENOUGH_ITEMS_FOR_RESETTING);
- + }
- + return true;
- + }
- +}
- \ No newline at end of file
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInsertHpSpVp.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInsertHpSpVp.java (revision 8809)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInsertHpSpVp.java (nonexistent)
- @@ -1,47 +0,0 @@
- -/*
- - * This file is part of the L2J Mobius project.
- - *
- - * This program is free software: you can redistribute it and/or modify
- - * it under the terms of the GNU General Public License as published by
- - * the Free Software Foundation, either version 3 of the License, or
- - * (at your option) any later version.
- - *
- - * This program is distributed in the hope that it will be useful,
- - * but WITHOUT ANY WARRANTY; without even the implied warranty of
- - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- - * General Public License for more details.
- - *
- - * You should have received a copy of the GNU General Public License
- - * along with this program. If not, see <http://www.gnu.org/licenses/>.
- - */
- -package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- -
- -import org.l2jmobius.commons.network.PacketWriter;
- -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- -import org.l2jmobius.gameserver.network.OutgoingPackets;
- -import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- -
- -/**
- - * @author Mobius
- - */
- -public class ExHomunculusInsertHpSpVp implements IClientOutgoingPacket
- -{
- - private final PlayerInstance _player;
- -
- - public ExHomunculusInsertHpSpVp(PlayerInstance player)
- - {
- - _player = player;
- - }
- -
- - @Override
- - public boolean write(PacketWriter packet)
- - {
- - OutgoingPackets.EX_HOMUNCULUS_HPSPVP.writeId(packet);
- -
- - packet.writeD((int) _player.getCurrentHp());
- - packet.writeQ(_player.getSp());
- - packet.writeD(_player.getVitalityPoints());
- -
- - return true;
- - }
- -}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInsertResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInsertResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusInsertResult.java (working copy)
- @@ -0,0 +1,57 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * This program is free software: you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation, either version 3 of the License, or
- + * (at your option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + * General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
- +
- +/**
- + * @author Mobius
- + */
- +public class ExHomunculusInsertResult implements IClientOutgoingPacket
- +{
- + private final int _type;
- +
- + public ExHomunculusInsertResult(int type)
- + {
- + _type = type;
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_HOMUNCULUS_INSERT_RESULT.writeId(packet);
- +
- + packet.writeD(1); // 1 - success
- + if (_type == 0)
- + {
- + packet.writeD(SystemMessage.THE_HOMUNCULUS_TAKES_YOUR_BLOOD_HP); // SystemMessageId
- + }
- + else if (_type == 1)
- + {
- + packet.writeD(SystemMessage.THE_HOMUNCULUS_TAKES_YOUR_SPIRIT_SP);
- + }
- + else
- + {
- + packet.writeD(SystemMessage.THE_HOMUNCULUS_TAKES_YOUR_TEARS_VP);
- + }
- +
- + return true;
- + }
- +}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusPointInfo.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusPointInfo.java (revision 8811)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusPointInfo.java (working copy)
- @@ -18,6 +18,7 @@
- import org.l2jmobius.commons.network.PacketWriter;
- import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
- import org.l2jmobius.gameserver.network.OutgoingPackets;
- import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- @@ -26,7 +27,6 @@
- */
- public class ExHomunculusPointInfo implements IClientOutgoingPacket
- {
- - @SuppressWarnings("unused")
- private final PlayerInstance _player;
- public ExHomunculusPointInfo(PlayerInstance player)
- @@ -39,13 +39,20 @@
- {
- OutgoingPackets.EX_HOMUNCULUS_POINT_INFO.writeId(packet);
- - packet.writeD(0); // enchant points
- - packet.writeD(0); // hunted monster points
- - packet.writeD(0); // points obtained
- - packet.writeD(0); // reset time
- - packet.writeD(0); // vitality points?
- - packet.writeD(0); // vitality points obtained?
- - packet.writeD(0); // vitality points reset time?
- + int upgradePoints = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_UPGRADE_POINTS, 0);
- + int killedMobs = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_KILLED_MOBS, 0);
- + int usedKillConverts = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_USED_KILL_CONVERT, 0);
- + int usedResetConverts = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_USED_RESET_KILLS, 0);
- + int usedVpPoints = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_USED_VP_POINTS, 0);
- + int usedVpConverts = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_USED_VP_CONVERT, 0);
- + int usedResetVp = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_USED_RESET_VP, 0);
- + packet.writeD(upgradePoints); // points
- + packet.writeD(killedMobs); // killed mobs
- + packet.writeD(usedKillConverts); // consumed basic kill points
- + packet.writeD(usedResetConverts); // consumed reset kill points?
- + packet.writeD(usedVpPoints); // vp points
- + packet.writeD(usedVpConverts); // consumed basic vp points
- + packet.writeD(usedResetVp); // consumed reset vp points
- return true;
- }
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusReady.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusReady.java (revision 8811)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusReady.java (working copy)
- @@ -17,7 +17,6 @@
- package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- import org.l2jmobius.commons.network.PacketWriter;
- -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- import org.l2jmobius.gameserver.network.OutgoingPackets;
- import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- @@ -26,12 +25,18 @@
- */
- public class ExHomunculusReady implements IClientOutgoingPacket
- {
- - @SuppressWarnings("unused")
- - private final PlayerInstance _player;
- + // private boolean _enabled;
- + //
- + // public ExHomunculusReady(boolean enabled)
- + // {
- + // _enabled = enabled;
- + // }
- - public ExHomunculusReady(PlayerInstance player)
- + private final int _enabled;
- +
- + public ExHomunculusReady(int enabled)
- {
- - _player = player;
- + _enabled = enabled;
- }
- @Override
- @@ -38,7 +43,7 @@
- public boolean write(PacketWriter packet)
- {
- OutgoingPackets.EX_HOMUNCULUS_READY.writeId(packet);
- - packet.writeC(0x01); // 1 = enabled, 0 = disabled
- + packet.writeC(_enabled);
- return true;
- }
- }
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusSummonResult.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusSummonResult.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExHomunculusSummonResult.java (working copy)
- @@ -0,0 +1,42 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * This program is free software: you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation, either version 3 of the License, or
- + * (at your option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + * General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
- +
- +public class ExHomunculusSummonResult implements IClientOutgoingPacket
- +{
- +
- + public ExHomunculusSummonResult()
- + {
- +
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_HOMUNCULUS_SUMMON_RESULT.writeId(packet);
- +
- + packet.writeD(1); // 1 - success
- + packet.writeD(SystemMessage.A_NEW_HOMUNCULUS_IS_CREATED); // SystemMessageId
- +
- + return true;
- + }
- +}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExShowHomunculusBirthInfo.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExShowHomunculusBirthInfo.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExShowHomunculusBirthInfo.java (working copy)
- @@ -0,0 +1,67 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * This program is free software: you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation, either version 3 of the License, or
- + * (at your option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + * General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- +import org.l2jmobius.gameserver.model.variables.PlayerVariables;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +
- +/**
- + * @author Mobius
- + */
- +public class ExShowHomunculusBirthInfo implements IClientOutgoingPacket
- +{
- + private static int _hpPoints, _spPoints, _vpPoints, _homunculusCreateTime;
- +
- + public ExShowHomunculusBirthInfo(PlayerInstance player)
- + {
- + _hpPoints = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_HP_POINTS, 0);
- + _spPoints = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_SP_POINTS, 0);
- + _vpPoints = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_VP_POINTS, 0);
- + _homunculusCreateTime = (int) (player.getVariables().getLong(PlayerVariables.HOMUNCULUS_CREATION_TIME, 0) / 1000);
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_SHOW_HOMUNCULUS_BIRTH_INFO.writeId(packet);
- +
- + int creationStage = 0;
- + if (_homunculusCreateTime > 0)
- + {
- + if (((System.currentTimeMillis() / 1000) >= _homunculusCreateTime) //
- + && (_hpPoints == 100) && (_spPoints == 10) && (_vpPoints == 5))
- + {
- + creationStage = 2;
- + }
- + else
- + {
- + creationStage = 1;
- + }
- + }
- + packet.writeD(creationStage); // in creation process (0: can create, 1: in process, 2: can awake
- + packet.writeD(_hpPoints); // hp points
- + packet.writeD(_spPoints); // sp points
- + packet.writeD(_vpPoints); // vp points
- + packet.writeD(_homunculusCreateTime); // finish time
- + packet.writeD(0); // JP = 0. ?
- +
- + return true;
- + }
- +}
- Index: java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExShowHomunculusList.java
- ===================================================================
- --- java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExShowHomunculusList.java (nonexistent)
- +++ java/org/l2jmobius/gameserver/network/serverpackets/homunculus/ExShowHomunculusList.java (working copy)
- @@ -0,0 +1,81 @@
- +/*
- + * This file is part of the L2J Mobius project.
- + *
- + * This program is free software: you can redistribute it and/or modify
- + * it under the terms of the GNU General Public License as published by
- + * the Free Software Foundation, either version 3 of the License, or
- + * (at your option) any later version.
- + *
- + * This program is distributed in the hope that it will be useful,
- + * but WITHOUT ANY WARRANTY; without even the implied warranty of
- + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- + * General Public License for more details.
- + *
- + * You should have received a copy of the GNU General Public License
- + * along with this program. If not, see <http://www.gnu.org/licenses/>.
- + */
- +package org.l2jmobius.gameserver.network.serverpackets.homunculus;
- +
- +import org.l2jmobius.commons.network.PacketWriter;
- +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
- +import org.l2jmobius.gameserver.model.homunculus.Homunculus;
- +import org.l2jmobius.gameserver.network.OutgoingPackets;
- +import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
- +
- +/**
- + * @author Mobius
- + */
- +public class ExShowHomunculusList implements IClientOutgoingPacket
- +{
- + private final PlayerInstance _player;
- +
- + public ExShowHomunculusList(PlayerInstance player)
- + {
- + _player = player;
- + }
- +
- + @Override
- + public boolean write(PacketWriter packet)
- + {
- + OutgoingPackets.EX_SHOW_HOMUNCULUS_LIST.writeId(packet);
- +
- + if (_player.getHomunculusList().size() > 0)
- + {
- + packet.writeD(_player.getHomunculusList().size()); // homunculus count
- + for (int i = 0; i < _player.getHomunculusList().size(); i++)
- + {
- + packet.writeD(i); // slot
- +
- + Homunculus homunculus = _player.getHomunculusList().get(i);
- +
- + packet.writeD(homunculus.getId()); // homunculus id
- + packet.writeD(homunculus.getType());
- + packet.writeC(homunculus.isActive() ? 1 : 0);
- + packet.writeD(homunculus.getTemplate().getBasicSkillId());
- + packet.writeD(homunculus.getSkill1Level() > 0 ? homunculus.getTemplate().getSkill1Id() : 0);
- + packet.writeD(homunculus.getSkill2Level() > 0 ? homunculus.getTemplate().getSkill2Id() : 0);
- + packet.writeD(homunculus.getSkill3Level() > 0 ? homunculus.getTemplate().getSkill3Id() : 0);
- + packet.writeD(homunculus.getSkill4Level() > 0 ? homunculus.getTemplate().getSkill4Id() : 0);
- + packet.writeD(homunculus.getSkill5Level() > 0 ? homunculus.getTemplate().getSkill5Id() : 0);
- + packet.writeD(homunculus.getTemplate().getBasicSkillLevel());
- + packet.writeD(homunculus.getSkill1Level());
- + packet.writeD(homunculus.getSkill2Level());
- + packet.writeD(homunculus.getSkill3Level());
- + packet.writeD(homunculus.getSkill4Level());
- + packet.writeD(homunculus.getSkill5Level());
- + packet.writeD(homunculus.getLevel());
- + packet.writeD(homunculus.getExp());
- + packet.writeD(homunculus.getHp());
- + packet.writeD(homunculus.getAtk());
- + packet.writeD(homunculus.getDef());
- + packet.writeD(homunculus.getCritRate());
- + }
- + }
- + else
- + {
- + packet.writeD(0);
- + }
- +
- + return true;
- + }
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement