Initial changes.
This commit is contained in:
@@ -221,11 +221,11 @@ public class Config
|
||||
public static int MIN_ABNORMAL_STATE_SUCCESS_RATE;
|
||||
public static int MAX_ABNORMAL_STATE_SUCCESS_RATE;
|
||||
public static long MAX_SP;
|
||||
public static byte PLAYER_MAXIMUM_LEVEL;
|
||||
public static byte MAX_SUBCLASS;
|
||||
public static byte BASE_SUBCLASS_LEVEL;
|
||||
public static byte BASE_DUALCLASS_LEVEL;
|
||||
public static byte MAX_SUBCLASS_LEVEL;
|
||||
public static int PLAYER_MAXIMUM_LEVEL;
|
||||
public static int MAX_SUBCLASS;
|
||||
public static int BASE_SUBCLASS_LEVEL;
|
||||
public static int BASE_DUALCLASS_LEVEL;
|
||||
public static int MAX_SUBCLASS_LEVEL;
|
||||
public static int MAX_PVTSTORESELL_SLOTS_DWARF;
|
||||
public static int MAX_PVTSTORESELL_SLOTS_OTHER;
|
||||
public static int MAX_PVTSTOREBUY_SLOTS_DWARF;
|
||||
@@ -460,9 +460,6 @@ public class Config
|
||||
public static boolean ORDER_QUEST_LIST_BY_QUESTID;
|
||||
public static boolean AUTODELETE_INVALID_QUEST_DATA;
|
||||
public static boolean ENABLE_STORY_QUEST_BUFF_REWARD;
|
||||
public static ItemHolder EXALTED_FOR_GLORY_ITEM_MAX;
|
||||
public static ItemHolder EXALTED_FOR_HONOR_ITEM_MAX;
|
||||
public static ItemHolder EXALTED_FOR_VICTORY_ITEM_MAX;
|
||||
public static boolean MULTIPLE_ITEM_DROP;
|
||||
public static boolean FORCE_INVENTORY_UPDATE;
|
||||
public static boolean LAZY_CACHE;
|
||||
@@ -1817,12 +1814,12 @@ public class Config
|
||||
MIN_ABNORMAL_STATE_SUCCESS_RATE = Character.getInt("MinAbnormalStateSuccessRate", 10);
|
||||
MAX_ABNORMAL_STATE_SUCCESS_RATE = Character.getInt("MaxAbnormalStateSuccessRate", 90);
|
||||
MAX_SP = Character.getLong("MaxSp", 50000000000L) >= 0 ? Character.getLong("MaxSp", 50000000000L) : Long.MAX_VALUE;
|
||||
PLAYER_MAXIMUM_LEVEL = Character.getByte("MaximumPlayerLevel", (byte) 99);
|
||||
PLAYER_MAXIMUM_LEVEL = Character.getInt("MaximumPlayerLevel", 99);
|
||||
PLAYER_MAXIMUM_LEVEL++;
|
||||
MAX_SUBCLASS = (byte) Math.min(3, Character.getByte("MaxSubclass", (byte) 3));
|
||||
BASE_SUBCLASS_LEVEL = Character.getByte("BaseSubclassLevel", (byte) 40);
|
||||
BASE_DUALCLASS_LEVEL = Character.getByte("BaseDualclassLevel", (byte) 85);
|
||||
MAX_SUBCLASS_LEVEL = Character.getByte("MaxSubclassLevel", (byte) 80);
|
||||
MAX_SUBCLASS = Math.min(3, Character.getInt("MaxSubclass", 3));
|
||||
BASE_SUBCLASS_LEVEL = Character.getInt("BaseSubclassLevel", 40);
|
||||
BASE_DUALCLASS_LEVEL = Character.getInt("BaseDualclassLevel", 85);
|
||||
MAX_SUBCLASS_LEVEL = Character.getInt("MaxSubclassLevel", 80);
|
||||
MAX_PVTSTORESELL_SLOTS_DWARF = Character.getInt("MaxPvtStoreSellSlotsDwarf", 4);
|
||||
MAX_PVTSTORESELL_SLOTS_OTHER = Character.getInt("MaxPvtStoreSellSlotsOther", 3);
|
||||
MAX_PVTSTOREBUY_SLOTS_DWARF = Character.getInt("MaxPvtStoreBuySlotsDwarf", 5);
|
||||
@@ -2053,9 +2050,6 @@ public class Config
|
||||
ORDER_QUEST_LIST_BY_QUESTID = General.getBoolean("OrderQuestListByQuestId", true);
|
||||
AUTODELETE_INVALID_QUEST_DATA = General.getBoolean("AutoDeleteInvalidQuestData", false);
|
||||
ENABLE_STORY_QUEST_BUFF_REWARD = General.getBoolean("StoryQuestRewardBuff", true);
|
||||
EXALTED_FOR_GLORY_ITEM_MAX = new ItemHolder(Integer.parseInt(General.getString("ExaltedForGloryItemMax", "45872,10").split(",")[0]), Integer.parseInt(General.getString("ExaltedForGloryItemMax", "45872,10").split(",")[1]));
|
||||
EXALTED_FOR_HONOR_ITEM_MAX = new ItemHolder(Integer.parseInt(General.getString("ExaltedForHonorItemMax", "45873,20").split(",")[0]), Integer.parseInt(General.getString("ExaltedForHonorItemMax", "45873,20").split(",")[1]));
|
||||
EXALTED_FOR_VICTORY_ITEM_MAX = new ItemHolder(Integer.parseInt(General.getString("ExaltedForVictoryItemMax", "80825,30").split(",")[0]), Integer.parseInt(General.getString("ExaltedForVictoryItemMax", "80825,30").split(",")[1]));
|
||||
MULTIPLE_ITEM_DROP = General.getBoolean("MultipleItemDrop", true);
|
||||
FORCE_INVENTORY_UPDATE = General.getBoolean("ForceInventoryUpdate", false);
|
||||
LAZY_CACHE = General.getBoolean("LazyCache", true);
|
||||
|
@@ -76,7 +76,6 @@ import org.l2jmobius.gameserver.data.xml.impl.InitialShortcutData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ItemCrystallizationData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.KarmaData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.LuckyGameData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.MonsterBookData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.MultisellData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.NpcNameLocalisationData;
|
||||
@@ -326,7 +325,6 @@ public class GameServer
|
||||
FakePlayerData.getInstance();
|
||||
FakePlayerChatManager.getInstance();
|
||||
SpawnData.getInstance();
|
||||
MonsterBookData.getInstance();
|
||||
WalkingManager.getInstance();
|
||||
StaticObjectData.getInstance();
|
||||
ItemAuctionManager.getInstance();
|
||||
|
@@ -39,8 +39,8 @@ public class ExperienceData implements IXmlReader
|
||||
private final Map<Integer, Long> _expTable = new HashMap<>();
|
||||
private final Map<Integer, Double> _traningRateTable = new HashMap<>();
|
||||
|
||||
private byte MAX_LEVEL;
|
||||
private byte MAX_PET_LEVEL;
|
||||
private int MAX_LEVEL;
|
||||
private int MAX_PET_LEVEL;
|
||||
|
||||
/**
|
||||
* Instantiates a new experience table.
|
||||
@@ -66,8 +66,8 @@ public class ExperienceData implements IXmlReader
|
||||
{
|
||||
final Node table = doc.getFirstChild();
|
||||
final NamedNodeMap tableAttr = table.getAttributes();
|
||||
MAX_LEVEL = (byte) (Byte.parseByte(tableAttr.getNamedItem("maxLevel").getNodeValue()) + 1);
|
||||
MAX_PET_LEVEL = (byte) (Byte.parseByte(tableAttr.getNamedItem("maxPetLevel").getNodeValue()) + 1);
|
||||
MAX_LEVEL = Integer.parseInt(tableAttr.getNamedItem("maxLevel").getNodeValue()) + 1;
|
||||
MAX_PET_LEVEL = Integer.parseInt(tableAttr.getNamedItem("maxPetLevel").getNodeValue()) + 1;
|
||||
if (MAX_LEVEL > Config.PLAYER_MAXIMUM_LEVEL)
|
||||
{
|
||||
MAX_LEVEL = Config.PLAYER_MAXIMUM_LEVEL;
|
||||
@@ -103,7 +103,7 @@ public class ExperienceData implements IXmlReader
|
||||
{
|
||||
if (level > Config.PLAYER_MAXIMUM_LEVEL)
|
||||
{
|
||||
return _expTable.get((int) Config.PLAYER_MAXIMUM_LEVEL);
|
||||
return _expTable.get(Config.PLAYER_MAXIMUM_LEVEL);
|
||||
}
|
||||
return _expTable.get(level);
|
||||
}
|
||||
@@ -112,7 +112,7 @@ public class ExperienceData implements IXmlReader
|
||||
{
|
||||
if (level > Config.PLAYER_MAXIMUM_LEVEL)
|
||||
{
|
||||
return _traningRateTable.get((int) Config.PLAYER_MAXIMUM_LEVEL);
|
||||
return _traningRateTable.get(Config.PLAYER_MAXIMUM_LEVEL);
|
||||
}
|
||||
return _traningRateTable.get(level);
|
||||
}
|
||||
@@ -121,7 +121,7 @@ public class ExperienceData implements IXmlReader
|
||||
* Gets the max level.
|
||||
* @return the maximum level acquirable by a player.
|
||||
*/
|
||||
public byte getMaxLevel()
|
||||
public int getMaxLevel()
|
||||
{
|
||||
return MAX_LEVEL;
|
||||
}
|
||||
@@ -130,7 +130,7 @@ public class ExperienceData implements IXmlReader
|
||||
* Gets the max pet level.
|
||||
* @return the maximum level acquirable by a pet.
|
||||
*/
|
||||
public byte getMaxPetLevel()
|
||||
public int getMaxPetLevel()
|
||||
{
|
||||
return MAX_PET_LEVEL;
|
||||
}
|
||||
|
@@ -101,9 +101,9 @@ public class FishingData implements IXmlReader
|
||||
{
|
||||
final NamedNodeMap attrs = bait.getAttributes();
|
||||
final int itemId = parseInteger(attrs, "itemId");
|
||||
final byte level = parseByte(attrs, "level", (byte) 1);
|
||||
final byte minPlayerLevel = parseByte(attrs, "minPlayerLevel");
|
||||
final byte maxPlayerLevel = parseByte(attrs, "minPlayerLevel", Config.PLAYER_MAXIMUM_LEVEL);
|
||||
final int level = parseInteger(attrs, "level", 1);
|
||||
final int minPlayerLevel = parseInteger(attrs, "minPlayerLevel");
|
||||
final int maxPlayerLevel = parseInteger(attrs, "minPlayerLevel", Config.PLAYER_MAXIMUM_LEVEL);
|
||||
final double chance = parseDouble(attrs, "chance");
|
||||
final int timeMin = parseInteger(attrs, "timeMin");
|
||||
final int timeMax = parseInteger(attrs, "timeMax", timeMin);
|
||||
|
@@ -1,133 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.data.xml.impl;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import org.l2jmobius.commons.util.IXmlReader;
|
||||
import org.l2jmobius.gameserver.enums.Faction;
|
||||
import org.l2jmobius.gameserver.model.holders.MonsterBookCardHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.MonsterBookRewardHolder;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class MonsterBookData implements IXmlReader
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(MonsterBookData.class.getName());
|
||||
private final List<MonsterBookCardHolder> _monsterBook = new ArrayList<>();
|
||||
|
||||
protected MonsterBookData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_monsterBook.clear();
|
||||
parseDatapackFile("data/MonsterBook.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _monsterBook.size() + " monster data.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc, File f)
|
||||
{
|
||||
for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
|
||||
{
|
||||
if ("list".equalsIgnoreCase(n.getNodeName()))
|
||||
{
|
||||
for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
|
||||
{
|
||||
if ("card".equalsIgnoreCase(d.getNodeName()))
|
||||
{
|
||||
final NamedNodeMap attrs = d.getAttributes();
|
||||
final int itemId = parseInteger(attrs, "id");
|
||||
final int monster = parseInteger(attrs, "monster");
|
||||
final String faction = parseString(attrs, "faction");
|
||||
final MonsterBookCardHolder card = new MonsterBookCardHolder(itemId, monster, Faction.valueOf(faction));
|
||||
if (NpcData.getInstance().getTemplate(monster) == null)
|
||||
{
|
||||
LOGGER.severe(getClass().getSimpleName() + ": Could not find NPC template with id " + monster + ".");
|
||||
}
|
||||
|
||||
for (Node b = d.getFirstChild(); b != null; b = b.getNextSibling())
|
||||
{
|
||||
if ("rewards".equalsIgnoreCase(b.getNodeName()))
|
||||
{
|
||||
final NamedNodeMap rewardAttrs = b.getAttributes();
|
||||
final int kills = parseInteger(rewardAttrs, "kills");
|
||||
final Long exp = parseLong(rewardAttrs, "exp");
|
||||
final int sp = parseInteger(rewardAttrs, "sp");
|
||||
final int points = parseInteger(rewardAttrs, "points");
|
||||
card.addReward(new MonsterBookRewardHolder(kills, exp, sp, points));
|
||||
}
|
||||
}
|
||||
|
||||
_monsterBook.add(card);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<MonsterBookCardHolder> getMonsterBookCards()
|
||||
{
|
||||
return _monsterBook;
|
||||
}
|
||||
|
||||
public MonsterBookCardHolder getMonsterBookCardByMonsterId(int monsterId)
|
||||
{
|
||||
for (MonsterBookCardHolder card : _monsterBook)
|
||||
{
|
||||
if (card.getMonsterId() == monsterId)
|
||||
{
|
||||
return card;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public MonsterBookCardHolder getMonsterBookCardById(int cardId)
|
||||
{
|
||||
for (MonsterBookCardHolder card : _monsterBook)
|
||||
{
|
||||
if (card.getId() == cardId)
|
||||
{
|
||||
return card;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static MonsterBookData getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final MonsterBookData INSTANCE = new MonsterBookData();
|
||||
}
|
||||
}
|
@@ -27,20 +27,40 @@ public enum BroochJewel
|
||||
RUBY_LV4(38858, 17816, 0.125, true),
|
||||
RUBY_LV5(38859, 17817, 0.2, true),
|
||||
GREATER_RUBY_LV1(47688, 18715, 0.2, true),
|
||||
GREATER_RUBY_LV2(48771, 18715, 0.235, true),
|
||||
GREATER_RUBY_LV3(48772, 18715, 0.275, true),
|
||||
GREATER_RUBY_LV4(48773, 18715, 0.325, true),
|
||||
GREATER_RUBY_LV5(48774, 18715, 0.4, true),
|
||||
SHAPPHIRE_LV1(38927, 17818, 0.01, false),
|
||||
SHAPPHIRE_LV2(38928, 17818, 0.035, false),
|
||||
SHAPPHIRE_LV3(38929, 17819, 0.075, false),
|
||||
SHAPPHIRE_LV4(38930, 17820, 0.125, false),
|
||||
SHAPPHIRE_LV5(38931, 17821, 0.2, false),
|
||||
GREATER_SHAPPHIRE_LV1(47689, 18718, 0.2, false),
|
||||
GREATER_SHAPPHIRE_LV2(48775, 18718, 0.235, false),
|
||||
GREATER_SHAPPHIRE_LV3(48776, 18718, 0.275, false),
|
||||
GREATER_SHAPPHIRE_LV4(48777, 18718, 0.325, false),
|
||||
GREATER_SHAPPHIRE_LV5(48778, 18718, 0.4, false);
|
||||
GREATER_RUBY_LV2(48771, 18715, 0.2, true),
|
||||
GREATER_RUBY_LV3(48772, 18715, 0.2, true),
|
||||
GREATER_RUBY_LV4(48773, 18715, 0.2, true),
|
||||
GREATER_RUBY_LV5(48774, 18715, 0.2, true),
|
||||
SUPERIOR_RUBY_LV1(81505, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV2(81506, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV3(81507, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV4(81508, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV5(81509, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV6(81510, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV7(81511, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV8(81512, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV9(81513, 39658, 0.23, true),
|
||||
SUPERIOR_RUBY_LV10(81514, 39658, 0.23, true),
|
||||
SAPPHIRE_LV1(38927, 17818, 0.01, false),
|
||||
SAPPHIRE_LV2(38928, 17818, 0.035, false),
|
||||
SAPPHIRE_LV3(38929, 17819, 0.075, false),
|
||||
SAPPHIRE_LV4(38930, 17820, 0.125, false),
|
||||
SAPPHIRE_LV5(38931, 17821, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV1(47689, 18718, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV2(48775, 18718, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV3(48776, 18718, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV4(48777, 18718, 0.2, false),
|
||||
GREATER_SAPPHIRE_LV5(48778, 18718, 0.2, false),
|
||||
SUPERIOR_SAPPHIRE_LV1(81515, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV2(81516, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV3(81517, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV4(81518, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV5(81519, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV6(81520, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV7(81521, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV8(81522, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV9(81523, 39660, 0.23, false),
|
||||
SUPERIOR_SAPPHIRE_LV10(81524, 39660, 0.23, false);
|
||||
|
||||
private int _itemId;
|
||||
private int _effectId;
|
||||
|
@@ -24,7 +24,7 @@ import org.l2jmobius.gameserver.model.interfaces.IUpdateTypeComponent;
|
||||
public enum UserInfoType implements IUpdateTypeComponent
|
||||
{
|
||||
RELATION(0x00, 4),
|
||||
BASIC_INFO(0x01, 16),
|
||||
BASIC_INFO(0x01, 23),
|
||||
BASE_STATS(0x02, 18),
|
||||
MAX_HPCPMP(0x03, 14),
|
||||
CURRENT_HPMPCP_EXP_SP(0x04, 38),
|
||||
@@ -32,7 +32,7 @@ public enum UserInfoType implements IUpdateTypeComponent
|
||||
APPAREANCE(0x06, 15),
|
||||
STATUS(0x07, 6),
|
||||
|
||||
STATS(0x08, 56),
|
||||
STATS(0x08, 64),
|
||||
ELEMENTALS(0x09, 14),
|
||||
POSITION(0x0A, 18),
|
||||
SPEED(0x0B, 18),
|
||||
@@ -51,7 +51,12 @@ public enum UserInfoType implements IUpdateTypeComponent
|
||||
|
||||
ATT_SPIRITS(0x17, 26),
|
||||
|
||||
RANKING(0x18, 6);
|
||||
RANKING(0x18, 6),
|
||||
|
||||
STAT_POINTS(0x19, 16),
|
||||
STAT_ABILITIES(0x1A, 18),
|
||||
|
||||
ELIXIR_USED(0x1B, 1);
|
||||
|
||||
/** Int mask. */
|
||||
private final int _mask;
|
||||
|
@@ -1,312 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.instancemanager;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.Spawn;
|
||||
import org.l2jmobius.gameserver.model.entity.Castle;
|
||||
import org.l2jmobius.gameserver.model.events.AbstractScript;
|
||||
|
||||
/**
|
||||
* Siege Flag Of Protection Manager.
|
||||
* @author CostyKiller
|
||||
*/
|
||||
public class SiegeFlagOfProtectionManager
|
||||
{
|
||||
private static final Logger LOGGER = Logger.getLogger(SiegeFlagOfProtectionManager.class.getName());
|
||||
|
||||
private static final Map<Integer, Set<Spawn>> FLAG_SPAWNS = new ConcurrentHashMap<>();
|
||||
|
||||
// Flag of Protection NPCs
|
||||
private static final int FLAG_GLUDIO = 36741; // 1 Gludio Castle
|
||||
private static final int FLAG_DION = 36742; // 2 Dion Castle
|
||||
private static final int FLAG_GIRAN = 36743; // 3 Giran Castle
|
||||
private static final int FLAG_OREN = 36744; // 4 Oren Castle
|
||||
private static final int FLAG_ADEN = 36745; // 5 Aden Castle
|
||||
private static final int FLAG_INNADRIL = 36746; // 6 Innadril Castle
|
||||
private static final int FLAG_GODDARD = 36747; // 7 Goddard Castle
|
||||
private static final int FLAG_RUNE = 36748; // 8 Rune Castle
|
||||
private static final int FLAG_SCHUTTGART = 36749; // 9 Schuttgart Castle
|
||||
|
||||
// Flag Spawn Positions
|
||||
private static final Location[] FLAG_LOC_GLUDIO =
|
||||
{
|
||||
new Location(-18488, 111080, -2575), // Front
|
||||
new Location(-17736, 107272, -2567), // Back
|
||||
new Location(-18568, 112328, -2509) // Tower
|
||||
};
|
||||
private static final Location[] FLAG_LOC_DION =
|
||||
{
|
||||
new Location(22440, 158632, -2776), // Front
|
||||
new Location(21752, 162488, -2764), // Back
|
||||
new Location(22536, 157432, -2703) // Tower
|
||||
};
|
||||
private static final Location[] FLAG_LOC_GIRAN =
|
||||
{
|
||||
new Location(114840, 144712, -2641), // Front
|
||||
new Location(118664, 145432, -2646), // Back
|
||||
new Location(113608, 144632, -2576) // Tower
|
||||
};
|
||||
private static final Location[] FLAG_LOC_OREN =
|
||||
{
|
||||
new Location(80904, 36824, -2368), // Front
|
||||
new Location(84728, 37512, -2364), // Back
|
||||
new Location(79672, 36728, -2303) // Tower
|
||||
};
|
||||
private static final Location[] FLAG_LOC_ADEN =
|
||||
{
|
||||
new Location(147464, 7240, -472), // Front
|
||||
new Location(149608, 8296, -472), // Right
|
||||
new Location(145304, 8296, -472), // Left
|
||||
new Location(148696, 1832, -472), // Right back
|
||||
new Location(146136, 1848, -472) // Left back
|
||||
};
|
||||
private static final Location[] FLAG_LOC_INNADRIL =
|
||||
{
|
||||
new Location(116392, 247464, -864), // Front
|
||||
new Location(115704, 251272, -862), // Back
|
||||
new Location(116488, 246200, -799) // Tower
|
||||
};
|
||||
private static final Location[] FLAG_LOC_GODDARD =
|
||||
{
|
||||
new Location(147320, -46072, -2087), // Front
|
||||
new Location(148056, -46600, -2386), // Right
|
||||
new Location(146888, -46568, -2386) // Left
|
||||
};
|
||||
private static final Location[] FLAG_LOC_RUNE =
|
||||
{
|
||||
new Location(15960, -48840, -1072), // Front
|
||||
new Location(16616, -50328, -643), // Right
|
||||
new Location(16616, -47976, -642), // Left
|
||||
new Location(13768, -52120, -961), // Right back
|
||||
new Location(13720, -46184, -954) // Left back
|
||||
};
|
||||
private static final Location[] FLAG_LOC_SCHUTTGART =
|
||||
{
|
||||
new Location(77704, -150104, -355), // Front
|
||||
new Location(78168, -150680, -654), // Right
|
||||
new Location(76968, -150632, -654) // Left
|
||||
};
|
||||
|
||||
protected SiegeFlagOfProtectionManager()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads all flags of protection for all castles.
|
||||
* @param castle
|
||||
*/
|
||||
public void loadFlags(Castle castle)
|
||||
{
|
||||
Spawn spawn = null;
|
||||
switch (castle.getResidenceId())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_GLUDIO);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_GLUDIO));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_DION);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_DION));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_GIRAN);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_GIRAN));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_OREN);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_OREN));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_ADEN);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_ADEN));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_INNADRIL);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_INNADRIL));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 7:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_GODDARD);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_GODDARD));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 8:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_RUNE);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_RUNE));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
try
|
||||
{
|
||||
spawn = new Spawn(FLAG_SCHUTTGART);
|
||||
spawn.setXYZ(AbstractScript.getRandomEntry(FLAG_LOC_SCHUTTGART));
|
||||
getSpawnedFlags(castle.getResidenceId()).add(spawn);
|
||||
}
|
||||
catch (ClassNotFoundException | NoSuchMethodException | ClassCastException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Spawn flag of protection for castle.
|
||||
* @param castle the castle instance
|
||||
*/
|
||||
public void spawnFlag(Castle castle)
|
||||
{
|
||||
try
|
||||
{
|
||||
loadFlags(castle);
|
||||
|
||||
for (Spawn spawn : getSpawnedFlags(castle.getResidenceId()))
|
||||
{
|
||||
if (spawn != null)
|
||||
{
|
||||
spawn.doSpawn();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
LOGGER.log(Level.SEVERE, "Error spawning flag of protection for castle " + castle.getName(), e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unspawn flag of protection for castle.
|
||||
* @param castle the castle instance
|
||||
*/
|
||||
public void unspawnFlag(Castle castle)
|
||||
{
|
||||
for (Spawn spawn : getSpawnedFlags(castle.getResidenceId()))
|
||||
{
|
||||
if ((spawn != null) && (spawn.getLastSpawn() != null))
|
||||
{
|
||||
spawn.stopRespawn();
|
||||
spawn.getLastSpawn().doDie(spawn.getLastSpawn());
|
||||
}
|
||||
}
|
||||
getSpawnedFlags(castle.getResidenceId()).clear();
|
||||
}
|
||||
|
||||
public Set<Spawn> getSpawnedFlags(int castleId)
|
||||
{
|
||||
return FLAG_SPAWNS.computeIfAbsent(castleId, key -> ConcurrentHashMap.newKeySet());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the single instance of {@code SiegeFlagOfProtectionManager}.
|
||||
* @return single instance of {@code SiegeFlagOfProtectionManager}
|
||||
*/
|
||||
public static SiegeFlagOfProtectionManager getInstance()
|
||||
{
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final SiegeFlagOfProtectionManager INSTANCE = new SiegeFlagOfProtectionManager();
|
||||
}
|
||||
}
|
@@ -50,7 +50,9 @@ public class ArmorSet
|
||||
Inventory.PAPERDOLL_LEGS,
|
||||
Inventory.PAPERDOLL_HEAD,
|
||||
Inventory.PAPERDOLL_GLOVES,
|
||||
Inventory.PAPERDOLL_FEET
|
||||
Inventory.PAPERDOLL_FEET,
|
||||
Inventory.PAPERDOLL_HAIR,
|
||||
Inventory.PAPERDOLL_HAIR2
|
||||
};
|
||||
private static final int[] ARTIFACT_1_SLOTS = new int[]
|
||||
{
|
||||
|
@@ -66,7 +66,6 @@ import org.l2jmobius.gameserver.data.xml.impl.CategoryData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ClassListData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.HennaData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.MonsterBookData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.NpcData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.NpcNameLocalisationData;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.PetDataTable;
|
||||
@@ -223,8 +222,6 @@ import org.l2jmobius.gameserver.model.holders.AutoPlaySettingsHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.AutoUseSettingsHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.DamageTakenHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.MonsterBookCardHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.MonsterBookRewardHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.MovieHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.PlayerEventHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.PreparedMultisellListHolder;
|
||||
@@ -349,9 +346,6 @@ import org.l2jmobius.gameserver.network.serverpackets.UserInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ValidateLocation;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.commission.ExResponseCommissionInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.friend.FriendStatus;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookRewardIcon;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.sessionzones.TimedHuntingZoneExit;
|
||||
import org.l2jmobius.gameserver.taskmanager.AttackStanceTaskManager;
|
||||
import org.l2jmobius.gameserver.util.Broadcast;
|
||||
@@ -848,10 +842,6 @@ public class PlayerInstance extends Playable
|
||||
_pvpRegTask = null;
|
||||
}
|
||||
|
||||
// Monster Book variables
|
||||
private static final String MONSTER_BOOK_KILLS_VAR = "MONSTER_BOOK_KILLS_";
|
||||
private static final String MONSTER_BOOK_LEVEL_VAR = "MONSTER_BOOK_LEVEL_";
|
||||
|
||||
// Training Camp
|
||||
private static final String TRAINING_CAMP_VAR = "TRAINING_CAMP";
|
||||
private static final String TRAINING_CAMP_DURATION = "TRAINING_CAMP_DURATION";
|
||||
@@ -872,6 +862,11 @@ public class PlayerInstance extends Playable
|
||||
|
||||
private ScheduledFuture<?> _timedHuntingZoneFinishTask = null;
|
||||
|
||||
private int _homunculusHpBonus;
|
||||
private int _homunculusAtkBonus;
|
||||
private int _homunculusDefBonus;
|
||||
private float _homunculusCritBonus;
|
||||
|
||||
private final List<QuestTimer> _questTimers = new ArrayList<>();
|
||||
private final List<TimerHolder<?>> _timerHolders = new ArrayList<>();
|
||||
|
||||
@@ -4740,6 +4735,9 @@ public class PlayerInstance extends Playable
|
||||
@Override
|
||||
public boolean doDie(Creature killer)
|
||||
{
|
||||
// Add Tranquil Soul effect.
|
||||
SkillCaster.triggerCast(this, this, CommonSkill.TRANQUIL_SOUL.getSkill());
|
||||
|
||||
Collection<ItemInstance> droppedItems = null;
|
||||
|
||||
if (killer != null)
|
||||
@@ -6421,7 +6419,7 @@ public class PlayerInstance extends Playable
|
||||
|
||||
player.getStat().setExp(rset.getLong("exp"));
|
||||
player.setExpBeforeDeath(rset.getLong("expBeforeDeath"));
|
||||
player.getStat().setLevel(rset.getByte("level"));
|
||||
player.getStat().setLevel(rset.getInt("level"));
|
||||
player.getStat().setSp(rset.getLong("sp"));
|
||||
|
||||
player.setWantsPeace(rset.getInt("wantspeace"));
|
||||
@@ -6671,6 +6669,8 @@ public class PlayerInstance extends Playable
|
||||
player.setTrueHero(true);
|
||||
}
|
||||
|
||||
player.calculateHomunculusBonuses();
|
||||
|
||||
// Recalculate all stats
|
||||
player.getStat().recalculateStats(false);
|
||||
|
||||
@@ -6808,7 +6808,7 @@ public class PlayerInstance extends Playable
|
||||
subClass.setClassId(rset.getInt("class_id"));
|
||||
subClass.setDualClassActive(rset.getBoolean("dual_class"));
|
||||
subClass.setVitalityPoints(rset.getInt("vitality_points"));
|
||||
subClass.setLevel(rset.getByte("level"));
|
||||
subClass.setLevel(rset.getInt("level"));
|
||||
subClass.setExp(rset.getLong("exp"));
|
||||
subClass.setSp(rset.getLong("sp"));
|
||||
subClass.setClassIndex(rset.getInt("class_index"));
|
||||
@@ -10124,6 +10124,9 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
|
||||
_lastDamageTaken.clear();
|
||||
|
||||
// Stop Tranquil Soul effect.
|
||||
getEffectList().stopSkillEffects(true, CommonSkill.TRANQUIL_SOUL.getSkill());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -13988,51 +13991,6 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
}
|
||||
|
||||
public int getMonsterBookKillCount(int cardId)
|
||||
{
|
||||
return getVariables().getInt(MONSTER_BOOK_KILLS_VAR + cardId, 0);
|
||||
}
|
||||
|
||||
public int getMonsterBookRewardLevel(int cardId)
|
||||
{
|
||||
return getVariables().getInt(MONSTER_BOOK_LEVEL_VAR + cardId, 0);
|
||||
}
|
||||
|
||||
public void updateMonsterBook(MonsterBookCardHolder card)
|
||||
{
|
||||
final int killCount = getMonsterBookKillCount(card.getId());
|
||||
if (killCount < card.getReward(3).getKills()) // no point adding kills when player has reached max
|
||||
{
|
||||
getVariables().set(MONSTER_BOOK_KILLS_VAR + card.getId(), killCount + 1);
|
||||
sendPacket(new ExMonsterBookCloseForce()); // in case it is open
|
||||
final int rewardLevel = getMonsterBookRewardLevel(card.getId());
|
||||
if ((getMonsterBookKillCount(card.getId()) >= card.getReward(rewardLevel).getKills()) && (rewardLevel < 4)) // make sure player can be rewarded
|
||||
{
|
||||
sendPacket(new ExMonsterBookRewardIcon());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void rewardMonsterBook(int cardId)
|
||||
{
|
||||
if (getLevel() < 99)
|
||||
{
|
||||
sendPacket(new SystemMessage(SystemMessageId.ONLY_CHARACTERS_OF_LEVEL_S1_OR_HIGHER_ARE_ELIGIBLE_FOR_REWARDS).addInt(99));
|
||||
return;
|
||||
}
|
||||
|
||||
final int rewardLevel = getMonsterBookRewardLevel(cardId);
|
||||
final MonsterBookCardHolder card = MonsterBookData.getInstance().getMonsterBookCardById(cardId);
|
||||
final MonsterBookRewardHolder reward = card.getReward(rewardLevel);
|
||||
if ((getMonsterBookKillCount(cardId) >= reward.getKills()) && (rewardLevel < 4)) // make sure player can be rewarded
|
||||
{
|
||||
getVariables().set(MONSTER_BOOK_LEVEL_VAR + cardId, rewardLevel + 1);
|
||||
addExpAndSp(reward.getExp(), reward.getSp());
|
||||
addFactionPoints(card.getFaction(), reward.getPoints());
|
||||
sendPacket(new ExMonsterBook(this));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void initStatusUpdateCache()
|
||||
{
|
||||
@@ -14176,7 +14134,11 @@ public class PlayerInstance extends Playable
|
||||
public boolean isInTimedHuntingZone(int x, int y)
|
||||
{
|
||||
return isInTimedHuntingZone(1, x, y) // Storm Isle
|
||||
|| isInTimedHuntingZone(6, x, y); // Primeval Isle
|
||||
|| isInTimedHuntingZone(6, x, y) // Primeval Isle
|
||||
|| isInTimedHuntingZone(7, x, y) // Golden Altar
|
||||
|| isInTimedHuntingZone(11, x, y) // Abandoned Coal Mines
|
||||
|| isInTimedHuntingZone(8, x, y) // Tower of Insolence
|
||||
|| isInTimedHuntingZone(12, x, y); // Imperial Tomb
|
||||
}
|
||||
|
||||
public boolean isInTimedHuntingZone(int zoneId)
|
||||
@@ -14199,6 +14161,22 @@ public class PlayerInstance extends Playable
|
||||
{
|
||||
return (x == 20) && (y == 17);
|
||||
}
|
||||
case 7: // Golden Altar
|
||||
{
|
||||
return (x == 16) && (y == 20);
|
||||
}
|
||||
case 11: // Abandoned Coal Mines
|
||||
{
|
||||
return (x == 24) && (y == 12);
|
||||
}
|
||||
case 8: // Tower of Insolence
|
||||
{
|
||||
return (x == 17) && (y == 18);
|
||||
}
|
||||
case 12: // Imperial Tomb
|
||||
{
|
||||
return (x == 25) && (y == 15);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -14241,4 +14219,43 @@ public class PlayerInstance extends Playable
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getHomunculusHpBonus()
|
||||
{
|
||||
return _homunculusHpBonus;
|
||||
}
|
||||
|
||||
public int getHomunculusAtkBonus()
|
||||
{
|
||||
return _homunculusAtkBonus;
|
||||
}
|
||||
|
||||
public int getHomunculusDefBonus()
|
||||
{
|
||||
return _homunculusDefBonus;
|
||||
}
|
||||
|
||||
public float getHomunculusCritBonus()
|
||||
{
|
||||
return _homunculusCritBonus;
|
||||
}
|
||||
|
||||
public void calculateHomunculusBonuses()
|
||||
{
|
||||
if (getVariables().getInt(PlayerVariables.HOMUNCULUS_ID, 0) > 0)
|
||||
{
|
||||
final int quality = getVariables().getInt(PlayerVariables.HOMUNCULUS_QUALITY, 0);
|
||||
_homunculusHpBonus = 800 + (quality * 100);
|
||||
_homunculusAtkBonus = 100 + (quality * 25);
|
||||
_homunculusDefBonus = 80 + (quality * 10);
|
||||
_homunculusCritBonus = 0.1f * (quality + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
_homunculusHpBonus = 0;
|
||||
_homunculusAtkBonus = 0;
|
||||
_homunculusDefBonus = 0;
|
||||
_homunculusCritBonus = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -34,8 +34,8 @@ import org.l2jmobius.gameserver.model.holders.TeleporterQuestRecommendationHolde
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.skills.CommonSkill;
|
||||
import org.l2jmobius.gameserver.model.teleporter.TeleportHolder;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowTeleportUi;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.teleports.ExShowTeleportUi;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
/**
|
||||
|
@@ -55,7 +55,7 @@ public class CreatureStat
|
||||
private final Creature _creature;
|
||||
private long _exp = 0;
|
||||
private long _sp = 0;
|
||||
private byte _level = 1;
|
||||
private int _level = 1;
|
||||
/** Creature's maximum buff count. */
|
||||
private int _maxBuffCount = Config.BUFFS_MAX_AMOUNT;
|
||||
private double _vampiricSum = 0;
|
||||
@@ -209,12 +209,12 @@ public class CreatureStat
|
||||
return (int) getValue(Stat.STAT_INT);
|
||||
}
|
||||
|
||||
public byte getLevel()
|
||||
public int getLevel()
|
||||
{
|
||||
return _level;
|
||||
}
|
||||
|
||||
public void setLevel(byte value)
|
||||
public void setLevel(int value)
|
||||
{
|
||||
_level = value;
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ public class NpcStat extends CreatureStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLevel()
|
||||
public int getLevel()
|
||||
{
|
||||
return getActiveChar().getTemplate().getLevel();
|
||||
}
|
||||
|
@@ -57,7 +57,7 @@ public class PetStat extends SummonStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addLevel(byte value)
|
||||
public boolean addLevel(int value)
|
||||
{
|
||||
if ((getLevel() + value) > (getMaxLevel() - 1))
|
||||
{
|
||||
@@ -115,7 +115,7 @@ public class PetStat extends SummonStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLevel(byte value)
|
||||
public void setLevel(int value)
|
||||
{
|
||||
getActiveChar().setPetData(PetDataTable.getInstance().getPetLevelData(getActiveChar().getTemplate().getId(), value));
|
||||
if (getActiveChar().getPetLevelData() == null)
|
||||
|
@@ -61,15 +61,15 @@ public class PlayableStat extends CreatureStat
|
||||
|
||||
final int oldLevel = getLevel();
|
||||
setExp(getExp() + value);
|
||||
byte minimumLevel = 1;
|
||||
int minimumLevel = 1;
|
||||
if (getActiveChar().isPet())
|
||||
{
|
||||
// get minimum level from NpcTemplate
|
||||
minimumLevel = (byte) PetDataTable.getInstance().getPetMinLevel(((PetInstance) getActiveChar()).getTemplate().getId());
|
||||
minimumLevel = PetDataTable.getInstance().getPetMinLevel(((PetInstance) getActiveChar()).getTemplate().getId());
|
||||
}
|
||||
|
||||
byte level = minimumLevel; // minimum level
|
||||
for (byte tmp = level; tmp <= getMaxLevel(); tmp++)
|
||||
int level = minimumLevel; // minimum level
|
||||
for (int tmp = level; tmp <= getMaxLevel(); tmp++)
|
||||
{
|
||||
if (getExp() >= getExpForLevel(tmp))
|
||||
{
|
||||
@@ -81,7 +81,7 @@ public class PlayableStat extends CreatureStat
|
||||
|
||||
if ((level != getLevel()) && (level >= minimumLevel))
|
||||
{
|
||||
addLevel((byte) (level - getLevel()));
|
||||
addLevel(level - getLevel());
|
||||
}
|
||||
|
||||
if ((getLevel() > oldLevel) && getActiveChar().isPlayer())
|
||||
@@ -110,14 +110,14 @@ public class PlayableStat extends CreatureStat
|
||||
}
|
||||
|
||||
setExp(getExp() - value);
|
||||
byte minimumLevel = 1;
|
||||
int minimumLevel = 1;
|
||||
if (getActiveChar().isPet())
|
||||
{
|
||||
// get minimum level from NpcTemplate
|
||||
minimumLevel = (byte) PetDataTable.getInstance().getPetMinLevel(((PetInstance) getActiveChar()).getTemplate().getId());
|
||||
minimumLevel = PetDataTable.getInstance().getPetMinLevel(((PetInstance) getActiveChar()).getTemplate().getId());
|
||||
}
|
||||
byte level = minimumLevel;
|
||||
for (byte tmp = level; tmp <= getMaxLevel(); tmp++)
|
||||
int level = minimumLevel;
|
||||
for (int tmp = level; tmp <= getMaxLevel(); tmp++)
|
||||
{
|
||||
if (getExp() >= getExpForLevel(tmp))
|
||||
{
|
||||
@@ -128,7 +128,7 @@ public class PlayableStat extends CreatureStat
|
||||
}
|
||||
if ((level != getLevel()) && (level >= minimumLevel))
|
||||
{
|
||||
addLevel((byte) (level - getLevel()));
|
||||
addLevel(level - getLevel());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -148,14 +148,14 @@ public class PlayableStat extends CreatureStat
|
||||
return expRemoved || spRemoved;
|
||||
}
|
||||
|
||||
public boolean addLevel(byte amount)
|
||||
public boolean addLevel(int amount)
|
||||
{
|
||||
byte value = amount;
|
||||
int value = amount;
|
||||
if ((getLevel() + value) > (getMaxLevel() - 1))
|
||||
{
|
||||
if (getLevel() < (getMaxLevel() - 1))
|
||||
{
|
||||
value = (byte) (getMaxLevel() - 1 - getLevel());
|
||||
value = getMaxLevel() - 1 - getLevel();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -231,7 +231,7 @@ public class PlayerStat extends PlayableStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean addLevel(byte value)
|
||||
public boolean addLevel(int value)
|
||||
{
|
||||
if ((getLevel() + value) > (ExperienceData.getInstance().getMaxLevel() - 1))
|
||||
{
|
||||
@@ -273,7 +273,7 @@ public class PlayerStat extends PlayableStat
|
||||
final PetInstance pet = (PetInstance) sPet;
|
||||
if (pet.getPetData().isSynchLevel() && (pet.getLevel() != getLevel()))
|
||||
{
|
||||
final byte availableLevel = (byte) Math.min(pet.getPetData().getMaxLevel(), getLevel());
|
||||
final int availableLevel = Math.min(pet.getPetData().getMaxLevel(), getLevel());
|
||||
pet.getStat().setLevel(availableLevel);
|
||||
pet.getStat().getExpForLevel(availableLevel);
|
||||
pet.setCurrentHp(pet.getMaxHp());
|
||||
@@ -387,7 +387,7 @@ public class PlayerStat extends PlayableStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLevel()
|
||||
public int getLevel()
|
||||
{
|
||||
if (getActiveChar().isDualClassActive())
|
||||
{
|
||||
@@ -400,18 +400,18 @@ public class PlayerStat extends PlayableStat
|
||||
return super.getLevel();
|
||||
}
|
||||
|
||||
public byte getBaseLevel()
|
||||
public int getBaseLevel()
|
||||
{
|
||||
return super.getLevel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLevel(byte value)
|
||||
public void setLevel(int value)
|
||||
{
|
||||
byte level = value;
|
||||
int level = value;
|
||||
if (level > (ExperienceData.getInstance().getMaxLevel() - 1))
|
||||
{
|
||||
level = (byte) (ExperienceData.getInstance().getMaxLevel() - 1);
|
||||
level = ExperienceData.getInstance().getMaxLevel() - 1;
|
||||
}
|
||||
|
||||
if (getActiveChar().isSubClassActive())
|
||||
|
@@ -32,7 +32,7 @@ public class StaticObjectStat extends CreatureStat
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte getLevel()
|
||||
public int getLevel()
|
||||
{
|
||||
return (byte) getActiveChar().getLevel();
|
||||
}
|
||||
|
@@ -270,7 +270,7 @@ public class NpcTemplate extends CreatureTemplate implements IIdentifiable
|
||||
return _displayId;
|
||||
}
|
||||
|
||||
public byte getLevel()
|
||||
public int getLevel()
|
||||
{
|
||||
return _level;
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
*/
|
||||
public class SubClass
|
||||
{
|
||||
private static final byte MAX_LEVEL = Config.MAX_SUBCLASS_LEVEL < ExperienceData.getInstance().getMaxLevel() ? Config.MAX_SUBCLASS_LEVEL : (byte) (ExperienceData.getInstance().getMaxLevel() - 1);
|
||||
private static final int MAX_LEVEL = Config.MAX_SUBCLASS_LEVEL < ExperienceData.getInstance().getMaxLevel() ? Config.MAX_SUBCLASS_LEVEL : ExperienceData.getInstance().getMaxLevel() - 1;
|
||||
|
||||
private static final int MAX_VITALITY_POINTS = 140000;
|
||||
private static final int MIN_VITALITY_POINTS = 0;
|
||||
@@ -34,7 +34,7 @@ public class SubClass
|
||||
private ClassId _class;
|
||||
private long _exp = ExperienceData.getInstance().getExpForLevel(Config.BASE_SUBCLASS_LEVEL);
|
||||
private long _sp = 0;
|
||||
private byte _level = Config.BASE_SUBCLASS_LEVEL;
|
||||
private int _level = Config.BASE_SUBCLASS_LEVEL;
|
||||
private int _classIndex = 1;
|
||||
private int _vitalityPoints = 0;
|
||||
private boolean _dualClass = false;
|
||||
@@ -65,7 +65,7 @@ public class SubClass
|
||||
return _sp;
|
||||
}
|
||||
|
||||
public byte getLevel()
|
||||
public int getLevel()
|
||||
{
|
||||
return _level;
|
||||
}
|
||||
@@ -124,7 +124,7 @@ public class SubClass
|
||||
_dualClass = dualClass;
|
||||
}
|
||||
|
||||
public void setLevel(byte levelValue)
|
||||
public void setLevel(int levelValue)
|
||||
{
|
||||
if (!_dualClass && (levelValue > MAX_LEVEL))
|
||||
{
|
||||
|
@@ -26,10 +26,8 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.enums.CeremonyOfChaosResult;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.instancemanager.CeremonyOfChaosManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.InstanceManager;
|
||||
@@ -42,7 +40,6 @@ import org.l2jmobius.gameserver.model.actor.appearance.PlayerAppearance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.MonsterInstance;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.eventengine.AbstractEvent;
|
||||
import org.l2jmobius.gameserver.model.events.AbstractScript;
|
||||
import org.l2jmobius.gameserver.model.events.EventDispatcher;
|
||||
import org.l2jmobius.gameserver.model.events.EventType;
|
||||
import org.l2jmobius.gameserver.model.events.ListenerRegisterType;
|
||||
@@ -54,7 +51,6 @@ import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.holders.SkillHolder;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
import org.l2jmobius.gameserver.model.instancezone.InstanceTemplate;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
@@ -412,41 +408,6 @@ public class CeremonyOfChaosEvent extends AbstractEvent<CeremonyOfChaosMember>
|
||||
params.set("time", 30);
|
||||
getTimers().addTimer("match_end_countdown", params, 30 * 1000, null, null);
|
||||
EventDispatcher.getInstance().notifyEvent(new OnCeremonyOfChaosMatchResult(winners, members));
|
||||
|
||||
// XXX: ML2 Rewards ForGlory, ForHonor and ForVictory quests
|
||||
for (CeremonyOfChaosMember member : getMembers().values())
|
||||
{
|
||||
final QuestState qs = member.getPlayer().getQuestState("Q10813_ForGlory");
|
||||
final QuestState qs1 = member.getPlayer().getQuestState("Q10819_ForHonor");
|
||||
final QuestState qs2 = member.getPlayer().getQuestState("Q10825_ForVictory");
|
||||
if ((qs != null) && !qs.isCompleted() && qs.isCond(1))
|
||||
{
|
||||
AbstractScript.giveItems(member.getPlayer(), Config.EXALTED_FOR_GLORY_ITEM_MAX.getId(), 1);
|
||||
AbstractScript.playSound(member.getPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
if (AbstractScript.getQuestItemsCount(member.getPlayer(), Config.EXALTED_FOR_GLORY_ITEM_MAX.getId()) >= Config.EXALTED_FOR_GLORY_ITEM_MAX.getCount())
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
}
|
||||
else if ((qs1 != null) && !qs1.isCompleted() && qs1.isCond(1))
|
||||
{
|
||||
AbstractScript.giveItems(member.getPlayer(), Config.EXALTED_FOR_HONOR_ITEM_MAX.getId(), 1);
|
||||
AbstractScript.playSound(member.getPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
if (AbstractScript.getQuestItemsCount(member.getPlayer(), Config.EXALTED_FOR_HONOR_ITEM_MAX.getId()) >= Config.EXALTED_FOR_HONOR_ITEM_MAX.getCount())
|
||||
{
|
||||
qs1.setCond(2, true);
|
||||
}
|
||||
}
|
||||
else if ((qs2 != null) && !qs2.isCompleted() && qs2.isCond(3))
|
||||
{
|
||||
AbstractScript.giveItems(member.getPlayer(), Config.EXALTED_FOR_VICTORY_ITEM_MAX.getId(), 1);
|
||||
AbstractScript.playSound(member.getPlayer(), QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
if (AbstractScript.getQuestItemsCount(member.getPlayer(), Config.EXALTED_FOR_VICTORY_ITEM_MAX.getId()) >= Config.EXALTED_FOR_VICTORY_ITEM_MAX.getCount())
|
||||
{
|
||||
qs2.setCond(4, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void teleportPlayersOut()
|
||||
|
@@ -40,7 +40,6 @@ import org.l2jmobius.gameserver.enums.SiegeClanType;
|
||||
import org.l2jmobius.gameserver.enums.SiegeTeleportWhoType;
|
||||
import org.l2jmobius.gameserver.enums.TeleportWhereType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.SiegeFlagOfProtectionManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.SiegeGuardManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.SiegeManager;
|
||||
import org.l2jmobius.gameserver.model.PlayerCondOverride;
|
||||
@@ -330,7 +329,6 @@ public class Siege implements Siegable
|
||||
saveCastleSiege(); // Save castle specific data
|
||||
clearSiegeClan(); // Clear siege clan from db
|
||||
removeTowers(); // Remove all towers from this castle
|
||||
SiegeFlagOfProtectionManager.getInstance().unspawnFlag(getCastle()); // Remove spawned flag of protection
|
||||
SiegeGuardManager.getInstance().unspawnSiegeGuard(getCastle()); // Remove all spawned siege guard from this castle
|
||||
if (_castle.getOwnerId() > 0)
|
||||
{
|
||||
@@ -505,7 +503,6 @@ public class Siege implements Siegable
|
||||
spawnControlTower(); // Spawn control tower
|
||||
spawnFlameTower(); // Spawn control tower
|
||||
_castle.spawnDoor(); // Spawn door
|
||||
SiegeFlagOfProtectionManager.getInstance().spawnFlag(getCastle()); // Spawn flag of protection
|
||||
spawnSiegeGuard(); // Spawn siege guard
|
||||
SiegeGuardManager.getInstance().deleteTickets(getCastle().getResidenceId()); // remove the tickets from the ground
|
||||
_castle.getZone().setSiegeInstance(this);
|
||||
|
@@ -27,9 +27,9 @@ import org.l2jmobius.commons.util.Rnd;
|
||||
public class FishingBait
|
||||
{
|
||||
private final int _itemId;
|
||||
private final byte _level;
|
||||
private final byte _minPlayerLevel;
|
||||
private final byte _maxPlayerLevel;
|
||||
private final int _level;
|
||||
private final int _minPlayerLevel;
|
||||
private final int _maxPlayerLevel;
|
||||
private final double _chance;
|
||||
private final int _timeMin;
|
||||
private final int _timeMax;
|
||||
@@ -38,7 +38,7 @@ public class FishingBait
|
||||
private final boolean _isPremiumOnly;
|
||||
private final List<FishingCatch> _rewards = new ArrayList<>();
|
||||
|
||||
public FishingBait(int itemId, byte level, byte minPlayerLevel, byte maxPlayerLevel, double chance, int timeMin, int timeMax, int waitMin, int waitMax, boolean isPremiumOnly)
|
||||
public FishingBait(int itemId, int level, int minPlayerLevel, int maxPlayerLevel, double chance, int timeMin, int timeMax, int waitMin, int waitMax, boolean isPremiumOnly)
|
||||
{
|
||||
_itemId = itemId;
|
||||
_level = level;
|
||||
@@ -57,17 +57,17 @@ public class FishingBait
|
||||
return _itemId;
|
||||
}
|
||||
|
||||
public byte getLevel()
|
||||
public int getLevel()
|
||||
{
|
||||
return _level;
|
||||
}
|
||||
|
||||
public byte getMinPlayerLevel()
|
||||
public int getMinPlayerLevel()
|
||||
{
|
||||
return _minPlayerLevel;
|
||||
}
|
||||
|
||||
public byte getMaxPlayerLevel()
|
||||
public int getMaxPlayerLevel()
|
||||
{
|
||||
return _maxPlayerLevel;
|
||||
}
|
||||
|
@@ -22,7 +22,6 @@ import java.util.logging.Logger;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.instancemanager.AntiFeedManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.FortManager;
|
||||
@@ -32,11 +31,9 @@ import org.l2jmobius.gameserver.model.Party.MessageType;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.model.actor.Summon;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.events.AbstractScript;
|
||||
import org.l2jmobius.gameserver.model.holders.ItemHolder;
|
||||
import org.l2jmobius.gameserver.model.instancezone.Instance;
|
||||
import org.l2jmobius.gameserver.model.items.instance.ItemInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.skills.Skill;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExOlympiadMode;
|
||||
@@ -411,41 +408,6 @@ public abstract class AbstractOlympiadGame
|
||||
}
|
||||
}
|
||||
|
||||
// XXX: ML2 Rewards ForGlory, ForHonor and ForVictory quests
|
||||
public static void rewardQuests(PlayerInstance player)
|
||||
{
|
||||
final QuestState qs = player.getQuestState("Q10813_ForGlory");
|
||||
final QuestState qs1 = player.getQuestState("Q10819_ForHonor");
|
||||
final QuestState qs2 = player.getQuestState("Q10825_ForVictory");
|
||||
if ((qs != null) && !qs.isCompleted() && qs.isCond(1))
|
||||
{
|
||||
AbstractScript.giveItems(player, Config.EXALTED_FOR_GLORY_ITEM_MAX.getId(), 1);
|
||||
AbstractScript.playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
if (AbstractScript.getQuestItemsCount(player, Config.EXALTED_FOR_GLORY_ITEM_MAX.getId()) >= Config.EXALTED_FOR_GLORY_ITEM_MAX.getCount())
|
||||
{
|
||||
qs.setCond(2, true);
|
||||
}
|
||||
}
|
||||
else if ((qs1 != null) && !qs1.isCompleted() && qs1.isCond(1))
|
||||
{
|
||||
AbstractScript.giveItems(player, Config.EXALTED_FOR_HONOR_ITEM_MAX.getId(), 1);
|
||||
AbstractScript.playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
if (AbstractScript.getQuestItemsCount(player, Config.EXALTED_FOR_HONOR_ITEM_MAX.getId()) >= Config.EXALTED_FOR_HONOR_ITEM_MAX.getCount())
|
||||
{
|
||||
qs1.setCond(2, true);
|
||||
}
|
||||
}
|
||||
else if ((qs2 != null) && !qs2.isCompleted() && qs2.isCond(3))
|
||||
{
|
||||
AbstractScript.giveItems(player, Config.EXALTED_FOR_VICTORY_ITEM_MAX.getId(), 1);
|
||||
AbstractScript.playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
if (AbstractScript.getQuestItemsCount(player, Config.EXALTED_FOR_VICTORY_ITEM_MAX.getId()) >= Config.EXALTED_FOR_VICTORY_ITEM_MAX.getCount())
|
||||
{
|
||||
qs2.setCond(4, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void rewardParticipant(PlayerInstance player, List<ItemHolder> list)
|
||||
{
|
||||
if ((player == null) || !player.isOnline() || (list == null))
|
||||
|
@@ -71,7 +71,7 @@ public class Olympiad extends ListenersContainer
|
||||
private static final String OLYMPIAD_SAVE_NOBLES = "INSERT INTO olympiad_nobles (`charId`,`class_id`,`olympiad_points`,`competitions_done`,`competitions_won`,`competitions_lost`,`competitions_drawn`, `competitions_done_week`) VALUES (?,?,?,?,?,?,?,?)";
|
||||
private static final String OLYMPIAD_UPDATE_NOBLES = "UPDATE olympiad_nobles SET olympiad_points = ?, competitions_done = ?, competitions_won = ?, competitions_lost = ?, competitions_drawn = ?, competitions_done_week = ? WHERE charId = ?";
|
||||
private static final String OLYMPIAD_GET_HEROS = "SELECT olympiad_nobles.charId, characters.char_name FROM olympiad_nobles, characters WHERE characters.charId = olympiad_nobles.charId AND olympiad_nobles.class_id = ? AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " AND olympiad_nobles.competitions_won > 0 ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC";
|
||||
private static final String OLYMPIAD_GET_LEGEND = "SELECT olympiad_nobles.charId FROM olympiad_nobles WHERE olympiad_nobles.competitions_done >=" + Config.ALT_OLY_MIN_MATCHES + " ORDER BY olympiad_nobles.olympiad_points DESC";
|
||||
private static final String OLYMPIAD_GET_LEGEND = "SELECT olympiad_nobles.charId FROM olympiad_nobles WHERE olympiad_nobles.competitions_done >=" + Config.ALT_OLY_MIN_MATCHES + " ORDER BY olympiad_nobles.olympiad_points DESC LIMIT 1";
|
||||
private static final String GET_ALL_CLASSIFIED_NOBLESS = "SELECT charId from olympiad_nobles_eom WHERE competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " ORDER BY olympiad_points DESC, competitions_done DESC, competitions_won DESC";
|
||||
private static final String GET_EACH_CLASS_LEADER = "SELECT characters.char_name from olympiad_nobles_eom, characters WHERE characters.charId = olympiad_nobles_eom.charId AND olympiad_nobles_eom.class_id = ? AND olympiad_nobles_eom.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " ORDER BY olympiad_nobles_eom.olympiad_points DESC, olympiad_nobles_eom.competitions_done DESC, olympiad_nobles_eom.competitions_won DESC LIMIT 10";
|
||||
private static final String GET_EACH_CLASS_LEADER_CURRENT = "SELECT characters.char_name from olympiad_nobles, characters WHERE characters.charId = olympiad_nobles.charId AND olympiad_nobles.class_id = ? AND olympiad_nobles.competitions_done >= " + Config.ALT_OLY_MIN_MATCHES + " ORDER BY olympiad_nobles.olympiad_points DESC, olympiad_nobles.competitions_done DESC, olympiad_nobles.competitions_won DESC LIMIT 10";
|
||||
|
@@ -51,7 +51,7 @@ public class OlympiadAnnouncer implements Runnable
|
||||
{
|
||||
case NON_CLASSED:
|
||||
{
|
||||
npcString = NpcStringId.OLYMPIAD_CLASS_FREE_INDIVIDUAL_MATCH_IS_GOING_TO_BEGIN_IN_ARENA_S1_IN_A_MOMENT;
|
||||
npcString = NpcStringId.THE_WORLD_OLYMPIAD_WILL_BEGIN_IN_ARENA_S1_SOON;
|
||||
break;
|
||||
}
|
||||
case CLASSED:
|
||||
|
@@ -458,7 +458,6 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
||||
winside = 1;
|
||||
|
||||
rewardParticipant(_playerOne.getPlayer(), Config.ALT_OLY_WINNER_REWARD); // Winner
|
||||
rewardQuests(_playerOne.getPlayer());
|
||||
|
||||
if (Config.ALT_OLY_LOG_FIGHTS)
|
||||
{
|
||||
@@ -485,7 +484,6 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
||||
winside = 2;
|
||||
|
||||
rewardParticipant(_playerTwo.getPlayer(), Config.ALT_OLY_WINNER_REWARD); // Winner
|
||||
rewardQuests(_playerTwo.getPlayer());
|
||||
|
||||
if (Config.ALT_OLY_LOG_FIGHTS)
|
||||
{
|
||||
@@ -602,8 +600,6 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
||||
|
||||
rewardParticipant(_playerOne.getPlayer(), Config.ALT_OLY_WINNER_REWARD); // Winner
|
||||
rewardParticipant(_playerTwo.getPlayer(), Config.ALT_OLY_LOSER_REWARD); // Loser
|
||||
rewardQuests(_playerOne.getPlayer());
|
||||
rewardQuests(_playerTwo.getPlayer());
|
||||
|
||||
// Notify to scripts
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnOlympiadMatchResult(_playerOne, _playerTwo, getType()), Olympiad.getInstance());
|
||||
@@ -631,8 +627,6 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
||||
|
||||
rewardParticipant(_playerTwo.getPlayer(), Config.ALT_OLY_WINNER_REWARD); // Winner
|
||||
rewardParticipant(_playerOne.getPlayer(), Config.ALT_OLY_LOSER_REWARD); // Loser
|
||||
rewardQuests(_playerOne.getPlayer());
|
||||
rewardQuests(_playerTwo.getPlayer());
|
||||
|
||||
// Notify to scripts
|
||||
EventDispatcher.getInstance().notifyEventAsync(new OnOlympiadMatchResult(_playerTwo, _playerOne, getType()), Olympiad.getInstance());
|
||||
|
@@ -239,6 +239,13 @@ public enum AbnormalType
|
||||
SONG_OF_ARCHERY(-1),
|
||||
DANCE_OF_SAGE(-1),
|
||||
SAYHA_BLESSING(-1),
|
||||
SAYHA_BUFF(-1),
|
||||
FREYA_SCROLL_VIT(-1),
|
||||
SHILLIEN_STUN(-1),
|
||||
DEMONIC_CAGE(-1),
|
||||
OLYMPIAD_SPEED(-1),
|
||||
OLYMPIAD_ATTACK(-1),
|
||||
FOCUS_ATTACK(-1),
|
||||
SONG_WEAPON(-1), // TODO: need find proper name
|
||||
HEAL_RESISTANCE(-1), // TODO: need find proper name
|
||||
TRIAD(-1),
|
||||
|
@@ -327,6 +327,79 @@ public enum AbnormalVisualEffect
|
||||
ATTACK_BUFF_AVE(338),
|
||||
SHIELD_BUFF_AVE(339),
|
||||
BERSERKER_BUFF_AVE(340),
|
||||
SEED_TALISMAN8(341),
|
||||
H_GOLD_STAR1_AVE(342),
|
||||
H_GOLD_STAR2_AVE(343),
|
||||
H_GOLD_STAR3_AVE(344),
|
||||
H_GOLD_STAR4_AVE(345),
|
||||
H_GOLD_STAR5_AVE(346),
|
||||
AVE_RAID_AREA(347),
|
||||
H_HEART_ADEN_AVE(348),
|
||||
H_ADENBAG_COIN_AVE(349),
|
||||
KAMAEL_BLACK_TRANSFORM_2(350),
|
||||
KAMAEL_WHITE_TRANSFORM_2(351),
|
||||
H_DEATH_EFFECT_AVE(352),
|
||||
AVE_WHITE_KNIGHT(353),
|
||||
U_ER_WI_WINDHIDE_AVE(354),
|
||||
JDK_BODY_FIRE_1(387),
|
||||
DK_BONEPRISON_AVE(388),
|
||||
DK_IGNITION_HUMAN_AVE(390),
|
||||
DK_IGNITION_ELF_AVE(391),
|
||||
DK_IGNITION_DARKELF_AVE(392),
|
||||
DK_ACCELERATION_AVE(393),
|
||||
DK_BURN_AVE(394),
|
||||
DK_FREEZING_AREA_AVE(395),
|
||||
DK_SHOCK_AVE(396),
|
||||
DK_PERFECT_SHILED_AVE(397),
|
||||
DK_FROSTBITE_AVE(398),
|
||||
DK_BONEPRISON_SQUELA_AVE(399),
|
||||
H_B_HASTE_B_AVE(400),
|
||||
FS_STIGMA_AVE(401),
|
||||
FORT_FLAG_AVE(403),
|
||||
H_EVENT_MOON_AVE(404),
|
||||
H_R_BARRIER_AVE(409),
|
||||
H_R_FIRE_DEBUFF_AVE(410),
|
||||
H_P_FIRE_DEBUFF_AVE(411),
|
||||
H_EVENT_PUMPKIN_AVE(418),
|
||||
H_EVENT_PUMPKIN_B_AVE(419),
|
||||
AVE_POISON_GROUND_G(420),
|
||||
AVE_POISON_GROUND_B(421),
|
||||
AVE_POISON_GROUND_P(422),
|
||||
AVE_POISON_GROUND_R(423),
|
||||
RANKER_DECO_ORC(424),
|
||||
H_DEBUFF_SELF_B_AVE(425),
|
||||
H_AURA_DEBUFF_B_AVE(426),
|
||||
H_ULTIMATE_DEFENCE_B_AVE(427),
|
||||
RANKER_DECO_ELF(428),
|
||||
RANKER_DECO_DARKELF(429),
|
||||
RANKER_DECO_DWARF(430),
|
||||
H_Y_MAGNETIC_AVE(431),
|
||||
H_R_NATURAL_BEAST_AVE(433),
|
||||
H_BERSERKER_B_BUFF_AVE(435),
|
||||
H_BERSERKER_C_BUFF_AVE(436),
|
||||
U_AVE_DIVINITY(437),
|
||||
Y_RO_GHOST_REFLECT_AVE(438),
|
||||
S_EVENT_KITE_DECO(439),
|
||||
H_B_SYMPHONY_SWORD_AVE(441),
|
||||
H_B_SYMPHONY_SWORD_DEFENCE_AVE(442),
|
||||
H_B_SYMPHONY_SWORD_BUFF_A_AVE(443),
|
||||
H_B_SYMPHONY_SWORD_BUFF_B_AVE(444),
|
||||
H_G_POISON_DANCE_AVE(445),
|
||||
H_G_POISON_DANCE_DEBUFF_A_AVE(446),
|
||||
H_G_POISON_DANCE_DEBUFF_B_AVE(447),
|
||||
H_R_POISON_DANCE_BUFF_B_AVE(448),
|
||||
H_B_CHOCOLATE_AVE(450),
|
||||
H_P_CHAIN_BLOCK_AVE(451),
|
||||
H_EVENT_MASK_AVE(452),
|
||||
H_R_ORC_TITAN_AVE(454),
|
||||
H_R_GIGANTIC_WEAPON_AVE(455),
|
||||
H_B_TOTEM_PUMA_AVE(457),
|
||||
H_Y_TOTEM_RABBIT_AVE(458),
|
||||
H_G_TOTEM_OGRE_AVE(459),
|
||||
H_Y_ORC_HP_AVE(460),
|
||||
H_B_ORC_HP_AVE(461),
|
||||
V_ORC_IMMOLATION_BODY_AVE(462),
|
||||
H_R_ORC_WAR_ROAR_AVE(463),
|
||||
DRAGON_ULTIMATE(700),
|
||||
CHANGE_HALLOWEEN(1000),
|
||||
BR_Y_1_ACCESSORY_R_RING(10001),
|
||||
@@ -339,7 +412,148 @@ public enum AbnormalVisualEffect
|
||||
BR_Y_3_ACCESSORY_EARRING(10008),
|
||||
BR_Y_3_ACCESSORY_NECKRACE(10009),
|
||||
BR_Y_3_TALI_DECO_WING(10019),
|
||||
CHAOS_MATCH_SMALL(10022);
|
||||
S_TRANS_DECO_1(10021),
|
||||
BR_TRANS_LV2_DECO_1(10022),
|
||||
BR_TRANS_LV3_DECO_1(10023),
|
||||
S_TRANS_DECO_2(10024),
|
||||
BR_TRANS_LV2_DECO_2(10025),
|
||||
BR_TRANS_LV3_DECO_2(10026),
|
||||
S_TRANS_DECO_3(10027),
|
||||
BR_TRANS_LV2_DECO_3(10028),
|
||||
BR_TRANS_LV3_DECO_3(10029),
|
||||
S_TRANS_DECO_4(10030),
|
||||
BR_TRANS_LV2_DECO_4(10031),
|
||||
BR_TRANS_LV3_DECO_4(10032),
|
||||
S_TRANS_DECO_5(10033),
|
||||
BR_TRANS_LV2_DECO_5(10034),
|
||||
BR_TRANS_LV3_DECO_5(10035),
|
||||
S_TRANS_DECO_6(10036),
|
||||
BR_TRANS_LV2_DECO_6(10037),
|
||||
BR_TRANS_LV3_DECO_6(10038),
|
||||
S_TRANS_DECO_7(10039),
|
||||
BR_TRANS_LV2_DECO_7(10040),
|
||||
BR_TRANS_LV3_DECO_7(10041),
|
||||
S_TRANS_DECO_8(10042),
|
||||
BR_TRANS_LV2_DECO_8(10043),
|
||||
BR_TRANS_LV3_DECO_8(10044),
|
||||
S_TRANS_DECO_9(10045),
|
||||
BR_TRANS_LV2_DECO_9(10046),
|
||||
BR_TRANS_LV3_DECO_9(10047),
|
||||
S_TRANS_DECO_10(10048),
|
||||
BR_TRANS_LV2_DECO_10(10049),
|
||||
BR_TRANS_LV3_DECO_10(10050),
|
||||
S_TRANS_DECO_11(10051),
|
||||
BR_TRANS_LV2_DECO_11(10052),
|
||||
BR_TRANS_LV3_DECO_11(10053),
|
||||
S_TRANS_DECO_12(10054),
|
||||
BR_TRANS_LV2_DECO_12(10055),
|
||||
BR_TRANS_LV3_DECO_12(10056),
|
||||
S_TRANS_DECO_13(10057),
|
||||
BR_TRANS_LV2_DECO_13(10058),
|
||||
BR_TRANS_LV3_DECO_13(10059),
|
||||
S_TRANS_DECO_14(10060),
|
||||
BR_TRANS_LV2_DECO_14(10061),
|
||||
BR_TRANS_LV3_DECO_14(10062),
|
||||
S_TRANS_DECO_15(10063),
|
||||
BR_TRANS_LV2_DECO_15(10064),
|
||||
BR_TRANS_LV3_DECO_15(10065),
|
||||
S_TRANS_DECO_16(10066),
|
||||
BR_TRANS_LV2_DECO_16(10067),
|
||||
BR_TRANS_LV3_DECO_16(10068),
|
||||
S_TRANS_DECO_17(10069),
|
||||
BR_TRANS_LV2_DECO_17(10070),
|
||||
BR_TRANS_LV3_DECO_17(10071),
|
||||
S_TRANS_DECO_18(10072),
|
||||
BR_TRANS_LV2_DECO_18(10073),
|
||||
BR_TRANS_LV3_DECO_18(10074),
|
||||
S_TRANS_DECO_19(10075),
|
||||
BR_TRANS_LV2_DECO_19(10076),
|
||||
BR_TRANS_LV3_DECO_19(10077),
|
||||
S_TRANS_DECO_20(10078),
|
||||
BR_TRANS_LV2_DECO_20(10079),
|
||||
BR_TRANS_LV3_DECO_20(10080),
|
||||
S_TRANS_DECO_21(10081),
|
||||
BR_TRANS_LV2_DECO_21(10082),
|
||||
BR_TRANS_LV3_DECO_21(10083),
|
||||
S_TRANS_DECO_22(10084),
|
||||
BR_TRANS_LV2_DECO_22(10085),
|
||||
BR_TRANS_LV3_DECO_22(10086),
|
||||
S_TRANS_DECO_23(10087),
|
||||
BR_TRANS_LV2_DECO_23(10088),
|
||||
BR_TRANS_LV3_DECO_23(10089),
|
||||
S_TRANS_DECO_24(10090),
|
||||
BR_TRANS_LV2_DECO_24(10091),
|
||||
BR_TRANS_LV3_DECO_24(10092),
|
||||
S_TRANS_DECO_25(10093),
|
||||
BR_TRANS_LV2_DECO_25(10094),
|
||||
BR_TRANS_LV3_DECO_25(10095),
|
||||
S_TRANS_DECO_26(10096),
|
||||
BR_TRANS_LV2_DECO_26(10097),
|
||||
BR_TRANS_LV3_DECO_26(10098),
|
||||
S_TRANS_DECO_27(10099),
|
||||
BR_TRANS_LV2_DECO_27(10100),
|
||||
BR_TRANS_LV3_DECO_27(10101),
|
||||
S_TRANS_DECO_28(10102),
|
||||
BR_TRANS_LV2_DECO_28(10103),
|
||||
BR_TRANS_LV3_DECO_28(10104),
|
||||
S_TRANS_DECO_29(10105),
|
||||
BR_TRANS_LV2_DECO_29(10106),
|
||||
BR_TRANS_LV3_DECO_29(10107),
|
||||
S_TRANS_DECO_30(10108),
|
||||
BR_TRANS_LV2_DECO_30(10109),
|
||||
BR_TRANS_LV3_DECO_30(10110),
|
||||
S_TRANS_DECO_31(10111),
|
||||
BR_TRANS_LV2_DECO_31(10112),
|
||||
BR_TRANS_LV3_DECO_31(10113),
|
||||
S_TRANS_DECO_32(10114),
|
||||
BR_TRANS_LV2_DECO_32(10115),
|
||||
BR_TRANS_LV3_DECO_32(10116),
|
||||
S_TRANS_DECO_33(10117),
|
||||
BR_TRANS_LV2_DECO_33(10118),
|
||||
BR_TRANS_LV3_DECO_33(10119),
|
||||
S_TRANS_DECO_34(10120),
|
||||
BR_TRANS_LV2_DECO_34(10121),
|
||||
BR_TRANS_LV3_DECO_34(10122),
|
||||
S_TRANS_DECO_35(10123),
|
||||
BR_TRANS_LV2_DECO_35(10124),
|
||||
BR_TRANS_LV3_DECO_35(10125),
|
||||
S_TRANS_DECO_36(10126),
|
||||
BR_TRANS_LV2_DECO_36(10127),
|
||||
BR_TRANS_LV3_DECO_36(10128),
|
||||
S_TRANS_DECO_37(10129),
|
||||
BR_TRANS_LV2_DECO_37(10130),
|
||||
BR_TRANS_LV3_DECO_37(10131),
|
||||
S_TRANS_DECO_38(10132),
|
||||
BR_TRANS_LV2_DECO_38(10133),
|
||||
BR_TRANS_LV3_DECO_38(10134),
|
||||
S_TRANS_DECO_39(10135),
|
||||
BR_TRANS_LV2_DECO_39(10136),
|
||||
BR_TRANS_LV3_DECO_39(10137),
|
||||
S_TRANS_DECO_40(10138),
|
||||
BR_TRANS_LV2_DECO_40(10139),
|
||||
BR_TRANS_LV3_DECO_40(10140),
|
||||
S_TRANS_DECO_41(10141),
|
||||
BR_TRANS_LV2_DECO_41(10142),
|
||||
BR_TRANS_LV3_DECO_41(10143),
|
||||
S_TRANS_DECO_42(10144),
|
||||
BR_TRANS_LV2_DECO_42(10145),
|
||||
BR_TRANS_LV3_DECO_42(10146),
|
||||
S_TRANS_DECO_43(10147),
|
||||
BR_TRANS_LV2_DECO_43(10148),
|
||||
BR_TRANS_LV3_DECO_43(10149),
|
||||
S_TRANS_DECO_44(10150),
|
||||
BR_TRANS_LV2_DECO_44(10151),
|
||||
BR_TRANS_LV3_DECO_44(10152),
|
||||
S_TRANS_DECO_45(10153),
|
||||
BR_TRANS_LV2_DECO_45(10154),
|
||||
BR_TRANS_LV3_DECO_45(10155),
|
||||
S_TRANS_DECO_46(10156),
|
||||
BR_TRANS_LV2_DECO_46(10157),
|
||||
BR_TRANS_LV3_DECO_46(10158),
|
||||
S_TRANS_DECO_47(10159),
|
||||
BR_TRANS_LV2_DECO_47(10160),
|
||||
BR_TRANS_LV3_DECO_47(10161),
|
||||
JDK_BODY_FIRE_2(10162);
|
||||
|
||||
private final int _clientId;
|
||||
|
||||
|
@@ -63,7 +63,8 @@ public enum CommonSkill
|
||||
FROG_TRANSFORM(6201, 1),
|
||||
CHILD_TRANSFORM(6202, 1),
|
||||
NATIVE_TRANSFORM(6203, 1),
|
||||
LUCKY_CLOVER(18103, 1);
|
||||
LUCKY_CLOVER(18103, 1),
|
||||
TRANQUIL_SOUL(32935, 1);
|
||||
|
||||
private final SkillHolder _holder;
|
||||
|
||||
|
@@ -41,6 +41,8 @@ public class MAttackFinalizer implements IStatFunction
|
||||
{
|
||||
// Enchanted chest bonus
|
||||
baseValue += calcEnchantBodyPart(creature, Item.SLOT_CHEST, Item.SLOT_FULL_ARMOR);
|
||||
// Bonus from Homunculus.
|
||||
baseValue += creature.getActingPlayer().getHomunculusAtkBonus();
|
||||
}
|
||||
|
||||
if (Config.CHAMPION_ENABLE && creature.isChampion())
|
||||
|
@@ -40,6 +40,9 @@ public class MCritRateFinalizer implements IStatFunction
|
||||
{
|
||||
// Enchanted legs bonus
|
||||
baseValue += calcEnchantBodyPart(creature, Item.SLOT_LEGS);
|
||||
|
||||
// Bonus from Homunculus.
|
||||
baseValue += creature.getActingPlayer().getHomunculusCritBonus();
|
||||
}
|
||||
|
||||
final double witBonus = creature.getWIT() > 0 ? BaseStat.WIT.calcBonus(creature) : 1.;
|
||||
|
@@ -76,6 +76,9 @@ public class MDefenseFinalizer implements IStatFunction
|
||||
}
|
||||
|
||||
baseValue *= BaseStat.CHA.calcBonus(creature);
|
||||
|
||||
// Bonus from Homunculus.
|
||||
baseValue += player.getHomunculusDefBonus();
|
||||
}
|
||||
else if (creature.isPet() && (creature.getInventory().getPaperdollObjectId(Inventory.PAPERDOLL_NECK) != 0))
|
||||
{
|
||||
|
@@ -52,6 +52,8 @@ public class MaxHpFinalizer implements IStatFunction
|
||||
{
|
||||
baseValue = player.getTemplate().getBaseHpMax(player.getLevel());
|
||||
}
|
||||
// Bonus from Homunculus.
|
||||
baseValue += creature.getActingPlayer().getHomunculusHpBonus();
|
||||
}
|
||||
|
||||
final double chaBonus = creature.isPlayer() ? BaseStat.CHA.calcBonus(creature) : 1.;
|
||||
|
@@ -41,6 +41,8 @@ public class PAttackFinalizer implements IStatFunction
|
||||
{
|
||||
// Enchanted chest bonus
|
||||
baseValue += calcEnchantBodyPart(creature, Item.SLOT_CHEST, Item.SLOT_FULL_ARMOR);
|
||||
// Bonus from Homunculus.
|
||||
baseValue += creature.getActingPlayer().getHomunculusAtkBonus();
|
||||
}
|
||||
|
||||
if (Config.CHAMPION_ENABLE && creature.isChampion())
|
||||
|
@@ -40,6 +40,9 @@ public class PCriticalRateFinalizer implements IStatFunction
|
||||
{
|
||||
// Enchanted legs bonus
|
||||
baseValue += calcEnchantBodyPart(creature, Item.SLOT_LEGS);
|
||||
|
||||
// Bonus from Homunculus.
|
||||
baseValue += creature.getActingPlayer().getHomunculusCritBonus();
|
||||
}
|
||||
final double dexBonus = creature.getDEX() > 0 ? BaseStat.DEX.calcBonus(creature) : 1.;
|
||||
return validateValue(creature, Stat.defaultValue(creature, stat, baseValue * dexBonus * 10), 0, creature.isPlayer() ? Config.MAX_PCRIT_RATE : Double.MAX_VALUE);
|
||||
|
@@ -79,6 +79,9 @@ public class PDefenseFinalizer implements IStatFunction
|
||||
}
|
||||
}
|
||||
baseValue *= BaseStat.CHA.calcBonus(creature);
|
||||
|
||||
// Bonus from Homunculus.
|
||||
baseValue += player.getHomunculusDefBonus();
|
||||
}
|
||||
}
|
||||
if (creature.isRaid())
|
||||
|
@@ -63,6 +63,14 @@ public class PlayerVariables extends AbstractVariables
|
||||
public static final String FORTUNE_TELLING_BLACK_CAT_VARIABLE = "FortuneTellingBlackCat";
|
||||
public static final String DELUSION_RETURN = "DELUSION_RETURN";
|
||||
public static final String HUNTING_ZONE_RESET_TIME = "HUNTING_ZONE_RESET_TIME_";
|
||||
public static final String FAVORITE_TELEPORTS = "FAVORITE_TELEPORTS";
|
||||
public static final String HOMUNCULUS_STATUS = "HOMUNCULUS_STATUS";
|
||||
public static final String HOMUNCULUS_TIME = "HOMUNCULUS_TIME";
|
||||
public static final String HOMUNCULUS_HP = "HOMUNCULUS_HP";
|
||||
public static final String HOMUNCULUS_SP = "HOMUNCULUS_SP";
|
||||
public static final String HOMUNCULUS_VP = "HOMUNCULUS_VP";
|
||||
public static final String HOMUNCULUS_ID = "HOMUNCULUS";
|
||||
public static final String HOMUNCULUS_QUALITY = "HOMUNCULUS_QUALITY";
|
||||
|
||||
private final int _objectId;
|
||||
|
||||
|
@@ -75,6 +75,17 @@ import org.l2jmobius.gameserver.network.clientpackets.ensoul.RequestTryEnSoulExt
|
||||
import org.l2jmobius.gameserver.network.clientpackets.equipmentupgrade.RequestUpgradeSystemResult;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.faction.RequestUserFactionInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusCreateStart;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusDeleteData;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusEnchantExperience;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusEnchantPoint;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusEnchantSkill;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusEvolve;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusInitPoint;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusInsert;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExHomunculusSummon;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExRequestHomonculusList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.homunculus.ExRequestHomunculusActivate;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGamePlay;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.luckygame.RequestLuckyGameStartInfo;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.mentoring.ConfirmMenteeAdd;
|
||||
@@ -82,9 +93,6 @@ import org.l2jmobius.gameserver.network.clientpackets.mentoring.RequestMenteeAdd
|
||||
import org.l2jmobius.gameserver.network.clientpackets.mentoring.RequestMenteeWaitingList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.mentoring.RequestMentorCancel;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.mentoring.RequestMentorList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.monsterbook.RequestMonsterBookClose;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.monsterbook.RequestMonsterBookOpen;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.monsterbook.RequestMonsterBookReward;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeAnnounce;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeItemBuy;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.pledgeV2.RequestExPledgeItemList;
|
||||
@@ -117,6 +125,10 @@ import org.l2jmobius.gameserver.network.clientpackets.shuttle.CannotMoveAnymoreI
|
||||
import org.l2jmobius.gameserver.network.clientpackets.shuttle.MoveToLocationInShuttle;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.shuttle.RequestShuttleGetOff;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.shuttle.RequestShuttleGetOn;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.teleports.ExRequestTeleport;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.teleports.ExRequestTeleportFavoriteList;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.teleports.ExRequestTeleportFavoritesAddDel;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.teleports.ExRequestTeleportFavoritesUIToggle;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.training.NotifyTrainingRoomEnd;
|
||||
|
||||
/**
|
||||
@@ -423,9 +435,9 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
REQUEST_RAID_SERVER_INFO(0x129, RequestRaidServerInfo::new, ConnectionState.IN_GAME),
|
||||
REQUEST_SHOW_AGIT_SIEGE_INFO(0x12A, null, ConnectionState.IN_GAME),
|
||||
REQUEST_ITEM_AUCTION_STATUS(0x12B, null, ConnectionState.IN_GAME),
|
||||
REQUEST_MONSTER_BOOK_OPEN(0x12C, RequestMonsterBookOpen::new, ConnectionState.IN_GAME),
|
||||
REQUEST_MONSTER_BOOK_CLOSE(0x12D, RequestMonsterBookClose::new, ConnectionState.IN_GAME),
|
||||
REQUEST_MONSTER_BOOK_REWARD(0x12E, RequestMonsterBookReward::new, ConnectionState.IN_GAME),
|
||||
REQUEST_MONSTER_BOOK_OPEN(0x12C, null, ConnectionState.IN_GAME),
|
||||
REQUEST_MONSTER_BOOK_CLOSE(0x12D, null, ConnectionState.IN_GAME),
|
||||
REQUEST_MONSTER_BOOK_REWARD(0x12E, null, ConnectionState.IN_GAME),
|
||||
EXREQUEST_MATCH_GROUP(0x12F, null, ConnectionState.IN_GAME),
|
||||
EXREQUEST_MATCH_GROUP_ASK(0x130, null, ConnectionState.IN_GAME),
|
||||
EXREQUEST_MATCH_GROUP_ANSWER(0x131, null, ConnectionState.IN_GAME),
|
||||
@@ -513,36 +525,81 @@ public enum ExIncomingPackets implements IIncomingPackets<GameClient>
|
||||
EX_RANKING_CHAR_INFO(0x181, RequestRankingCharInfo::new, ConnectionState.IN_GAME),
|
||||
EX_RANKING_CHAR_HISTORY(0x182, null, ConnectionState.IN_GAME),
|
||||
EX_RANKING_CHAR_RANKERS(0x183, RequestRankingCharRankers::new, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MERCENARY_RECRUIT_INFO_SET(0x184, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MERCENARY_CASTLEWAR_CASTLE_INFO(0x185, null, ConnectionState.IN_GAME),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_INFO(0x186, null, ConnectionState.IN_GAME),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_ATTACKER_LIST(0x187, null, ConnectionState.IN_GAME),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_DEFENDER_LIST(0x188, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MERCENARY_MEMBER_LIST(0x189, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MERCENARY_MEMBER_JOIN(0x18A, null, ConnectionState.IN_GAME),
|
||||
EX_PVP_BOOK_LIST(0x18B, ExPvpBookList::new, ConnectionState.IN_GAME),
|
||||
EX_PVP_BOOK_KILLER_LOCATION(0x18C, null, ConnectionState.IN_GAME),
|
||||
EX_PVP_BOOK_TELEPORT_TO_KILLER(0x18D, null, ConnectionState.IN_GAME),
|
||||
EX_LETTER_COLLECTOR_TAKE_REWARD(0x18E, null, ConnectionState.IN_GAME),
|
||||
EX_SET_STATUS_BONUS(0x18F, null, ConnectionState.IN_GAME),
|
||||
EX_RESET_STATUS_BONUS(0x190, null, ConnectionState.IN_GAME),
|
||||
EX_OLYMPIAD_MY_RANKING_INFO(0x191, RequestOlympiadMyRankingInfo::new, ConnectionState.IN_GAME),
|
||||
EX_OLYMPIAD_RANKING_INFO(0x192, RequestOlympiadRankingInfo::new, ConnectionState.IN_GAME),
|
||||
EX_OLYMPIAD_HERO_AND_LEGEND_INFO(0x193, RequestOlympiadHeroAndLegendInfo::new, ConnectionState.IN_GAME),
|
||||
EX_CASTLEWAR_OBSERVER_START(0x194, null, ConnectionState.IN_GAME),
|
||||
EX_RAID_TELEPORT_INFO(0x195, null, ConnectionState.IN_GAME),
|
||||
EX_TELEPORT_TO_RAID_POSITION(0x196, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_EXTRACT(0x197, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_RANDOM_INFO(0x198, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_RANDOM_LOCK_SLOT(0x199, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_RANDOM_REFRESH(0x19A, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_RANDOM_MAKE(0x19B, null, ConnectionState.IN_GAME),
|
||||
EX_MULTI_SELL_LIST(0x19C, null, ConnectionState.IN_GAME),
|
||||
EX_SAVE_ITEM_ANNOUNCE_SETTING(0x19D, null, ConnectionState.IN_GAME),
|
||||
EX_ANTIBOT(0x19E, null, ConnectionState.IN_GAME),
|
||||
EX_DPSVR(0x19F, null, ConnectionState.IN_GAME),
|
||||
EX_TENPROTECT_DECRYPT_ERROR(0x1A0, null, ConnectionState.IN_GAME),
|
||||
EX_MAX(0x1A1, null, ConnectionState.IN_GAME);
|
||||
EX_RANKING_CHAR_SPAWN_BUFFZONE_NPC(0x184, null, ConnectionState.IN_GAME),
|
||||
EX_RANKING_CHAR_BUFFZONE_NPC_POSITION(0x185, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MERCENARY_RECRUIT_INFO_SET(0x186, null, ConnectionState.IN_GAME),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_INFO(0x187, null, ConnectionState.IN_GAME),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_INFO(0x188, null, ConnectionState.IN_GAME),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_ATTACKER_LIST(0x189, null, ConnectionState.IN_GAME),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_DEFENDER_LIST(0x18A, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MERCENARY_MEMBER_LIST(0x18B, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_MERCENARY_MEMBER_JOIN(0x18C, null, ConnectionState.IN_GAME),
|
||||
EX_PVP_BOOK_LIST(0x18D, ExPvpBookList::new, ConnectionState.IN_GAME),
|
||||
EX_PVPBOOK_KILLER_LOCATION(0x18E, null, ConnectionState.IN_GAME),
|
||||
EX_PVPBOOK_TELEPORT_TO_KILLER(0x18F, null, ConnectionState.IN_GAME),
|
||||
EX_LETTER_COLLECTOR_TAKE_REWARD(0x190, null, ConnectionState.IN_GAME),
|
||||
EX_SET_STATUS_BONUS(0x191, null, ConnectionState.IN_GAME),
|
||||
EX_RESET_STATUS_BONUS(0x192, null, ConnectionState.IN_GAME),
|
||||
EX_OLYMPIAD_MY_RANKING_INFO(0x193, RequestOlympiadMyRankingInfo::new, ConnectionState.IN_GAME),
|
||||
EX_OLYMPIAD_RANKING_INFO(0x194, RequestOlympiadRankingInfo::new, ConnectionState.IN_GAME),
|
||||
EX_OLYMPIAD_HERO_AND_LEGEND_INFO(0x195, RequestOlympiadHeroAndLegendInfo::new, ConnectionState.IN_GAME),
|
||||
EX_CASTLEWAR_OBSERVER_START(0x196, null, ConnectionState.IN_GAME),
|
||||
EX_RAID_TELEPORT_INFO(0x197, null, ConnectionState.IN_GAME),
|
||||
EX_TELEPORT_TO_RAID_POSITION(0x198, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_EXTRACT(0x199, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_RANDOM_INFO(0x19A, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_RANDOM_LOCK_SLOTEX_CRAFT_RANDOM_INFO(0x19B, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_RANDOM_REFRESH(0x19C, null, ConnectionState.IN_GAME),
|
||||
EX_CRAFT_RANDOM_MAKE(0x19D, null, ConnectionState.IN_GAME),
|
||||
EX_MULTI_SELL_LIST(0x19E, null, ConnectionState.IN_GAME),
|
||||
EX_SAVE_ITEM_ANNOUNCE_SETTING(0x19F, null, ConnectionState.IN_GAME),
|
||||
EX_OLYMPIAD_UI(0x1A0, null, ConnectionState.IN_GAME),
|
||||
// 270
|
||||
EX_SHARED_POSITION_SHARING_UI(0x1A1, null, ConnectionState.IN_GAME),
|
||||
EX_SHARED_POSITION_TELEPORT_UI(0x1A2, null, ConnectionState.IN_GAME),
|
||||
EX_SHARED_POSITION_TELEPORT(0x1A3, null, ConnectionState.IN_GAME),
|
||||
EX_AUTH_RECONNECT(0x1A4, null, ConnectionState.IN_GAME),
|
||||
EX_PET_EQUIP_ITEM(0x1A5, null, ConnectionState.IN_GAME),
|
||||
EX_PET_UNEQUIP_ITEM(0x1A6, null, ConnectionState.IN_GAME),
|
||||
EX_SHOW_HOMUNCULUS_INFO(0x1A7, ExRequestHomonculusList::new, ConnectionState.IN_GAME),
|
||||
EX_HOMUNCULUS_CREATE_START(0x1A8, ExHomunculusCreateStart::new, ConnectionState.IN_GAME),
|
||||
EX_HOMUNCULUS_INSERT(0x1A9, ExHomunculusInsert::new, ConnectionState.IN_GAME),
|
||||
EX_HOMUNCULUS_SUMMON(0x1AA, ExHomunculusSummon::new, ConnectionState.IN_GAME),
|
||||
EX_DELETE_HOMUNCULUS_DATA(0x1AB, ExHomunculusDeleteData::new, ConnectionState.IN_GAME),
|
||||
EX_REQUEST_ACTIVATE_HOMUNCULUS(0x1AC, ExRequestHomunculusActivate::new, ConnectionState.IN_GAME),
|
||||
EX_HOMUNCULUS_GET_ENCHANT_POINT(0x1AD, ExHomunculusEnchantPoint::new, ConnectionState.IN_GAME),
|
||||
EX_HOMUNCULUS_INIT_POINT(0x1AE, ExHomunculusInitPoint::new, ConnectionState.IN_GAME),
|
||||
EX_EVOLVE_PET(0x1AF, ExHomunculusEvolve::new, ConnectionState.IN_GAME),
|
||||
EX_ENCHANT_HOMUNCULUS_SKILL(0x1B0, ExHomunculusEnchantSkill::new, ConnectionState.IN_GAME),
|
||||
EX_HOMUNCULUS_ENCHANT_EXP(0x1B1, ExHomunculusEnchantExperience::new, ConnectionState.IN_GAME),
|
||||
EX_TELEPORT_FAVORITES_LIST(0x1B2, ExRequestTeleportFavoriteList::new, ConnectionState.IN_GAME),
|
||||
EX_TELEPORT_FAVORITES_UI_TOGGLE(0x1B3, ExRequestTeleportFavoritesUIToggle::new, ConnectionState.IN_GAME),
|
||||
EX_TELEPORT_FAVORITES_ADD_DEL(0x1B4, ExRequestTeleportFavoritesAddDel::new, ConnectionState.IN_GAME),
|
||||
EX_ANTIBOT(0x1B5, null, ConnectionState.IN_GAME),
|
||||
EX_DPSVR(0x1B6, null, ConnectionState.IN_GAME),
|
||||
EX_TENPROTECT_DECRYPT_ERROR(0x1B7, null, ConnectionState.IN_GAME),
|
||||
EX_NET_LATENCY(0x1B8, null, ConnectionState.IN_GAME),
|
||||
EX_MABLE_GAME_OPEN(0x1B9, null, ConnectionState.IN_GAME),
|
||||
EX_MABLE_GAME_ROLL_DICE(0x1BA, null, ConnectionState.IN_GAME),
|
||||
EX_MABLE_GAME_POPUP_OK(0x1BB, null, ConnectionState.IN_GAME),
|
||||
EX_MABLE_GAME_RESET(0x1BC, null, ConnectionState.IN_GAME),
|
||||
EX_MABLE_GAME_CLOSE(0x1BD, null, ConnectionState.IN_GAME),
|
||||
EX_RETURN_TO_ORIGIN(0x1BE, null, ConnectionState.IN_GAME),
|
||||
EX_BLESS_OPTION_PUT_ITEM(0x1BF, null, ConnectionState.IN_GAME),
|
||||
EX_BLESS_OPTION_ENCHANT(0x1C0, null, ConnectionState.IN_GAME),
|
||||
EX_BLESS_OPTION_CANCEL(0x1C1, null, ConnectionState.IN_GAME),
|
||||
EX_PVP_RANKING_MY_INFO(0x1C2, null, ConnectionState.IN_GAME),
|
||||
EX_PVP_RANKING_LIST(0x1C3, null, ConnectionState.IN_GAME),
|
||||
EX_ACQUIRE_PET_SKILL(0x1C4, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_V3_INFO(0x1C5, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ENEMY_INFO_LIST(0x1C6, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ENEMY_REGISTER(0x1C7, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_ENEMY_DELETE(0x1C8, null, ConnectionState.IN_GAME),
|
||||
EX_PK_PENALTY_LIST(0x1C9, null, ConnectionState.IN_GAME),
|
||||
EX_PK_PENALTY_LIST_ONLY_LOC(0x1CA, null, ConnectionState.IN_GAME),
|
||||
EX_TRY_PET_EXTRACT_SYSTEM(0x1CB, null, ConnectionState.IN_GAME),
|
||||
EX_PLEDGE_V3_SET_ANNOUNCE(0x1CC, null, ConnectionState.IN_GAME),
|
||||
EX_MAX(0x1CD, null, ConnectionState.IN_GAME);
|
||||
|
||||
public static final ExIncomingPackets[] PACKET_ARRAY;
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -792,61 +792,62 @@ public enum OutgoingPackets
|
||||
EX_OLYMPIAD_MATCH_INFO(0xFE, 0x1FC),
|
||||
EX_ELEMENTAL_SPIRIT_GET_EXP(0xFE, 0x1FD),
|
||||
EX_ITEM_ANNOUNCE(0xFE, 0x1FE),
|
||||
EX_DRESS_ROOM_UI_OPEN(0xFE, 0x1FF),
|
||||
EX_DRESS_HANGER_LIST(0xFE, 0x200),
|
||||
EX_COMPLETED_DAILY_QUEST_LIST(0xFE, 0x1FF),
|
||||
EX_COMPLETED_DAILY_QUEST(0xFE, 0x200),
|
||||
EX_USER_BAN_INFO(0xFE, 0x201),
|
||||
EX_TRY_ENCHANT_ARTIFACT_RESULT(0xFE, 0x202),
|
||||
EX_XIGN_CODE(0xFE, 0x203),
|
||||
// 196
|
||||
EX_SHOW_UPGRADE_SYSTEM_NORMAL(0xFE, 0x204),
|
||||
EX_UPGRADE_SYSTEM_NORMAL_RESULT(0xFE, 0x205),
|
||||
EX_PURCHASE_LIMIT_SHOP_ITEM_L(0xFE, 0x206),
|
||||
EX_PURCHASE_LIMIT_SHOP_ITEM_B(0xFE, 0x207),
|
||||
EX_BLOODY_COIN_COUNT(0xFE, 0x208),
|
||||
EX_CLASS_CHANGE_SET_ALARM(0xFE, 0x209),
|
||||
EX_REQUEST_CLASS_CHANGE(0xFE, 0x20A),
|
||||
EX_REQUEST_CLASS_CHANGE_VERIFY(0xFE, 0x20B),
|
||||
EX_COSTUME_USE_ITEM(0xFE, 0x20C),
|
||||
EX_CHOOSE_COSTUME_ITEM(0xFE, 0x20D),
|
||||
EX_SEND_COSTUME_LIST(0xFE, 0x20E),
|
||||
EX_SEND_COSTUME_LIST_FULL(0xFE, 0x20F),
|
||||
EX_COSTUME_COLLECTION_SKILL_A(0xFE, 0x211),
|
||||
EX_COSTUME_EVOLUTION(0xFE, 0x212),
|
||||
EX_COSTUME_EXTRACT(0xFE, 0x213),
|
||||
EX_COSTUME_LOCK(0xFE, 0x214),
|
||||
EX_COSTUME_SHORTCUT_LIST(0xFE, 0x215),
|
||||
EX_MAGICLAMP_EXP_INFO(0xFE, 0x216),
|
||||
EX_MAGICLAMP_GAME_INFO(0xFE, 0x217),
|
||||
EX_MAGICLAMP_GAME_RESULT(0xFE, 0x218),
|
||||
EX_SHOW_UPGRADE_SYSTEM_NORMAL(0xFE, 0x203),
|
||||
EX_UPGRADE_SYSTEM_NORMAL_RESULT(0xFE, 0x204),
|
||||
EX_PURCHASE_LIMIT_SHOP_ITEM_LIST(0xFE, 0x205),
|
||||
EX_PURCHASE_LIMIT_SHOP_ITEM_BUY(0xFE, 0x206),
|
||||
EX_BLOODY_COIN_COUNT(0xFE, 0x207),
|
||||
EX_CLASS_CHANGE_SET_ALARM(0xFE, 0x208),
|
||||
EX_REQUEST_CLASS_CHANGE(0xFE, 0x209),
|
||||
EX_REQUEST_CLASS_CHANGE_VERIFYING(0xFE, 0x20A),
|
||||
EX_COSTUME_USE_ITEM(0xFE, 0x20B),
|
||||
EX_CHOOSE_COSTUME_ITEM(0xFE, 0x20C),
|
||||
EX_SEND_COSTUME_LIST(0xFE, 0x20D),
|
||||
EX_SEND_COSTUME_LIST_FULL(0xFE, 0x20E),
|
||||
EX_COSTUME_COLLECTION_SKILL_ACTIVE(0xFE, 0x20F),
|
||||
EX_COSTUME_EVOLUTION(0xFE, 0x210),
|
||||
EX_COSTUME_EXTRACT(0xFE, 0x211),
|
||||
EX_COSTUME_LOCK(0xFE, 0x212),
|
||||
EX_COSTUME_SHORTCUT_LIST(0xFE, 0x213),
|
||||
EX_MAGICLAMP_EXP_INFO(0xFE, 0x214),
|
||||
EX_MAGICLAMP_GAME_INFO(0xFE, 0x215),
|
||||
EX_MAGICLAMP_GAME_RESULT(0xFE, 0x216),
|
||||
// 228
|
||||
EX_SHOW_TELEPORT_UI(0xFE, 0x219),
|
||||
EX_ACTIVATE_AUTO_SHORTCUT(0xFE, 0x21A),
|
||||
EX_PREMIUM_MANAGER_SHOW_HTML(0xFE, 0x21B),
|
||||
EX_ACTIVATED_CURSED_TREASURE(0xFE, 0x21C),
|
||||
EX_PAYBACK_LIST(0xFE, 0x21D),
|
||||
EX_PAYBACK_GIVE_REWARD(0xFE, 0x21E),
|
||||
EX_PAYBACK_UI_LAUNCHER(0xFE, 0x21F),
|
||||
EX_DIE_INFO(0xFE, 0x220),
|
||||
EX_AUTOPLAY_SETTING(0xFE, 0x221),
|
||||
EX_AUTOPLAY_DO_MACRO(0xFE, 0x222),
|
||||
EX_OLYMPIAD_MATCH_MAKING_RESULT(0xFE, 0x223),
|
||||
EX_FESTIVAL_BM_INFO(0xFE, 0x224),
|
||||
EX_FESTIVAL_BM_ALL_ITEM_INFO(0xFE, 0x225),
|
||||
EX_FESTIVAL_BM_TOP_ITEM_INFO(0xFE, 0x226),
|
||||
EX_FESTIVAL_BM_GAME(0xFE, 0x227),
|
||||
EX_GACHA_SHOP_INFO(0xFE, 0x228),
|
||||
EX_GACHA_SHOP_GACHA_GROUP(0xFE, 0x229),
|
||||
EX_GACHA_SHOP_GACHA_ITEM(0xFE, 0x22A),
|
||||
EX_TIME_RESTRICT_FIELD_LIST(0xFE, 0x22B),
|
||||
EX_TIME_RESTRICT_FIELD_USER_ENTER(0xFE, 0x22C),
|
||||
EX_TIME_RESTRICT_FIELD_USER_CHARGE_RESULT(0xFE, 0x22D),
|
||||
EX_TIME_RESTRICT_FIELD_USER_ALARM(0xFE, 0x22E),
|
||||
EX_TIME_RESTRICT_FIELD_USER_EXIT(0xFE, 0x22F),
|
||||
EX_RANKING_CHAR_INFO(0xFE, 0x230),
|
||||
EX_RANKING_CHAR_HISTORY(0xFE, 0x231),
|
||||
EX_RANKING_CHAR_RANKERS(0xFE, 0x232),
|
||||
EX_SHOW_TELEPORT_UI(0xFE, 0x217),
|
||||
EX_ACTIVATE_AUTO_SHORTCUT(0xFE, 0x218),
|
||||
EX_PREMIUM_MANAGER_SHOW_HTML(0xFE, 0x219),
|
||||
EX_ACTIVATED_CURSED_TREASURE_BOX_LOCATION(0xFE, 0x21A),
|
||||
EX_PAYBACK_LIST(0xFE, 0x21B),
|
||||
EX_PAYBACK_GIVE_REWARD(0xFE, 0x21C),
|
||||
EX_PAYBACK_UI_LAUNCHER(0xFE, 0x21D),
|
||||
EX_DIE_INFO(0xFE, 0x21E),
|
||||
EX_AUTOPLAY_SETTING(0xFE, 0x21F),
|
||||
EX_AUTOPLAY_DO_MACRO(0xFE, 0x220),
|
||||
EX_OLYMPIAD_MATCH_MAKING_RESULT(0xFE, 0x221),
|
||||
EX_FESTIVAL_BM_INFO(0xFE, 0x222),
|
||||
EX_FESTIVAL_BM_ALL_ITEM_INFO(0xFE, 0x223),
|
||||
EX_FESTIVAL_BM_TOP_ITEM_INFO(0xFE, 0x224),
|
||||
EX_FESTIVAL_BM_GAME(0xFE, 0x225),
|
||||
EX_GACHA_SHOP_INFO(0xFE, 0x226),
|
||||
EX_GACHA_SHOP_GACHA_GROUP(0xFE, 0x227),
|
||||
EX_GACHA_SHOP_GACHA_ITEM(0xFE, 0x228),
|
||||
EX_TIME_RESTRICT_FIELD_LIST(0xFE, 0x229),
|
||||
EX_TIME_RESTRICT_FIELD_USER_ENTER(0xFE, 0x22A),
|
||||
EX_TIME_RESTRICT_FIELD_USER_CHARGE_RESULT(0xFE, 0x22B),
|
||||
EX_TIME_RESTRICT_FIELD_USER_ALARM(0xFE, 0x22C),
|
||||
EX_TIME_RESTRICT_FIELD_USER_EXIT(0xFE, 0x22D),
|
||||
EX_RANKING_CHAR_INFO(0xFE, 0x22E),
|
||||
EX_RANKING_CHAR_HISTORY(0xFE, 0x22F),
|
||||
EX_RANKING_CHAR_RANKERS(0xFE, 0x230),
|
||||
EX_RANKING_CHAR_BUFFZONE_NPC_INFO(0xFE, 0x231),
|
||||
EX_RANKING_CHAR_BUFFZONE_NPC_POSITION(0xFE, 0x232),
|
||||
EX_BOW_ACTION_TO(0xFE, 0x233),
|
||||
EX_LETTER_COLLECTOR_UI_LAUNCH(0xFE, 0x234),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_INFO(0xFE, 0x234),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_HUD_INFO(0xFE, 0x235),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_INFO(0xFE, 0x236),
|
||||
EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_ATTACKER_LIST(0xFE, 0x237),
|
||||
@@ -857,7 +858,7 @@ public enum OutgoingPackets
|
||||
EX_PVPBOOK_NEW_PK(0xFE, 0x23C),
|
||||
EX_PLEDGE_MERCENARY_MEMBER_JOIN(0xFE, 0x23D),
|
||||
EX_RAID_DROP_ITEM_ANNOUNCE(0xFE, 0x23E),
|
||||
EX_LETTER_COLLECTOR_UI_LAUNCER(0xFE, 0x23F),
|
||||
EX_LETTER_COLLECTOR_UI_LAUNCHER(0xFE, 0x23F),
|
||||
EX_OLYMPIAD_MY_RANKING_INFO(0xFE, 0x240),
|
||||
EX_OLYMPIAD_RANKING_INFO(0xFE, 0x241),
|
||||
EX_OLYMPIAD_HERO_AND_LEGEND_INFO(0xFE, 0x242),
|
||||
@@ -869,11 +870,63 @@ public enum OutgoingPackets
|
||||
EX_CRAFT_RANDOM_REFRESH(0xFE, 0x248),
|
||||
EX_CRAFT_RANDOM_MAKE(0xFE, 0x249),
|
||||
EX_ITEM_ANNOUNCE_SETTING(0xFE, 0x24A),
|
||||
EX_ANTIBOT(0xFE, 0x24B),
|
||||
EX_DPSVR(0xFE, 0x24C),
|
||||
EX_SEND_CMD_LIST(0xFE, 0x24D),
|
||||
EX_SHANGHAI_HEALTHY_TIPS(0xFE, 0x24E),
|
||||
EX_MAX(0xFE, 0x24F);
|
||||
EX_USER_BOOST_STAT(0xFE, 0x24B),
|
||||
EX_ANTIBOT(0xFE, 0x24C),
|
||||
EX_DPSVR(0xFE, 0x24D),
|
||||
EX_SEND_CMD_LIST(0xFE, 0x24E),
|
||||
EX_SHANGHAI_HEALTHY_TIPS(0xFE, 0x24F),
|
||||
// 270
|
||||
EX_ADEN_FORTRESS_SIEGE_HUD_INFO(0xFE, 0x250),
|
||||
EX_PURCHASE_LIMIT_SHOP_ITEM_LIST_NEW(0xFE, 0x251),
|
||||
EX_SHARED_POSITION_SHARING_UI(0xFE, 0x252),
|
||||
EX_SHARED_POSITION_TELEPORT_UI(0xFE, 0x253),
|
||||
EX_CHAR_INFO(0xFE, 0x254),
|
||||
EX_AUTH_RECONNECT(0xFE, 0x255),
|
||||
EX_SHOW_BIRTH_INFO(0xFE, 0x256),
|
||||
EX_HOMUNCULUS_CREATE_START_RESULT(0xFE, 0x257),
|
||||
EX_HOMUNCULUS_INSERT_RESULT(0xFE, 0x258),
|
||||
EX_HOMUNCULUS_SUMMON_RESULT(0xFE, 0x259),
|
||||
EX_SHOW_HOMUNCULUS_LIST(0xFE, 0x25A),
|
||||
EX_DELETE_HOMUNCLUS_DATA_RESULT(0xFE, 0x25B),
|
||||
EX_ACTIVATE_HOMUNCULUS_RESULT(0xFE, 0x25C),
|
||||
EX_HOMUNCULUS_GET_ENCHANT_POINT_RESULT(0xFE, 0x25D),
|
||||
EX_HOMUNCULUS_INIT_POINT_RESULT(0xFE, 0x25E),
|
||||
EX_HOMUNCULUS_POINT_INFO(0xFE, 0x25F),
|
||||
EX_RESET_HOMUNCULUS_SKILL_RESULT(0xFE, 0x260),
|
||||
EX_ENCHANT_HOMUNCULUS_SKILL_RESULT(0xFE, 0x261),
|
||||
EX_HOMUNCULUS_ENCHANT_EXP_RESULT(0xFE, 0x262),
|
||||
EX_HOMUNCULUS_HPSPVP(0xFE, 0x263),
|
||||
EX_HOMUNCULUS_READY(0xFE, 0x264),
|
||||
EX_TELEPORT_FAVORITES_LIST(0xFE, 0x265),
|
||||
EX_VITAL_EX_INFO(0xFE, 0x266),
|
||||
EX_NET_LATENCY(0xFE, 0x267),
|
||||
EX_MABLE_GAME_SHOW_PLAYER_STATE(0xFE, 0x268),
|
||||
EX_MABLE_GAME_DICE_RESULT(0xFE, 0x269),
|
||||
EX_MABLE_GAME_MOVE(0xFE, 0x26A),
|
||||
EX_MABLE_GAME_PRISON(0xFE, 0x26B),
|
||||
EX_MABLE_GAME_REWARD_ITEM(0xFE, 0x26C),
|
||||
EX_MABLE_GAME_SKILL_INFO(0xFE, 0x26D),
|
||||
EX_MABLE_GAME_MINIGAME(0xFE, 0x26E),
|
||||
EX_MABLE_GAME_PLAY_UNABLE(0xFE, 0x26F),
|
||||
EX_MABLE_GAME_UI_LAUNCHER(0xFE, 0x270),
|
||||
EX_MABLE_GAME_ROLL_COUNT_RESET(0xFE, 0x271),
|
||||
EX_PET_SKILL_LIST(0xFE, 0x272),
|
||||
EX_OPEN_BLESS_OPTION_SCROLL(0xFE, 0x273),
|
||||
EX_BLESS_OPTION_PUT_ITEM(0xFE, 0x274),
|
||||
EX_BLESS_OPTION_ENCHANT(0xFE, 0x275),
|
||||
EX_BLESS_OPTION_CANCEL(0xFE, 0x276),
|
||||
EX_PVP_RANKING_MY_INFO(0xFE, 0x277),
|
||||
EX_PVP_RANKING_LIST(0xFE, 0x278),
|
||||
EX_PLEDGE_V3_INFO(0xFE, 0x279),
|
||||
EX_PLEDGE_ENEMY_INFO_LIST(0xFE, 0x27A),
|
||||
EX_ITEM_DELETION_INFO(0xFE, 0x27B),
|
||||
// 272
|
||||
EX_PK_PENALTY_LIST(0xFE, 0x27C),
|
||||
EX_PK_PENALTY_LIST_ONLY_LOC(0xFE, 0x27D),
|
||||
EX_SHOW_PET_EXTRACT_SYSTEM(0xFE, 0x27E),
|
||||
EX_RESULT_PET_EXTRACT_SYSTEM(0xFE, 0x27F),
|
||||
EX_HIDE_PET_EXTRACT_SYSTEM(0xFE, 0x280),
|
||||
EX_MAX(0xFE, 0x281);
|
||||
|
||||
private final int _id1;
|
||||
private final int _id2;
|
||||
|
@@ -9670,7 +9670,7 @@ public class SystemMessageId
|
||||
@ClientString(id = 3351, message = "Magic Buffer")
|
||||
public static SystemMessageId MAGIC_BUFFER;
|
||||
|
||||
@ClientString(id = 3352, message = "- Diverse buff Skills <br>- Expert at ally boosting, enemy weakening, and crowd control<br>- Powerful Rush and Dual Weapon attacks")
|
||||
@ClientString(id = 3352, message = "- Diverse buff Skills<br>- Expert at ally boosting, enemy weakening, and crowd control<br>- Powerful Rush and Dual Weapon attacks")
|
||||
public static SystemMessageId DIVERSE_BUFF_SKILLS_BR_EXPERT_AT_ALLY_BOOSTING_ENEMY_WEAKENING_AND_CROWD_CONTROL_BR_POWERFUL_RUSH_AND_DUAL_WEAPON_ATTACKS;
|
||||
|
||||
@ClientString(id = 3353, message = "Inherited the powers of Iss Enchanter <font color='#FFDF4C'>Leister</font>, an insightful and observant Giant who combined magic with military strategy and tactics. His ability to anticipate and react to the flow of battle was legendary.")
|
||||
@@ -13216,7 +13216,7 @@ public class SystemMessageId
|
||||
@ClientString(id = 4626, message = "By the will of the Chaos, the power of Ashagen, the greatest assassin of the giants, has been combined with the ancient power of darkness and wind. This power endowed the Othell Ghost Hunters with speed and critical attacks that made them the ultimate assassins.")
|
||||
public static SystemMessageId BY_THE_WILL_OF_THE_CHAOS_THE_POWER_OF_ASHAGEN_THE_GREATEST_ASSASSIN_OF_THE_GIANTS_HAS_BEEN_COMBINED_WITH_THE_ANCIENT_POWER_OF_DARKNESS_AND_WIND_THIS_POWER_ENDOWED_THE_OTHELL_GHOST_HUNTERS_WITH_SPEED_AND_CRITICAL_ATTACKS_THAT_MADE_THEM_THE_ULTIMATE_ASSASSINS;
|
||||
|
||||
@ClientString(id = 4627, message = "- Specializes in Spoil (Plunder) <br> (* obtains rare items and ingredients)")
|
||||
@ClientString(id = 4627, message = "- Specializes in Spoil (Plunder)<br> (* obtains rare items and ingredients)")
|
||||
public static SystemMessageId SPECIALIZES_IN_SPOIL_PLUNDER_BR_OBTAINS_RARE_ITEMS_AND_INGREDIENTS;
|
||||
|
||||
@ClientString(id = 4628, message = "By the will of the Chaos, the power of Ashagen, the greatest assassin of the giants, has been combined with the ancient power of the earth and wind. Heightened in all senses, they now utilize their abilities in both battlefield and at home.")
|
||||
@@ -14164,16 +14164,16 @@ public class SystemMessageId
|
||||
@ClientString(id = 5033, message = "Your account has not completed the <font color='#FFDF4C'>Parental Agreement</font>.<br> Please complete the <font color='#FFDF4C'>Parental Agreement</font> before logging in.")
|
||||
public static SystemMessageId YOUR_ACCOUNT_HAS_NOT_COMPLETED_THE_FONT_COLOR_FFDF4C_PARENTAL_AGREEMENT_FONT_BR_PLEASE_COMPLETE_THE_FONT_COLOR_FFDF4C_PARENTAL_AGREEMENT_FONT_BEFORE_LOGGING_IN;
|
||||
|
||||
@ClientString(id = 5034, message = "This account has declined the User Agreement or has requested for membership withdrawal. Please try again after <br><font color='#FFDF4C'>cancelling the Game Agreement declination</font> or <font color='#FFDF4C'>cancelling the membership withdrawal request</font>.")
|
||||
@ClientString(id = 5034, message = "This account has declined the User Agreement or has requested for membership withdrawal. Please try again after<br><font color='#FFDF4C'>cancelling the Game Agreement declination</font> or <font color='#FFDF4C'>cancelling the membership withdrawal request</font>.")
|
||||
public static SystemMessageId THIS_ACCOUNT_HAS_DECLINED_THE_USER_AGREEMENT_OR_HAS_REQUESTED_FOR_MEMBERSHIP_WITHDRAWAL_PLEASE_TRY_AGAIN_AFTER_BR_FONT_COLOR_FFDF4C_CANCELLING_THE_GAME_AGREEMENT_DECLINATION_FONT_OR_FONT_COLOR_FFDF4C_CANCELLING_THE_MEMBERSHIP_WITHDRAWAL_REQUEST_FONT;
|
||||
|
||||
@ClientString(id = 5035, message = "All permissions on your account are restricted. <br>Please go to http://eu.4game.com/ for details.")
|
||||
@ClientString(id = 5035, message = "All permissions on your account are restricted.<br>Please go to http://eu.4game.com/ for details.")
|
||||
public static SystemMessageId ALL_PERMISSIONS_ON_YOUR_ACCOUNT_ARE_RESTRICTED_BR_PLEASE_GO_TO_HTTP_EU_4GAME_COM_FOR_DETAILS;
|
||||
|
||||
@ClientString(id = 5036, message = "Your account has been restricted.<br>For more detail, visit the <font color='#FFDF4C'>4game website (</font><font color='#6699FF'><a href='asfunction:homePage'>https://support.4game.com</a></font><font color='#FFDF4C'>) or <font color='#FFDF4C'>Customer Service Center</font>.")
|
||||
public static SystemMessageId YOUR_ACCOUNT_HAS_BEEN_RESTRICTED_BR_FOR_MORE_DETAIL_VISIT_THE_FONT_COLOR_FFDF4C_4GAME_WEBSITE_FONT_FONT_COLOR_6699FF_A_HREF_ASFUNCTION_HOMEPAGE_HTTPS_SUPPORT_4GAME_COM_A_FONT_FONT_COLOR_FFDF4C_OR_FONT_COLOR_FFDF4C_CUSTOMER_SERVICE_CENTER_FONT;
|
||||
|
||||
@ClientString(id = 5037, message = "You can no longer log in as your account has been converted to <font color='#FFDF4C'>Unified Account</font>. <br>Please try again through the <font color='#FFDF4C'>Unified Account</font>.")
|
||||
@ClientString(id = 5037, message = "You can no longer log in as your account has been converted to <font color='#FFDF4C'>Unified Account</font>.<br>Please try again through the <font color='#FFDF4C'>Unified Account</font>.")
|
||||
public static SystemMessageId YOU_CAN_NO_LONGER_LOG_IN_AS_YOUR_ACCOUNT_HAS_BEEN_CONVERTED_TO_FONT_COLOR_FFDF4C_UNIFIED_ACCOUNT_FONT_BR_PLEASE_TRY_AGAIN_THROUGH_THE_FONT_COLOR_FFDF4C_UNIFIED_ACCOUNT_FONT;
|
||||
|
||||
@ClientString(id = 5038, message = "You must change your password and secret question in order to log in. Please visit the <font color='#FFDF4C'>4game website (</font><font color='#6699FF'><a href='asfunction:homePage'>https://support.4game.com</a></font><font color='#FFDF4C'>) 1:1 Customer Service Center</font> and <font color='#FFDF4C'>change the password and secret question</font>.")
|
||||
@@ -15952,7 +15952,7 @@ public class SystemMessageId
|
||||
@ClientString(id = 6833, message = "The character is already banned.")
|
||||
public static SystemMessageId THE_CHARACTER_IS_ALREADY_BANNED;
|
||||
|
||||
@ClientString(id = 6834, message = "The sanctions were imposed on the character. <br>Please, click on the icon below to find out the details.")
|
||||
@ClientString(id = 6834, message = "The sanctions were imposed on the character.<br>Please, click on the icon below to find out the details.")
|
||||
public static SystemMessageId THE_SANCTIONS_WERE_IMPOSED_ON_THE_CHARACTER_BR_PLEASE_CLICK_ON_THE_ICON_BELOW_TO_FIND_OUT_THE_DETAILS;
|
||||
|
||||
@ClientString(id = 6835, message = "The character was blocked due to the User Agreement Violation. Please contact Support for the detailed information: https://eu.4gamesupport.com/")
|
||||
|
@@ -65,16 +65,19 @@ public abstract class AbstractRefinePacket implements IClientIncomingPacket
|
||||
return false;
|
||||
}
|
||||
|
||||
// TODO: Update XMLs.
|
||||
// Check for item id
|
||||
if (fee.getItemId() != feeItem.getId())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// if (fee.getItemId() != feeItem.getId())
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// TODO: Update XMLs.
|
||||
// Count must be greater or equal of required number
|
||||
if (fee.getItemCount() > feeItem.getCount())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// if (fee.getItemCount() > feeItem.getCount())
|
||||
// {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -107,6 +107,9 @@ import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ability.ExAcquireAPSkillList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.attendance.ExVipAttendanceItemList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.friend.L2FriendList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusBirthInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomunculusPointInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomunculusReady;
|
||||
import org.l2jmobius.gameserver.util.BuilderUtil;
|
||||
|
||||
/**
|
||||
@@ -320,6 +323,11 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
player.sendPacket(new ExVitalityEffectInfo(player));
|
||||
}
|
||||
|
||||
// Enable Homunculus system.
|
||||
player.sendPacket(new ExHomonculusBirthInfo(player));
|
||||
player.sendPacket(new ExHomunculusPointInfo(player));
|
||||
player.sendPacket(new ExHomunculusReady(player));
|
||||
|
||||
// Send time.
|
||||
player.sendPacket(new ExEnterWorld());
|
||||
|
||||
@@ -390,9 +398,6 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
// Send Adena / Inventory Count Info
|
||||
player.sendPacket(new ExAdenaInvenCount(player));
|
||||
|
||||
// Send Equipped Items
|
||||
player.sendPacket(new ExUserInfoEquipSlot(player));
|
||||
|
||||
// Send Unread Mail Count
|
||||
if (MailManager.getInstance().hasUnreadPost(player))
|
||||
{
|
||||
@@ -456,6 +461,9 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
// Expand Skill
|
||||
player.sendPacket(new ExStorageMaxCount(player));
|
||||
|
||||
// Send Equipped Items
|
||||
player.sendPacket(new ExUserInfoEquipSlot(player));
|
||||
|
||||
// Friend list
|
||||
client.sendPacket(new L2FriendList(player));
|
||||
if (Config.SHOW_GOD_VIDEO_INTRO && player.getVariables().getBoolean("intro_god_video", false))
|
||||
@@ -658,6 +666,10 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
final long stormIsleExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 1, 0);
|
||||
final long primevalIsleExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 6, 0);
|
||||
final long goldenAltarExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 7, 0);
|
||||
final long coalMinesExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 11, 0);
|
||||
final long toiExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 8, 0);
|
||||
final long imperialTombExitTime = player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 12, 0);
|
||||
if ((stormIsleExitTime > currentTime) && player.isInTimedHuntingZone(1))
|
||||
{
|
||||
player.startTimedHuntingZone(1, stormIsleExitTime - currentTime);
|
||||
@@ -666,6 +678,22 @@ public class EnterWorld implements IClientIncomingPacket
|
||||
{
|
||||
player.startTimedHuntingZone(6, primevalIsleExitTime - currentTime);
|
||||
}
|
||||
else if ((goldenAltarExitTime > currentTime) && player.isInTimedHuntingZone(7))
|
||||
{
|
||||
player.startTimedHuntingZone(7, goldenAltarExitTime - currentTime);
|
||||
}
|
||||
else if ((coalMinesExitTime > currentTime) && player.isInTimedHuntingZone(11))
|
||||
{
|
||||
player.startTimedHuntingZone(11, coalMinesExitTime - currentTime);
|
||||
}
|
||||
else if ((toiExitTime > currentTime) && player.isInTimedHuntingZone(11))
|
||||
{
|
||||
player.startTimedHuntingZone(8, toiExitTime - currentTime);
|
||||
}
|
||||
else if ((imperialTombExitTime > currentTime) && player.isInTimedHuntingZone(11))
|
||||
{
|
||||
player.startTimedHuntingZone(12, imperialTombExitTime - currentTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.teleToLocation(MapRegionManager.getInstance().getTeleToLocation(player, TeleportWhereType.TOWN));
|
||||
|
@@ -36,7 +36,6 @@ public class RequestRefine extends AbstractRefinePacket
|
||||
{
|
||||
private int _targetItemObjId;
|
||||
private int _mineralItemObjId;
|
||||
private int _feeItemObjId;
|
||||
private long _feeCount;
|
||||
|
||||
@Override
|
||||
@@ -44,7 +43,7 @@ public class RequestRefine extends AbstractRefinePacket
|
||||
{
|
||||
_targetItemObjId = packet.readD();
|
||||
_mineralItemObjId = packet.readD();
|
||||
_feeItemObjId = packet.readD();
|
||||
packet.readD(); // _feeItemObjId
|
||||
_feeCount = packet.readQ();
|
||||
return true;
|
||||
}
|
||||
@@ -70,13 +69,18 @@ public class RequestRefine extends AbstractRefinePacket
|
||||
return;
|
||||
}
|
||||
|
||||
final ItemInstance feeItem = player.getInventory().getItemByObjectId(_feeItemObjId);
|
||||
final VariationFee fee = VariationData.getInstance().getFee(targetItem.getId(), mineralItem.getId());
|
||||
if (fee == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final ItemInstance feeItem = player.getInventory().getItemByItemId(fee.getItemId());
|
||||
if (feeItem == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final VariationFee fee = VariationData.getInstance().getFee(targetItem.getId(), mineralItem.getId());
|
||||
if (!isValid(player, targetItem, mineralItem, feeItem, fee))
|
||||
{
|
||||
player.sendPacket(new ExVariationResult(0, 0, false));
|
||||
@@ -84,7 +88,9 @@ public class RequestRefine extends AbstractRefinePacket
|
||||
return;
|
||||
}
|
||||
|
||||
if (_feeCount != fee.getItemCount())
|
||||
// TODO: Update XMLs.
|
||||
// if (_feeCount != fee.getItemCount())
|
||||
if (_feeCount <= 0)
|
||||
{
|
||||
player.sendPacket(new ExVariationResult(0, 0, false));
|
||||
player.sendPacket(SystemMessageId.AUGMENTATION_FAILED_DUE_TO_INAPPROPRIATE_CONDITIONS);
|
||||
|
@@ -92,7 +92,11 @@ public class Say2 implements IClientIncomingPacket
|
||||
{
|
||||
_text = packet.readS();
|
||||
_type = packet.readD();
|
||||
_target = (_type == ChatType.WHISPER.getClientId()) ? packet.readS() : null;
|
||||
if (_type == ChatType.WHISPER.getClientId())
|
||||
{
|
||||
packet.readC();
|
||||
_target = packet.readS();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -25,6 +25,7 @@ import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.ai.CtrlEvent;
|
||||
import org.l2jmobius.gameserver.ai.CtrlIntention;
|
||||
import org.l2jmobius.gameserver.ai.NextAction;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.VariationData;
|
||||
import org.l2jmobius.gameserver.enums.ItemSkillType;
|
||||
import org.l2jmobius.gameserver.enums.PrivateStoreType;
|
||||
import org.l2jmobius.gameserver.handler.AdminCommandHandler;
|
||||
@@ -43,6 +44,7 @@ import org.l2jmobius.gameserver.model.items.type.ActionType;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ActionFailed;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExShowVariationMakeWindow;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.ExUseSharedGroupItem;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
@@ -285,6 +287,11 @@ public class UseItem implements IClientIncomingPacket
|
||||
sendSharedGroupUpdate(player, sharedReuseGroup, reuseDelay, reuseDelay);
|
||||
}
|
||||
}
|
||||
// TODO: New item handler for minerals.
|
||||
if (VariationData.getInstance().getVariation(_itemId) != null)
|
||||
{
|
||||
player.sendPacket(ExShowVariationMakeWindow.STATIC_PACKET);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -46,6 +46,7 @@ public class ExAutoPlaySetting implements IClientIncomingPacket
|
||||
_nextTargetMode = packet.readH();
|
||||
_longRange = packet.readC() == 0;
|
||||
_potionPercent = packet.readD();
|
||||
packet.readD(); // 272
|
||||
_respectfulHunting = packet.readC() == 1;
|
||||
return true;
|
||||
}
|
||||
|
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusBirthInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusCreateStartResult;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusCreateStart implements IClientIncomingPacket
|
||||
{
|
||||
private static final int COST = 1000000;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int status = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_STATUS, 0);
|
||||
if (status > 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.getAdena() < COST)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA_2);
|
||||
return;
|
||||
}
|
||||
player.reduceAdena("Homunculus creation", COST, player, true);
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_STATUS, 1);
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_TIME, System.currentTimeMillis() / 1000);
|
||||
|
||||
client.sendPacket(new ExHomonculusBirthInfo(player));
|
||||
client.sendPacket(new ExHomonculusCreateStartResult(player));
|
||||
}
|
||||
}
|
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusBirthInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusDeleteData implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
packet.readD(); // Position?
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.getVariables().remove(PlayerVariables.HOMUNCULUS_STATUS);
|
||||
player.getVariables().remove(PlayerVariables.HOMUNCULUS_TIME);
|
||||
player.getVariables().remove(PlayerVariables.HOMUNCULUS_HP);
|
||||
player.getVariables().remove(PlayerVariables.HOMUNCULUS_SP);
|
||||
player.getVariables().remove(PlayerVariables.HOMUNCULUS_VP);
|
||||
player.getVariables().remove(PlayerVariables.HOMUNCULUS_ID);
|
||||
player.getVariables().remove(PlayerVariables.HOMUNCULUS_QUALITY);
|
||||
|
||||
player.calculateHomunculusBonuses();
|
||||
player.getStat().recalculateStats(true);
|
||||
|
||||
client.sendPacket(new ExHomonculusList(player));
|
||||
client.sendPacket(new ExHomonculusBirthInfo(player));
|
||||
}
|
||||
}
|
@@ -1,42 +1,47 @@
|
||||
/*
|
||||
* 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.monsterbook;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBook;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookOpenResult;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestMonsterBookOpen implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
client.sendPacket(new ExMonsterBookOpenResult(true));
|
||||
client.sendPacket(new ExMonsterBook(client.getPlayer()));
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusEnchantExperience implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExHomonculusList(player));
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomunculusPointInfo;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusEnchantPoint implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new ExHomunculusPointInfo(player));
|
||||
}
|
||||
}
|
@@ -1,42 +1,47 @@
|
||||
/*
|
||||
* 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.monsterbook;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestMonsterBookReward implements IClientIncomingPacket
|
||||
{
|
||||
private int _id;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_id = packet.readH();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
client.getPlayer().rewardMonsterBook(_id);
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusEnchantSkill implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExHomonculusList(player));
|
||||
}
|
||||
}
|
@@ -1,40 +1,47 @@
|
||||
/*
|
||||
* 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.monsterbook;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.monsterbook.ExMonsterBookCloseForce;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestMonsterBookClose implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
client.sendPacket(new ExMonsterBookCloseForce());
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusEvolve implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExHomonculusList(player));
|
||||
}
|
||||
}
|
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomunculusPointInfo;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusInitPoint implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
player.sendPacket(new ExHomunculusPointInfo(player));
|
||||
}
|
||||
}
|
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusBirthInfo;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomunculusInsertHpSpVp;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusInsert implements IClientIncomingPacket
|
||||
{
|
||||
private int _type;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_type = packet.readD();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int time = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_TIME, 0);
|
||||
if (((System.currentTimeMillis() / 1000) - time) < 86400)
|
||||
{
|
||||
player.sendMessage("Waiting time has not passed.");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (_type)
|
||||
{
|
||||
case 0: // hp
|
||||
{
|
||||
if (player.getCurrentHp() >= 10000)
|
||||
{
|
||||
player.setCurrentHp(player.getCurrentHp() - 10000);
|
||||
final int hp = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_HP, 0);
|
||||
if (hp < 99)
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_HP, hp + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_HP, 100);
|
||||
|
||||
final int status = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_STATUS, 0);
|
||||
if (status == 1)
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_STATUS, 2);
|
||||
}
|
||||
}
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_TIME, System.currentTimeMillis() / 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1: // sp
|
||||
{
|
||||
if (player.getSp() >= 5000000000L)
|
||||
{
|
||||
player.setSp(player.getSp() - 5000000000L);
|
||||
final int sp = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_SP, 0);
|
||||
if (sp < 9)
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_SP, sp + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_SP, 10);
|
||||
|
||||
final int status = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_STATUS, 0);
|
||||
if (status == 1)
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_STATUS, 2);
|
||||
}
|
||||
}
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_TIME, System.currentTimeMillis() / 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 2: // vp
|
||||
{
|
||||
if (player.getVitalityPoints() >= 35000)
|
||||
{
|
||||
player.setVitalityPoints(player.getVitalityPoints() - 35000, true);
|
||||
final int vp = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_VP, 0);
|
||||
if (vp < 4)
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_VP, vp + 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_VP, 5);
|
||||
|
||||
final int status = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_STATUS, 0);
|
||||
if (status == 1)
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_STATUS, 2);
|
||||
}
|
||||
}
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_TIME, System.currentTimeMillis() / 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
player.sendPacket(new ExHomunculusInsertHpSpVp(player));
|
||||
player.sendPacket(new ExHomonculusBirthInfo(player));
|
||||
}
|
||||
}
|
@@ -0,0 +1,78 @@
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusList;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusSummonResult;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusSummon implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final int homunculus = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_ID, 0);
|
||||
if (homunculus == 0)
|
||||
{
|
||||
final int status = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_STATUS, 0);
|
||||
final int hp = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_HP, 0);
|
||||
final int sp = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_SP, 0);
|
||||
final int vp = player.getVariables().getInt(PlayerVariables.HOMUNCULUS_VP, 0);
|
||||
if ((status == 2) && ((hp == 100) || (sp == 10) || (vp == 5)))
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_ID, 1);
|
||||
|
||||
int quality = 2;
|
||||
if (Rnd.get(100) < 50)
|
||||
{
|
||||
quality = 0;
|
||||
}
|
||||
else if (Rnd.get(100) < 30)
|
||||
{
|
||||
quality = 1;
|
||||
}
|
||||
player.getVariables().set(PlayerVariables.HOMUNCULUS_QUALITY, quality);
|
||||
|
||||
player.calculateHomunculusBonuses();
|
||||
player.getStat().recalculateStats(true);
|
||||
}
|
||||
}
|
||||
|
||||
client.sendPacket(new ExHomonculusSummonResult(player));
|
||||
client.sendPacket(new ExHomonculusList(player));
|
||||
}
|
||||
}
|
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExRequestHomonculusList implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
packet.readD(); // ?
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExHomonculusList(player));
|
||||
}
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* 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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.homunculus.ExHomonculusActivateResult;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExRequestHomunculusActivate implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
packet.readD();
|
||||
packet.readC(); // enabled?
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExHomonculusActivateResult(player));
|
||||
}
|
||||
}
|
@@ -86,6 +86,10 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
|
||||
if (((_zoneId == 1) && (player.getLevel() < 100)) //
|
||||
|| ((_zoneId == 6) && (player.getLevel() < 105)) //
|
||||
|| ((_zoneId == 7) && (player.getLevel() < 107)) //
|
||||
|| (((_zoneId == 11) && ((player.getLevel() < 99) || (player.getLevel() > 105)))) //
|
||||
|| (((_zoneId == 12) && ((player.getLevel() < 110) || (player.getLevel() > 130)))) //
|
||||
|| (((_zoneId == 13) && ((player.getLevel() < 105) || (player.getLevel() > 130)))) //
|
||||
)
|
||||
{
|
||||
player.sendMessage("Your level does not correspond the zone equivalent.");
|
||||
@@ -122,6 +126,26 @@ public class ExTimedHuntingZoneEnter implements IClientIncomingPacket
|
||||
player.teleToLocation(9400, -21720, -3634);
|
||||
break;
|
||||
}
|
||||
case 7: // Golden Altar
|
||||
{
|
||||
player.teleToLocation(-122259, 73678, -2872);
|
||||
break;
|
||||
}
|
||||
case 11: // Abandoned Coal Mines
|
||||
{
|
||||
player.teleToLocation(139411, -169382, -1600);
|
||||
break;
|
||||
}
|
||||
case 8: // Tower of Insolence
|
||||
{
|
||||
player.teleToLocation(-82014, 16247, -15416);
|
||||
break;
|
||||
}
|
||||
case 12: // Imperial Tomb
|
||||
{
|
||||
player.teleToLocation(181409, -78389, -2728);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
player.getVariables().set(PlayerVariables.HUNTING_ZONE_RESET_TIME + _zoneId, endTime);
|
||||
|
@@ -14,7 +14,7 @@
|
||||
* 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;
|
||||
package org.l2jmobius.gameserver.network.clientpackets.teleports;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
@@ -25,6 +25,7 @@ import org.l2jmobius.gameserver.model.entity.Castle;
|
||||
import org.l2jmobius.gameserver.model.holders.TeleportListHolder;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author NviX, Mobius
|
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
* 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.teleports;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.teleports.ExTeleportFavoritesList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExRequestTeleportFavoriteList implements IClientIncomingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExTeleportFavoritesList(player, true));
|
||||
}
|
||||
}
|
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* 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.teleports;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.TeleportListData;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExRequestTeleportFavoritesAddDel implements IClientIncomingPacket
|
||||
{
|
||||
private boolean _enable;
|
||||
private int _teleportId;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_enable = packet.readC() == 1;
|
||||
_teleportId = packet.readD();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (TeleportListData.getInstance().getTeleport(_teleportId) == null)
|
||||
{
|
||||
LOGGER.warning("No registered teleport location for id: " + _teleportId);
|
||||
return;
|
||||
}
|
||||
|
||||
final List<Integer> favorites = new ArrayList<>();
|
||||
if (player.getVariables().contains(PlayerVariables.FAVORITE_TELEPORTS))
|
||||
{
|
||||
for (int id : player.getVariables().getIntArray(PlayerVariables.FAVORITE_TELEPORTS, ","))
|
||||
{
|
||||
if (TeleportListData.getInstance().getTeleport(_teleportId) == null)
|
||||
{
|
||||
LOGGER.warning("No registered teleport location for id: " + _teleportId);
|
||||
}
|
||||
else
|
||||
{
|
||||
favorites.add(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_enable)
|
||||
{
|
||||
if (!favorites.contains(_teleportId))
|
||||
{
|
||||
favorites.add(_teleportId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
favorites.remove((Integer) _teleportId);
|
||||
}
|
||||
|
||||
String variable = "";
|
||||
for (int id : favorites)
|
||||
{
|
||||
variable += id + ",";
|
||||
}
|
||||
if (variable.isEmpty())
|
||||
{
|
||||
player.getVariables().remove(PlayerVariables.FAVORITE_TELEPORTS);
|
||||
}
|
||||
else
|
||||
{
|
||||
player.getVariables().set(PlayerVariables.FAVORITE_TELEPORTS, variable);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* 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.teleports;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketReader;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.GameClient;
|
||||
import org.l2jmobius.gameserver.network.clientpackets.IClientIncomingPacket;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.teleports.ExTeleportFavoritesList;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExRequestTeleportFavoritesUIToggle implements IClientIncomingPacket
|
||||
{
|
||||
private boolean _enable;
|
||||
|
||||
@Override
|
||||
public boolean read(GameClient client, PacketReader packet)
|
||||
{
|
||||
_enable = packet.readC() == 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(GameClient client)
|
||||
{
|
||||
final PlayerInstance player = client.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
client.sendPacket(new ExTeleportFavoritesList(player, _enable));
|
||||
}
|
||||
}
|
@@ -71,8 +71,9 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
protected void writeItem(PacketWriter packet, ItemInfo item)
|
||||
{
|
||||
final int mask = calculateMask(item);
|
||||
// cddcQcchQccddc
|
||||
|
||||
packet.writeC(mask);
|
||||
packet.writeC(0x00); // 286 protocol
|
||||
packet.writeD(item.getObjectId()); // ObjectId
|
||||
packet.writeD(item.getItem().getDisplayId()); // ItemId
|
||||
packet.writeC(item.getItem().isQuestItem() || (item.getEquipped() == 1) ? 0xFF : item.getLocation()); // T1
|
||||
@@ -82,12 +83,14 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
packet.writeH(item.getEquipped()); // Equipped : 00-No, 01-yes
|
||||
packet.writeQ(item.getItem().getBodyPart()); // Slot : 0006-lr.ear, 0008-neck, 0030-lr.finger, 0040-head, 0100-l.hand, 0200-gloves, 0400-chest, 0800-pants, 1000-feet, 4000-r.hand, 8000-r.hand
|
||||
packet.writeC(item.getEnchantLevel()); // Enchant level (pet level shown in control item)
|
||||
packet.writeC(item.getCustomType2()); // Pet name exists or not shown in control item
|
||||
packet.writeC(0x00); // 286 protocol
|
||||
packet.writeD(item.getMana());
|
||||
packet.writeC(0x00); // 270 protocol
|
||||
packet.writeD(item.getTime());
|
||||
packet.writeC(item.isAvailable() ? 1 : 0); // GOD Item enabled = 1 disabled (red) = 0
|
||||
packet.writeC(0x00); // 140 protocol
|
||||
packet.writeC(0x00); // 140 protocol
|
||||
|
||||
if (containsMask(mask, ItemListType.AUGMENT_BONUS))
|
||||
{
|
||||
writeItemAugment(packet, item);
|
||||
@@ -113,7 +116,9 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
protected void writeItem(PacketWriter packet, ItemInfo item, long count)
|
||||
{
|
||||
final int mask = calculateMask(item);
|
||||
|
||||
packet.writeC(mask);
|
||||
packet.writeC(0x00); // 286 protocol
|
||||
packet.writeD(item.getObjectId()); // ObjectId
|
||||
packet.writeD(item.getItem().getDisplayId()); // ItemId
|
||||
packet.writeC(item.getItem().isQuestItem() || (item.getEquipped() == 1) ? 0xFF : item.getLocation()); // T1
|
||||
@@ -123,12 +128,14 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
packet.writeH(item.getEquipped()); // Equipped : 00-No, 01-yes
|
||||
packet.writeQ(item.getItem().getBodyPart()); // Slot : 0006-lr.ear, 0008-neck, 0030-lr.finger, 0040-head, 0100-l.hand, 0200-gloves, 0400-chest, 0800-pants, 1000-feet, 4000-r.hand, 8000-r.hand
|
||||
packet.writeC(item.getEnchantLevel()); // Enchant level (pet level shown in control item)
|
||||
packet.writeC(0x01); // TODO : Find me
|
||||
packet.writeC(0x00); // 286 protocol
|
||||
packet.writeD(item.getMana());
|
||||
packet.writeC(0x00); // 270 protocol
|
||||
packet.writeD(item.getTime());
|
||||
packet.writeC(item.isAvailable() ? 1 : 0); // GOD Item enabled = 1 disabled (red) = 0
|
||||
packet.writeC(0x00); // 140 protocol
|
||||
packet.writeC(0x00); // 140 protocol
|
||||
|
||||
if (containsMask(mask, ItemListType.AUGMENT_BONUS))
|
||||
{
|
||||
writeItemAugment(packet, item);
|
||||
@@ -147,16 +154,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
}
|
||||
if (containsMask(mask, ItemListType.SOUL_CRYSTAL))
|
||||
{
|
||||
packet.writeC(item.getSoulCrystalOptions().size());
|
||||
for (EnsoulOption option : item.getSoulCrystalOptions())
|
||||
{
|
||||
packet.writeD(option.getId());
|
||||
}
|
||||
packet.writeC(item.getSoulCrystalSpecialOptions().size());
|
||||
for (EnsoulOption option : item.getSoulCrystalSpecialOptions())
|
||||
{
|
||||
packet.writeD(option.getId());
|
||||
}
|
||||
writeItemEnsoulOptions(packet, item);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -20,6 +20,7 @@ import java.util.Set;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||
import org.l2jmobius.gameserver.model.VariationInstance;
|
||||
@@ -262,7 +263,18 @@ public class CharInfo implements IClientOutgoingPacket
|
||||
packet.writeC(_player.getAbilityPointsUsed()); // Used Ability Points
|
||||
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
|
||||
// AFK animation.
|
||||
if ((_player.getClan() != null) && (CastleManager.getInstance().getCastleByOwner(_player.getClan()) != null))
|
||||
{
|
||||
packet.writeD(_player.isClanLeader() ? 100 : 101);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
}
|
||||
|
||||
// Rank.
|
||||
packet.writeC(RankManager.getInstance().getPlayerGlobalRank(_player) == 1 ? 1 : RankManager.getInstance().getPlayerRaceRank(_player) == 1 ? 2 : 0);
|
||||
|
||||
return true;
|
||||
|
@@ -302,6 +302,9 @@ public class CharSelectionInfo implements IClientOutgoingPacket
|
||||
packet.writeC(charInfoPackage.isNoble() ? 0x01 : 0x00);
|
||||
packet.writeC(Hero.getInstance().isHero(charInfoPackage.getObjectId()) ? 0x02 : 0x00); // Hero glow
|
||||
packet.writeC(charInfoPackage.isHairAccessoryEnabled() ? 0x01 : 0x00); // Show hair accessory if enabled
|
||||
|
||||
packet.writeD(0x00); // 235 - ban time left
|
||||
packet.writeD((int) (charInfoPackage.getLastAccess() / 1000)); // 235 - last play time
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -229,7 +229,7 @@ public class ExPetInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
OutgoingPackets.EX_PET_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(_summon.getObjectId());
|
||||
packet.writeC(_value); // // 0=teleported 1=default 2=summoned
|
||||
packet.writeC(_value); // 0=teleported 1=default 2=summoned
|
||||
packet.writeH(37); // mask_bits_37
|
||||
packet.writeB(_masks);
|
||||
|
||||
|
@@ -36,6 +36,7 @@ public class ExSendUIEvent implements IClientOutgoingPacket
|
||||
public static final int TYPE_DRACO_INCUBATION_1 = 6;
|
||||
public static final int TYPE_DRACO_INCUBATION_2 = 7;
|
||||
public static final int TYPE_CLAN_PROGRESS_BAR = 8;
|
||||
public static final int TYPE_FAFURION = 9;
|
||||
|
||||
private final int _objectId;
|
||||
private final int _type;
|
||||
|
@@ -1,52 +1,52 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExTeleportToLocationActivate implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _objectId;
|
||||
private final Location _loc;
|
||||
|
||||
public ExTeleportToLocationActivate(Creature creature)
|
||||
{
|
||||
_objectId = creature.getObjectId();
|
||||
_loc = creature.getLocation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_TELEPORT_TO_LOCATION_ACTIVATE.writeId(packet);
|
||||
|
||||
packet.writeD(_objectId);
|
||||
packet.writeD(_loc.getX());
|
||||
packet.writeD(_loc.getY());
|
||||
packet.writeD(_loc.getZ());
|
||||
packet.writeD(0); // Unknown (this isn't instanceId)
|
||||
packet.writeD(_loc.getHeading());
|
||||
packet.writeD(0); // Unknown
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.actor.Creature;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
/**
|
||||
* @author UnAfraid
|
||||
*/
|
||||
public class ExTeleportToLocationActivate implements IClientOutgoingPacket
|
||||
{
|
||||
private final int _objectId;
|
||||
private final Location _loc;
|
||||
|
||||
public ExTeleportToLocationActivate(Creature creature)
|
||||
{
|
||||
_objectId = creature.getObjectId();
|
||||
_loc = creature.getLocation();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_TELEPORT_TO_LOCATION_ACTIVATE.writeId(packet);
|
||||
|
||||
packet.writeD(_objectId);
|
||||
packet.writeD(_loc.getX());
|
||||
packet.writeD(_loc.getY());
|
||||
packet.writeD(_loc.getZ());
|
||||
packet.writeD(0); // Unknown (this isn't instanceId)
|
||||
packet.writeD(_loc.getHeading());
|
||||
packet.writeD(0); // Unknown
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.stats.Stat;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExUserBoostStat implements IClientOutgoingPacket
|
||||
{
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExUserBoostStat(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_USER_BOOST_STAT.writeId(packet);
|
||||
|
||||
final int currentVitalityPoints = _player.getStat().getVitalityPoints();
|
||||
int vitalityBonus = 0;
|
||||
if (currentVitalityPoints > 105000)
|
||||
{
|
||||
vitalityBonus = 300;
|
||||
}
|
||||
else if (currentVitalityPoints > 70000)
|
||||
{
|
||||
vitalityBonus = 250;
|
||||
}
|
||||
else if (currentVitalityPoints > 35000)
|
||||
{
|
||||
vitalityBonus = 200;
|
||||
}
|
||||
else if (currentVitalityPoints > 0)
|
||||
{
|
||||
vitalityBonus = 150;
|
||||
}
|
||||
|
||||
// final int bonus = (int) (_player.getStat().getExpBonusMultiplier() * 100);
|
||||
final int bonus = (int) (_player.getStat().getValue(Stat.BONUS_EXP, 0) + vitalityBonus);
|
||||
packet.writeC(bonus > 0 ? 2 : 0);
|
||||
packet.writeC(bonus > 0 ? 2 : 0);
|
||||
packet.writeH(bonus);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -78,7 +78,7 @@ public class MultiSellList extends AbstractItemPacket
|
||||
writeItemAugment(packet, itemEnchantment);
|
||||
writeItemElemental(packet, itemEnchantment);
|
||||
writeItemEnsoulOptions(packet, itemEnchantment);
|
||||
|
||||
packet.writeC(0x00); // 286
|
||||
packet.writeH(entry.getProducts().size());
|
||||
packet.writeH(entry.getIngredients().size());
|
||||
|
||||
@@ -103,6 +103,7 @@ public class MultiSellList extends AbstractItemPacket
|
||||
writeItemAugment(packet, displayItemEnchantment);
|
||||
writeItemElemental(packet, displayItemEnchantment);
|
||||
writeItemEnsoulOptions(packet, displayItemEnchantment);
|
||||
packet.writeC(0x00); // 286
|
||||
}
|
||||
|
||||
for (ItemChanceHolder ingredient : entry.getIngredients())
|
||||
@@ -116,6 +117,7 @@ public class MultiSellList extends AbstractItemPacket
|
||||
writeItemAugment(packet, displayItemEnchantment);
|
||||
writeItemElemental(packet, displayItemEnchantment);
|
||||
writeItemEnsoulOptions(packet, displayItemEnchantment);
|
||||
packet.writeC(0x00); // 286
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
@@ -163,6 +163,8 @@ public class PetInfo implements IClientOutgoingPacket
|
||||
|
||||
packet.writeQ(_summon.getExpForNextLevel()); // 100% absoulte value
|
||||
|
||||
packet.writeC(0x00); // 286
|
||||
|
||||
packet.writeD(_summon.isPet() ? _summon.getInventory().getTotalWeight() : 0); // weight
|
||||
packet.writeD(_summon.getMaxLoad()); // max weight it can carry
|
||||
packet.writeD(_summon.getPAtk()); // patk
|
||||
|
@@ -346,7 +346,7 @@ public class SummonInfo extends AbstractMaskPacket<NpcInfoType>
|
||||
}
|
||||
if (containsMask(NpcInfoType.SUMMONED))
|
||||
{
|
||||
packet.writeC(_summon.isShowSummonAnimation() ? 0x02 : 00); // 2 - do some animation on spawn
|
||||
packet.writeC(_summon.isShowSummonAnimation() ? 0x02 : 0x00); // 2 - do some animation on spawn
|
||||
}
|
||||
if (containsMask(NpcInfoType.UNKNOWN12))
|
||||
{
|
||||
|
@@ -22,6 +22,7 @@ import org.l2jmobius.gameserver.data.xml.impl.ExperienceData;
|
||||
import org.l2jmobius.gameserver.enums.AttributeType;
|
||||
import org.l2jmobius.gameserver.enums.ItemGrade;
|
||||
import org.l2jmobius.gameserver.enums.UserInfoType;
|
||||
import org.l2jmobius.gameserver.instancemanager.CastleManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.CursedWeaponsManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.RankManager;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
@@ -141,7 +142,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
|
||||
packet.writeD(_player.getObjectId());
|
||||
packet.writeD(_initSize);
|
||||
packet.writeH(25); // 196 - 25
|
||||
packet.writeH(28); // 286 - 28
|
||||
packet.writeB(_masks);
|
||||
|
||||
if (containsMask(UserInfoType.RELATION))
|
||||
@@ -151,7 +152,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
|
||||
if (containsMask(UserInfoType.BASIC_INFO))
|
||||
{
|
||||
packet.writeH(16 + (_player.getAppearance().getVisibleName().length() * 2));
|
||||
packet.writeH(23 + (_player.getAppearance().getVisibleName().length() * 2));
|
||||
packet.writeString(_player.getName());
|
||||
packet.writeC(_player.isGM() ? 0x01 : 0x00);
|
||||
packet.writeC(_player.getRace().ordinal());
|
||||
@@ -159,6 +160,10 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
packet.writeD(ClassId.getClassId(_player.getBaseTemplate().getClassId().getId()).getRootClassId().getId());
|
||||
packet.writeD(_player.getClassId().getId());
|
||||
packet.writeC(_player.getLevel());
|
||||
packet.writeC(0x00); // 270
|
||||
packet.writeC(0x00); // 270
|
||||
packet.writeC(0x00); // 270
|
||||
packet.writeD(0x00); // 286
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.BASE_STATS))
|
||||
@@ -220,7 +225,7 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
|
||||
if (containsMask(UserInfoType.STATS))
|
||||
{
|
||||
packet.writeH(56);
|
||||
packet.writeH(64); // 270
|
||||
packet.writeH(_player.getActiveWeaponItem() != null ? 40 : 20);
|
||||
packet.writeD(_player.getPAtk());
|
||||
packet.writeD(_player.getPAtkSpd());
|
||||
@@ -235,6 +240,8 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
packet.writeD(_player.getMDef());
|
||||
packet.writeD(_player.getMagicAccuracy());
|
||||
packet.writeD(_player.getMCriticalHit());
|
||||
packet.writeD(0x00); // 270
|
||||
packet.writeD(0x00); // 270
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.ELEMENTALS))
|
||||
@@ -319,7 +326,15 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
packet.writeD(_player.getPvpKills());
|
||||
packet.writeH(_player.getRecomLeft());
|
||||
packet.writeH(_player.getRecomHave());
|
||||
packet.writeD(0x00); // 196
|
||||
// AFK animation.
|
||||
if ((_player.getClan() != null) && (CastleManager.getInstance().getCastleByOwner(_player.getClan()) != null)) // 196
|
||||
{
|
||||
packet.writeD(_player.isClanLeader() ? 100 : 101);
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0x00);
|
||||
}
|
||||
packet.writeD(0x00); // 228
|
||||
}
|
||||
|
||||
@@ -411,6 +426,43 @@ public class UserInfo extends AbstractMaskPacket<UserInfoType>
|
||||
packet.writeD(RankManager.getInstance().getPlayerGlobalRank(_player) == 1 ? 1 : RankManager.getInstance().getPlayerRaceRank(_player) == 1 ? 2 : 0);
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.STAT_POINTS)) // 235
|
||||
{
|
||||
packet.writeH(16);
|
||||
packet.writeH(0x00); // Usable points?
|
||||
packet.writeH(0x00); // STR points
|
||||
packet.writeH(0x00); // DEX points
|
||||
packet.writeH(0x00); // CON points
|
||||
packet.writeH(0x00); // INT points
|
||||
packet.writeH(0x00); // WIT points
|
||||
packet.writeH(0x00); // MEN points
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.STAT_ABILITIES)) // 235
|
||||
{
|
||||
packet.writeH(18);
|
||||
packet.writeH(0x00); // STR additional
|
||||
packet.writeH(0x00); // DEX additional
|
||||
packet.writeH(0x00); // CON additional
|
||||
packet.writeH(0x00); // INT additional
|
||||
packet.writeH(0x00); // WIT additional
|
||||
packet.writeH(0x00); // MEN additional
|
||||
packet.writeH(0x00); // ?
|
||||
packet.writeH(0x00); // ?
|
||||
}
|
||||
|
||||
if (containsMask(UserInfoType.ELIXIR_USED)) // 286
|
||||
{
|
||||
packet.writeH(1);
|
||||
packet.writeD(0x00);
|
||||
}
|
||||
|
||||
// Send exp bonus change.
|
||||
if (containsMask(UserInfoType.VITA_FAME))
|
||||
{
|
||||
_player.sendPacket(new ExUserBoostStat(_player));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -54,6 +54,7 @@ public class ExAutoPlaySettingSend implements IClientOutgoingPacket
|
||||
packet.writeH(_nextTargetMode);
|
||||
packet.writeC(_longRange ? 1 : 0);
|
||||
packet.writeD(_potionPercent);
|
||||
packet.writeD(0); // 272
|
||||
packet.writeC(_respectfulHunting ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
|
@@ -23,18 +23,18 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExRequestClassChangeUi implements IClientOutgoingPacket
|
||||
public class ExClassChangeSetAlarm implements IClientOutgoingPacket
|
||||
{
|
||||
public static final ExRequestClassChangeUi STATIC_PACKET = new ExRequestClassChangeUi();
|
||||
public static final IClientOutgoingPacket STATIC_PACKET = new ExClassChangeSetAlarm();
|
||||
|
||||
public ExRequestClassChangeUi()
|
||||
public ExClassChangeSetAlarm()
|
||||
{
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_REQUEST_CLASS_CHANGE.writeId(packet);
|
||||
OutgoingPackets.EX_CLASS_CHANGE_SET_ALARM.writeId(packet);
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -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 org.l2jmobius.gameserver.network.serverpackets.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomonculusActivateResult implements IClientOutgoingPacket
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExHomonculusActivateResult(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_ACTIVATE_HOMUNCULUS_RESULT.writeId(packet);
|
||||
|
||||
// struct _C_EX_REQUEST_ACTIVATE_HOMUNCULUS
|
||||
// {
|
||||
// var int nIdx;
|
||||
// var byte bActivate;
|
||||
// };
|
||||
|
||||
packet.writeD(0x01);
|
||||
packet.writeC(0x01);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomonculusBirthInfo implements IClientOutgoingPacket
|
||||
{
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExHomonculusBirthInfo(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_BIRTH_INFO.writeId(packet);
|
||||
|
||||
final int status = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_STATUS, 0);
|
||||
final int hp = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_HP, 0);
|
||||
final int sp = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_SP, 0);
|
||||
final int vp = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_VP, 0);
|
||||
final int time = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_TIME, 0);
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
|
||||
packet.writeD(status); // 0 = time idle, 1 = time updating, 2 = summon enabled
|
||||
packet.writeD(hp); // hp 100
|
||||
packet.writeD(sp); // sp 10
|
||||
packet.writeD(vp); // vitality 5
|
||||
packet.writeQ((currentTime / 1000) + (86400 - Math.min(86400, (currentTime / 1000) - time)));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -1,34 +1,47 @@
|
||||
/*
|
||||
* 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.monsterbook;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExMonsterBookFactionUI implements IClientOutgoingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_MONSTER_BOOK_REWARD_FACTION_UI.writeId(packet);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomonculusCreateStartResult implements IClientOutgoingPacket
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExHomonculusCreateStartResult(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_HOMUNCULUS_CREATE_START_RESULT.writeId(packet);
|
||||
|
||||
packet.writeD(0x00);
|
||||
packet.writeD(0x00);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomonculusInsertResult implements IClientOutgoingPacket
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private final PlayerInstance _player;
|
||||
private final int _type;
|
||||
|
||||
public ExHomonculusInsertResult(PlayerInstance player, int type)
|
||||
{
|
||||
_player = player;
|
||||
_type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_HOMUNCULUS_INSERT_RESULT.writeId(packet);
|
||||
|
||||
packet.writeD(0x01);
|
||||
packet.writeD(_type);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,82 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomonculusList implements IClientOutgoingPacket
|
||||
{
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExHomonculusList(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_HOMUNCULUS_LIST.writeId(packet);
|
||||
|
||||
final int homunculus = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_ID, 0);
|
||||
if (homunculus > 0)
|
||||
{
|
||||
final int quality = _player.getVariables().getInt(PlayerVariables.HOMUNCULUS_QUALITY, 0);
|
||||
|
||||
packet.writeD(0x01); // Size.
|
||||
|
||||
packet.writeD(0x00); // nIdx
|
||||
packet.writeD(homunculus); // nID
|
||||
packet.writeD(quality); // eType
|
||||
packet.writeC(0x01); // bActivate
|
||||
|
||||
packet.writeD(0x00); // m_nSkillID 0
|
||||
packet.writeD(0x00); // m_nSkillID 1
|
||||
packet.writeD(0x00); // m_nSkillID 2
|
||||
packet.writeD(0x00); // m_nSkillID 3
|
||||
packet.writeD(0x00); // m_nSkillID 4
|
||||
packet.writeD(0x00); // m_nSkillID 5
|
||||
|
||||
packet.writeD(0x00); // m_nSkillLevel 0
|
||||
packet.writeD(0x00); // m_nSkillLevel 1
|
||||
packet.writeD(0x00); // m_nSkillLevel 2
|
||||
packet.writeD(0x00); // m_nSkillLevel 3
|
||||
packet.writeD(0x00); // m_nSkillLevel 4
|
||||
packet.writeD(0x00); // m_nSkillLevel 5
|
||||
|
||||
packet.writeD(0x01); // m_nLevel
|
||||
packet.writeD(0x00); // m_nExp
|
||||
packet.writeD(_player.getHomunculusHpBonus()); // m_nHP
|
||||
packet.writeD(_player.getHomunculusAtkBonus()); // m_nAttack
|
||||
packet.writeD(_player.getHomunculusDefBonus()); // m_nDefence
|
||||
packet.writeD((int) (_player.getHomunculusCritBonus() * 100)); // m_nCritical
|
||||
}
|
||||
else
|
||||
{
|
||||
packet.writeD(0); // Size.
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -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.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
public class ExHomonculusSummonResult implements IClientOutgoingPacket
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExHomonculusSummonResult(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_SHOW_HOMUNCULUS_LIST.writeId(packet);
|
||||
|
||||
packet.writeD(1);
|
||||
packet.writeD(2);
|
||||
packet.writeD(1); // Homunculus client id?
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -1,34 +1,47 @@
|
||||
/*
|
||||
* 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.monsterbook;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExMonsterBookCloseForce implements IClientOutgoingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_MONSTER_BOOK_CLOSE_FORCE.writeId(packet);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusInsertHpSpVp implements IClientOutgoingPacket
|
||||
{
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExHomunculusInsertHpSpVp(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_HOMUNCULUS_HPSPVP.writeId(packet);
|
||||
|
||||
packet.writeD((int) _player.getCurrentHp());
|
||||
packet.writeQ(_player.getSp());
|
||||
packet.writeD(_player.getVitalityPoints());
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusPointInfo implements IClientOutgoingPacket
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExHomunculusPointInfo(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_HOMUNCULUS_POINT_INFO.writeId(packet);
|
||||
|
||||
packet.writeD(0); // enchant points
|
||||
packet.writeD(0); // hunted monster points
|
||||
packet.writeD(0); // points obtained
|
||||
packet.writeD(0); // reset time
|
||||
packet.writeD(0); // vitality points?
|
||||
packet.writeD(0); // vitality points obtained?
|
||||
packet.writeD(0); // vitality points reset time?
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -1,42 +1,44 @@
|
||||
/*
|
||||
* 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.monsterbook;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExMonsterBookOpenResult implements IClientOutgoingPacket
|
||||
{
|
||||
private final boolean _isOpen;
|
||||
|
||||
public ExMonsterBookOpenResult(boolean isOpen)
|
||||
{
|
||||
_isOpen = isOpen;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_MONSTER_BOOK_OPEN_RESULT.writeId(packet);
|
||||
packet.writeC(_isOpen ? 1 : 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets.homunculus;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExHomunculusReady implements IClientOutgoingPacket
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private final PlayerInstance _player;
|
||||
|
||||
public ExHomunculusReady(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_HOMUNCULUS_READY.writeId(packet);
|
||||
packet.writeC(0x01); // 1 = enabled, 0 = disabled
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -1,62 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.l2jmobius.gameserver.network.serverpackets.monsterbook;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.data.xml.impl.MonsterBookData;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.holders.MonsterBookCardHolder;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExMonsterBook implements IClientOutgoingPacket
|
||||
{
|
||||
final PlayerInstance _player;
|
||||
final List<Integer> _cardIds = new ArrayList<>();
|
||||
|
||||
public ExMonsterBook(PlayerInstance player)
|
||||
{
|
||||
_player = player;
|
||||
for (MonsterBookCardHolder card : MonsterBookData.getInstance().getMonsterBookCards())
|
||||
{
|
||||
if (player.getMonsterBookKillCount(card.getId()) > 0)
|
||||
{
|
||||
_cardIds.add(card.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_MONSTER_BOOK.writeId(packet);
|
||||
packet.writeH(_cardIds.size()); // loop count
|
||||
for (int cardId : _cardIds)
|
||||
{
|
||||
packet.writeH(cardId); // card id
|
||||
packet.writeC(_player.getMonsterBookRewardLevel(cardId)); // player reward level
|
||||
packet.writeD(_player.getMonsterBookKillCount(cardId)); // player kills
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
@@ -75,6 +75,8 @@ public class ExRankingCharInfo implements IClientOutgoingPacket
|
||||
packet.writeD(0); // race rank
|
||||
packet.writeD(0); // server rank snapshot
|
||||
packet.writeD(0); // race rank snapshot
|
||||
packet.writeD(0); // nClassRank
|
||||
packet.writeD(0); // nClassRank_Snapshot snapshot
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -82,6 +84,8 @@ public class ExRankingCharInfo implements IClientOutgoingPacket
|
||||
packet.writeD(0); // race rank
|
||||
packet.writeD(0); // server rank snapshot
|
||||
packet.writeD(0); // race rank snapshot
|
||||
packet.writeD(0); // nClassRank
|
||||
packet.writeD(0); // nClassRank_Snapshot snapshot
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@@ -33,11 +33,9 @@ import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
private final PlayerInstance _player;
|
||||
|
||||
private final int _race;
|
||||
private final int _group;
|
||||
private final int _scope;
|
||||
|
||||
private final int _race;
|
||||
private final Map<Integer, StatSet> _playerList;
|
||||
private final Map<Integer, StatSet> _snapshotList;
|
||||
|
||||
@@ -59,6 +57,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
packet.writeC(_group);
|
||||
packet.writeC(_scope);
|
||||
packet.writeD(_race);
|
||||
packet.writeD(_player.getClassId().getId());
|
||||
|
||||
if (_playerList.size() > 0)
|
||||
{
|
||||
@@ -89,6 +88,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id2); // server rank snapshot
|
||||
packet.writeD(snapshot.getInt("raceRank", 0)); // race rank snapshot
|
||||
packet.writeD(0); // TODO: nClassRank_Snapshot
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,6 +96,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -137,6 +138,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id3); // server rank snapshot
|
||||
packet.writeD(snapshot.getInt("raceRank", 0));
|
||||
packet.writeD(0); // TODO: nClassRank_Snapshot
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -197,6 +199,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id2); // server rank snapshot
|
||||
packet.writeD(snapshot.getInt("raceRank", 0)); // race rank snapshot
|
||||
packet.writeD(0); // TODO: nClassRank_Snapshot
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -204,6 +207,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(i);
|
||||
packet.writeD(i);
|
||||
packet.writeD(i); // TODO: Check this. nClassRank_Snapshot?
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@@ -252,6 +256,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
packet.writeD(id2); // server rank
|
||||
packet.writeD(id2);
|
||||
packet.writeD(id2);
|
||||
packet.writeD(id2); // TODO: Check this. nClassRank_Snapshot?
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -298,6 +303,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id2); // server rank snapshot
|
||||
packet.writeD(snapshot.getInt("raceRank", 0)); // race rank snapshot
|
||||
packet.writeD(0); // TODO: nClassRank_Snapshot
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -305,6 +311,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -356,6 +363,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id2); // server rank snapshot
|
||||
packet.writeD(snapshot.getInt("raceRank", 0)); // race rank snapshot
|
||||
packet.writeD(0); // TODO: nClassRank_Snapshot
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -363,6 +371,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -393,6 +402,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(id); // server rank snapshot
|
||||
packet.writeD(snapshot.getInt("raceRank", 0)); // race rank snapshot
|
||||
packet.writeD(0); // TODO: nClassRank_Snapshot
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -400,6 +410,7 @@ public class ExRankingCharRankers implements IClientOutgoingPacket
|
||||
{
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
packet.writeD(0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@@ -44,7 +44,7 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
||||
|
||||
final long currentTime = System.currentTimeMillis();
|
||||
long endTime;
|
||||
packet.writeD(2); // zone count
|
||||
packet.writeD(6); // zone count
|
||||
|
||||
// Storm Isle
|
||||
packet.writeD(1); // required item count
|
||||
@@ -64,7 +64,8 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
||||
packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000));
|
||||
packet.writeD(3600); // remain refill time
|
||||
packet.writeD(3600); // refill time max
|
||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated
|
||||
packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||
packet.writeH(0); // 245
|
||||
|
||||
// Primeval Isle
|
||||
packet.writeD(1); // required item count
|
||||
@@ -84,7 +85,92 @@ public class TimedHuntingZoneList implements IClientOutgoingPacket
|
||||
packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000));
|
||||
packet.writeD(3600); // remain refill time
|
||||
packet.writeD(3600); // refill time max
|
||||
packet.writeC(_isInTimedHuntingZone ? 0 : 1); // field activated
|
||||
packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||
packet.writeH(0); // 245
|
||||
|
||||
// Golden Altar
|
||||
packet.writeD(1); // required item count
|
||||
packet.writeD(57); // item id
|
||||
packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count
|
||||
packet.writeD(1); // reset cycle
|
||||
packet.writeD(7); // zone id
|
||||
packet.writeD(107); // min level
|
||||
packet.writeD(120); // max level
|
||||
packet.writeD(0); // remain time base?
|
||||
endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 7, 0);
|
||||
if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime)
|
||||
{
|
||||
endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME;
|
||||
}
|
||||
packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time
|
||||
packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000));
|
||||
packet.writeD(3600); // remain refill time
|
||||
packet.writeD(3600); // refill time max
|
||||
packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||
packet.writeH(0); // 245
|
||||
|
||||
// Abandoned Coal Mines
|
||||
packet.writeD(1); // required item count
|
||||
packet.writeD(57); // item id
|
||||
packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count
|
||||
packet.writeD(1); // reset cycle
|
||||
packet.writeD(11); // zone id
|
||||
packet.writeD(99); // min level
|
||||
packet.writeD(105); // max level
|
||||
packet.writeD(0); // remain time base?
|
||||
endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 11, 0);
|
||||
if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime)
|
||||
{
|
||||
endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME;
|
||||
}
|
||||
packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time
|
||||
packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000));
|
||||
packet.writeD(3600); // remain refill time
|
||||
packet.writeD(3600); // refill time max
|
||||
packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||
packet.writeH(0); // 245
|
||||
|
||||
// Tower of Insolence
|
||||
packet.writeD(1); // required item count
|
||||
packet.writeD(57); // item id
|
||||
packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count
|
||||
packet.writeD(1); // reset cycle
|
||||
packet.writeD(8); // zone id
|
||||
packet.writeD(110); // min level
|
||||
packet.writeD(130); // max level
|
||||
packet.writeD(0); // remain time base?
|
||||
endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 8, 0);
|
||||
if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime)
|
||||
{
|
||||
endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME;
|
||||
}
|
||||
packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time
|
||||
packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000));
|
||||
packet.writeD(3600); // remain refill time
|
||||
packet.writeD(3600); // refill time max
|
||||
packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||
packet.writeH(0); // 245
|
||||
|
||||
// Imperial Tomb
|
||||
packet.writeD(1); // required item count
|
||||
packet.writeD(57); // item id
|
||||
packet.writeQ(Config.TIME_LIMITED_ZONE_TELEPORT_FEE); // item count
|
||||
packet.writeD(1); // reset cycle
|
||||
packet.writeD(12); // zone id
|
||||
packet.writeD(105); // min level
|
||||
packet.writeD(130); // max level
|
||||
packet.writeD(0); // remain time base?
|
||||
endTime = _player.getVariables().getLong(PlayerVariables.HUNTING_ZONE_RESET_TIME + 12, 0);
|
||||
if ((endTime + Config.TIME_LIMITED_ZONE_RESET_DELAY) < currentTime)
|
||||
{
|
||||
endTime = currentTime + Config.TIME_LIMITED_ZONE_INITIAL_TIME;
|
||||
}
|
||||
packet.writeD((int) (Math.max(endTime - currentTime, 0)) / 1000); // remain time
|
||||
packet.writeD((int) (Config.TIME_LIMITED_MAX_ADDED_TIME / 1000));
|
||||
packet.writeD(3600); // remain refill time
|
||||
packet.writeD(3600); // refill time max
|
||||
packet.writeD(_isInTimedHuntingZone ? 0 : 1); // field activated (272 C to D)
|
||||
packet.writeH(0); // 245
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@@ -14,10 +14,11 @@
|
||||
* 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;
|
||||
package org.l2jmobius.gameserver.network.serverpackets.teleports;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
@@ -1,34 +1,60 @@
|
||||
/*
|
||||
* 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.monsterbook;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExMonsterBookRewardIcon implements IClientOutgoingPacket
|
||||
{
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_MONSTER_BOOK_REWARD_ICON.writeId(packet);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 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.teleports;
|
||||
|
||||
import org.l2jmobius.commons.network.PacketWriter;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.variables.PlayerVariables;
|
||||
import org.l2jmobius.gameserver.network.OutgoingPackets;
|
||||
import org.l2jmobius.gameserver.network.serverpackets.IClientOutgoingPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExTeleportFavoritesList implements IClientOutgoingPacket
|
||||
{
|
||||
private final int[] _teleports;
|
||||
private final boolean _enable;
|
||||
|
||||
public ExTeleportFavoritesList(PlayerInstance player, boolean enable)
|
||||
{
|
||||
if (player.getVariables().contains(PlayerVariables.FAVORITE_TELEPORTS))
|
||||
{
|
||||
_teleports = player.getVariables().getIntArray(PlayerVariables.FAVORITE_TELEPORTS, ",");
|
||||
}
|
||||
else
|
||||
{
|
||||
_teleports = new int[0];
|
||||
}
|
||||
_enable = enable;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean write(PacketWriter packet)
|
||||
{
|
||||
OutgoingPackets.EX_TELEPORT_FAVORITES_LIST.writeId(packet);
|
||||
|
||||
packet.writeC(_enable ? 0x01 : 0x00);
|
||||
packet.writeD(_teleports.length);
|
||||
for (int id : _teleports)
|
||||
{
|
||||
packet.writeD(id);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user