Elemental spirit extraction fee by grade.
This commit is contained in:
parent
27176333cf
commit
de3890b3bf
@ -35,9 +35,16 @@ public class ElementalSpiritData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ElementalSpiritData.class.getName());
|
||||
|
||||
public static final long EXTRACT_FEE = 1000000;
|
||||
public static final float FRAGMENT_XP_CONSUME = 50000.0f;
|
||||
public static final int TALENT_INIT_FEE = 50000;
|
||||
public final static int[] EXTRACT_FEES =
|
||||
{
|
||||
100000,
|
||||
200000,
|
||||
300000,
|
||||
600000,
|
||||
1500000
|
||||
};
|
||||
|
||||
private static final Map<Byte, Map<Byte, ElementalSpiritTemplateHolder>> SPIRIT_DATA = new HashMap<>(4);
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class ExElementalSpiritExtract implements IClientIncomingPacket
|
||||
final int amount = spirit.getExtractAmount();
|
||||
client.sendPacket(new SystemMessage(SystemMessageId.EXTRACTED_S1_S2_SUCCESSFULLY).addItemName(spirit.getExtractItem()).addInt(amount));
|
||||
spirit.reduceLevel();
|
||||
player.addItem("Extract", spirit.getExtractItem(), amount, player, true);
|
||||
player.addItem("ElementalSpiritExtract", spirit.getExtractItem(), amount, player, true);
|
||||
|
||||
final UserInfo userInfo = new UserInfo(player);
|
||||
userInfo.addComponentType(UserInfoType.ATT_SPIRITS);
|
||||
@ -98,7 +98,7 @@ public class ExElementalSpiritExtract implements IClientIncomingPacket
|
||||
player.sendPacket(SystemMessageId.UNABLE_TO_EVOLVE_DURING_BATTLE);
|
||||
return false;
|
||||
}
|
||||
if (!player.reduceAdena("Extract", ElementalSpiritData.EXTRACT_FEE, player, true))
|
||||
if (!player.reduceAdena("ElementalSpiritExtract", ElementalSpiritData.EXTRACT_FEES[spirit.getStage() - 1], player, true))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.NOT_ENOUGH_INGREDIENTS_TO_EXTRACT);
|
||||
return false;
|
||||
|
@ -17,6 +17,7 @@
|
||||
package org.l2jmobius.gameserver.network.serverpackets.elementalspirits;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.ElementalSpiritData;
|
||||
import org.l2jmobius.gameserver.enums.ElementalType;
|
||||
import org.l2jmobius.gameserver.model.ElementalSpirit;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -56,7 +57,7 @@ public class ElementalSpiritExtractInfo implements IClientOutgoingPacket
|
||||
packet.writeC(1); // cost count
|
||||
// for each cost count
|
||||
packet.writeD(57); // item id
|
||||
packet.writeD(1000000); // item count
|
||||
packet.writeD(ElementalSpiritData.EXTRACT_FEES[spirit.getStage() - 1]); // item count
|
||||
|
||||
packet.writeD(spirit.getExtractItem());
|
||||
packet.writeD(spirit.getExtractAmount());
|
||||
|
@ -35,9 +35,16 @@ public class ElementalSpiritData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(ElementalSpiritData.class.getName());
|
||||
|
||||
public static final long EXTRACT_FEE = 1000000;
|
||||
public static final float FRAGMENT_XP_CONSUME = 50000.0f;
|
||||
public static final int TALENT_INIT_FEE = 50000;
|
||||
public final static int[] EXTRACT_FEES =
|
||||
{
|
||||
100000,
|
||||
200000,
|
||||
300000,
|
||||
600000,
|
||||
1500000
|
||||
};
|
||||
|
||||
private static final Map<Byte, Map<Byte, ElementalSpiritTemplateHolder>> SPIRIT_DATA = new HashMap<>(4);
|
||||
|
||||
|
@ -66,7 +66,7 @@ public class ExElementalSpiritExtract implements IClientIncomingPacket
|
||||
final int amount = spirit.getExtractAmount();
|
||||
client.sendPacket(new SystemMessage(SystemMessageId.EXTRACTED_S1_S2_SUCCESSFULLY).addItemName(spirit.getExtractItem()).addInt(amount));
|
||||
spirit.reduceLevel();
|
||||
player.addItem("Extract", spirit.getExtractItem(), amount, player, true);
|
||||
player.addItem("ElementalSpiritExtract", spirit.getExtractItem(), amount, player, true);
|
||||
|
||||
final UserInfo userInfo = new UserInfo(player);
|
||||
userInfo.addComponentType(UserInfoType.ATT_SPIRITS);
|
||||
@ -98,7 +98,7 @@ public class ExElementalSpiritExtract implements IClientIncomingPacket
|
||||
player.sendPacket(SystemMessageId.UNABLE_TO_EVOLVE_DURING_BATTLE);
|
||||
return false;
|
||||
}
|
||||
if (!player.reduceAdena("Extract", ElementalSpiritData.EXTRACT_FEE, player, true))
|
||||
if (!player.reduceAdena("ElementalSpiritExtract", ElementalSpiritData.EXTRACT_FEES[spirit.getStage() - 1], player, true))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.NOT_ENOUGH_INGREDIENTS_TO_EXTRACT);
|
||||
return false;
|
||||
|
@ -17,6 +17,7 @@
|
||||
package org.l2jmobius.gameserver.network.serverpackets.elementalspirits;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.ElementalSpiritData;
|
||||
import org.l2jmobius.gameserver.enums.ElementalType;
|
||||
import org.l2jmobius.gameserver.model.ElementalSpirit;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
@ -56,7 +57,7 @@ public class ElementalSpiritExtractInfo implements IClientOutgoingPacket
|
||||
packet.writeC(1); // cost count
|
||||
// for each cost count
|
||||
packet.writeD(57); // item id
|
||||
packet.writeD(1000000); // item count
|
||||
packet.writeD(ElementalSpiritData.EXTRACT_FEES[spirit.getStage() - 1]); // item count
|
||||
|
||||
packet.writeD(spirit.getExtractItem());
|
||||
packet.writeD(spirit.getExtractAmount());
|
||||
|
Loading…
Reference in New Issue
Block a user