Homunculus summon result packet improvements.
Contributed by nasseka.
This commit is contained in:
@@ -70,6 +70,7 @@ public class RequestExHomunculusSummon implements IClientIncomingPacket
|
||||
if (chance > TEMPLATE.getMaxChance())
|
||||
{
|
||||
player.sendMessage("Homunculus is not created!");
|
||||
player.sendPacket(new ExHomunculusSummonResult(0));
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < TEMPLATE.getCreationChance().size(); i++)
|
||||
@@ -99,8 +100,8 @@ public class RequestExHomunculusSummon implements IClientIncomingPacket
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_SP_POINTS, 0);
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_VP_POINTS, 0);
|
||||
player.sendPacket(new ExShowHomunculusBirthInfo(player));
|
||||
player.sendPacket(new ExHomunculusSummonResult(1));
|
||||
player.sendPacket(new ExShowHomunculusList(player));
|
||||
player.sendPacket(new ExHomunculusSummonResult());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -23,15 +23,18 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
public class ExHomunculusSummonResult implements IClientOutgoingPacket
|
||||
{
|
||||
public ExHomunculusSummonResult()
|
||||
private final int _success;
|
||||
|
||||
public ExHomunculusSummonResult(int success)
|
||||
{
|
||||
_success = success;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_HOMUNCULUS_SUMMON_RESULT.writeId(packet);
|
||||
packet.writeD(1); // 1 - success
|
||||
packet.writeD(_success); // 1 - success
|
||||
packet.writeD(SystemMessageId.A_NEW_HOMUNCULUS_IS_CREATED.getId());
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user