Recipe additional chance and critical rate display.
Contributed by Index.
This commit is contained in:
parent
39984548fe
commit
ca82640f13
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.RecipeHolder;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -29,6 +30,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final Player _player;
|
||||
private final Boolean _success;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success, long offeringMaximumAdena)
|
||||
{
|
||||
@ -36,6 +39,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
@ -44,6 +49,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, long offeringMaximumAdena)
|
||||
@ -52,6 +59,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -60,6 +69,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,6 +87,10 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_success == null ? -1 : (_success ? 1 : 0)); // item creation none/success/failed
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Show offering window.
|
||||
packet.writeQ(_offeringMaximumAdena); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
@ -27,6 +28,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
private final Boolean _success;
|
||||
private final long _manufacturePrice;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, boolean success, long manufacturePrice, long offeringMaximumAdena)
|
||||
{
|
||||
@ -35,6 +38,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = success;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, long manufacturePrice, long offeringMaximumAdena)
|
||||
@ -44,6 +49,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = null;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,6 +65,10 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeQ(_manufacturePrice);
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Trigger offering window if 1
|
||||
packet.writeQ(_offeringMaximumAdena);
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -20,17 +20,22 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,6 +58,9 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
packet.writeD(item.getKey());
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(item.getValue());
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.RecipeHolder;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -29,6 +30,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final Player _player;
|
||||
private final Boolean _success;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success, long offeringMaximumAdena)
|
||||
{
|
||||
@ -36,6 +39,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
@ -44,6 +49,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, long offeringMaximumAdena)
|
||||
@ -52,6 +59,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -60,6 +69,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,6 +87,10 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_success == null ? -1 : (_success ? 1 : 0)); // item creation none/success/failed
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Show offering window.
|
||||
packet.writeQ(_offeringMaximumAdena); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
@ -27,6 +28,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
private final Boolean _success;
|
||||
private final long _manufacturePrice;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, boolean success, long manufacturePrice, long offeringMaximumAdena)
|
||||
{
|
||||
@ -35,6 +38,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = success;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, long manufacturePrice, long offeringMaximumAdena)
|
||||
@ -44,6 +49,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = null;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,6 +65,10 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeQ(_manufacturePrice);
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Trigger offering window if 1
|
||||
packet.writeQ(_offeringMaximumAdena);
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -20,17 +20,22 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,6 +58,9 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
packet.writeD(item.getKey());
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(item.getValue());
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.RecipeHolder;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -29,6 +30,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final Player _player;
|
||||
private final Boolean _success;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success, long offeringMaximumAdena)
|
||||
{
|
||||
@ -36,6 +39,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
@ -44,6 +49,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, long offeringMaximumAdena)
|
||||
@ -52,6 +59,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -60,6 +69,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,6 +87,10 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_success == null ? -1 : (_success ? 1 : 0)); // item creation none/success/failed
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Show offering window.
|
||||
packet.writeQ(_offeringMaximumAdena); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
@ -27,6 +28,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
private final Boolean _success;
|
||||
private final long _manufacturePrice;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, boolean success, long manufacturePrice, long offeringMaximumAdena)
|
||||
{
|
||||
@ -35,6 +38,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = success;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, long manufacturePrice, long offeringMaximumAdena)
|
||||
@ -44,6 +49,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = null;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,6 +65,10 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeQ(_manufacturePrice);
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Trigger offering window if 1
|
||||
packet.writeQ(_offeringMaximumAdena);
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -20,17 +20,22 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,6 +58,9 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
packet.writeD(item.getKey());
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(item.getValue());
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.RecipeHolder;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -29,6 +30,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final Player _player;
|
||||
private final Boolean _success;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success, long offeringMaximumAdena)
|
||||
{
|
||||
@ -36,6 +39,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
@ -44,6 +49,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, long offeringMaximumAdena)
|
||||
@ -52,6 +59,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -60,6 +69,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,6 +87,10 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_success == null ? -1 : (_success ? 1 : 0)); // item creation none/success/failed
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Show offering window.
|
||||
packet.writeQ(_offeringMaximumAdena); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
@ -27,6 +28,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
private final Boolean _success;
|
||||
private final long _manufacturePrice;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, boolean success, long manufacturePrice, long offeringMaximumAdena)
|
||||
{
|
||||
@ -35,6 +38,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = success;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, long manufacturePrice, long offeringMaximumAdena)
|
||||
@ -44,6 +49,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = null;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,6 +65,10 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeQ(_manufacturePrice);
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Trigger offering window if 1
|
||||
packet.writeQ(_offeringMaximumAdena);
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -20,17 +20,22 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,6 +58,9 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
packet.writeD(item.getKey());
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(item.getValue());
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.RecipeHolder;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -29,6 +30,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final Player _player;
|
||||
private final Boolean _success;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success, long offeringMaximumAdena)
|
||||
{
|
||||
@ -36,6 +39,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
@ -44,6 +49,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, long offeringMaximumAdena)
|
||||
@ -52,6 +59,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -60,6 +69,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,6 +87,10 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_success == null ? -1 : (_success ? 1 : 0)); // item creation none/success/failed
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Show offering window.
|
||||
packet.writeQ(_offeringMaximumAdena); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
@ -27,6 +28,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
private final Boolean _success;
|
||||
private final long _manufacturePrice;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, boolean success, long manufacturePrice, long offeringMaximumAdena)
|
||||
{
|
||||
@ -35,6 +38,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = success;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, long manufacturePrice, long offeringMaximumAdena)
|
||||
@ -44,6 +49,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = null;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,6 +65,10 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeQ(_manufacturePrice);
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Trigger offering window if 1
|
||||
packet.writeQ(_offeringMaximumAdena);
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -20,17 +20,22 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,6 +58,9 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
packet.writeD(item.getKey());
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(item.getValue());
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.holders.RecipeHolder;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -29,6 +30,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final Player _player;
|
||||
private final Boolean _success;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success, long offeringMaximumAdena)
|
||||
{
|
||||
@ -36,6 +39,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
@ -44,6 +49,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = success;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, long offeringMaximumAdena)
|
||||
@ -52,6 +59,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -60,6 +69,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_player = player;
|
||||
_success = null;
|
||||
_offeringMaximumAdena = 0;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -76,6 +87,10 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_success == null ? -1 : (_success ? 1 : 0)); // item creation none/success/failed
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Show offering window.
|
||||
packet.writeQ(_offeringMaximumAdena); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,6 +18,7 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
@ -27,6 +28,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
private final Boolean _success;
|
||||
private final long _manufacturePrice;
|
||||
private final long _offeringMaximumAdena;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, boolean success, long manufacturePrice, long offeringMaximumAdena)
|
||||
{
|
||||
@ -35,6 +38,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = success;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeShopItemInfo(Player manufacturer, int recipeId, long manufacturePrice, long offeringMaximumAdena)
|
||||
@ -44,6 +49,8 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
_success = null;
|
||||
_manufacturePrice = manufacturePrice;
|
||||
_offeringMaximumAdena = offeringMaximumAdena;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -58,6 +65,10 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeQ(_manufacturePrice);
|
||||
packet.writeC(_offeringMaximumAdena > 0 ? 1 : 0); // Trigger offering window if 1
|
||||
packet.writeQ(_offeringMaximumAdena);
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -20,17 +20,22 @@ import java.util.Map.Entry;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -53,6 +58,9 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
packet.writeD(item.getKey());
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(item.getValue());
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.RecipeList;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -28,12 +29,16 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final int _id;
|
||||
private final Player _player;
|
||||
private final boolean _success;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
{
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = success;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -41,6 +46,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = true;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,9 +61,13 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(recipe.isDwarvenRecipe() ? 0 : 1); // 0 = Dwarven - 1 = Common
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(_success ? 1 : 0); // item creation success/failed
|
||||
packet.writeC(0);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(_success ? 1 : 0); // item creation none/success/failed
|
||||
packet.writeC(0); // Show offering window.
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,17 +18,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _player;
|
||||
private final int _recipeId;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player player, int recipeId)
|
||||
{
|
||||
_player = player;
|
||||
_recipeId = recipeId;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,10 +44,14 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_recipeId);
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(0xffffffff);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(0xffffffff); // item creation none/success/failed
|
||||
packet.writeQ(0); // manufacturePrice
|
||||
packet.writeC(0); // Trigger offering window if 1
|
||||
packet.writeQ(0);
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -19,17 +19,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -50,11 +55,11 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
for (ManufactureItem temp : _manufacturer.getManufactureItems().values())
|
||||
{
|
||||
packet.writeD(temp.getRecipeId());
|
||||
packet.writeD(0); // unknown
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(temp.getCost());
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeC(0); // Classic - 166
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.RecipeList;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -28,12 +29,16 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final int _id;
|
||||
private final Player _player;
|
||||
private final boolean _success;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
{
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = success;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -41,6 +46,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = true;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,9 +61,13 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(recipe.isDwarvenRecipe() ? 0 : 1); // 0 = Dwarven - 1 = Common
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(_success ? 1 : 0); // item creation success/failed
|
||||
packet.writeC(0);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(_success ? 1 : 0); // item creation none/success/failed
|
||||
packet.writeC(0); // Show offering window.
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,17 +18,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _player;
|
||||
private final int _recipeId;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player player, int recipeId)
|
||||
{
|
||||
_player = player;
|
||||
_recipeId = recipeId;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,10 +44,14 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_recipeId);
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(0xffffffff);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(0xffffffff); // item creation none/success/failed
|
||||
packet.writeQ(0); // manufacturePrice
|
||||
packet.writeC(0); // Trigger offering window if 1
|
||||
packet.writeQ(0);
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -19,17 +19,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -50,11 +55,11 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
for (ManufactureItem temp : _manufacturer.getManufactureItems().values())
|
||||
{
|
||||
packet.writeD(temp.getRecipeId());
|
||||
packet.writeD(0); // unknown
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(temp.getCost());
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeC(0); // Classic - 166
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.RecipeList;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -28,12 +29,16 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final int _id;
|
||||
private final Player _player;
|
||||
private final boolean _success;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
{
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = success;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -41,6 +46,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = true;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,9 +61,13 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(recipe.isDwarvenRecipe() ? 0 : 1); // 0 = Dwarven - 1 = Common
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(_success ? 1 : 0); // item creation success/failed
|
||||
packet.writeC(0);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(_success ? 1 : 0); // item creation none/success/failed
|
||||
packet.writeC(0); // Show offering window.
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,17 +18,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _player;
|
||||
private final int _recipeId;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player player, int recipeId)
|
||||
{
|
||||
_player = player;
|
||||
_recipeId = recipeId;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,10 +44,14 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_recipeId);
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(0xffffffff);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(0xffffffff); // item creation none/success/failed
|
||||
packet.writeQ(0); // manufacturePrice
|
||||
packet.writeC(0); // Trigger offering window if 1
|
||||
packet.writeQ(0);
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -19,17 +19,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -50,11 +55,11 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
for (ManufactureItem temp : _manufacturer.getManufactureItems().values())
|
||||
{
|
||||
packet.writeD(temp.getRecipeId());
|
||||
packet.writeD(0); // unknown
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(temp.getCost());
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeC(0); // Classic - 166
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.RecipeList;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -28,12 +29,16 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final int _id;
|
||||
private final Player _player;
|
||||
private final boolean _success;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
{
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = success;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -41,6 +46,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = true;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,9 +61,13 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(recipe.isDwarvenRecipe() ? 0 : 1); // 0 = Dwarven - 1 = Common
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(_success ? 1 : 0); // item creation success/failed
|
||||
packet.writeC(0);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(_success ? 1 : 0); // item creation none/success/failed
|
||||
packet.writeC(0); // Show offering window.
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,17 +18,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _player;
|
||||
private final int _recipeId;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player player, int recipeId)
|
||||
{
|
||||
_player = player;
|
||||
_recipeId = recipeId;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,10 +44,14 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_recipeId);
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(0xffffffff);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(0xffffffff); // item creation none/success/failed
|
||||
packet.writeQ(0); // manufacturePrice
|
||||
packet.writeC(0); // Trigger offering window if 1
|
||||
packet.writeQ(0);
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -19,17 +19,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -50,11 +55,11 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
for (ManufactureItem temp : _manufacturer.getManufactureItems().values())
|
||||
{
|
||||
packet.writeD(temp.getRecipeId());
|
||||
packet.writeD(0); // unknown
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(temp.getCost());
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeC(0); // Classic - 166
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.RecipeList;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -28,12 +29,16 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final int _id;
|
||||
private final Player _player;
|
||||
private final boolean _success;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
{
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = success;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -41,6 +46,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = true;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,9 +61,13 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(recipe.isDwarvenRecipe() ? 0 : 1); // 0 = Dwarven - 1 = Common
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(_success ? 1 : 0); // item creation success/failed
|
||||
packet.writeC(0);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(_success ? 1 : 0); // item creation none/success/failed
|
||||
packet.writeC(0); // Show offering window.
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,17 +18,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _player;
|
||||
private final int _recipeId;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player player, int recipeId)
|
||||
{
|
||||
_player = player;
|
||||
_recipeId = recipeId;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,10 +44,14 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_recipeId);
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(0xffffffff);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(0xffffffff); // item creation none/success/failed
|
||||
packet.writeQ(0); // manufacturePrice
|
||||
packet.writeC(0); // Trigger offering window if 1
|
||||
packet.writeQ(0);
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -19,17 +19,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -50,11 +55,11 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
for (ManufactureItem temp : _manufacturer.getManufactureItems().values())
|
||||
{
|
||||
packet.writeD(temp.getRecipeId());
|
||||
packet.writeD(0); // unknown
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(temp.getCost());
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeC(0); // Classic - 166
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@ -20,6 +20,7 @@ import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.RecipeData;
|
||||
import org.l2jmobius.gameserver.model.RecipeList;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.PacketLogger;
|
||||
|
||||
@ -28,12 +29,16 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
private final int _id;
|
||||
private final Player _player;
|
||||
private final boolean _success;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player, boolean success)
|
||||
{
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = success;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
public RecipeItemMakeInfo(int id, Player player)
|
||||
@ -41,6 +46,8 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
_id = id;
|
||||
_player = player;
|
||||
_success = true;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,9 +61,13 @@ public class RecipeItemMakeInfo implements IClientOutgoingPacket
|
||||
packet.writeD(recipe.isDwarvenRecipe() ? 0 : 1); // 0 = Dwarven - 1 = Common
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(_success ? 1 : 0); // item creation success/failed
|
||||
packet.writeC(0);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(_success ? 1 : 0); // item creation none/success/failed
|
||||
packet.writeC(0); // Show offering window.
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
PacketLogger.info("Character: " + _player + ": Requested unexisting recipe with id = " + _id);
|
||||
|
@ -18,17 +18,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _player;
|
||||
private final int _recipeId;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopItemInfo(Player player, int recipeId)
|
||||
{
|
||||
_player = player;
|
||||
_recipeId = recipeId;
|
||||
_craftRate = _player.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _player.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -39,10 +44,14 @@ public class RecipeShopItemInfo implements IClientOutgoingPacket
|
||||
packet.writeD(_recipeId);
|
||||
packet.writeD((int) _player.getCurrentMp());
|
||||
packet.writeD(_player.getMaxMp());
|
||||
packet.writeD(0xffffffff);
|
||||
packet.writeQ(0);
|
||||
packet.writeD(0xffffffff); // item creation none/success/failed
|
||||
packet.writeQ(0); // manufacturePrice
|
||||
packet.writeC(0); // Trigger offering window if 1
|
||||
packet.writeQ(0);
|
||||
packet.writeQ(0); // Adena worth of items for maximum offering.
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
packet.writeC(0); // find me
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -19,17 +19,22 @@ package org.l2jmobius.gameserver.network.serverpackets;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.ManufactureItem;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
{
|
||||
private final Player _buyer;
|
||||
private final Player _manufacturer;
|
||||
private final double _craftRate;
|
||||
private final double _craftCritical;
|
||||
|
||||
public RecipeShopSellList(Player buyer, Player manufacturer)
|
||||
{
|
||||
_buyer = buyer;
|
||||
_manufacturer = manufacturer;
|
||||
_craftRate = _manufacturer.getStat().getValue(Stat.CRAFT_RATE, 0);
|
||||
_craftCritical = _manufacturer.getStat().getValue(Stat.CRAFTING_CRITICAL, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -50,11 +55,11 @@ public class RecipeShopSellList implements IClientOutgoingPacket
|
||||
for (ManufactureItem temp : _manufacturer.getManufactureItems().values())
|
||||
{
|
||||
packet.writeD(temp.getRecipeId());
|
||||
packet.writeD(0); // unknown
|
||||
packet.writeD(0); // CanCreate?
|
||||
packet.writeQ(temp.getCost());
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeQ(0); // Classic - 166
|
||||
packet.writeC(0); // Classic - 166
|
||||
packet.writeF(Math.min(_craftRate, 100.0));
|
||||
packet.writeC(_craftCritical > 0 ? 1 : 0);
|
||||
packet.writeF(Math.min(_craftCritical, 100.0));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user