Addition of upgrade equipment system.
This commit is contained in:
3824
L2J_Mobius_6.0_Fafurion/dist/game/data/UpgradeEquipmentData.xml
vendored
Normal file
3824
L2J_Mobius_6.0_Fafurion/dist/game/data/UpgradeEquipmentData.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,6 @@
|
|||||||
<html><body>Head Blacksmith Ferris:<br>
|
<html><body>Head Blacksmith Ferris:<br>
|
||||||
Have you heard of the crystals that contain the desires of spirits? They've been appearing in various places throughout Aden, and the elders and blacksmiths found out that they can be used to increase the level of equipment.<br>
|
Have you heard of the crystals that contain the desires of spirits? They've been appearing in various places throughout Aden, and the elders and blacksmiths found out that they can be used to increase the level of equipment.<br>
|
||||||
I learned from the elders how to bring out the power from the crystals, and I'm able to upgrade equipment with that. Are you ready?<br>
|
I learned from the elders how to bring out the power from the crystals, and I'm able to upgrade equipment with that. Are you ready?<br>
|
||||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 30847002"><font color="LEVEL">"Upgrade Warrior, Knight and Wizard Circlet"</font></Button>
|
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_UpgradeEquipment"><font color="LEVEL">"Upgrade equipment."</font></Button>
|
||||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_exc_multisell 30847001"><font color="LEVEL">"Exchange Krishna/Leviathan Equipment"</font></Button>
|
|
||||||
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||||
</body></html>
|
</body></html>
|
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/multisell.xsd">
|
|
||||||
<npcs>
|
|
||||||
<npc>30847</npc> <!-- Ferris (Aden) -->
|
|
||||||
</npcs>
|
|
||||||
<item>
|
|
||||||
<ingredient count="1" id="48202" enchantmentLevel="5" /><!-- Warrior's Circlet -->
|
|
||||||
<ingredient count="1" id="48212" /> <!-- Noble Circlet Upgrade Stone -->
|
|
||||||
<production count="1" id="48203" /><!-- Noble Warrior's Circlet -->
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<ingredient count="1" id="48203" enchantmentLevel="5" /><!-- Noble Warrior's Circlet -->
|
|
||||||
<ingredient count="1" id="48213" /> <!-- Radiant Circlet Upgrade Stone -->
|
|
||||||
<production count="1" id="48204" /><!-- Radiant Warrior's Circlet -->
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<ingredient count="1" id="48205" enchantmentLevel="5" /><!-- Wizard's Circlet -->
|
|
||||||
<ingredient count="1" id="48212" /> <!-- Noble Circlet Upgrade Stone -->
|
|
||||||
<production count="1" id="48206" /><!-- Noble Wizard's Circlet -->
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<ingredient count="1" id="48206" enchantmentLevel="5" /><!-- Noble Wizard's Circlet -->
|
|
||||||
<ingredient count="1" id="48213" /> <!-- Radiant Circlet Upgrade Stone -->
|
|
||||||
<production count="1" id="48207" /><!-- Radiant Wizard's Circlet -->
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<ingredient count="1" id="48208" enchantmentLevel="5" /><!-- Knight's Circlet -->
|
|
||||||
<ingredient count="1" id="48212" /> <!-- Noble Circlet Upgrade Stone -->
|
|
||||||
<production count="1" id="48209" /><!-- Noble Knight's Circlet -->
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<ingredient count="1" id="48209" enchantmentLevel="5" /><!-- Noble Knight's Circlet -->
|
|
||||||
<ingredient count="1" id="48213" /> <!-- Radiant Circlet Upgrade Stone -->
|
|
||||||
<production count="1" id="48210" /><!-- Radiant Knight's Circlet -->
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<ingredient count="1" id="48491" enchantmentLevel="5" /><!-- Dragon Skin Shirt -->
|
|
||||||
<ingredient count="1" id="48495" /> <!-- Noble Leather Upgrade Stone -->
|
|
||||||
<production count="1" id="48492" /><!-- Dragon Leather Shirt -->
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<ingredient count="1" id="48492" enchantmentLevel="5" /><!-- Dragon Leather Shirt -->
|
|
||||||
<ingredient count="1" id="48496" /> <!-- Radiant Rind Upgrade Stone -->
|
|
||||||
<production count="1" id="48493" /><!-- Dragon Rind Leather Shirt -->
|
|
||||||
</item>
|
|
||||||
</list>
|
|
@@ -159,6 +159,7 @@ import handlers.bypasshandlers.ReleaseAttribute;
|
|||||||
import handlers.bypasshandlers.SkillList;
|
import handlers.bypasshandlers.SkillList;
|
||||||
import handlers.bypasshandlers.TerritoryStatus;
|
import handlers.bypasshandlers.TerritoryStatus;
|
||||||
import handlers.bypasshandlers.TutorialClose;
|
import handlers.bypasshandlers.TutorialClose;
|
||||||
|
import handlers.bypasshandlers.UpgradeEquipment;
|
||||||
import handlers.bypasshandlers.VoiceCommand;
|
import handlers.bypasshandlers.VoiceCommand;
|
||||||
import handlers.bypasshandlers.Wear;
|
import handlers.bypasshandlers.Wear;
|
||||||
import handlers.chathandlers.ChatAlliance;
|
import handlers.chathandlers.ChatAlliance;
|
||||||
@@ -498,6 +499,7 @@ public class MasterHandler
|
|||||||
SkillList.class,
|
SkillList.class,
|
||||||
TerritoryStatus.class,
|
TerritoryStatus.class,
|
||||||
TutorialClose.class,
|
TutorialClose.class,
|
||||||
|
UpgradeEquipment.class,
|
||||||
VoiceCommand.class,
|
VoiceCommand.class,
|
||||||
Wear.class,
|
Wear.class,
|
||||||
},
|
},
|
||||||
|
53
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/bypasshandlers/UpgradeEquipment.java
vendored
Normal file
53
L2J_Mobius_6.0_Fafurion/dist/game/data/scripts/handlers/bypasshandlers/UpgradeEquipment.java
vendored
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* 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 handlers.bypasshandlers;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.handler.IBypassHandler;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
import org.l2jmobius.gameserver.network.serverpackets.equipmentupgrade.ExShowUpgradeSystem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class UpgradeEquipment implements IBypassHandler
|
||||||
|
{
|
||||||
|
private static final int FERRIS = 30847;
|
||||||
|
|
||||||
|
private static final String[] COMMANDS =
|
||||||
|
{
|
||||||
|
"UpgradeEquipment"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useBypass(String command, PlayerInstance player, Creature target)
|
||||||
|
{
|
||||||
|
if ((target == null) || !target.isNpc() || (((Npc) target).getId() != FERRIS))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
player.sendPacket(new ExShowUpgradeSystem());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getBypassList()
|
||||||
|
{
|
||||||
|
return COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
21
L2J_Mobius_6.0_Fafurion/dist/game/data/xsd/UpgradeEquipmentData.xsd
vendored
Normal file
21
L2J_Mobius_6.0_Fafurion/dist/game/data/xsd/UpgradeEquipmentData.xsd
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<xs:element name="list">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="upgrade" maxOccurs="unbounded" minOccurs="0">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="xs:string">
|
||||||
|
<xs:attribute type="xs:short" name="id" use="required"/>
|
||||||
|
<xs:attribute type="xs:string" name="item" use="optional"/>
|
||||||
|
<xs:attribute type="xs:string" name="materials" use="optional"/>
|
||||||
|
<xs:attribute type="xs:long" name="adena" use="optional"/>
|
||||||
|
<xs:attribute type="xs:string" name="result" use="required"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
@@ -98,6 +98,7 @@ import org.l2jmobius.gameserver.data.xml.impl.SpawnsData;
|
|||||||
import org.l2jmobius.gameserver.data.xml.impl.StaticObjectData;
|
import org.l2jmobius.gameserver.data.xml.impl.StaticObjectData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.TeleportersData;
|
import org.l2jmobius.gameserver.data.xml.impl.TeleportersData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.TransformData;
|
import org.l2jmobius.gameserver.data.xml.impl.TransformData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.UpgradeEquipmentData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.VariationData;
|
import org.l2jmobius.gameserver.data.xml.impl.VariationData;
|
||||||
import org.l2jmobius.gameserver.datatables.BotReportTable;
|
import org.l2jmobius.gameserver.datatables.BotReportTable;
|
||||||
import org.l2jmobius.gameserver.datatables.EventDroplist;
|
import org.l2jmobius.gameserver.datatables.EventDroplist;
|
||||||
@@ -262,6 +263,7 @@ public class GameServer
|
|||||||
EnchantItemHPBonusData.getInstance();
|
EnchantItemHPBonusData.getInstance();
|
||||||
BuyListData.getInstance();
|
BuyListData.getInstance();
|
||||||
MultisellData.getInstance();
|
MultisellData.getInstance();
|
||||||
|
UpgradeEquipmentData.getInstance();
|
||||||
RecipeData.getInstance();
|
RecipeData.getInstance();
|
||||||
ArmorSetsData.getInstance();
|
ArmorSetsData.getInstance();
|
||||||
FishingData.getInstance();
|
FishingData.getInstance();
|
||||||
|
@@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* 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.data.xml.impl;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
|
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.UpgradeEquipmentHolder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class UpgradeEquipmentData implements IXmlReader
|
||||||
|
{
|
||||||
|
private static Logger LOGGER = Logger.getLogger(UpgradeEquipmentData.class.getName());
|
||||||
|
private static final Map<Integer, UpgradeEquipmentHolder> _upgrades = new HashMap<>();
|
||||||
|
|
||||||
|
protected UpgradeEquipmentData()
|
||||||
|
{
|
||||||
|
load();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load()
|
||||||
|
{
|
||||||
|
_upgrades.clear();
|
||||||
|
parseDatapackFile("data/UpgradeEquipmentData.xml");
|
||||||
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _upgrades.size() + " upgrade equipment data.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void parseDocument(Document doc, File f)
|
||||||
|
{
|
||||||
|
forEach(doc, "list", listNode -> forEach(listNode, "upgrade", upgradeNode ->
|
||||||
|
{
|
||||||
|
final StatsSet set = new StatsSet(parseAttributes(upgradeNode));
|
||||||
|
final int id = set.getInt("id");
|
||||||
|
final String[] item = set.getString("item").split(",");
|
||||||
|
final int requiredItemId = Integer.parseInt(item[0]);
|
||||||
|
final int requiredItemEnchant = Integer.parseInt(item[1]);
|
||||||
|
final String materials = set.getString("materials");
|
||||||
|
final List<ItemHolder> materialList = new ArrayList<>();
|
||||||
|
if (!materials.isEmpty())
|
||||||
|
{
|
||||||
|
for (String mat : materials.split(";"))
|
||||||
|
{
|
||||||
|
final String[] matValues = mat.split(",");
|
||||||
|
final int matItemId = Integer.parseInt(matValues[0]);
|
||||||
|
if (ItemTable.getInstance().getTemplate(matItemId) == null)
|
||||||
|
{
|
||||||
|
LOGGER.info(getClass().getSimpleName() + ": Material item with id " + matItemId + " does not exist.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
materialList.add(new ItemHolder(matItemId, Long.parseLong(matValues[1])));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
final long adena = set.getLong("adena", 0);
|
||||||
|
final String[] resultItem = set.getString("result").split(",");
|
||||||
|
final int resultItemId = Integer.parseInt(resultItem[0]);
|
||||||
|
final int resultItemEnchant = Integer.parseInt(resultItem[1]);
|
||||||
|
if (ItemTable.getInstance().getTemplate(requiredItemId) == null)
|
||||||
|
{
|
||||||
|
LOGGER.info(getClass().getSimpleName() + ": Required item with id " + requiredItemId + " does not exist.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_upgrades.put(id, new UpgradeEquipmentHolder(id, requiredItemId, requiredItemEnchant, materialList, adena, resultItemId, resultItemEnchant));
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpgradeEquipmentHolder getUpgrade(int id)
|
||||||
|
{
|
||||||
|
return _upgrades.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static UpgradeEquipmentData getInstance()
|
||||||
|
{
|
||||||
|
return SingletonHolder.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class SingletonHolder
|
||||||
|
{
|
||||||
|
protected static final UpgradeEquipmentData INSTANCE = new UpgradeEquipmentData();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* 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.model.holders;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class UpgradeEquipmentHolder
|
||||||
|
{
|
||||||
|
private final int _id;
|
||||||
|
private final int _requiredItemId;
|
||||||
|
private final int _requiredItemEnchant;
|
||||||
|
private final List<ItemHolder> _materials;
|
||||||
|
private final long _adena;
|
||||||
|
private final int _resultItemId;
|
||||||
|
private final int _resultItemEnchant;
|
||||||
|
|
||||||
|
public UpgradeEquipmentHolder(int id, int requiredItemId, int requiredItemEnchant, List<ItemHolder> materials, long adena, int resultItemId, int resultItemEnchant)
|
||||||
|
{
|
||||||
|
_id = id;
|
||||||
|
_requiredItemId = requiredItemId;
|
||||||
|
_requiredItemEnchant = requiredItemEnchant;
|
||||||
|
_materials = materials;
|
||||||
|
_adena = adena;
|
||||||
|
_resultItemId = resultItemId;
|
||||||
|
_resultItemEnchant = resultItemEnchant;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId()
|
||||||
|
{
|
||||||
|
return _id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRequiredItemId()
|
||||||
|
{
|
||||||
|
return _requiredItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRequiredItemEnchant()
|
||||||
|
{
|
||||||
|
return _requiredItemEnchant;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ItemHolder> getMaterials()
|
||||||
|
{
|
||||||
|
return _materials;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getAdena()
|
||||||
|
{
|
||||||
|
return _adena;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getResultItemId()
|
||||||
|
{
|
||||||
|
return _resultItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getResultItemEnchant()
|
||||||
|
{
|
||||||
|
return _resultItemEnchant;
|
||||||
|
}
|
||||||
|
}
|
@@ -69,6 +69,7 @@ import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrys
|
|||||||
import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
|
import org.l2jmobius.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul;
|
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExtraction;
|
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExtraction;
|
||||||
|
import org.l2jmobius.gameserver.network.clientpackets.equipmentupgrade.RequestUpgradeSystemResult;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.faction.RequestUserFactionInfo;
|
import org.l2jmobius.gameserver.network.clientpackets.faction.RequestUserFactionInfo;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGamePlay;
|
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGamePlay;
|
||||||
@@ -415,7 +416,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
|||||||
EXREQUEST_MATCH_GROUP_WITHDRAW(0x133, null, ConnectionState.IN_GAME),
|
EXREQUEST_MATCH_GROUP_WITHDRAW(0x133, null, ConnectionState.IN_GAME),
|
||||||
EXREQUEST_MATCH_GROUP_OUST(0x134, null, ConnectionState.IN_GAME),
|
EXREQUEST_MATCH_GROUP_OUST(0x134, null, ConnectionState.IN_GAME),
|
||||||
EXREQUEST_MATCH_GROUP_CHANGE_MASTER(0x135, null, ConnectionState.IN_GAME),
|
EXREQUEST_MATCH_GROUP_CHANGE_MASTER(0x135, null, ConnectionState.IN_GAME),
|
||||||
REQUEST_UPGRADE_SYSTEM_RESULT(0x136, null, ConnectionState.IN_GAME),
|
REQUEST_UPGRADE_SYSTEM_RESULT(0x136, RequestUpgradeSystemResult::new, ConnectionState.IN_GAME),
|
||||||
EX_CARD_UPDOWN_PICK_NUMB(0x137, null, ConnectionState.IN_GAME),
|
EX_CARD_UPDOWN_PICK_NUMB(0x137, null, ConnectionState.IN_GAME),
|
||||||
EX_CARD_UPDOWN_GAME_REWARD_REQUEST(0x138, null, ConnectionState.IN_GAME),
|
EX_CARD_UPDOWN_GAME_REWARD_REQUEST(0x138, null, ConnectionState.IN_GAME),
|
||||||
EX_CARD_UPDOWN_GAME_RETRY(0x139, null, ConnectionState.IN_GAME),
|
EX_CARD_UPDOWN_GAME_RETRY(0x139, null, ConnectionState.IN_GAME),
|
||||||
|
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* 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.clientpackets.equipmentupgrade;
|
||||||
|
|
||||||
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.UpgradeEquipmentData;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.UpgradeEquipmentHolder;
|
||||||
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
|
import org.l2jmobius.gameserver.network.serverpackets.equipmentupgrade.ExUpgradeSystemResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class RequestUpgradeSystemResult implements IClientIncomingPacket
|
||||||
|
{
|
||||||
|
private int _objectId;
|
||||||
|
private int _upgradeId;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
|
{
|
||||||
|
_objectId = packet.readD();
|
||||||
|
_upgradeId = packet.readD();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(GameClient client)
|
||||||
|
{
|
||||||
|
final PlayerInstance player = client.getPlayer();
|
||||||
|
if (player == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ItemInstance existingItem = player.getInventory().getItemByObjectId(_objectId);
|
||||||
|
if (existingItem == null)
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final UpgradeEquipmentHolder upgradeHolder = UpgradeEquipmentData.getInstance().getUpgrade(_upgradeId);
|
||||||
|
if (upgradeHolder == null)
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (ItemHolder material : upgradeHolder.getMaterials())
|
||||||
|
{
|
||||||
|
if (player.getInventory().getInventoryItemCount(material.getId(), -1) < material.getCount())
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final long adena = upgradeHolder.getAdena();
|
||||||
|
if ((adena > 0) && (player.getAdena() < adena))
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((existingItem.getItem().getId() != upgradeHolder.getRequiredItemId()) || (existingItem.getEnchantLevel() != upgradeHolder.getRequiredItemEnchant()))
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get materials.
|
||||||
|
player.destroyItem("UpgradeEquipment", _objectId, 1, player, true);
|
||||||
|
for (ItemHolder material : upgradeHolder.getMaterials())
|
||||||
|
{
|
||||||
|
player.destroyItemByItemId("UpgradeEquipment", material.getId(), material.getCount(), player, true);
|
||||||
|
}
|
||||||
|
if (adena > 0)
|
||||||
|
{
|
||||||
|
player.reduceAdena("UpgradeEquipment", adena, player, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Give item.
|
||||||
|
final ItemInstance newItem = player.addItem("UpgradeEquipment", upgradeHolder.getResultItemId(), 1, player, true);
|
||||||
|
final int enchantLevel = upgradeHolder.getResultItemEnchant();
|
||||||
|
if (enchantLevel > 0)
|
||||||
|
{
|
||||||
|
newItem.setEnchantLevel(enchantLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(newItem.getObjectId(), 1));
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* 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.equipmentupgrade;
|
||||||
|
|
||||||
|
import org.l2jmobius.commons.network.PacketWriter;
|
||||||
|
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
|
import org.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class ExShowUpgradeSystem extends AbstractItemPacket
|
||||||
|
{
|
||||||
|
public ExShowUpgradeSystem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean write(PacketWriter packet)
|
||||||
|
{
|
||||||
|
OutgoingPackets.EX_SHOW_UPGRADE_SYSTEM.writeId(packet);
|
||||||
|
packet.writeH(0x01);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* 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.equipmentupgrade;
|
||||||
|
|
||||||
|
import org.l2jmobius.commons.network.PacketWriter;
|
||||||
|
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
|
import org.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class ExUpgradeSystemResult extends AbstractItemPacket
|
||||||
|
{
|
||||||
|
private final int _objectId;
|
||||||
|
private final int _success;
|
||||||
|
|
||||||
|
public ExUpgradeSystemResult(int objectId, int success)
|
||||||
|
{
|
||||||
|
_objectId = objectId;
|
||||||
|
_success = success;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean write(PacketWriter packet)
|
||||||
|
{
|
||||||
|
OutgoingPackets.EX_UPGRADE_SYSTEM_RESULT.writeId(packet);
|
||||||
|
packet.writeH(_success);
|
||||||
|
packet.writeD(_objectId);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
57
L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/UpgradeEquipmentData.xml
vendored
Normal file
57
L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/UpgradeEquipmentData.xml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<list xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xsd/UpgradeEquipmentData.xsd">
|
||||||
|
<upgrade id="1" item="91244,5" materials="1459,200" adena="2000000" result="91245,0" />
|
||||||
|
<upgrade id="2" item="91245,5" materials="1460,1500" adena="10000000" result="91246,0" />
|
||||||
|
<upgrade id="3" item="91246,5" materials="1460,5000" adena="50000000" result="91247,0" />
|
||||||
|
<upgrade id="4" item="902,10" materials="91384,1" adena="10000000" result="91378,0" />
|
||||||
|
<upgrade id="5" item="864,10" materials="91385,1" adena="10000000" result="91379,0" />
|
||||||
|
<upgrade id="6" item="895,10" materials="91386,1" adena="10000000" result="91380,0" />
|
||||||
|
<upgrade id="7" item="893,10" materials="91387,1" adena="10000000" result="91381,0" />
|
||||||
|
<upgrade id="8" item="871,10" materials="91388,1" adena="10000000" result="91382,0" />
|
||||||
|
<upgrade id="9" item="862,10" materials="91389,1" adena="10000000" result="91383,0" />
|
||||||
|
<upgrade id="10" item="924,10" materials="91554,1" adena="10000000" result="91553,0" />
|
||||||
|
<upgrade id="11" item="902,11" materials="91384,1" adena="1000000" result="91378,0" />
|
||||||
|
<upgrade id="12" item="864,11" materials="91385,1" adena="1000000" result="91379,0" />
|
||||||
|
<upgrade id="13" item="895,11" materials="91386,1" adena="1000000" result="91380,0" />
|
||||||
|
<upgrade id="14" item="893,11" materials="91387,1" adena="1000000" result="91381,0" />
|
||||||
|
<upgrade id="15" item="871,11" materials="91388,1" adena="1000000" result="91382,0" />
|
||||||
|
<upgrade id="16" item="862,11" materials="91389,1" adena="1000000" result="91383,0" />
|
||||||
|
<upgrade id="17" item="924,11" materials="91554,1" adena="1000000" result="91553,0" />
|
||||||
|
<upgrade id="18" item="902,12" materials="91384,1" adena="10000" result="91378,0" />
|
||||||
|
<upgrade id="19" item="864,12" materials="91385,1" adena="10000" result="91379,0" />
|
||||||
|
<upgrade id="20" item="895,12" materials="91386,1" adena="10000" result="91380,0" />
|
||||||
|
<upgrade id="21" item="893,12" materials="91387,1" adena="10000" result="91381,0" />
|
||||||
|
<upgrade id="22" item="871,12" materials="91388,1" adena="10000" result="91382,0" />
|
||||||
|
<upgrade id="23" item="862,12" materials="91389,1" adena="10000" result="91383,0" />
|
||||||
|
<upgrade id="24" item="924,12" materials="91554,1" adena="10000" result="91553,0" />
|
||||||
|
<upgrade id="10000" item="71184,7" materials="71212,3" adena="7777" result="71193,0" />
|
||||||
|
<upgrade id="10001" item="71185,7" materials="71212,3" adena="7777" result="71194,0" />
|
||||||
|
<upgrade id="10002" item="71186,7" materials="71212,2" adena="7777" result="71195,0" />
|
||||||
|
<upgrade id="10003" item="71187,7" materials="71212,2" adena="7777" result="71196,0" />
|
||||||
|
<upgrade id="10004" item="71188,7" materials="71212,2" adena="7777" result="71197,0" />
|
||||||
|
<upgrade id="10005" item="71189,7" materials="71212,2" adena="7777" result="71198,0" />
|
||||||
|
<upgrade id="10006" item="71190,7" materials="71212,2" adena="7777" result="71199,0" />
|
||||||
|
<upgrade id="10007" item="71191,7" materials="71212,2" adena="7777" result="71200,0" />
|
||||||
|
<upgrade id="10008" item="71192,7" materials="71212,2" adena="7777" result="71201,0" />
|
||||||
|
<upgrade id="10009" item="71193,7" materials="71212,7" adena="7777" result="71202,0" />
|
||||||
|
<upgrade id="10010" item="71194,7" materials="71212,7" adena="7777" result="71203,0" />
|
||||||
|
<upgrade id="10011" item="71195,7" materials="71212,5" adena="7777" result="71204,0" />
|
||||||
|
<upgrade id="10012" item="71196,7" materials="71212,5" adena="7777" result="71205,0" />
|
||||||
|
<upgrade id="10013" item="71197,7" materials="71212,5" adena="7777" result="71206,0" />
|
||||||
|
<upgrade id="10014" item="71198,7" materials="71212,5" adena="7777" result="71207,0" />
|
||||||
|
<upgrade id="10015" item="71199,7" materials="71212,5" adena="7777" result="71208,0" />
|
||||||
|
<upgrade id="10016" item="71200,7" materials="71212,5" adena="7777" result="71209,0" />
|
||||||
|
<upgrade id="10017" item="71201,7" materials="71212,5" adena="7777" result="71210,0" />
|
||||||
|
<upgrade id="10018" item="71691,5" materials="" adena="12000000" result="71692,0" />
|
||||||
|
<upgrade id="10019" item="71692,5" materials="71699,3" adena="16000000" result="71693,0" />
|
||||||
|
<upgrade id="10020" item="71693,5" materials="71699,20" adena="50000000" result="71694,0" />
|
||||||
|
<upgrade id="10021" item="71695,5" materials="" adena="12000000" result="71696,0" />
|
||||||
|
<upgrade id="10022" item="71696,5" materials="71699,3" adena="16000000" result="71697,0" />
|
||||||
|
<upgrade id="10023" item="71697,5" materials="71699,20" adena="50000000" result="71698,0" />
|
||||||
|
<upgrade id="10024" item="29706,10" materials="71699,20" adena="1000" result="71693,0" />
|
||||||
|
<upgrade id="10025" item="29707,10" materials="71699,7" adena="1000" result="71693,0" />
|
||||||
|
<upgrade id="10026" item="29708,10" materials="71699,40" adena="1000" result="71694,0" />
|
||||||
|
<upgrade id="10027" item="29711,10" materials="71699,20" adena="1000" result="71697,0" />
|
||||||
|
<upgrade id="10028" item="29712,10" materials="71699,7" adena="1000" result="71697,0" />
|
||||||
|
<upgrade id="10029" item="29713,10" materials="71699,40" adena="1000" result="71698,0" />
|
||||||
|
</list>
|
6
L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/html/villagemaster/30847-1.htm
vendored
Normal file
6
L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/html/villagemaster/30847-1.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<html><body>Head Blacksmith Ferris:<br>
|
||||||
|
Have you heard of the crystals that contain the desires of spirits? They've been appearing in various places throughout Aden, and the elders and blacksmiths found out that they can be used to increase the level of equipment.<br>
|
||||||
|
I learned from the elders how to bring out the power from the crystals, and I'm able to upgrade equipment with that. Are you ready?<br>
|
||||||
|
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_UpgradeEquipment"><font color="LEVEL">"Upgrade equipment."</font></Button>
|
||||||
|
<Button ALIGN=LEFT ICON="RETURN" action="bypass -h npc_%objectId%_Chat 0">Back</Button>
|
||||||
|
</body></html>
|
@@ -1,6 +1,7 @@
|
|||||||
<html><body>Head Blacksmith Ferris:<br>
|
<html><body>Head Blacksmith Ferris:<br>
|
||||||
Aden Town used to be a teaming hub of blacksmith activities, especially during the war with Elmore always hovering on the horizon. Why in those days, ol' Tapoy of the Black Anvil Guild made a killing. He was able to retire in style. Bought a cute little cabin out by a lake and set up his own personal forge. Now that's the life!<br>
|
Before, us blacksmiths had a lot of work to be do here. Since our enemy Elmore was just a short distance away. The Black Anvil Guild also made good money back then.<br>
|
||||||
I thought that when wars were finally over I'd have some time to pursue my other interests, like knitting and free climbing, but I've been busier than ever lately. Sigh.
|
With the war over, I thought we would have some down time, but I guess that's not gonna happen.<br>
|
||||||
|
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Chat 1">"I want to upgrade equipment."</Button>
|
||||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest ClassTransferTalk">"Can you tell me about the 2nd Class Transfer?"</Button>
|
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest ClassTransferTalk">"Can you tell me about the 2nd Class Transfer?"</Button>
|
||||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest ClanMaster">Clan</Button>
|
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest ClanMaster">Clan</Button>
|
||||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AllianceMaster">Alliance</Button>
|
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest AllianceMaster">Alliance</Button>
|
||||||
|
@@ -160,6 +160,7 @@ import handlers.bypasshandlers.SupportBlessing;
|
|||||||
import handlers.bypasshandlers.SupportMagic;
|
import handlers.bypasshandlers.SupportMagic;
|
||||||
import handlers.bypasshandlers.TerritoryStatus;
|
import handlers.bypasshandlers.TerritoryStatus;
|
||||||
import handlers.bypasshandlers.TutorialClose;
|
import handlers.bypasshandlers.TutorialClose;
|
||||||
|
import handlers.bypasshandlers.UpgradeEquipment;
|
||||||
import handlers.bypasshandlers.VoiceCommand;
|
import handlers.bypasshandlers.VoiceCommand;
|
||||||
import handlers.bypasshandlers.Wear;
|
import handlers.bypasshandlers.Wear;
|
||||||
import handlers.chathandlers.ChatAlliance;
|
import handlers.chathandlers.ChatAlliance;
|
||||||
@@ -499,6 +500,7 @@ public class MasterHandler
|
|||||||
SupportMagic.class,
|
SupportMagic.class,
|
||||||
TerritoryStatus.class,
|
TerritoryStatus.class,
|
||||||
TutorialClose.class,
|
TutorialClose.class,
|
||||||
|
UpgradeEquipment.class,
|
||||||
VoiceCommand.class,
|
VoiceCommand.class,
|
||||||
Wear.class,
|
Wear.class,
|
||||||
},
|
},
|
||||||
|
@@ -0,0 +1,53 @@
|
|||||||
|
/*
|
||||||
|
* 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 handlers.bypasshandlers;
|
||||||
|
|
||||||
|
import org.l2jmobius.gameserver.handler.IBypassHandler;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
import org.l2jmobius.gameserver.network.serverpackets.equipmentupgrade.ExShowUpgradeSystem;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class UpgradeEquipment implements IBypassHandler
|
||||||
|
{
|
||||||
|
private static final int FERRIS = 30847;
|
||||||
|
|
||||||
|
private static final String[] COMMANDS =
|
||||||
|
{
|
||||||
|
"UpgradeEquipment"
|
||||||
|
};
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean useBypass(String command, PlayerInstance player, Creature target)
|
||||||
|
{
|
||||||
|
if ((target == null) || !target.isNpc() || (((Npc) target).getId() != FERRIS))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
player.sendPacket(new ExShowUpgradeSystem());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String[] getBypassList()
|
||||||
|
{
|
||||||
|
return COMMANDS;
|
||||||
|
}
|
||||||
|
}
|
21
L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/xsd/UpgradeEquipmentData.xsd
vendored
Normal file
21
L2J_Mobius_Classic_2.4_SecretOfEmpire/dist/game/data/xsd/UpgradeEquipmentData.xsd
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||||
|
<xs:element name="list">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:sequence>
|
||||||
|
<xs:element name="upgrade" maxOccurs="unbounded" minOccurs="0">
|
||||||
|
<xs:complexType>
|
||||||
|
<xs:simpleContent>
|
||||||
|
<xs:extension base="xs:string">
|
||||||
|
<xs:attribute type="xs:short" name="id" use="required"/>
|
||||||
|
<xs:attribute type="xs:string" name="item" use="optional"/>
|
||||||
|
<xs:attribute type="xs:string" name="materials" use="optional"/>
|
||||||
|
<xs:attribute type="xs:long" name="adena" use="optional"/>
|
||||||
|
<xs:attribute type="xs:string" name="result" use="required"/>
|
||||||
|
</xs:extension>
|
||||||
|
</xs:simpleContent>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:sequence>
|
||||||
|
</xs:complexType>
|
||||||
|
</xs:element>
|
||||||
|
</xs:schema>
|
@@ -94,6 +94,7 @@ import org.l2jmobius.gameserver.data.xml.impl.SpawnsData;
|
|||||||
import org.l2jmobius.gameserver.data.xml.impl.StaticObjectData;
|
import org.l2jmobius.gameserver.data.xml.impl.StaticObjectData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.TeleportersData;
|
import org.l2jmobius.gameserver.data.xml.impl.TeleportersData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.TransformData;
|
import org.l2jmobius.gameserver.data.xml.impl.TransformData;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.UpgradeEquipmentData;
|
||||||
import org.l2jmobius.gameserver.data.xml.impl.VariationData;
|
import org.l2jmobius.gameserver.data.xml.impl.VariationData;
|
||||||
import org.l2jmobius.gameserver.datatables.BotReportTable;
|
import org.l2jmobius.gameserver.datatables.BotReportTable;
|
||||||
import org.l2jmobius.gameserver.datatables.EventDroplist;
|
import org.l2jmobius.gameserver.datatables.EventDroplist;
|
||||||
@@ -257,6 +258,7 @@ public class GameServer
|
|||||||
EnchantItemHPBonusData.getInstance();
|
EnchantItemHPBonusData.getInstance();
|
||||||
BuyListData.getInstance();
|
BuyListData.getInstance();
|
||||||
MultisellData.getInstance();
|
MultisellData.getInstance();
|
||||||
|
UpgradeEquipmentData.getInstance();
|
||||||
RecipeData.getInstance();
|
RecipeData.getInstance();
|
||||||
ArmorSetsData.getInstance();
|
ArmorSetsData.getInstance();
|
||||||
FishingData.getInstance();
|
FishingData.getInstance();
|
||||||
|
@@ -0,0 +1,112 @@
|
|||||||
|
/*
|
||||||
|
* 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.data.xml.impl;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
|
import org.l2jmobius.commons.util.IXmlReader;
|
||||||
|
import org.l2jmobius.gameserver.datatables.ItemTable;
|
||||||
|
import org.l2jmobius.gameserver.model.StatsSet;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.UpgradeEquipmentHolder;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class UpgradeEquipmentData implements IXmlReader
|
||||||
|
{
|
||||||
|
private static Logger LOGGER = Logger.getLogger(UpgradeEquipmentData.class.getName());
|
||||||
|
private static final Map<Integer, UpgradeEquipmentHolder> _upgrades = new HashMap<>();
|
||||||
|
|
||||||
|
protected UpgradeEquipmentData()
|
||||||
|
{
|
||||||
|
load();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load()
|
||||||
|
{
|
||||||
|
_upgrades.clear();
|
||||||
|
parseDatapackFile("data/UpgradeEquipmentData.xml");
|
||||||
|
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _upgrades.size() + " upgrade equipment data.");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void parseDocument(Document doc, File f)
|
||||||
|
{
|
||||||
|
forEach(doc, "list", listNode -> forEach(listNode, "upgrade", upgradeNode ->
|
||||||
|
{
|
||||||
|
final StatsSet set = new StatsSet(parseAttributes(upgradeNode));
|
||||||
|
final int id = set.getInt("id");
|
||||||
|
final String[] item = set.getString("item").split(",");
|
||||||
|
final int requiredItemId = Integer.parseInt(item[0]);
|
||||||
|
final int requiredItemEnchant = Integer.parseInt(item[1]);
|
||||||
|
final String materials = set.getString("materials");
|
||||||
|
final List<ItemHolder> materialList = new ArrayList<>();
|
||||||
|
if (!materials.isEmpty())
|
||||||
|
{
|
||||||
|
for (String mat : materials.split(";"))
|
||||||
|
{
|
||||||
|
final String[] matValues = mat.split(",");
|
||||||
|
final int matItemId = Integer.parseInt(matValues[0]);
|
||||||
|
if (ItemTable.getInstance().getTemplate(matItemId) == null)
|
||||||
|
{
|
||||||
|
LOGGER.info(getClass().getSimpleName() + ": Material item with id " + matItemId + " does not exist.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
materialList.add(new ItemHolder(matItemId, Long.parseLong(matValues[1])));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
final long adena = set.getLong("adena", 0);
|
||||||
|
final String[] resultItem = set.getString("result").split(",");
|
||||||
|
final int resultItemId = Integer.parseInt(resultItem[0]);
|
||||||
|
final int resultItemEnchant = Integer.parseInt(resultItem[1]);
|
||||||
|
if (ItemTable.getInstance().getTemplate(requiredItemId) == null)
|
||||||
|
{
|
||||||
|
LOGGER.info(getClass().getSimpleName() + ": Required item with id " + requiredItemId + " does not exist.");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_upgrades.put(id, new UpgradeEquipmentHolder(id, requiredItemId, requiredItemEnchant, materialList, adena, resultItemId, resultItemEnchant));
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
|
public UpgradeEquipmentHolder getUpgrade(int id)
|
||||||
|
{
|
||||||
|
return _upgrades.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static UpgradeEquipmentData getInstance()
|
||||||
|
{
|
||||||
|
return SingletonHolder.INSTANCE;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class SingletonHolder
|
||||||
|
{
|
||||||
|
protected static final UpgradeEquipmentData INSTANCE = new UpgradeEquipmentData();
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,79 @@
|
|||||||
|
/*
|
||||||
|
* 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.model.holders;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class UpgradeEquipmentHolder
|
||||||
|
{
|
||||||
|
private final int _id;
|
||||||
|
private final int _requiredItemId;
|
||||||
|
private final int _requiredItemEnchant;
|
||||||
|
private final List<ItemHolder> _materials;
|
||||||
|
private final long _adena;
|
||||||
|
private final int _resultItemId;
|
||||||
|
private final int _resultItemEnchant;
|
||||||
|
|
||||||
|
public UpgradeEquipmentHolder(int id, int requiredItemId, int requiredItemEnchant, List<ItemHolder> materials, long adena, int resultItemId, int resultItemEnchant)
|
||||||
|
{
|
||||||
|
_id = id;
|
||||||
|
_requiredItemId = requiredItemId;
|
||||||
|
_requiredItemEnchant = requiredItemEnchant;
|
||||||
|
_materials = materials;
|
||||||
|
_adena = adena;
|
||||||
|
_resultItemId = resultItemId;
|
||||||
|
_resultItemEnchant = resultItemEnchant;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getId()
|
||||||
|
{
|
||||||
|
return _id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRequiredItemId()
|
||||||
|
{
|
||||||
|
return _requiredItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getRequiredItemEnchant()
|
||||||
|
{
|
||||||
|
return _requiredItemEnchant;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ItemHolder> getMaterials()
|
||||||
|
{
|
||||||
|
return _materials;
|
||||||
|
}
|
||||||
|
|
||||||
|
public long getAdena()
|
||||||
|
{
|
||||||
|
return _adena;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getResultItemId()
|
||||||
|
{
|
||||||
|
return _resultItemId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getResultItemEnchant()
|
||||||
|
{
|
||||||
|
return _resultItemEnchant;
|
||||||
|
}
|
||||||
|
}
|
@@ -63,6 +63,7 @@ import org.l2jmobius.gameserver.network.clientpackets.dailymission.RequestTodoLi
|
|||||||
import org.l2jmobius.gameserver.network.clientpackets.elementalspirits.ExElementalSpiritInfo;
|
import org.l2jmobius.gameserver.network.clientpackets.elementalspirits.ExElementalSpiritInfo;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul;
|
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestItemEnsoul;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExtraction;
|
import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExtraction;
|
||||||
|
import org.l2jmobius.gameserver.network.clientpackets.equipmentupgrade.RequestUpgradeSystemResult;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGamePlay;
|
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGamePlay;
|
||||||
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGameStartInfo;
|
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGameStartInfo;
|
||||||
@@ -396,7 +397,7 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
|||||||
EXREQUEST_MATCH_GROUP_WITHDRAW(0x133, null, ConnectionState.IN_GAME),
|
EXREQUEST_MATCH_GROUP_WITHDRAW(0x133, null, ConnectionState.IN_GAME),
|
||||||
EXREQUEST_MATCH_GROUP_OUST(0x134, null, ConnectionState.IN_GAME),
|
EXREQUEST_MATCH_GROUP_OUST(0x134, null, ConnectionState.IN_GAME),
|
||||||
EXREQUEST_MATCH_GROUP_CHANGE_MASTER(0x135, null, ConnectionState.IN_GAME),
|
EXREQUEST_MATCH_GROUP_CHANGE_MASTER(0x135, null, ConnectionState.IN_GAME),
|
||||||
REQUEST_UPGRADE_SYSTEM_RESULT(0x136, null, ConnectionState.IN_GAME),
|
REQUEST_UPGRADE_SYSTEM_RESULT(0x136, RequestUpgradeSystemResult::new, ConnectionState.IN_GAME),
|
||||||
EX_CARD_UPDOWN_PICK_NUMB(0x137, null, ConnectionState.IN_GAME),
|
EX_CARD_UPDOWN_PICK_NUMB(0x137, null, ConnectionState.IN_GAME),
|
||||||
EX_CARD_UPDOWN_GAME_REWARD_REQUEST(0x138, null, ConnectionState.IN_GAME),
|
EX_CARD_UPDOWN_GAME_REWARD_REQUEST(0x138, null, ConnectionState.IN_GAME),
|
||||||
EX_CARD_UPDOWN_GAME_RETRY(0x139, null, ConnectionState.IN_GAME),
|
EX_CARD_UPDOWN_GAME_RETRY(0x139, null, ConnectionState.IN_GAME),
|
||||||
|
@@ -0,0 +1,111 @@
|
|||||||
|
/*
|
||||||
|
* 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.clientpackets.equipmentupgrade;
|
||||||
|
|
||||||
|
import org.l2jmobius.commons.network.PacketReader;
|
||||||
|
import org.l2jmobius.gameserver.data.xml.impl.UpgradeEquipmentData;
|
||||||
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||||
|
import org.l2jmobius.gameserver.model.holders.UpgradeEquipmentHolder;
|
||||||
|
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||||
|
import org.l2jmobius.gameserver.network.GameClient;
|
||||||
|
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||||
|
import org.l2jmobius.gameserver.network.serverpackets.equipmentupgrade.ExUpgradeSystemResult;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class RequestUpgradeSystemResult implements IClientIncomingPacket
|
||||||
|
{
|
||||||
|
private int _objectId;
|
||||||
|
private int _upgradeId;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean read(GameClient client, PacketReader packet)
|
||||||
|
{
|
||||||
|
_objectId = packet.readD();
|
||||||
|
_upgradeId = packet.readD();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void run(GameClient client)
|
||||||
|
{
|
||||||
|
final PlayerInstance player = client.getPlayer();
|
||||||
|
if (player == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final ItemInstance existingItem = player.getInventory().getItemByObjectId(_objectId);
|
||||||
|
if (existingItem == null)
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
final UpgradeEquipmentHolder upgradeHolder = UpgradeEquipmentData.getInstance().getUpgrade(_upgradeId);
|
||||||
|
if (upgradeHolder == null)
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (ItemHolder material : upgradeHolder.getMaterials())
|
||||||
|
{
|
||||||
|
if (player.getInventory().getInventoryItemCount(material.getId(), -1) < material.getCount())
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
final long adena = upgradeHolder.getAdena();
|
||||||
|
if ((adena > 0) && (player.getAdena() < adena))
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((existingItem.getItem().getId() != upgradeHolder.getRequiredItemId()) || (existingItem.getEnchantLevel() != upgradeHolder.getRequiredItemEnchant()))
|
||||||
|
{
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(0, 0));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get materials.
|
||||||
|
player.destroyItem("UpgradeEquipment", _objectId, 1, player, true);
|
||||||
|
for (ItemHolder material : upgradeHolder.getMaterials())
|
||||||
|
{
|
||||||
|
player.destroyItemByItemId("UpgradeEquipment", material.getId(), material.getCount(), player, true);
|
||||||
|
}
|
||||||
|
if (adena > 0)
|
||||||
|
{
|
||||||
|
player.reduceAdena("UpgradeEquipment", adena, player, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Give item.
|
||||||
|
final ItemInstance newItem = player.addItem("UpgradeEquipment", upgradeHolder.getResultItemId(), 1, player, true);
|
||||||
|
final int enchantLevel = upgradeHolder.getResultItemEnchant();
|
||||||
|
if (enchantLevel > 0)
|
||||||
|
{
|
||||||
|
newItem.setEnchantLevel(enchantLevel);
|
||||||
|
}
|
||||||
|
|
||||||
|
player.sendPacket(new ExUpgradeSystemResult(newItem.getObjectId(), 1));
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,39 @@
|
|||||||
|
/*
|
||||||
|
* 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.equipmentupgrade;
|
||||||
|
|
||||||
|
import org.l2jmobius.commons.network.PacketWriter;
|
||||||
|
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
|
import org.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class ExShowUpgradeSystem extends AbstractItemPacket
|
||||||
|
{
|
||||||
|
public ExShowUpgradeSystem()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean write(PacketWriter packet)
|
||||||
|
{
|
||||||
|
OutgoingPackets.EX_SHOW_UPGRADE_SYSTEM.writeId(packet);
|
||||||
|
packet.writeH(0x01);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
@@ -0,0 +1,45 @@
|
|||||||
|
/*
|
||||||
|
* 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.equipmentupgrade;
|
||||||
|
|
||||||
|
import org.l2jmobius.commons.network.PacketWriter;
|
||||||
|
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||||
|
import org.l2jmobius.gameserver.network.serverpackets.AbstractItemPacket;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Mobius
|
||||||
|
*/
|
||||||
|
public class ExUpgradeSystemResult extends AbstractItemPacket
|
||||||
|
{
|
||||||
|
private final int _objectId;
|
||||||
|
private final int _success;
|
||||||
|
|
||||||
|
public ExUpgradeSystemResult(int objectId, int success)
|
||||||
|
{
|
||||||
|
_objectId = objectId;
|
||||||
|
_success = success;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean write(PacketWriter packet)
|
||||||
|
{
|
||||||
|
OutgoingPackets.EX_UPGRADE_SYSTEM_RESULT.writeId(packet);
|
||||||
|
packet.writeH(_success);
|
||||||
|
packet.writeD(_objectId);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user