Underground update.
This commit is contained in:
@@ -173,6 +173,7 @@ public final class Config
|
||||
public static int MAX_EVASION;
|
||||
public static int MIN_ABNORMAL_STATE_SUCCESS_RATE;
|
||||
public static int MAX_ABNORMAL_STATE_SUCCESS_RATE;
|
||||
public static byte PLAYER_MAXIMUM_LEVEL;
|
||||
public static byte MAX_SUBCLASS;
|
||||
public static byte BASE_SUBCLASS_LEVEL;
|
||||
public static byte BASE_DUALCLASS_LEVEL;
|
||||
@@ -251,7 +252,7 @@ public final class Config
|
||||
public static boolean PETITIONING_ALLOWED;
|
||||
public static int MAX_PETITIONS_PER_PLAYER;
|
||||
public static int MAX_PETITIONS_PENDING;
|
||||
public static boolean ALT_GAME_FREE_TELEPORT;
|
||||
public static boolean FREE_TELEPORTING;
|
||||
public static int DELETE_DAYS;
|
||||
public static float ALT_GAME_EXPONENT_XP;
|
||||
public static float ALT_GAME_EXPONENT_SP;
|
||||
@@ -1523,6 +1524,8 @@ public final class Config
|
||||
MAX_EVASION = character.getInt("MaxEvasion", 250);
|
||||
MIN_ABNORMAL_STATE_SUCCESS_RATE = character.getInt("MinAbnormalStateSuccessRate", 10);
|
||||
MAX_ABNORMAL_STATE_SUCCESS_RATE = character.getInt("MaxAbnormalStateSuccessRate", 90);
|
||||
PLAYER_MAXIMUM_LEVEL = character.getByte("MaximumPlayerLevel", (byte) 99);
|
||||
PLAYER_MAXIMUM_LEVEL++; // Player maximum level calculations always require +1.
|
||||
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);
|
||||
@@ -1696,7 +1699,7 @@ public final class Config
|
||||
PETITIONING_ALLOWED = character.getBoolean("PetitioningAllowed", true);
|
||||
MAX_PETITIONS_PER_PLAYER = character.getInt("MaxPetitionsPerPlayer", 5);
|
||||
MAX_PETITIONS_PENDING = character.getInt("MaxPetitionsPending", 25);
|
||||
ALT_GAME_FREE_TELEPORT = character.getBoolean("AltFreeTeleporting", false);
|
||||
FREE_TELEPORTING = character.getBoolean("FreeTeleporting", false);
|
||||
DELETE_DAYS = character.getInt("DeleteCharAfterDays", 1);
|
||||
ALT_GAME_EXPONENT_XP = character.getFloat("AltGameExponentXp", 0);
|
||||
ALT_GAME_EXPONENT_SP = character.getFloat("AltGameExponentSp", 0);
|
||||
@@ -3552,8 +3555,8 @@ public final class Config
|
||||
case "castlezonefameaquirepoints":
|
||||
CASTLE_ZONE_FAME_AQUIRE_POINTS = Integer.parseInt(pValue);
|
||||
break;
|
||||
case "altfreeteleporting":
|
||||
ALT_GAME_FREE_TELEPORT = Boolean.parseBoolean(pValue);
|
||||
case "freeteleporting":
|
||||
FREE_TELEPORTING = Boolean.parseBoolean(pValue);
|
||||
break;
|
||||
case "altsubclasswithoutquests":
|
||||
ALT_GAME_SUBCLASS_WITHOUT_QUESTS = Boolean.parseBoolean(pValue);
|
||||
|
||||
@@ -38,6 +38,17 @@ public abstract class SendablePacket<T extends MMOClient<?>> extends AbstractPac
|
||||
_buf.putFloat(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>byte</B> to the buffer. <BR>
|
||||
* 8bit integer (00)
|
||||
* @param data
|
||||
*/
|
||||
protected final void writeC(final boolean data)
|
||||
{
|
||||
int value = data ? 0x01 : 0x00;
|
||||
_buf.put((byte) value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>byte</B> to the buffer. <BR>
|
||||
* 8bit integer (00)
|
||||
@@ -78,6 +89,17 @@ public abstract class SendablePacket<T extends MMOClient<?>> extends AbstractPac
|
||||
_buf.putInt(value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>int</B> to the buffer. <BR>
|
||||
* 32bit integer (00 00 00 00)
|
||||
* @param value
|
||||
*/
|
||||
protected final void writeD(final boolean value)
|
||||
{
|
||||
int val = value ? 0x01 : 0x00;
|
||||
_buf.putInt(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write <B>long</B> to the buffer. <BR>
|
||||
* 64bit integer (00 00 00 00 00 00 00 00)
|
||||
|
||||
@@ -53,6 +53,7 @@ import com.l2jserver.gameserver.data.xml.impl.BeautyShopData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.BuyListData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.CategoryData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.ClassListData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.DailyMissionData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.DoorData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.EnchantItemData;
|
||||
import com.l2jserver.gameserver.data.xml.impl.EnchantItemGroupsData;
|
||||
@@ -312,6 +313,7 @@ public final class GameServer
|
||||
CursedWeaponsManager.getInstance();
|
||||
TransformData.getInstance();
|
||||
BotReportTable.getInstance();
|
||||
DailyMissionData.getInstance();
|
||||
|
||||
printSection("Scripts");
|
||||
QuestManager.getInstance();
|
||||
|
||||
@@ -0,0 +1,261 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.data.xml.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.base.ClassId;
|
||||
import com.l2jserver.gameserver.model.holders.DailyMissionHolder;
|
||||
import com.l2jserver.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
* The Class DailyMissionData.
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DailyMissionData implements IXmlReader
|
||||
{
|
||||
private final List<DailyMissionHolder> _dailyMissions = new ArrayList<>();
|
||||
private final List<DailyMissionHolder> _dailyLevelUpMissions = new ArrayList<>();
|
||||
|
||||
/**
|
||||
* Instantiates new daily mission data.
|
||||
*/
|
||||
protected DailyMissionData()
|
||||
{
|
||||
load();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void load()
|
||||
{
|
||||
_dailyMissions.clear();
|
||||
_dailyLevelUpMissions.clear();
|
||||
parseDatapackFile("dailyMissions.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _dailyMissions.size() + " daily missions.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void parseDocument(Document doc)
|
||||
{
|
||||
int id;
|
||||
int clientId;
|
||||
String type;
|
||||
int level;
|
||||
List<Integer> classesList;
|
||||
Map<Integer, Integer> rewards;
|
||||
|
||||
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 ("mission".equalsIgnoreCase(d.getNodeName()))
|
||||
{
|
||||
NamedNodeMap attrs = d.getAttributes();
|
||||
Node att;
|
||||
id = -1;
|
||||
clientId = 0;
|
||||
type = "";
|
||||
level = 1;
|
||||
classesList = new ArrayList<>();
|
||||
rewards = new HashMap<>();
|
||||
|
||||
att = attrs.getNamedItem("id");
|
||||
if (att == null)
|
||||
{
|
||||
LOGGER.severe(getClass().getSimpleName() + ": Missing id for daily mission, skipping");
|
||||
continue;
|
||||
}
|
||||
id = Integer.parseInt(att.getNodeValue());
|
||||
|
||||
att = attrs.getNamedItem("clientId");
|
||||
if (att == null)
|
||||
{
|
||||
LOGGER.severe(getClass().getSimpleName() + ": Missing clientId for daily mission id: " + id + ", skipping");
|
||||
continue;
|
||||
}
|
||||
clientId = Integer.parseInt(att.getNodeValue());
|
||||
|
||||
att = attrs.getNamedItem("type");
|
||||
if (att == null)
|
||||
{
|
||||
LOGGER.severe(getClass().getSimpleName() + ": Missing type for daily mission id: " + id + ", skipping");
|
||||
continue;
|
||||
}
|
||||
type = att.getNodeValue();
|
||||
|
||||
att = attrs.getNamedItem("level");
|
||||
if (att == null)
|
||||
{
|
||||
LOGGER.severe(getClass().getSimpleName() + ": Missing level for daily mission id: " + id + ", skipping");
|
||||
continue;
|
||||
}
|
||||
level = Integer.parseInt(att.getNodeValue());
|
||||
|
||||
att = attrs.getNamedItem("classes");
|
||||
if (att == null)
|
||||
{
|
||||
LOGGER.severe(getClass().getSimpleName() + ": Missing classes for daily mission id: " + id + ", skipping");
|
||||
continue;
|
||||
}
|
||||
if (att.getNodeValue().equalsIgnoreCase("ALL"))
|
||||
{
|
||||
for (ClassId cid : ClassId.values())
|
||||
{
|
||||
classesList.add(cid.getId());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
final String[] s = att.getNodeValue().split(",");
|
||||
for (String element : s)
|
||||
{
|
||||
classesList.add(Integer.parseInt(element));
|
||||
}
|
||||
}
|
||||
|
||||
for (Node c = d.getFirstChild(); c != null; c = c.getNextSibling())
|
||||
{
|
||||
if ("reward".equalsIgnoreCase(c.getNodeName()))
|
||||
{
|
||||
final int itemId = Integer.parseInt(c.getAttributes().getNamedItem("item").getNodeValue());
|
||||
final int itemCount = Integer.parseInt(c.getAttributes().getNamedItem("count").getNodeValue());
|
||||
rewards.put(itemId, itemCount);
|
||||
}
|
||||
}
|
||||
|
||||
if (type.equalsIgnoreCase("LEVEL"))
|
||||
{
|
||||
_dailyLevelUpMissions.add(new DailyMissionHolder(id, clientId, type, level, classesList, rewards));
|
||||
}
|
||||
_dailyMissions.add(new DailyMissionHolder(id, clientId, type, level, classesList, rewards));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param id int
|
||||
* @param player L2PcInstance
|
||||
* @return boolean
|
||||
*/
|
||||
public boolean isRewardAvailable(int id, L2PcInstance player)
|
||||
{
|
||||
if (player.getLevel() < _dailyMissions.get(id - 1).getLevel())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (player.getVariables().getString("DailyMission" + id, null) != null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param rewardId1 int
|
||||
* @param player L2PcInstance
|
||||
*/
|
||||
public void rewardPlayer(int rewardId1, L2PcInstance player)
|
||||
{
|
||||
for (DailyMissionHolder mission : _dailyMissions)
|
||||
{
|
||||
if ((mission.getClientId() == rewardId1) && isRewardAvailable(mission.getId(), player))
|
||||
{
|
||||
for (int itemId : mission.getRewards().keySet())
|
||||
{
|
||||
player.addItem("DailyMission", itemId, mission.getRewards().get(itemId), player, true);
|
||||
}
|
||||
for (DailyMissionHolder m : _dailyMissions)
|
||||
{
|
||||
if (mission.getClientId() == m.getClientId())
|
||||
{
|
||||
player.getVariables().set("DailyMission" + m.getId(), System.currentTimeMillis());
|
||||
}
|
||||
}
|
||||
player.sendPacket(new ExOneDayReceiveRewardList(player));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the daily missions.
|
||||
* @param classId int
|
||||
* @return the daily missions
|
||||
*/
|
||||
public List<DailyMissionHolder> getDailyMissions(int classId)
|
||||
{
|
||||
List<DailyMissionHolder> missions = new ArrayList<>();
|
||||
for (DailyMissionHolder mission : _dailyMissions)
|
||||
{
|
||||
if (mission.getAvailableClasses().contains(classId))
|
||||
{
|
||||
missions.add(mission);
|
||||
}
|
||||
}
|
||||
return missions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the daily level up missions.
|
||||
* @param classId int
|
||||
* @return the daily level up missions
|
||||
*/
|
||||
public List<DailyMissionHolder> getDailyLevelUpMissions(int classId)
|
||||
{
|
||||
List<DailyMissionHolder> missions = new ArrayList<>();
|
||||
for (DailyMissionHolder mission : _dailyLevelUpMissions)
|
||||
{
|
||||
if (mission.getAvailableClasses().contains(classId))
|
||||
{
|
||||
missions.add(mission);
|
||||
}
|
||||
}
|
||||
return missions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the single instance of DailyMissionData.
|
||||
* @return single instance of DailyMissionData
|
||||
*/
|
||||
public static DailyMissionData getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
/**
|
||||
* The Class SingletonHolder.
|
||||
*/
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final DailyMissionData _instance = new DailyMissionData();
|
||||
}
|
||||
}
|
||||
@@ -53,6 +53,14 @@ public class EnchantSkillGroupsData implements IXmlReader
|
||||
public static final int CHANGE_ENCHANT_BOOK = 30299;
|
||||
public static final int UNTRAIN_ENCHANT_BOOK = 30300;
|
||||
public static final int IMMORTAL_SCROLL = 37044;
|
||||
public static final int NORMAL_ENCHANT_BOOK_V2 = 46150;
|
||||
public static final int SAFE_ENCHANT_BOOK_V2 = 46151;
|
||||
public static final int CHANGE_ENCHANT_BOOK_V2 = 46152;
|
||||
public static final int IMMORTAL_SCROLL_V2 = 46153;
|
||||
public static final int NORMAL_ENCHANT_BOOK_V3 = 46154;
|
||||
public static final int SAFE_ENCHANT_BOOK_V3 = 46155;
|
||||
public static final int CHANGE_ENCHANT_BOOK_V3 = 46156;
|
||||
public static final int IMMORTAL_SCROLL_V3 = 46157;
|
||||
|
||||
private final Map<Integer, L2EnchantSkillGroup> _enchantSkillGroups = new HashMap<>();
|
||||
private final Map<Integer, L2EnchantSkillLearn> _enchantSkillTrees = new HashMap<>();
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
@@ -51,7 +52,7 @@ public final class ExperienceData implements IXmlReader
|
||||
{
|
||||
_expTable.clear();
|
||||
parseDatapackFile("stats/experience.xml");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _expTable.size() + " levels.");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Loaded " + (_expTable.size() - 1) + " levels.");
|
||||
LOGGER.info(getClass().getSimpleName() + ": Max Player Level is: " + (MAX_LEVEL - 1));
|
||||
LOGGER.info(getClass().getSimpleName() + ": Max Pet Level is: " + (MAX_PET_LEVEL - 1));
|
||||
}
|
||||
@@ -65,12 +66,27 @@ public final class ExperienceData implements IXmlReader
|
||||
MAX_LEVEL = (byte) (Byte.parseByte(tableAttr.getNamedItem("maxLevel").getNodeValue()) + 1);
|
||||
MAX_PET_LEVEL = (byte) (Byte.parseByte(tableAttr.getNamedItem("maxPetLevel").getNodeValue()) + 1);
|
||||
|
||||
if (MAX_LEVEL > Config.PLAYER_MAXIMUM_LEVEL)
|
||||
{
|
||||
MAX_LEVEL = Config.PLAYER_MAXIMUM_LEVEL;
|
||||
}
|
||||
if (MAX_PET_LEVEL > MAX_LEVEL)
|
||||
{
|
||||
MAX_PET_LEVEL = MAX_LEVEL; // Pet level should not exceed owner level.
|
||||
}
|
||||
|
||||
int maxLevel = 0;
|
||||
for (Node n = table.getFirstChild(); n != null; n = n.getNextSibling())
|
||||
{
|
||||
if ("experience".equals(n.getNodeName()))
|
||||
{
|
||||
NamedNodeMap attrs = n.getAttributes();
|
||||
_expTable.put(parseInteger(attrs, "level"), parseLong(attrs, "tolevel"));
|
||||
maxLevel = parseInteger(attrs, "level");
|
||||
if (maxLevel > Config.PLAYER_MAXIMUM_LEVEL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
_expTable.put(maxLevel, parseLong(attrs, "tolevel"));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -82,6 +98,10 @@ public final class ExperienceData implements IXmlReader
|
||||
*/
|
||||
public long getExpForLevel(int level)
|
||||
{
|
||||
if (level > Config.PLAYER_MAXIMUM_LEVEL)
|
||||
{
|
||||
level = Config.PLAYER_MAXIMUM_LEVEL;
|
||||
}
|
||||
return _expTable.get(level);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.util.data.xml.IXmlReader;
|
||||
|
||||
/**
|
||||
@@ -61,7 +62,12 @@ public class KarmaData implements IXmlReader
|
||||
if ("increase".equalsIgnoreCase(d.getNodeName()))
|
||||
{
|
||||
final NamedNodeMap attrs = d.getAttributes();
|
||||
_karmaTable.put(parseInteger(attrs, "lvl"), parseDouble(attrs, "val"));
|
||||
int level = parseInteger(attrs, "lvl");
|
||||
if (level >= Config.PLAYER_MAXIMUM_LEVEL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
_karmaTable.put(level, parseDouble(attrs, "val"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import org.w3c.dom.Document;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.StatsSet;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2PcTemplate;
|
||||
@@ -152,12 +153,11 @@ public final class PlayerTemplateData implements IXmlReader
|
||||
{
|
||||
attrs = lvlNode.getAttributes();
|
||||
int level = parseInteger(attrs, "val");
|
||||
|
||||
for (Node valNode = lvlNode.getFirstChild(); valNode != null; valNode = valNode.getNextSibling())
|
||||
{
|
||||
String nodeName = valNode.getNodeName();
|
||||
|
||||
if ((nodeName.startsWith("hp") || nodeName.startsWith("mp") || nodeName.startsWith("cp")) && _playerTemplates.containsKey(ClassId.getClassId(classId)))
|
||||
if ((level < Config.PLAYER_MAXIMUM_LEVEL) && (nodeName.startsWith("hp") || nodeName.startsWith("mp") || nodeName.startsWith("cp")) && _playerTemplates.containsKey(ClassId.getClassId(classId)))
|
||||
{
|
||||
_playerTemplates.get(ClassId.getClassId(classId)).setUpgainValue(nodeName, level, Double.parseDouble(valNode.getTextContent()));
|
||||
_dataCount++;
|
||||
@@ -165,6 +165,7 @@ public final class PlayerTemplateData implements IXmlReader
|
||||
}
|
||||
}
|
||||
}
|
||||
// TODO: Generate stats automatically.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,12 @@ public final class PlayerXpPercentLostData implements IXmlReader
|
||||
if ("xpLost".equalsIgnoreCase(d.getNodeName()))
|
||||
{
|
||||
NamedNodeMap attrs = d.getAttributes();
|
||||
_playerXpPercentLost[parseInteger(attrs, "level")] = parseDouble(attrs, "val");
|
||||
Integer level = parseInteger(attrs, "level");
|
||||
if (level > _maxlevel)
|
||||
{
|
||||
break;
|
||||
}
|
||||
_playerXpPercentLost[level] = parseDouble(attrs, "val");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -280,7 +280,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets1[i] = new StatsSet();
|
||||
_currentSkill.enchsets1[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets1[i].set("level", i + 101);
|
||||
_currentSkill.enchsets1[i].set("level", i + 1001);
|
||||
_currentSkill.enchsets1[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
@@ -309,7 +309,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets2[i] = new StatsSet();
|
||||
_currentSkill.enchsets2[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets2[i].set("level", i + 201);
|
||||
_currentSkill.enchsets2[i].set("level", i + 2001);
|
||||
_currentSkill.enchsets2[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
@@ -338,7 +338,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets3[i] = new StatsSet();
|
||||
_currentSkill.enchsets3[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets3[i].set("level", i + 301);
|
||||
_currentSkill.enchsets3[i].set("level", i + 3001);
|
||||
_currentSkill.enchsets3[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
@@ -367,7 +367,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets4[i] = new StatsSet();
|
||||
_currentSkill.enchsets4[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets4[i].set("level", i + 401);
|
||||
_currentSkill.enchsets4[i].set("level", i + 4001);
|
||||
_currentSkill.enchsets4[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
@@ -396,7 +396,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets5[i] = new StatsSet();
|
||||
_currentSkill.enchsets5[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets5[i].set("level", i + 501);
|
||||
_currentSkill.enchsets5[i].set("level", i + 5001);
|
||||
_currentSkill.enchsets5[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
@@ -425,7 +425,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets6[i] = new StatsSet();
|
||||
_currentSkill.enchsets6[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets6[i].set("level", i + 601);
|
||||
_currentSkill.enchsets6[i].set("level", i + 6001);
|
||||
_currentSkill.enchsets6[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
@@ -454,7 +454,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets7[i] = new StatsSet();
|
||||
_currentSkill.enchsets7[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets7[i].set("level", i + 701);
|
||||
_currentSkill.enchsets7[i].set("level", i + 7001);
|
||||
_currentSkill.enchsets7[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
@@ -483,7 +483,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets8[i] = new StatsSet();
|
||||
_currentSkill.enchsets8[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets8[i].set("level", i + 801);
|
||||
_currentSkill.enchsets8[i].set("level", i + 8001);
|
||||
_currentSkill.enchsets8[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
@@ -512,7 +512,7 @@ public class DocumentSkill extends DocumentBase
|
||||
{
|
||||
_currentSkill.enchsets9[i] = new StatsSet();
|
||||
_currentSkill.enchsets9[i].set("skill_id", _currentSkill.id);
|
||||
_currentSkill.enchsets9[i].set("level", i + 901);
|
||||
_currentSkill.enchsets9[i].set("level", i + 9001);
|
||||
_currentSkill.enchsets9[i].set("name", _currentSkill.name);
|
||||
|
||||
for (n = first; n != null; n = n.getNextSibling())
|
||||
|
||||
@@ -40,25 +40,25 @@ public enum InventorySlot implements IUpdateTypeComponent
|
||||
LEGS(Inventory.PAPERDOLL_LEGS),
|
||||
FEET(Inventory.PAPERDOLL_FEET),
|
||||
CLOAK(Inventory.PAPERDOLL_CLOAK),
|
||||
LRHAND(Inventory.PAPERDOLL_RHAND),
|
||||
LRHAND(Inventory.PAPERDOLL_LRHAND),
|
||||
HAIR(Inventory.PAPERDOLL_HAIR),
|
||||
HAIR2(Inventory.PAPERDOLL_HAIR2),
|
||||
HAIR2(Inventory.PAPERDOLL_DHAIR),
|
||||
RBRACELET(Inventory.PAPERDOLL_RBRACELET),
|
||||
LBRACELET(Inventory.PAPERDOLL_LBRACELET),
|
||||
DECO1(Inventory.PAPERDOLL_DECO1),
|
||||
DECO2(Inventory.PAPERDOLL_DECO2),
|
||||
DECO3(Inventory.PAPERDOLL_DECO3),
|
||||
DECO4(Inventory.PAPERDOLL_DECO4),
|
||||
DECO5(Inventory.PAPERDOLL_DECO5),
|
||||
DECO6(Inventory.PAPERDOLL_DECO6),
|
||||
DECO1(Inventory.PAPERDOLL_TALISMAN1),
|
||||
DECO2(Inventory.PAPERDOLL_TALISMAN2),
|
||||
DECO3(Inventory.PAPERDOLL_TALISMAN3),
|
||||
DECO4(Inventory.PAPERDOLL_TALISMAN4),
|
||||
DECO5(Inventory.PAPERDOLL_TALISMAN5),
|
||||
DECO6(Inventory.PAPERDOLL_TALISMAN6),
|
||||
BELT(Inventory.PAPERDOLL_BELT),
|
||||
BROOCH(Inventory.PAPERDOLL_BROOCH),
|
||||
BROOCH_JEWEL(Inventory.PAPERDOLL_BROOCH_JEWEL1),
|
||||
BROOCH_JEWEL2(Inventory.PAPERDOLL_BROOCH_JEWEL2),
|
||||
BROOCH_JEWEL3(Inventory.PAPERDOLL_BROOCH_JEWEL3),
|
||||
BROOCH_JEWEL4(Inventory.PAPERDOLL_BROOCH_JEWEL4),
|
||||
BROOCH_JEWEL5(Inventory.PAPERDOLL_BROOCH_JEWEL5),
|
||||
BROOCH_JEWEL6(Inventory.PAPERDOLL_BROOCH_JEWEL6);
|
||||
BROOCH_JEWEL(Inventory.PAPERDOLL_BROOCH_STONE1),
|
||||
BROOCH_JEWEL2(Inventory.PAPERDOLL_BROOCH_STONE2),
|
||||
BROOCH_JEWEL3(Inventory.PAPERDOLL_BROOCH_STONE3),
|
||||
BROOCH_JEWEL4(Inventory.PAPERDOLL_BROOCH_STONE4),
|
||||
BROOCH_JEWEL5(Inventory.PAPERDOLL_BROOCH_STONE5),
|
||||
BROOCH_JEWEL6(Inventory.PAPERDOLL_BROOCH_STONE6);
|
||||
|
||||
private final int _paperdollSlot;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public enum PartySmallWindowUpdateType implements IUpdateTypeComponent
|
||||
MAX_MP(0x20),
|
||||
LEVEL(0x40),
|
||||
CLASS_ID(0x80),
|
||||
VITALITY_POINTS(0x100);
|
||||
VITALITY_POINTS(0x200);
|
||||
|
||||
private final int _mask;
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ public final class PcCafePointsManager
|
||||
}
|
||||
else
|
||||
{
|
||||
message = SystemMessage.getSystemMessage(SystemMessageId.YOU_EARNED_S1_PC_POINT_S2);
|
||||
message = SystemMessage.getSystemMessage(SystemMessageId.YOU_EARNED_S1_PC_POINT_S);
|
||||
}
|
||||
if ((player.getPcBangPoints() + points) > Config.PC_BANG_MAX_POINTS)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.model;
|
||||
|
||||
import com.l2jserver.gameserver.model.entity.Hero;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.PcInventory;
|
||||
import com.l2jserver.gameserver.model.variables.PlayerVariables;
|
||||
@@ -322,9 +323,14 @@ public class CharSelectInfoPackage
|
||||
_sp = sp;
|
||||
}
|
||||
|
||||
public int getEnchantEffect()
|
||||
public int getWeaponEnchantEffect()
|
||||
{
|
||||
return _paperdoll[Inventory.PAPERDOLL_RHAND][2];
|
||||
return getEnchantEffect(Inventory.PAPERDOLL_RHAND);
|
||||
}
|
||||
|
||||
public int getEnchantEffect(int slot)
|
||||
{
|
||||
return _paperdoll[slot][2];
|
||||
}
|
||||
|
||||
public void setReputation(int reputation)
|
||||
@@ -421,4 +427,48 @@ public class CharSelectInfoPackage
|
||||
{
|
||||
return _vars.getBoolean("hairAccessoryEnabled", true);
|
||||
}
|
||||
|
||||
public int getTransformationId()
|
||||
{
|
||||
int weaponId = getPaperdollItemId(Inventory.PAPERDOLL_RHAND);
|
||||
switch (weaponId)
|
||||
{
|
||||
case 8190:
|
||||
return 301;
|
||||
case 8689:
|
||||
return 302;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public int getVitalityPercent()
|
||||
{
|
||||
return 200; // TODO: Implement.
|
||||
}
|
||||
|
||||
public int getVitalityItemCount()
|
||||
{
|
||||
return 5; // TODO: Implement.
|
||||
}
|
||||
|
||||
public boolean isAvailable()
|
||||
{
|
||||
return getAccessLevel() > -100;
|
||||
}
|
||||
|
||||
public boolean isHero()
|
||||
{
|
||||
return Hero.getInstance().isHero(getObjectId());
|
||||
}
|
||||
|
||||
public int get1stAugmentationId()
|
||||
{
|
||||
return 0x0000FFFF & getAugmentationId();
|
||||
}
|
||||
|
||||
public int get2ndAugmentationId()
|
||||
{
|
||||
return getAugmentationId() >> 16;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -325,6 +325,16 @@ public class ItemInfo
|
||||
return _augmentation;
|
||||
}
|
||||
|
||||
public int get1stAugmentationId()
|
||||
{
|
||||
return 0x0000FFFF & getAugmentationBonus();
|
||||
}
|
||||
|
||||
public int get2ndAugmentationId()
|
||||
{
|
||||
return getAugmentationBonus() >> 16;
|
||||
}
|
||||
|
||||
public long getCount()
|
||||
{
|
||||
return _count;
|
||||
|
||||
@@ -59,17 +59,17 @@ public final class L2EnchantSkillLearn
|
||||
|
||||
public static int getEnchantRoute(int level)
|
||||
{
|
||||
return (int) Math.floor(level / 100);
|
||||
return (int) Math.floor(level / 1000);
|
||||
}
|
||||
|
||||
public static int getEnchantIndex(int level)
|
||||
{
|
||||
return (level % 100) - 1;
|
||||
return (level % 1000) - 1;
|
||||
}
|
||||
|
||||
public static int getEnchantType(int level)
|
||||
{
|
||||
return ((level - 1) / 100) - 1;
|
||||
return ((level - 1) / 1000) - 1;
|
||||
}
|
||||
|
||||
public L2EnchantSkillGroup getFirstRouteGroup()
|
||||
@@ -84,7 +84,7 @@ public final class L2EnchantSkillLearn
|
||||
|
||||
public int getMinSkillLevel(int level)
|
||||
{
|
||||
if ((level % 100) == 1)
|
||||
if ((level % 1000) == 1)
|
||||
{
|
||||
return _baseLvl;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public class L2Mentee
|
||||
else
|
||||
{
|
||||
_name = player.getName();
|
||||
_classId = player.getBaseClass();
|
||||
_classId = player.getBaseClassId();
|
||||
_currentLevel = player.getLevel();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -129,7 +129,30 @@ public class ShortCuts implements IRestorable
|
||||
{
|
||||
if (_owner.removeAutoSoulShot(item.getId()))
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(item.getId(), 0));
|
||||
switch (item.getEtcItem().getDefaultAction())
|
||||
{
|
||||
case SOULSHOT:
|
||||
case FISHINGSHOT:
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(item.getId(), 0, 0));
|
||||
break;
|
||||
}
|
||||
case SPIRITSHOT:
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(item.getId(), 0, 1));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SOULSHOT:
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(item.getId(), 0, 2));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SPIRITSHOT:
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(item.getId(), 0, 3));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -138,7 +161,32 @@ public class ShortCuts implements IRestorable
|
||||
|
||||
for (int shotId : _owner.getAutoSoulShot())
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(shotId, 1));
|
||||
L2ItemInstance item = _owner.getInventory().getItemByObjectId(shotId);
|
||||
|
||||
switch (item.getEtcItem().getDefaultAction())
|
||||
{
|
||||
case SOULSHOT:
|
||||
case FISHINGSHOT:
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(shotId, 1, 0));
|
||||
break;
|
||||
}
|
||||
case SPIRITSHOT:
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(shotId, 1, 1));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SOULSHOT:
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(shotId, 1, 2));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SPIRITSHOT:
|
||||
{
|
||||
_owner.sendPacket(new ExAutoSoulShot(shotId, 1, 3));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,7 @@ import com.l2jserver.gameserver.model.actor.tasks.character.QueuedMagicUseTask;
|
||||
import com.l2jserver.gameserver.model.actor.templates.L2CharTemplate;
|
||||
import com.l2jserver.gameserver.model.actor.transform.Transform;
|
||||
import com.l2jserver.gameserver.model.actor.transform.TransformTemplate;
|
||||
import com.l2jserver.gameserver.model.effects.AbstractEffect;
|
||||
import com.l2jserver.gameserver.model.effects.EffectFlag;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.entity.Instance;
|
||||
@@ -119,6 +120,7 @@ import com.l2jserver.gameserver.model.options.OptionsSkillHolder;
|
||||
import com.l2jserver.gameserver.model.options.OptionsSkillType;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalType;
|
||||
import com.l2jserver.gameserver.model.skills.AbnormalVisualEffect;
|
||||
import com.l2jserver.gameserver.model.skills.BlowSuccess;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.skills.CommonSkill;
|
||||
import com.l2jserver.gameserver.model.skills.EffectScope;
|
||||
@@ -1853,7 +1855,7 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
{
|
||||
if (!destroyItemByItemId("Consume", skill.getItemConsumeId(), skill.getItemConsumeCount(), null, true))
|
||||
{
|
||||
getActingPlayer().sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
getActingPlayer().sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
abortCast();
|
||||
return;
|
||||
}
|
||||
@@ -1880,7 +1882,18 @@ public abstract class L2Character extends L2Object implements ISkillsHolder, IDe
|
||||
|
||||
// Send a Server->Client packet MagicSkillUser with target, displayId, level, skillTime, reuseDelay
|
||||
// to the L2Character AND to all L2PcInstance in the _KnownPlayers of the L2Character
|
||||
broadcastPacket(new MagicSkillUse(this, target, skill.getDisplayId(), skill.getDisplayLevel(), skillTime, reuseDelay));
|
||||
if (skill.getBlowChance() > 0)
|
||||
{
|
||||
for (AbstractEffect effect : skill.getEffects(EffectScope.GENERAL))
|
||||
{
|
||||
BlowSuccess.getInstance().set(this, skill, effect.calcSuccess(new BuffInfo(this, target, skill)));
|
||||
}
|
||||
broadcastPacket(new MagicSkillUse(this, target, skill.getDisplayId(), skill.getDisplayLevel(), skillTime, reuseDelay, BlowSuccess.getInstance().get(this, skill)));
|
||||
}
|
||||
else
|
||||
{
|
||||
broadcastPacket(new MagicSkillUse(this, target, skill.getDisplayId(), skill.getDisplayLevel(), skillTime, reuseDelay));
|
||||
}
|
||||
|
||||
// Send a system message to the player.
|
||||
if (isPlayer() && !skill.isAbnormalInstant())
|
||||
|
||||
@@ -395,7 +395,7 @@ public final class L2ClassMasterInstance extends L2MerchantInstance
|
||||
{
|
||||
if (player.getInventory().getInventoryItemCount(holder.getId(), -1) < holder.getCount())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
player.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -419,11 +419,11 @@ public final class L2ClassMasterInstance extends L2MerchantInstance
|
||||
|
||||
if (player.isSubClassActive())
|
||||
{
|
||||
player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClass());
|
||||
player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClassId());
|
||||
}
|
||||
else
|
||||
{
|
||||
player.setBaseClass(player.getActiveClass());
|
||||
player.setBaseClassId(player.getActiveClassId());
|
||||
}
|
||||
|
||||
player.broadcastUserInfo();
|
||||
|
||||
@@ -429,6 +429,7 @@ public final class L2PcInstance extends L2Playable
|
||||
private long _uptime;
|
||||
|
||||
private final ReentrantLock _subclassLock = new ReentrantLock();
|
||||
protected int _initialClass;
|
||||
protected int _baseClass;
|
||||
protected int _activeClass;
|
||||
protected int _classIndex = 0;
|
||||
@@ -954,6 +955,8 @@ public final class L2PcInstance extends L2Playable
|
||||
player.setName(name);
|
||||
// Set Character's create time
|
||||
player.setCreateDate(Calendar.getInstance());
|
||||
// Set the initial class ID to that of the actual class ID.
|
||||
player.setInitialClassId(player.getClassId().getId());
|
||||
// Set the base class ID to that of the actual class ID.
|
||||
player.setBaseClass(player.getClassId());
|
||||
// Give 20 recommendations
|
||||
@@ -1234,14 +1237,19 @@ public final class L2PcInstance extends L2Playable
|
||||
return super.getLevelMod();
|
||||
}
|
||||
|
||||
public void setBaseClass(int baseClass)
|
||||
public void setInitialClassId(int classId)
|
||||
{
|
||||
_initialClass = classId;
|
||||
}
|
||||
|
||||
public void setBaseClassId(int baseClass)
|
||||
{
|
||||
_baseClass = baseClass;
|
||||
}
|
||||
|
||||
public void setBaseClass(ClassId classId)
|
||||
{
|
||||
_baseClass = classId.ordinal();
|
||||
_baseClass = classId.getId();
|
||||
}
|
||||
|
||||
public boolean isInStoreMode()
|
||||
@@ -3125,7 +3133,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3459,7 +3467,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3519,7 +3527,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -3544,7 +3552,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -3576,7 +3584,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -3771,7 +3779,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -3864,7 +3872,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -6616,7 +6624,7 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
// You can't mount, dismount, break and drop items while fishing
|
||||
sendPacket(ActionFailed.STATIC_PACKET);
|
||||
sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING2);
|
||||
sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING);
|
||||
return false;
|
||||
}
|
||||
else if (isTransformed() || isCursedWeaponEquipped())
|
||||
@@ -7020,7 +7028,7 @@ public final class L2PcInstance extends L2Playable
|
||||
ps.setInt(30, isOnlineInt());
|
||||
ps.setInt(31, getClanPrivileges().getBitmask());
|
||||
ps.setInt(32, getWantsPeace());
|
||||
ps.setInt(33, getBaseClass());
|
||||
ps.setInt(33, getBaseClassId());
|
||||
ps.setInt(34, isNoble() ? 1 : 0);
|
||||
ps.setLong(35, 0);
|
||||
ps.setTimestamp(36, new Timestamp(getCreateDate().getTimeInMillis()));
|
||||
@@ -7125,18 +7133,18 @@ public final class L2PcInstance extends L2Playable
|
||||
player._classIndex = 0;
|
||||
try
|
||||
{
|
||||
player.setBaseClass(rset.getInt("base_class"));
|
||||
player.setBaseClassId(rset.getInt("base_class"));
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// TODO: Should this be logged?
|
||||
player.setBaseClass(activeClassId);
|
||||
player.setBaseClassId(activeClassId);
|
||||
}
|
||||
player.setInitialClassId(ClassId.getInitialClassId(player));
|
||||
|
||||
// Restore Subclass Data (cannot be done earlier in function)
|
||||
if (restoreSubClassData(player))
|
||||
{
|
||||
if (activeClassId != player.getBaseClass())
|
||||
if (activeClassId != player.getBaseClassId())
|
||||
{
|
||||
for (SubClass subClass : player.getSubClasses().values())
|
||||
{
|
||||
@@ -7147,12 +7155,12 @@ public final class L2PcInstance extends L2Playable
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((player.getClassIndex() == 0) && (activeClassId != player.getBaseClass()))
|
||||
if ((player.getClassIndex() == 0) && (activeClassId != player.getBaseClassId()))
|
||||
{
|
||||
// Subclass in use but doesn't exist in DB -
|
||||
// a possible restart-while-modifysubclass cheat has been attempted.
|
||||
// Switching to use base class
|
||||
player.setClassId(player.getBaseClass());
|
||||
player.setClassId(player.getBaseClassId());
|
||||
_log.warning("Player " + player.getName() + " reverted to base class. Possibly has tried a relogin exploit while subclassing.");
|
||||
}
|
||||
else
|
||||
@@ -7651,7 +7659,7 @@ public final class L2PcInstance extends L2Playable
|
||||
ps.setInt(31, isOnlineInt());
|
||||
ps.setInt(32, getClanPrivileges().getBitmask());
|
||||
ps.setInt(33, getWantsPeace());
|
||||
ps.setInt(34, getBaseClass());
|
||||
ps.setInt(34, getBaseClassId());
|
||||
|
||||
long totalOnlineTime = _onlineTime;
|
||||
if (_onlineBeginTime > 0)
|
||||
@@ -9657,8 +9665,32 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
if (_activeSoulShots.contains(itemId))
|
||||
{
|
||||
removeAutoSoulShot(itemId);
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0));
|
||||
final L2ItemInstance item = getInventory().getItemByItemId(itemId);
|
||||
|
||||
switch (item.getEtcItem().getDefaultAction())
|
||||
{
|
||||
case SOULSHOT:
|
||||
case FISHINGSHOT:
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0, 0));
|
||||
break;
|
||||
}
|
||||
case SPIRITSHOT:
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0, 1));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SOULSHOT:
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0, 2));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SPIRITSHOT:
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0, 3));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_AUTOMATIC_USE_OF_S1_HAS_BEEN_DEACTIVATED);
|
||||
sm.addItemName(itemId);
|
||||
@@ -9675,7 +9707,33 @@ public final class L2PcInstance extends L2Playable
|
||||
{
|
||||
for (int itemId : _activeSoulShots)
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0));
|
||||
final L2ItemInstance item = getInventory().getItemByItemId(itemId);
|
||||
|
||||
switch (item.getEtcItem().getDefaultAction())
|
||||
{
|
||||
case SOULSHOT:
|
||||
case FISHINGSHOT:
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0, 0));
|
||||
break;
|
||||
}
|
||||
case SPIRITSHOT:
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0, 1));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SOULSHOT:
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0, 2));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SPIRITSHOT:
|
||||
{
|
||||
sendPacket(new ExAutoSoulShot(itemId, 0, 3));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_AUTOMATIC_USE_OF_S1_HAS_BEEN_DEACTIVATED);
|
||||
sm.addItemName(itemId);
|
||||
sendPacket(sm);
|
||||
@@ -10573,12 +10631,27 @@ public final class L2PcInstance extends L2Playable
|
||||
return getSubClasses().size();
|
||||
}
|
||||
|
||||
public int getBaseClass()
|
||||
public int getInitialClassId()
|
||||
{
|
||||
return _initialClass;
|
||||
}
|
||||
|
||||
public ClassId getInitialClass()
|
||||
{
|
||||
return ClassId.getClassId(_initialClass);
|
||||
}
|
||||
|
||||
public int getBaseClassId()
|
||||
{
|
||||
return _baseClass;
|
||||
}
|
||||
|
||||
public int getActiveClass()
|
||||
public ClassId getBaseClass()
|
||||
{
|
||||
return ClassId.getClassId(_baseClass);
|
||||
}
|
||||
|
||||
public int getActiveClassId()
|
||||
{
|
||||
return _activeClass;
|
||||
}
|
||||
@@ -10663,7 +10736,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
if (classIndex == 0)
|
||||
{
|
||||
setClassTemplate(getBaseClass());
|
||||
setClassTemplate(getBaseClassId());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -14888,7 +14961,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public boolean isAwaken()
|
||||
{
|
||||
if (((getActiveClass() >= 139) && (getActiveClass() <= 181)) || (getActiveClass() >= 188))
|
||||
if (((getActiveClassId() >= 139) && (getActiveClassId() <= 181)) || (getActiveClassId() >= 188))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -15298,7 +15371,7 @@ public final class L2PcInstance extends L2Playable
|
||||
*/
|
||||
public int getVitalityPoints()
|
||||
{
|
||||
if (getClassId().getId() == getBaseClass())
|
||||
if (getClassId().getId() == getBaseClassId())
|
||||
{
|
||||
return _vitalityPoints;
|
||||
}
|
||||
@@ -15311,7 +15384,7 @@ public final class L2PcInstance extends L2Playable
|
||||
|
||||
public void setVitalityPoints(int points)
|
||||
{
|
||||
if (getClassId().getId() == getBaseClass())
|
||||
if (getClassId().getId() == getBaseClassId())
|
||||
{
|
||||
_vitalityPoints = points;
|
||||
return;
|
||||
|
||||
@@ -395,7 +395,7 @@ public class L2PetInstance extends L2Summon
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -443,7 +443,7 @@ public class L2PetInstance extends L2Summon
|
||||
{
|
||||
if (sendMessage)
|
||||
{
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -218,8 +218,6 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
}
|
||||
|
||||
/**
|
||||
* For characters below level 77 teleport service is free.<br>
|
||||
* From 8.00 pm to 00.00 from Monday till Tuesday for all characters there's a 50% discount on teleportation services
|
||||
* @param player
|
||||
* @param type
|
||||
* @param loc
|
||||
@@ -247,7 +245,7 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
|
||||
protected boolean shouldPayFee(L2PcInstance player, TeleportType type, TeleportLocation loc)
|
||||
{
|
||||
return (type != TeleportType.NORMAL) || (!Config.ALT_GAME_FREE_TELEPORT && ((player.getLevel() > 76) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0)));
|
||||
return (type != TeleportType.NORMAL) || (!Config.FREE_TELEPORTING && ((player.getLevel() > 76) || player.isSubClassActive()) && ((loc.getFeeId() != 0) && (loc.getFeeCount() > 0)));
|
||||
}
|
||||
|
||||
protected int parseNextInt(StringTokenizer st, int defaultVal)
|
||||
@@ -556,7 +554,7 @@ public final class L2TeleporterInstance extends L2Npc
|
||||
}
|
||||
}
|
||||
|
||||
if (Config.ALT_GAME_FREE_TELEPORT || player.destroyItemByItemId("Teleport " + (list.getIsForNoble() ? " nobless" : ""), list.getItemId(), price, this, true))
|
||||
if (Config.FREE_TELEPORTING || player.destroyItemByItemId("Teleport " + (list.getIsForNoble() ? " nobless" : ""), list.getItemId(), price, this, true))
|
||||
{
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import com.l2jserver.gameserver.enums.Race;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.interfaces.IIdentifiable;
|
||||
|
||||
/**
|
||||
@@ -377,7 +378,7 @@ public enum ClassId implements IIdentifiable
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the child level of this Class (0=root, 1=child leve 1...)
|
||||
* @return the level of this Class (0=initial, 4=awaken...)
|
||||
*/
|
||||
public final int level()
|
||||
{
|
||||
@@ -421,4 +422,64 @@ public enum ClassId implements IIdentifiable
|
||||
{
|
||||
_nextClassIds.add(cId);
|
||||
}
|
||||
|
||||
public static int getInitialClassId(L2PcInstance player)
|
||||
{
|
||||
switch (player.getBaseClass().getRace())
|
||||
{
|
||||
case HUMAN:
|
||||
{
|
||||
if (player.getClassId().isMage())
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
case ELF:
|
||||
{
|
||||
if (player.getClassId().isMage())
|
||||
{
|
||||
return 25;
|
||||
}
|
||||
return 18;
|
||||
}
|
||||
case DARK_ELF:
|
||||
{
|
||||
if (player.getClassId().isMage())
|
||||
{
|
||||
return 38;
|
||||
}
|
||||
return 31;
|
||||
}
|
||||
case ORC:
|
||||
{
|
||||
if (player.getClassId().isMage())
|
||||
{
|
||||
return 49;
|
||||
}
|
||||
return 44;
|
||||
}
|
||||
case DWARF:
|
||||
{
|
||||
return 53;
|
||||
}
|
||||
case KAMAEL:
|
||||
{
|
||||
if (player.getAppearance().getSex())
|
||||
{
|
||||
return 124;
|
||||
}
|
||||
return 123;
|
||||
}
|
||||
case ERTHEIA:
|
||||
{
|
||||
if (player.getClassId().isMage())
|
||||
{
|
||||
return 183;
|
||||
}
|
||||
return 182;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class PledgeApplicantInfo
|
||||
|
||||
public int getClassId()
|
||||
{
|
||||
if (isOnline() && (getPlayerInstance().getBaseClass() != _classId))
|
||||
if (isOnline() && (getPlayerInstance().getBaseClassId() != _classId))
|
||||
{
|
||||
_classId = getPlayerInstance().getClassId().getId();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class PledgeWaitingInfo
|
||||
|
||||
public int getPlayerClassId()
|
||||
{
|
||||
if (isOnline() && (getPlayerInstance().getBaseClass() != _playerClassId))
|
||||
if (isOnline() && (getPlayerInstance().getBaseClassId() != _playerClassId))
|
||||
{
|
||||
_playerClassId = getPlayerInstance().getClassId().getId();
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ public final class AuctionableHall extends ClanHall
|
||||
{
|
||||
ClanHallAuctionManager.getInstance().initNPC(getId());
|
||||
ClanHallManager.getInstance().setFree(getId());
|
||||
Clan.broadcastToOnlineMembers(SystemMessage.getSystemMessage(SystemMessageId.THE_CLAN_HALL_FEE_IS_ONE_WEEK_OVERDUE_THEREFORE_THE_CLAN_HALL_OWNERSHIP_HAS_BEEN_REVOKED));
|
||||
Clan.broadcastToOnlineMembers(SystemMessage.getSystemMessage(SystemMessageId.THE_CLAN_HALL_FEE_IS_ONE_WEEK_OVERDUE));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.holders;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class DailyMissionHolder
|
||||
{
|
||||
private final int _id;
|
||||
private final int _clientId;
|
||||
private final String _type;
|
||||
private final int _level;
|
||||
private final List<Integer> _classes;
|
||||
private final Map<Integer, Integer> _rewards;
|
||||
|
||||
public DailyMissionHolder(int id, int clientId, String type, int level, List<Integer> classes, Map<Integer, Integer> rewards)
|
||||
{
|
||||
_id = id;
|
||||
_clientId = clientId;
|
||||
_type = type;
|
||||
_level = level;
|
||||
_classes = classes;
|
||||
_rewards = rewards;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
*/
|
||||
public int getId()
|
||||
{
|
||||
return _id;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the clientId
|
||||
*/
|
||||
public int getClientId()
|
||||
{
|
||||
return _clientId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the type
|
||||
*/
|
||||
public String getType()
|
||||
{
|
||||
return _type;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the level
|
||||
*/
|
||||
public int getLevel()
|
||||
{
|
||||
return _level;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the classes
|
||||
*/
|
||||
public List<Integer> getAvailableClasses()
|
||||
{
|
||||
return _classes;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the rewards
|
||||
*/
|
||||
public Map<Integer, Integer> getRewards()
|
||||
{
|
||||
return _rewards;
|
||||
}
|
||||
}
|
||||
@@ -71,38 +71,113 @@ public abstract class Inventory extends ItemContainer
|
||||
public static final long MAX_ADENA = Config.MAX_ADENA;
|
||||
|
||||
public static final int PAPERDOLL_UNDER = 0;
|
||||
public static final int PAPERDOLL_HEAD = 1;
|
||||
public static final int PAPERDOLL_HAIR = 2;
|
||||
public static final int PAPERDOLL_HAIR2 = 3;
|
||||
public static final int PAPERDOLL_NECK = 4;
|
||||
public static final int PAPERDOLL_RHAND = 5;
|
||||
public static final int PAPERDOLL_CHEST = 6;
|
||||
public static final int PAPERDOLL_LHAND = 7;
|
||||
public static final int PAPERDOLL_REAR = 8;
|
||||
public static final int PAPERDOLL_LEAR = 9;
|
||||
public static final int PAPERDOLL_GLOVES = 10;
|
||||
public static final int PAPERDOLL_REAR = 1;
|
||||
public static final int PAPERDOLL_LEAR = 2;
|
||||
public static final int PAPERDOLL_NECK = 3;
|
||||
public static final int PAPERDOLL_RFINGER = 4;
|
||||
public static final int PAPERDOLL_LFINGER = 5;
|
||||
public static final int PAPERDOLL_HEAD = 6;
|
||||
public static final int PAPERDOLL_RHAND = 7;
|
||||
public static final int PAPERDOLL_LHAND = 8;
|
||||
public static final int PAPERDOLL_GLOVES = 9;
|
||||
public static final int PAPERDOLL_CHEST = 10;
|
||||
public static final int PAPERDOLL_LEGS = 11;
|
||||
public static final int PAPERDOLL_FEET = 12;
|
||||
public static final int PAPERDOLL_RFINGER = 13;
|
||||
public static final int PAPERDOLL_LFINGER = 14;
|
||||
public static final int PAPERDOLL_LBRACELET = 15;
|
||||
public static final int PAPERDOLL_RBRACELET = 16;
|
||||
public static final int PAPERDOLL_DECO1 = 17;
|
||||
public static final int PAPERDOLL_DECO2 = 18;
|
||||
public static final int PAPERDOLL_DECO3 = 19;
|
||||
public static final int PAPERDOLL_DECO4 = 20;
|
||||
public static final int PAPERDOLL_DECO5 = 21;
|
||||
public static final int PAPERDOLL_DECO6 = 22;
|
||||
public static final int PAPERDOLL_CLOAK = 23;
|
||||
public static final int PAPERDOLL_BELT = 24;
|
||||
public static final int PAPERDOLL_BROOCH = 25;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL1 = 26;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL2 = 27;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL3 = 28;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL4 = 29;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL5 = 30;
|
||||
public static final int PAPERDOLL_BROOCH_JEWEL6 = 31;
|
||||
public static final int PAPERDOLL_TOTALSLOTS = 32;
|
||||
public static final int PAPERDOLL_CLOAK = 13;
|
||||
public static final int PAPERDOLL_LRHAND = 14;
|
||||
public static final int PAPERDOLL_HAIR = 15;
|
||||
public static final int PAPERDOLL_DHAIR = 16;
|
||||
public static final int PAPERDOLL_RBRACELET = 17;
|
||||
public static final int PAPERDOLL_LBRACELET = 18;
|
||||
public static final int PAPERDOLL_TALISMAN1 = 19;
|
||||
public static final int PAPERDOLL_TALISMAN2 = 20;
|
||||
public static final int PAPERDOLL_TALISMAN3 = 21;
|
||||
public static final int PAPERDOLL_TALISMAN4 = 22;
|
||||
public static final int PAPERDOLL_TALISMAN5 = 23;
|
||||
public static final int PAPERDOLL_TALISMAN6 = 24;
|
||||
public static final int PAPERDOLL_BELT = 25;
|
||||
public static final int PAPERDOLL_BROOCH = 26;
|
||||
public static final int PAPERDOLL_BROOCH_STONE1 = 27;
|
||||
public static final int PAPERDOLL_BROOCH_STONE2 = 28;
|
||||
public static final int PAPERDOLL_BROOCH_STONE3 = 29;
|
||||
public static final int PAPERDOLL_BROOCH_STONE4 = 30;
|
||||
public static final int PAPERDOLL_BROOCH_STONE5 = 31;
|
||||
public static final int PAPERDOLL_BROOCH_STONE6 = 32;
|
||||
|
||||
public static final int PAPERDOLL_TOTALSLOTS = 33;
|
||||
|
||||
public static final int[] PAPERDOLL_ORDER = new int[]
|
||||
{
|
||||
Inventory.PAPERDOLL_UNDER,
|
||||
Inventory.PAPERDOLL_HEAD,
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
Inventory.PAPERDOLL_LHAND,
|
||||
Inventory.PAPERDOLL_GLOVES,
|
||||
Inventory.PAPERDOLL_CHEST,
|
||||
Inventory.PAPERDOLL_LEGS,
|
||||
Inventory.PAPERDOLL_FEET,
|
||||
Inventory.PAPERDOLL_CLOAK,
|
||||
Inventory.PAPERDOLL_LRHAND,
|
||||
Inventory.PAPERDOLL_HAIR,
|
||||
Inventory.PAPERDOLL_DHAIR
|
||||
};
|
||||
|
||||
public static final int[] PAPERDOLL_ORDER_ALL =
|
||||
{
|
||||
Inventory.PAPERDOLL_UNDER,
|
||||
Inventory.PAPERDOLL_REAR,
|
||||
Inventory.PAPERDOLL_LEAR,
|
||||
Inventory.PAPERDOLL_NECK,
|
||||
Inventory.PAPERDOLL_RFINGER,
|
||||
Inventory.PAPERDOLL_LFINGER,
|
||||
Inventory.PAPERDOLL_HEAD,
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
Inventory.PAPERDOLL_LHAND,
|
||||
Inventory.PAPERDOLL_GLOVES,
|
||||
Inventory.PAPERDOLL_CHEST,
|
||||
Inventory.PAPERDOLL_LEGS,
|
||||
Inventory.PAPERDOLL_FEET,
|
||||
Inventory.PAPERDOLL_CLOAK,
|
||||
Inventory.PAPERDOLL_LRHAND,
|
||||
Inventory.PAPERDOLL_HAIR,
|
||||
Inventory.PAPERDOLL_DHAIR,
|
||||
Inventory.PAPERDOLL_RBRACELET,
|
||||
Inventory.PAPERDOLL_LBRACELET,
|
||||
Inventory.PAPERDOLL_TALISMAN1,
|
||||
Inventory.PAPERDOLL_TALISMAN2,
|
||||
Inventory.PAPERDOLL_TALISMAN3,
|
||||
Inventory.PAPERDOLL_TALISMAN4,
|
||||
Inventory.PAPERDOLL_TALISMAN5,
|
||||
Inventory.PAPERDOLL_TALISMAN6,
|
||||
Inventory.PAPERDOLL_BELT,
|
||||
Inventory.PAPERDOLL_BROOCH,
|
||||
Inventory.PAPERDOLL_BROOCH_STONE1,
|
||||
Inventory.PAPERDOLL_BROOCH_STONE2,
|
||||
Inventory.PAPERDOLL_BROOCH_STONE3,
|
||||
Inventory.PAPERDOLL_BROOCH_STONE4,
|
||||
Inventory.PAPERDOLL_BROOCH_STONE5,
|
||||
Inventory.PAPERDOLL_BROOCH_STONE6
|
||||
};
|
||||
|
||||
public static final int[] PAPERDOLL_ORDER_AUGMENT = new int[]
|
||||
{
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
Inventory.PAPERDOLL_LHAND,
|
||||
Inventory.PAPERDOLL_LRHAND
|
||||
};
|
||||
|
||||
public static final int[] PAPERDOLL_ORDER_VISUAL_ID = new int[]
|
||||
{
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
Inventory.PAPERDOLL_LHAND,
|
||||
Inventory.PAPERDOLL_GLOVES,
|
||||
Inventory.PAPERDOLL_CHEST,
|
||||
Inventory.PAPERDOLL_LEGS,
|
||||
Inventory.PAPERDOLL_FEET,
|
||||
Inventory.PAPERDOLL_LRHAND,
|
||||
Inventory.PAPERDOLL_HAIR,
|
||||
Inventory.PAPERDOLL_DHAIR
|
||||
};
|
||||
|
||||
// Speed percentage mods
|
||||
public static final double MAX_ARMOR_WEIGHT = 12000;
|
||||
@@ -848,12 +923,12 @@ public abstract class Inventory extends ItemContainer
|
||||
{
|
||||
if (item.getItem().getBodyPart() == L2Item.SLOT_R_BRACELET)
|
||||
{
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_DECO1);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_DECO2);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_DECO3);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_DECO4);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_DECO5);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_DECO6);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_TALISMAN1);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_TALISMAN2);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_TALISMAN3);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_TALISMAN4);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_TALISMAN5);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_TALISMAN6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -878,12 +953,12 @@ public abstract class Inventory extends ItemContainer
|
||||
{
|
||||
if (item.getItem().getBodyPart() == L2Item.SLOT_BROOCH)
|
||||
{
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_JEWEL1);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_JEWEL2);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_JEWEL3);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_JEWEL4);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_JEWEL5);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_JEWEL6);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_STONE1);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_STONE2);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_STONE3);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_STONE4);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_STONE5);
|
||||
inventory.unEquipItemInSlot(PAPERDOLL_BROOCH_STONE6);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1092,19 +1167,19 @@ public abstract class Inventory extends ItemContainer
|
||||
case L2Item.SLOT_HAIRALL:
|
||||
return PAPERDOLL_HAIR;
|
||||
case L2Item.SLOT_HAIR2:
|
||||
return PAPERDOLL_HAIR2;
|
||||
return PAPERDOLL_DHAIR;
|
||||
case L2Item.SLOT_R_BRACELET:
|
||||
return PAPERDOLL_RBRACELET;
|
||||
case L2Item.SLOT_L_BRACELET:
|
||||
return PAPERDOLL_LBRACELET;
|
||||
case L2Item.SLOT_DECO:
|
||||
return PAPERDOLL_DECO1; // return first we deal with it later
|
||||
return PAPERDOLL_TALISMAN1; // return first we deal with it later
|
||||
case L2Item.SLOT_BELT:
|
||||
return PAPERDOLL_BELT;
|
||||
case L2Item.SLOT_BROOCH:
|
||||
return PAPERDOLL_BROOCH;
|
||||
case L2Item.SLOT_BROOCH_JEWEL:
|
||||
return PAPERDOLL_BROOCH_JEWEL1;
|
||||
return PAPERDOLL_BROOCH_STONE1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
@@ -1167,6 +1242,16 @@ public abstract class Inventory extends ItemContainer
|
||||
return ((item != null) && (item.getAugmentation() != null)) ? item.getAugmentation().getAugmentationId() : 0;
|
||||
}
|
||||
|
||||
public int getPaperdoll1stAugmentationId(int slot)
|
||||
{
|
||||
return 0x0000FFFF & getPaperdollAugmentationId(slot);
|
||||
}
|
||||
|
||||
public int getPaperdoll2ndAugmentationId(int slot)
|
||||
{
|
||||
return getPaperdollAugmentationId(slot) >> 16;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the objectID associated to the item in the paperdoll slot
|
||||
* @param slot : int pointing out the slot
|
||||
@@ -1303,7 +1388,7 @@ public abstract class Inventory extends ItemContainer
|
||||
case PAPERDOLL_HAIR:
|
||||
slot = L2Item.SLOT_HAIR;
|
||||
break;
|
||||
case PAPERDOLL_HAIR2:
|
||||
case PAPERDOLL_DHAIR:
|
||||
slot = L2Item.SLOT_HAIR2;
|
||||
break;
|
||||
case PAPERDOLL_HEAD:
|
||||
@@ -1336,12 +1421,12 @@ public abstract class Inventory extends ItemContainer
|
||||
case PAPERDOLL_RBRACELET:
|
||||
slot = L2Item.SLOT_R_BRACELET;
|
||||
break;
|
||||
case PAPERDOLL_DECO1:
|
||||
case PAPERDOLL_DECO2:
|
||||
case PAPERDOLL_DECO3:
|
||||
case PAPERDOLL_DECO4:
|
||||
case PAPERDOLL_DECO5:
|
||||
case PAPERDOLL_DECO6:
|
||||
case PAPERDOLL_TALISMAN1:
|
||||
case PAPERDOLL_TALISMAN2:
|
||||
case PAPERDOLL_TALISMAN3:
|
||||
case PAPERDOLL_TALISMAN4:
|
||||
case PAPERDOLL_TALISMAN5:
|
||||
case PAPERDOLL_TALISMAN6:
|
||||
slot = L2Item.SLOT_DECO;
|
||||
break;
|
||||
case PAPERDOLL_BELT:
|
||||
@@ -1350,12 +1435,12 @@ public abstract class Inventory extends ItemContainer
|
||||
case PAPERDOLL_BROOCH:
|
||||
slot = L2Item.SLOT_BROOCH;
|
||||
break;
|
||||
case PAPERDOLL_BROOCH_JEWEL1:
|
||||
case PAPERDOLL_BROOCH_JEWEL2:
|
||||
case PAPERDOLL_BROOCH_JEWEL3:
|
||||
case PAPERDOLL_BROOCH_JEWEL4:
|
||||
case PAPERDOLL_BROOCH_JEWEL5:
|
||||
case PAPERDOLL_BROOCH_JEWEL6:
|
||||
case PAPERDOLL_BROOCH_STONE1:
|
||||
case PAPERDOLL_BROOCH_STONE2:
|
||||
case PAPERDOLL_BROOCH_STONE3:
|
||||
case PAPERDOLL_BROOCH_STONE4:
|
||||
case PAPERDOLL_BROOCH_STONE5:
|
||||
case PAPERDOLL_BROOCH_STONE6:
|
||||
slot = L2Item.SLOT_BROOCH_JEWEL;
|
||||
break;
|
||||
}
|
||||
@@ -1453,7 +1538,7 @@ public abstract class Inventory extends ItemContainer
|
||||
pdollSlot = PAPERDOLL_HAIR;
|
||||
break;
|
||||
case L2Item.SLOT_HAIR2:
|
||||
pdollSlot = PAPERDOLL_HAIR2;
|
||||
pdollSlot = PAPERDOLL_DHAIR;
|
||||
break;
|
||||
case L2Item.SLOT_HAIRALL:
|
||||
setPaperdollItem(PAPERDOLL_HAIR, null);
|
||||
@@ -1496,7 +1581,7 @@ public abstract class Inventory extends ItemContainer
|
||||
pdollSlot = PAPERDOLL_RBRACELET;
|
||||
break;
|
||||
case L2Item.SLOT_DECO:
|
||||
pdollSlot = PAPERDOLL_DECO1;
|
||||
pdollSlot = PAPERDOLL_TALISMAN1;
|
||||
break;
|
||||
case L2Item.SLOT_BELT:
|
||||
pdollSlot = PAPERDOLL_BELT;
|
||||
@@ -1505,7 +1590,7 @@ public abstract class Inventory extends ItemContainer
|
||||
pdollSlot = PAPERDOLL_BROOCH;
|
||||
break;
|
||||
case L2Item.SLOT_BROOCH_JEWEL:
|
||||
pdollSlot = PAPERDOLL_BROOCH_JEWEL1;
|
||||
pdollSlot = PAPERDOLL_BROOCH_STONE1;
|
||||
break;
|
||||
default:
|
||||
_log.info("Unhandled slot type: " + slot);
|
||||
@@ -1684,7 +1769,7 @@ public abstract class Inventory extends ItemContainer
|
||||
L2ItemInstance hair = getPaperdollItem(PAPERDOLL_HAIR);
|
||||
if ((hair != null) && (hair.getItem().getBodyPart() == L2Item.SLOT_HAIRALL))
|
||||
{
|
||||
setPaperdollItem(PAPERDOLL_HAIR2, null);
|
||||
setPaperdollItem(PAPERDOLL_DHAIR, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1701,13 +1786,13 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
else
|
||||
{
|
||||
setPaperdollItem(PAPERDOLL_HAIR2, null);
|
||||
setPaperdollItem(PAPERDOLL_DHAIR, null);
|
||||
}
|
||||
|
||||
setPaperdollItem(PAPERDOLL_HAIR2, item);
|
||||
setPaperdollItem(PAPERDOLL_DHAIR, item);
|
||||
break;
|
||||
case L2Item.SLOT_HAIRALL:
|
||||
setPaperdollItem(PAPERDOLL_HAIR2, null);
|
||||
setPaperdollItem(PAPERDOLL_DHAIR, null);
|
||||
setPaperdollItem(PAPERDOLL_HAIR, item);
|
||||
break;
|
||||
case L2Item.SLOT_UNDERWEAR:
|
||||
@@ -1893,7 +1978,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
// find same (or incompatible) talisman type
|
||||
for (int i = PAPERDOLL_DECO1; i < (PAPERDOLL_DECO1 + getTalismanSlots()); i++)
|
||||
for (int i = PAPERDOLL_TALISMAN1; i < (PAPERDOLL_TALISMAN1 + getTalismanSlots()); i++)
|
||||
{
|
||||
if (_paperdoll[i] != null)
|
||||
{
|
||||
@@ -1907,7 +1992,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
// no free slot found - put on first free
|
||||
for (int i = PAPERDOLL_DECO1; i < (PAPERDOLL_DECO1 + getTalismanSlots()); i++)
|
||||
for (int i = PAPERDOLL_TALISMAN1; i < (PAPERDOLL_TALISMAN1 + getTalismanSlots()); i++)
|
||||
{
|
||||
if (_paperdoll[i] == null)
|
||||
{
|
||||
@@ -1917,7 +2002,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
// no free slots - put on first
|
||||
setPaperdollItem(PAPERDOLL_DECO1, item);
|
||||
setPaperdollItem(PAPERDOLL_TALISMAN1, item);
|
||||
}
|
||||
|
||||
public int getBroochJewelSlots()
|
||||
@@ -1933,7 +2018,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
// find same (or incompatible) brooch jewel type
|
||||
for (int i = PAPERDOLL_BROOCH_JEWEL1; i < (PAPERDOLL_BROOCH_JEWEL1 + getBroochJewelSlots()); i++)
|
||||
for (int i = PAPERDOLL_BROOCH_STONE1; i < (PAPERDOLL_BROOCH_STONE1 + getBroochJewelSlots()); i++)
|
||||
{
|
||||
if (_paperdoll[i] != null)
|
||||
{
|
||||
@@ -1947,7 +2032,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
// no free slot found - put on first free
|
||||
for (int i = PAPERDOLL_BROOCH_JEWEL1; i < (PAPERDOLL_BROOCH_JEWEL1 + getBroochJewelSlots()); i++)
|
||||
for (int i = PAPERDOLL_BROOCH_STONE1; i < (PAPERDOLL_BROOCH_STONE1 + getBroochJewelSlots()); i++)
|
||||
{
|
||||
if (_paperdoll[i] == null)
|
||||
{
|
||||
@@ -1957,7 +2042,7 @@ public abstract class Inventory extends ItemContainer
|
||||
}
|
||||
|
||||
// no free slots - put on first
|
||||
setPaperdollItem(PAPERDOLL_BROOCH_JEWEL1, item);
|
||||
setPaperdollItem(PAPERDOLL_BROOCH_STONE1, item);
|
||||
}
|
||||
|
||||
public boolean canEquipCloak()
|
||||
|
||||
@@ -879,7 +879,7 @@ public class PcInventory extends Inventory
|
||||
|
||||
public static int[][] restoreVisibleInventory(int objectId)
|
||||
{
|
||||
int[][] paperdoll = new int[33][4];
|
||||
int[][] paperdoll = new int[Inventory.PAPERDOLL_TOTALSLOTS][4];
|
||||
try (Connection con = ConnectionFactory.getInstance().getConnection();
|
||||
PreparedStatement ps = con.prepareStatement("SELECT object_id,item_id,loc_data,enchant_level FROM items WHERE owner_id=? AND loc='PAPERDOLL'"))
|
||||
{
|
||||
|
||||
@@ -114,18 +114,18 @@ public abstract class AbstractOlympiadGame
|
||||
{
|
||||
if ((player == null) || !player.isOnline())
|
||||
{
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_MADE_HASTE_WITH_THEIR_TAIL_BETWEEN_THEIR_LEGS_THE_MATCH_HAS_BEEN_CANCELLED);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_MADE_HASTE_WITH_THEIR_TAIL_BETWEEN_THEIR_LEGS);
|
||||
}
|
||||
|
||||
if ((player.getClient() == null) || player.getClient().isDetached())
|
||||
{
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_MADE_HASTE_WITH_THEIR_TAIL_BETWEEN_THEIR_LEGS_THE_MATCH_HAS_BEEN_CANCELLED);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_MADE_HASTE_WITH_THEIR_TAIL_BETWEEN_THEIR_LEGS);
|
||||
}
|
||||
|
||||
// safety precautions
|
||||
if (player.inObserverMode() || TvTEvent.isPlayerParticipant(player.getObjectId()))
|
||||
{
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE_THE_MATCH_HAS_BEEN_CANCELLED);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE);
|
||||
}
|
||||
|
||||
SystemMessage sm;
|
||||
@@ -134,14 +134,14 @@ public abstract class AbstractOlympiadGame
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.C1_IS_CURRENTLY_DEAD_AND_CANNOT_PARTICIPATE_IN_THE_OLYMPIAD);
|
||||
sm.addPcName(player);
|
||||
player.sendPacket(sm);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE_THE_MATCH_HAS_BEEN_CANCELLED);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE);
|
||||
}
|
||||
if (player.isSubClassActive())
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.C1_DOES_NOT_MEET_THE_PARTICIPATION_REQUIREMENTS_YOU_CANNOT_PARTICIPATE_IN_THE_OLYMPIAD_BECAUSE_YOU_HAVE_CHANGED_YOUR_CLASS_TO_SUBCLASS);
|
||||
sm.addPcName(player);
|
||||
player.sendPacket(sm);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE_THE_MATCH_HAS_BEEN_CANCELLED);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE);
|
||||
}
|
||||
if (player.isCursedWeaponEquipped())
|
||||
{
|
||||
@@ -149,14 +149,14 @@ public abstract class AbstractOlympiadGame
|
||||
sm.addPcName(player);
|
||||
sm.addItemName(player.getCursedWeaponEquippedId());
|
||||
player.sendPacket(sm);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE_THE_MATCH_HAS_BEEN_CANCELLED);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE);
|
||||
}
|
||||
if (!player.isInventoryUnder90(true))
|
||||
{
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.C1_DOES_NOT_MEET_THE_PARTICIPATION_REQUIREMENTS_AS_THE_INVENTORY_WEIGHT_SLOT_IS_FILLED_BEYOND_80);
|
||||
sm.addPcName(player);
|
||||
player.sendPacket(sm);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE_THE_MATCH_HAS_BEEN_CANCELLED);
|
||||
return SystemMessage.getSystemMessage(SystemMessageId.YOUR_OPPONENT_DOES_NOT_MEET_THE_REQUIREMENTS_TO_DO_BATTLE);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -520,7 +520,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
||||
}
|
||||
else if (_pOneCrash && _pTwoCrash)
|
||||
{
|
||||
stadium.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR_THE_MATCH_ENDS_IN_A_TIE));
|
||||
stadium.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR));
|
||||
|
||||
_playerOne.updateStat(COMP_LOST, 1);
|
||||
removePointsFromParticipant(_playerOne, pointDiff);
|
||||
@@ -614,7 +614,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
||||
{
|
||||
_playerOne.updateStat(COMP_DRAWN, 1);
|
||||
_playerTwo.updateStat(COMP_DRAWN, 1);
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR_THE_MATCH_ENDS_IN_A_TIE);
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR);
|
||||
stadium.broadcastPacket(sm);
|
||||
}
|
||||
else if ((_playerTwo.getPlayer() == null) || !_playerTwo.getPlayer().isOnline() || ((playerTwoHp == 0) && (playerOneHp != 0)) || ((_damageP1 > _damageP2) && (playerTwoHp != 0) && (playerOneHp != 0)))
|
||||
@@ -672,7 +672,7 @@ public abstract class OlympiadGameNormal extends AbstractOlympiadGame
|
||||
// Save Fight Result
|
||||
saveResults(_playerOne, _playerTwo, 0, _startTime, _fightTime, getType());
|
||||
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR_THE_MATCH_ENDS_IN_A_TIE);
|
||||
sm = SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR);
|
||||
stadium.broadcastPacket(sm);
|
||||
|
||||
int value = Math.min(playerOnePoints / getDivider(), Config.ALT_OLY_MAX_POINTS);
|
||||
|
||||
@@ -784,7 +784,7 @@ public class OlympiadGameTeams extends AbstractOlympiadGame
|
||||
}
|
||||
else if (tOneCrash && tTwoCrash)
|
||||
{
|
||||
stadium.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR_THE_MATCH_ENDS_IN_A_TIE));
|
||||
stadium.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR));
|
||||
|
||||
for (int i = _teamOneSize; --i >= 0;)
|
||||
{
|
||||
@@ -936,7 +936,7 @@ public class OlympiadGameTeams extends AbstractOlympiadGame
|
||||
}
|
||||
else
|
||||
{
|
||||
stadium.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR_THE_MATCH_ENDS_IN_A_TIE));
|
||||
stadium.broadcastPacket(SystemMessage.getSystemMessage(SystemMessageId.THERE_IS_NO_VICTOR));
|
||||
|
||||
for (int i = 0; i < _teamOneSize; i++)
|
||||
{
|
||||
|
||||
@@ -141,7 +141,7 @@ public class OlympiadManager
|
||||
return true;
|
||||
}
|
||||
|
||||
final List<Integer> classed = _classBasedRegisters.get(noble.getBaseClass());
|
||||
final List<Integer> classed = _classBasedRegisters.get(noble.getBaseClassId());
|
||||
if ((classed != null) && classed.contains(objId))
|
||||
{
|
||||
if (showMessage)
|
||||
@@ -250,7 +250,7 @@ public class OlympiadManager
|
||||
return false;
|
||||
}
|
||||
|
||||
List<Integer> classed = _classBasedRegisters.get(player.getBaseClass());
|
||||
List<Integer> classed = _classBasedRegisters.get(player.getBaseClassId());
|
||||
if (classed != null)
|
||||
{
|
||||
classed.add(charId);
|
||||
@@ -259,7 +259,7 @@ public class OlympiadManager
|
||||
{
|
||||
classed = new CopyOnWriteArrayList<>();
|
||||
classed.add(charId);
|
||||
_classBasedRegisters.put(player.getBaseClass(), classed);
|
||||
_classBasedRegisters.put(player.getBaseClassId(), classed);
|
||||
}
|
||||
|
||||
player.sendPacket(SystemMessageId.YOU_HAVE_BEEN_REGISTERED_FOR_THE_OLYMPIAD_WAITING_LIST_FOR_A_CLASS_BATTLE);
|
||||
@@ -388,10 +388,10 @@ public class OlympiadManager
|
||||
return true;
|
||||
}
|
||||
|
||||
final List<Integer> classed = _classBasedRegisters.get(noble.getBaseClass());
|
||||
final List<Integer> classed = _classBasedRegisters.get(noble.getBaseClassId());
|
||||
if ((classed != null) && classed.remove(objId))
|
||||
{
|
||||
_classBasedRegisters.put(noble.getBaseClass(), classed);
|
||||
_classBasedRegisters.put(noble.getBaseClassId(), classed);
|
||||
|
||||
if (Config.L2JMOD_DUALBOX_CHECK_MAX_OLYMPIAD_PARTICIPANTS_PER_IP > 0)
|
||||
{
|
||||
@@ -428,7 +428,7 @@ public class OlympiadManager
|
||||
return;
|
||||
}
|
||||
|
||||
final List<Integer> classed = _classBasedRegisters.get(player.getBaseClass());
|
||||
final List<Integer> classed = _classBasedRegisters.get(player.getBaseClassId());
|
||||
if ((classed != null) && classed.remove(objId))
|
||||
{
|
||||
return;
|
||||
@@ -508,7 +508,7 @@ public class OlympiadManager
|
||||
if (statDat == null)
|
||||
{
|
||||
statDat = new StatsSet();
|
||||
statDat.set(Olympiad.CLASS_ID, noble.getBaseClass());
|
||||
statDat.set(Olympiad.CLASS_ID, noble.getBaseClassId());
|
||||
statDat.set(Olympiad.CHAR_NAME, noble.getName());
|
||||
statDat.set(Olympiad.POINTS, Olympiad.DEFAULT_POINTS);
|
||||
statDat.set(Olympiad.COMP_DONE, 0);
|
||||
|
||||
@@ -44,7 +44,7 @@ public final class Participant
|
||||
player = plr;
|
||||
name = plr.getName();
|
||||
side = olympiadSide;
|
||||
baseClass = plr.getBaseClass();
|
||||
baseClass = plr.getBaseClassId();
|
||||
stats = Olympiad.getNobleStats(getObjectId());
|
||||
clanName = plr.getClan() != null ? plr.getClan().getName() : "";
|
||||
clanId = plr.getClanId();
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.model.skills;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
|
||||
public class BlowSuccess
|
||||
{
|
||||
private static Map<String, Boolean> _success = new HashMap<>();
|
||||
|
||||
public static BlowSuccess getInstance()
|
||||
{
|
||||
return SingletonHolder._instance;
|
||||
}
|
||||
|
||||
private static class SingletonHolder
|
||||
{
|
||||
protected static final BlowSuccess _instance = new BlowSuccess();
|
||||
}
|
||||
|
||||
public void remove(L2Character l2Character, Skill skill)
|
||||
{
|
||||
_success.remove(makeKey(l2Character, skill));
|
||||
}
|
||||
|
||||
public boolean get(L2Character l2Character, Skill skill)
|
||||
{
|
||||
return _success.get(makeKey(l2Character, skill));
|
||||
}
|
||||
|
||||
public void set(L2Character l2Character, Skill skill, boolean success)
|
||||
{
|
||||
_success.put(makeKey(l2Character, skill), success);
|
||||
}
|
||||
|
||||
private String makeKey(L2Character l2Character, Skill skill)
|
||||
{
|
||||
return "" + l2Character.getObjectId() + ":" + skill.getId();
|
||||
}
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@ public final class Skill implements IIdentifiable
|
||||
{
|
||||
if (effect.isInstant())
|
||||
{
|
||||
if (applyInstantEffects && effect.calcSuccess(info))
|
||||
if (applyInstantEffects && (getBlowChance() > 0 ? BlowSuccess.getInstance().get(info.getEffector(), info.getSkill()) : effect.calcSuccess(info)))
|
||||
{
|
||||
effect.onStart(info);
|
||||
}
|
||||
|
||||
@@ -71,6 +71,11 @@ public class L2JumpZone extends L2ZoneType
|
||||
@Override
|
||||
protected void onEnter(L2Character character)
|
||||
{
|
||||
if (!isInsideZone(character))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (character.isPlayer())
|
||||
{
|
||||
character.setInsideZone(ZoneId.JUMP, true);
|
||||
|
||||
@@ -53,6 +53,9 @@ import com.l2jserver.gameserver.network.clientpackets.compound.RequestNewEnchant
|
||||
import com.l2jserver.gameserver.network.clientpackets.compound.RequestNewEnchantTry;
|
||||
import com.l2jserver.gameserver.network.clientpackets.crystalization.RequestCrystallizeEstimate;
|
||||
import com.l2jserver.gameserver.network.clientpackets.crystalization.RequestCrystallizeItemCancel;
|
||||
import com.l2jserver.gameserver.network.clientpackets.dailymission.RequestOneDayRewardReceive;
|
||||
import com.l2jserver.gameserver.network.clientpackets.dailymission.RequestTodoList;
|
||||
import com.l2jserver.gameserver.network.clientpackets.dailymission.RequestTodoListHTML;
|
||||
import com.l2jserver.gameserver.network.clientpackets.friend.RequestAnswerFriendInvite;
|
||||
import com.l2jserver.gameserver.network.clientpackets.friend.RequestFriendDel;
|
||||
import com.l2jserver.gameserver.network.clientpackets.friend.RequestFriendDetailInfo;
|
||||
@@ -467,6 +470,9 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
|
||||
case 0x67:
|
||||
msg = new RequestPledgeCrest();
|
||||
break;
|
||||
case 0x6a:
|
||||
// New Request Friend List
|
||||
break;
|
||||
case 0x6b: // RequestSendL2FriendSay
|
||||
msg = new RequestSendFriendMsg();
|
||||
break;
|
||||
@@ -937,7 +943,7 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
|
||||
msg = new RequestExEnchantItemAttribute();
|
||||
break;
|
||||
case 0x33:
|
||||
msg = new RequestGotoLobby();
|
||||
// already in AUTHED
|
||||
break;
|
||||
case 0x35:
|
||||
msg = new MoveToLocationAirShip();
|
||||
@@ -986,7 +992,7 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
|
||||
msg = new RequestExEnchantSkillInfoDetail();
|
||||
break;
|
||||
case 0x44:
|
||||
msg = new RequestExMagicSkillUseGround();
|
||||
// already in 0x41
|
||||
break;
|
||||
case 0x45:
|
||||
msg = new RequestFortressMapInfo();
|
||||
@@ -1665,6 +1671,57 @@ public final class L2GamePacketHandler implements IPacketHandler<L2GameClient>,
|
||||
case 0x104:
|
||||
msg = new RequestExAutoFish();
|
||||
break;
|
||||
case 0x105:
|
||||
// msg = new RequestVipAttendanceItemList();
|
||||
break;
|
||||
case 0x106:
|
||||
// msg = new RequestVipAttendanceCheck();
|
||||
break;
|
||||
case 0x107:
|
||||
// msg = new RequestItemEnsoul();
|
||||
break;
|
||||
case 0x108:
|
||||
// msg = new RequestVipProductList();
|
||||
break;
|
||||
case 0x109:
|
||||
// msg = new RequestVipLuckyGameInfo();
|
||||
break;
|
||||
case 0x10A:
|
||||
// msg = new RequestVipLuckyGameItemList();
|
||||
break;
|
||||
case 0x10B:
|
||||
// msg = new RequestVipLuckyGameBonus();
|
||||
break;
|
||||
case 0x10C:
|
||||
// msg = new ExRequestVipInfo();
|
||||
break;
|
||||
case 0x10D:
|
||||
// msg = new RequestCaptchaAnswer();
|
||||
break;
|
||||
case 0x10E:
|
||||
// msg = new RequestRefreshCaptchaImage();
|
||||
break;
|
||||
case 0x10F:
|
||||
msg = new RequestTodoList();
|
||||
break;
|
||||
case 0x110:
|
||||
msg = new RequestTodoListHTML();
|
||||
break;
|
||||
case 0x111:
|
||||
msg = new RequestOneDayRewardReceive();
|
||||
break;
|
||||
case 0x112:
|
||||
// msg = new RequestPledgeBonusOpen();
|
||||
break;
|
||||
case 0x113:
|
||||
// msg = new RequestPledgeBonusRewardList();
|
||||
break;
|
||||
case 0x114:
|
||||
// msg = new RequestPledgeBonusReward();
|
||||
break;
|
||||
case 0x115:
|
||||
// msg = new RequestSSOAuthnToken();
|
||||
break;
|
||||
default:
|
||||
printDebugDoubleOpcode(opcode, id2, buf, state, client);
|
||||
break;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -87,7 +87,7 @@ public final class CharacterDelete extends L2GameClientPacket
|
||||
_log.log(Level.SEVERE, "Error:", e);
|
||||
}
|
||||
|
||||
CharSelectionInfo cl = new CharSelectionInfo(getClient().getAccountName(), getClient().getSessionId().playOkID1, 0);
|
||||
CharSelectionInfo cl = new CharSelectionInfo(getClient().getAccountName(), getClient().getSessionId().playOkID1);
|
||||
sendPacket(cl);
|
||||
getClient().setCharSelection(cl.getCharInfo());
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public final class CharacterRestore extends L2GameClientPacket
|
||||
}
|
||||
|
||||
getClient().markRestoredChar(_charSlot);
|
||||
CharSelectionInfo cl = new CharSelectionInfo(getClient().getAccountName(), getClient().getSessionId().playOkID1, 0);
|
||||
CharSelectionInfo cl = new CharSelectionInfo(getClient().getAccountName(), getClient().getSessionId().playOkID1);
|
||||
sendPacket(cl);
|
||||
getClient().setCharSelection(cl.getCharInfo());
|
||||
final CharSelectInfoPackage charInfo = getClient().getCharSelection(_charSlot);
|
||||
|
||||
@@ -70,6 +70,7 @@ import com.l2jserver.gameserver.network.serverpackets.Die;
|
||||
import com.l2jserver.gameserver.network.serverpackets.EtcStatusUpdate;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAcquireAPSkillList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAdenaInvenCount;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExAutoSoulShot;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBasicActionList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExBeautyItemList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.ExCastleState;
|
||||
@@ -103,16 +104,11 @@ import com.l2jserver.gameserver.network.serverpackets.ShortCutInit;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SkillCoolTime;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SkillList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
import com.l2jserver.gameserver.network.serverpackets.dailymission.ExConnectedTimeAndGetTableReward;
|
||||
import com.l2jserver.gameserver.network.serverpackets.friend.L2FriendList;
|
||||
|
||||
/**
|
||||
* Enter World Packet Handler
|
||||
* <p>
|
||||
* <p>
|
||||
* 0000: 03
|
||||
* <p>
|
||||
* packet format rev87 bddddbdcccccccccccccccccccc
|
||||
* <p>
|
||||
*/
|
||||
public class EnterWorld extends L2GameClientPacket
|
||||
{
|
||||
@@ -660,6 +656,15 @@ public class EnterWorld extends L2GameClientPacket
|
||||
activeChar.sendPacket(new ExAcquireAPSkillList(activeChar));
|
||||
activeChar.sendPacket(new ExWorldChatCnt(activeChar));
|
||||
|
||||
// Underground auto shots system.
|
||||
activeChar.sendPacket(new ExAutoSoulShot(0, 0, 0));
|
||||
activeChar.sendPacket(new ExAutoSoulShot(0, 0, 1));
|
||||
activeChar.sendPacket(new ExAutoSoulShot(0, 0, 2));
|
||||
activeChar.sendPacket(new ExAutoSoulShot(0, 0, 3));
|
||||
|
||||
// Underground daily rewards system.
|
||||
activeChar.sendPacket(ExConnectedTimeAndGetTableReward.STATIC_PACKET);
|
||||
|
||||
// Unstuck players that had client open when server crashed.
|
||||
activeChar.sendPacket(ActionFailed.STATIC_PACKET);
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ public final class RequestAcquireSkill extends L2GameClientPacket
|
||||
return;
|
||||
}
|
||||
|
||||
if ((_level < 1) || (_level > 1000) || (_id < 1) || (_id > 32000))
|
||||
if ((_level < 1) || (_level > 10000) || (_id < 1) || (_id > 32000))
|
||||
{
|
||||
Util.handleIllegalPlayerAction(activeChar, "Wrong Packet Data in Aquired Skill", Config.DEFAULT_PUNISH);
|
||||
_log.warning("Recived Wrong Packet Data in Aquired Skill - id: " + _id + " level: " + _level + " for " + activeChar);
|
||||
|
||||
@@ -1186,7 +1186,7 @@ public final class RequestActionUse extends L2GameClientPacket
|
||||
}
|
||||
if (activeChar.isFishing())
|
||||
{
|
||||
sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING3);
|
||||
sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1241,7 +1241,7 @@ public final class RequestActionUse extends L2GameClientPacket
|
||||
|
||||
if (requester.isFishing())
|
||||
{
|
||||
sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING3);
|
||||
sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public final class RequestAnswerJoinParty extends L2GameClientPacket
|
||||
{
|
||||
if (requestor.isInParty())
|
||||
{
|
||||
if (requestor.getParty().getMemberCount() >= 9)
|
||||
if (requestor.getParty().getMemberCount() >= 7)
|
||||
{
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_PARTY_IS_FULL);
|
||||
player.sendPacket(sm);
|
||||
|
||||
@@ -114,7 +114,7 @@ public final class RequestAutoSoulShot extends L2GameClientPacket
|
||||
|
||||
// Activate shots
|
||||
activeChar.addAutoSoulShot(_itemId);
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, _type));
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, 1, isSoulshot ? 2 : 3));
|
||||
|
||||
// Send message
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_AUTOMATIC_USE_OF_S1_HAS_BEEN_ACTIVATED);
|
||||
@@ -149,7 +149,7 @@ public final class RequestAutoSoulShot extends L2GameClientPacket
|
||||
|
||||
// Activate shots
|
||||
activeChar.addAutoSoulShot(_itemId);
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, _type));
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, 1, isSoulshot ? 0 : 1));
|
||||
|
||||
// Send message
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_AUTOMATIC_USE_OF_S1_HAS_BEEN_ACTIVATED);
|
||||
@@ -164,7 +164,30 @@ public final class RequestAutoSoulShot extends L2GameClientPacket
|
||||
{
|
||||
// Cancel auto shots
|
||||
activeChar.removeAutoSoulShot(_itemId);
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, _type));
|
||||
switch (item.getEtcItem().getDefaultAction())
|
||||
{
|
||||
case SOULSHOT:
|
||||
case FISHINGSHOT:
|
||||
{
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, 0, 0));
|
||||
break;
|
||||
}
|
||||
case SPIRITSHOT:
|
||||
{
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, 0, 1));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SOULSHOT:
|
||||
{
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, 0, 2));
|
||||
break;
|
||||
}
|
||||
case SUMMON_SPIRITSHOT:
|
||||
{
|
||||
activeChar.sendPacket(new ExAutoSoulShot(_itemId, 0, 3));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Send message
|
||||
final SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.THE_AUTOMATIC_USE_OF_S1_HAS_BEEN_DEACTIVATED);
|
||||
|
||||
+9
@@ -120,6 +120,15 @@ public final class RequestConfirmCancelItem extends L2GameClientPacket
|
||||
case S84:
|
||||
price = 920000;
|
||||
break;
|
||||
case R:
|
||||
price = 1840000;
|
||||
break;
|
||||
case R95:
|
||||
price = 3680000;
|
||||
break;
|
||||
case R99:
|
||||
price = 7360000;
|
||||
break;
|
||||
// TODO: S84 TOP price 3.2M
|
||||
// any other item type is not augmentable
|
||||
default:
|
||||
|
||||
@@ -35,13 +35,22 @@ public class RequestDispel extends L2GameClientPacket
|
||||
private int _objectId;
|
||||
private int _skillId;
|
||||
private int _skillLevel;
|
||||
private int _fullLevel;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_objectId = readD();
|
||||
_skillId = readD();
|
||||
_skillLevel = readD();
|
||||
_fullLevel = readD();
|
||||
if (_fullLevel < 100)
|
||||
{
|
||||
_skillLevel = _fullLevel;
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillLevel = _fullLevel >> 16;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -129,7 +129,7 @@ public final class RequestDropItem extends L2GameClientPacket
|
||||
if (activeChar.isFishing())
|
||||
{
|
||||
// You can't mount, dismount, break and drop items while fishing
|
||||
activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING2);
|
||||
activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING);
|
||||
return;
|
||||
}
|
||||
if (activeChar.isFlying())
|
||||
|
||||
@@ -143,7 +143,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
// attempting to destroy scroll
|
||||
if (activeChar.getInventory().destroyItem("Enchant", scroll.getObjectId(), 1, activeChar, item) == null)
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
activeChar.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant with a scroll he doesn't have", Config.DEFAULT_PUNISH);
|
||||
activeChar.removeRequest(request.getClass());
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
@@ -155,7 +155,7 @@ public final class RequestEnchantItem extends L2GameClientPacket
|
||||
{
|
||||
if (activeChar.getInventory().destroyItem("Enchant", support.getObjectId(), 1, activeChar, item) == null)
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT2);
|
||||
activeChar.sendPacket(SystemMessageId.INCORRECT_ITEM_COUNT);
|
||||
Util.handleIllegalPlayerAction(activeChar, "Player " + activeChar.getName() + " tried to enchant with a support item he doesn't have", Config.DEFAULT_PUNISH);
|
||||
activeChar.removeRequest(request.getClass());
|
||||
activeChar.sendPacket(new EnchantResult(EnchantResult.ERROR, 0, 0));
|
||||
|
||||
+84
-112
@@ -52,13 +52,22 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
|
||||
private int _skillId;
|
||||
private int _skillLvl;
|
||||
private int _fullLvl;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_type = readD();
|
||||
_skillId = readD();
|
||||
_skillLvl = readD();
|
||||
_fullLvl = readD();
|
||||
if (_fullLvl < 100)
|
||||
{
|
||||
_skillLvl = _fullLvl;
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillLvl = _fullLvl >> 16;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -104,6 +113,7 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
{
|
||||
return;
|
||||
}
|
||||
final int _elvl = ((_skillLvl % 100) - 1) / 10;
|
||||
if (_type == 0) // enchant
|
||||
{
|
||||
final EnchantSkillHolder esd = s.getEnchantSkillHolder(_skillLvl);
|
||||
@@ -117,8 +127,7 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
final int requiredSp = esd.getSpCost() * costMultiplier;
|
||||
if (player.getSp() >= requiredSp)
|
||||
{
|
||||
// only first lvl requires book
|
||||
final boolean usesBook = (_skillLvl % 100) == 1; // 101, 201, 301 ...
|
||||
final boolean usesBook = true;
|
||||
final int reqItemId;
|
||||
if (player.getClassId().level() == 3)
|
||||
{
|
||||
@@ -126,7 +135,18 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK;
|
||||
if (_elvl == 0)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_V3;
|
||||
}
|
||||
}
|
||||
final L2ItemInstance spb = player.getInventory().getItemByItemId(reqItemId);
|
||||
|
||||
@@ -188,7 +208,15 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
player.addSkill(SkillData.getInstance().getSkill(_skillId, s.getBaseLevel()), true);
|
||||
if (player.getClassId().level() == 3)
|
||||
{
|
||||
player.addSkill(SkillData.getInstance().getSkill(_skillId, s.getBaseLevel()), true);
|
||||
}
|
||||
else
|
||||
{
|
||||
final int _clvl = ((((_skillLvl % 100) - 1) / 10) * 10) + ((_skillLvl / 1000) * 1000);
|
||||
player.addSkill(SkillData.getInstance().getSkill(_skillId, _clvl), true);
|
||||
}
|
||||
player.sendPacket(SystemMessageId.SKILL_ENCHANT_FAILED_THE_SKILL_WILL_BE_INITIALIZED);
|
||||
player.sendPacket(ExEnchantSkillResult.valueOf(false));
|
||||
|
||||
@@ -229,7 +257,18 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK;
|
||||
if (_elvl == 0)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_V3;
|
||||
}
|
||||
}
|
||||
final EnchantSkillHolder esd = s.getEnchantSkillHolder(_skillLvl);
|
||||
final int beforeEnchantSkillLevel = player.getSkillLevel(_skillId);
|
||||
@@ -333,104 +372,7 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
}
|
||||
else if (_type == 2) // untrain
|
||||
{
|
||||
if ((_skillLvl % 100) == 0)
|
||||
{
|
||||
_skillLvl = s.getBaseLevel();
|
||||
}
|
||||
|
||||
final int reqItemId;
|
||||
if (player.getClassId().level() == 3)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.UNTRAIN_ENCHANT_BOOK_OLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.UNTRAIN_ENCHANT_BOOK;
|
||||
}
|
||||
|
||||
final int beforeUntrainSkillLevel = player.getSkillLevel(_skillId);
|
||||
if (((beforeUntrainSkillLevel - 1) != _skillLvl) && (((beforeUntrainSkillLevel % 100) != 1) || (_skillLvl != s.getBaseLevel())))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
EnchantSkillHolder esd = s.getEnchantSkillHolder(beforeUntrainSkillLevel);
|
||||
|
||||
int requiredSp = esd.getSpCost();
|
||||
int requireditems = esd.getAdenaCost();
|
||||
|
||||
L2ItemInstance spb = player.getInventory().getItemByItemId(reqItemId);
|
||||
if (Config.ES_SP_BOOK_NEEDED)
|
||||
{
|
||||
if (spb == null)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ALL_OF_THE_ITEMS_NEEDED_TO_ENCHANT_THAT_SKILL);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (player.getInventory().getAdena() < requireditems)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ALL_OF_THE_ITEMS_NEEDED_TO_ENCHANT_THAT_SKILL);
|
||||
return;
|
||||
}
|
||||
|
||||
boolean check = true;
|
||||
if (Config.ES_SP_BOOK_NEEDED)
|
||||
{
|
||||
check &= player.destroyItem("Consume", spb.getObjectId(), 1, player, true);
|
||||
}
|
||||
|
||||
check &= player.destroyItemByItemId("Consume", Inventory.ADENA_ID, requireditems, player, true);
|
||||
|
||||
if (!check)
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ALL_OF_THE_ITEMS_NEEDED_TO_ENCHANT_THAT_SKILL);
|
||||
return;
|
||||
}
|
||||
|
||||
player.getStat().addSp((int) (requiredSp * 0.8));
|
||||
|
||||
if (Config.LOG_SKILL_ENCHANTS)
|
||||
{
|
||||
LogRecord record = new LogRecord(Level.INFO, "Untrain");
|
||||
record.setParameters(new Object[]
|
||||
{
|
||||
player,
|
||||
skill,
|
||||
spb
|
||||
});
|
||||
record.setLoggerName("skill");
|
||||
_logEnchant.log(record);
|
||||
}
|
||||
|
||||
player.addSkill(skill, true);
|
||||
player.sendPacket(ExEnchantSkillResult.valueOf(true));
|
||||
|
||||
if (Config.DEBUG)
|
||||
{
|
||||
_log.fine("Learned skill ID: " + _skillId + " Level: " + _skillLvl + " for " + requiredSp + " SP, " + requireditems + " Adena.");
|
||||
}
|
||||
|
||||
player.sendPacket(new UserInfo(player));
|
||||
|
||||
if (_skillLvl > 100)
|
||||
{
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.UNTRAIN_OF_ENCHANT_SKILL_WAS_SUCCESSFUL_CURRENT_LEVEL_OF_ENCHANT_SKILL_S1_HAS_BEEN_DECREASED_BY_1);
|
||||
sm.addSkillName(_skillId);
|
||||
player.sendPacket(sm);
|
||||
}
|
||||
else
|
||||
{
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.UNTRAIN_OF_ENCHANT_SKILL_WAS_SUCCESSFUL_CURRENT_LEVEL_OF_ENCHANT_SKILL_S1_BECAME_0_AND_ENCHANT_SKILL_WILL_BE_INITIALIZED);
|
||||
sm.addSkillName(_skillId);
|
||||
player.sendPacket(sm);
|
||||
}
|
||||
player.sendSkillList();
|
||||
final int afterUntrainSkillLevel = player.getSkillLevel(_skillId);
|
||||
player.sendPacket(new ExEnchantSkillInfo(_skillId, afterUntrainSkillLevel));
|
||||
player.sendPacket(new ExEnchantSkillInfoDetail(2, _skillId, afterUntrainSkillLevel - 1, player));
|
||||
player.updateShortCuts(_skillId, afterUntrainSkillLevel);
|
||||
return;
|
||||
}
|
||||
else if (_type == 3) // change route
|
||||
{
|
||||
@@ -441,17 +383,28 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK;
|
||||
if (_elvl == 0)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_V3;
|
||||
}
|
||||
}
|
||||
|
||||
final int beforeEnchantSkillLevel = player.getSkillLevel(_skillId);
|
||||
if (beforeEnchantSkillLevel <= 100)
|
||||
if (beforeEnchantSkillLevel <= 1000)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int currentEnchantLevel = beforeEnchantSkillLevel % 100;
|
||||
if (currentEnchantLevel != (_skillLvl % 100))
|
||||
int currentEnchantLevel = beforeEnchantSkillLevel % 1000;
|
||||
if (currentEnchantLevel != (_skillLvl % 1000))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -495,7 +448,7 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
|
||||
int levelPenalty = Rnd.get(Math.min(4, currentEnchantLevel));
|
||||
_skillLvl -= levelPenalty;
|
||||
if ((_skillLvl % 100) == 0)
|
||||
if ((_skillLvl % 1000) == 0)
|
||||
{
|
||||
_skillLvl = s.getBaseLevel();
|
||||
}
|
||||
@@ -534,9 +487,9 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
SystemMessage sm = SystemMessage.getSystemMessage(SystemMessageId.ENCHANT_SKILL_ROUTE_CHANGE_WAS_SUCCESSFUL_LV_OF_ENCHANT_SKILL_S1_HAS_BEEN_DECREASED_BY_S2);
|
||||
sm.addSkillName(_skillId);
|
||||
|
||||
if (_skillLvl > 100)
|
||||
if (_skillLvl > 1000)
|
||||
{
|
||||
sm.addInt(_skillLvl % 100);
|
||||
sm.addInt(_skillLvl % 1000);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -558,7 +511,26 @@ public final class RequestExEnchantSkill extends L2GameClientPacket
|
||||
}
|
||||
else if (_type == 4) // 100% enchant
|
||||
{
|
||||
int reqItemId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
final int reqItemId;
|
||||
if (player.getClassId().level() == 3)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_elvl == 0)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.IMMORTAL_SCROLL_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
reqItemId = EnchantSkillGroupsData.IMMORTAL_SCROLL_V3;
|
||||
}
|
||||
}
|
||||
final int beforeEnchantSkillLevel = player.getSkillLevel(_skillId);
|
||||
if (beforeEnchantSkillLevel != s.getMinSkillLevel(_skillLvl))
|
||||
{
|
||||
|
||||
+10
-1
@@ -34,12 +34,21 @@ public final class RequestExEnchantSkillInfo extends L2GameClientPacket
|
||||
|
||||
private int _skillId;
|
||||
private int _skillLvl;
|
||||
private int _fullLvl;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_skillId = readD();
|
||||
_skillLvl = readD();
|
||||
_fullLvl = readD();
|
||||
if (_fullLvl < 100)
|
||||
{
|
||||
_skillLvl = _fullLvl;
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillLvl = _fullLvl >> 16;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+13
-4
@@ -34,13 +34,22 @@ public final class RequestExEnchantSkillInfoDetail extends L2GameClientPacket
|
||||
private int _type;
|
||||
private int _skillId;
|
||||
private int _skillLvl;
|
||||
private int _fullLvl;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_type = readD();
|
||||
_skillId = readD();
|
||||
_skillLvl = readD();
|
||||
_fullLvl = readD();
|
||||
if (_fullLvl < 100)
|
||||
{
|
||||
_skillLvl = _fullLvl;
|
||||
}
|
||||
else
|
||||
{
|
||||
_skillLvl = _fullLvl >> 16;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -66,7 +75,7 @@ public final class RequestExEnchantSkillInfoDetail extends L2GameClientPacket
|
||||
}
|
||||
else if (_type == 2)
|
||||
{
|
||||
reqSkillLvl = _skillLvl + 1; // untrain
|
||||
return;
|
||||
}
|
||||
else if (_type == 3)
|
||||
{
|
||||
@@ -82,7 +91,7 @@ public final class RequestExEnchantSkillInfoDetail extends L2GameClientPacket
|
||||
}
|
||||
|
||||
// if reqlvl is 100,200,.. check base skill lvl enchant
|
||||
if ((reqSkillLvl % 100) == 0)
|
||||
if ((reqSkillLvl % 1000) == 0)
|
||||
{
|
||||
L2EnchantSkillLearn esl = EnchantSkillGroupsData.getInstance().getSkillEnchantmentBySkillId(_skillId);
|
||||
if (esl != null)
|
||||
@@ -102,7 +111,7 @@ public final class RequestExEnchantSkillInfoDetail extends L2GameClientPacket
|
||||
else if (playerSkillLvl != reqSkillLvl)
|
||||
{
|
||||
// change route is different skill lvl but same enchant
|
||||
if ((_type == 3) && ((playerSkillLvl % 100) != (_skillLvl % 100)))
|
||||
if ((_type == 3) && ((playerSkillLvl % 1000) != (_skillLvl % 1000)))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public final class RequestGiveItemToPet extends L2GameClientPacket
|
||||
|
||||
if (!pet.getInventory().validateWeight(item, _amount))
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_ANY_MORE_ITEMS2);
|
||||
player.sendPacket(SystemMessageId.YOUR_PET_CANNOT_CARRY_ANY_MORE_ITEMS);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public final class RequestJoinAlly extends L2GameClientPacket
|
||||
sm.addString(activeChar.getClan().getAllyName());
|
||||
sm.addString(activeChar.getName());
|
||||
target.sendPacket(sm);
|
||||
target.sendPacket(new AskJoinAlly(activeChar.getObjectId(), activeChar.getClan().getAllyName()));
|
||||
target.sendPacket(new AskJoinAlly(activeChar.getObjectId(), activeChar.getClan().getAllyName(), activeChar.getName()));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -76,7 +76,8 @@ public final class RequestJoinPledge extends L2GameClientPacket
|
||||
|
||||
final String pledgeName = activeChar.getClan().getName();
|
||||
final String subPledgeName = (activeChar.getClan().getSubPledge(_pledgeType) != null ? activeChar.getClan().getSubPledge(_pledgeType).getName() : null);
|
||||
target.sendPacket(new AskJoinPledge(activeChar.getObjectId(), subPledgeName, _pledgeType, pledgeName));
|
||||
final String askjoinName = activeChar.getName();
|
||||
target.sendPacket(new AskJoinPledge(activeChar.getObjectId(), subPledgeName, _pledgeType, pledgeName, askjoinName));
|
||||
}
|
||||
|
||||
public int getPledgeType()
|
||||
|
||||
@@ -70,7 +70,7 @@ public final class RequestPreviewItem extends L2GameClientPacket
|
||||
{
|
||||
try
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.YOU_ARE_NO_LONGER_TRYING_ON_EQUIPMENT2);
|
||||
activeChar.sendPacket(SystemMessageId.YOU_ARE_NO_LONGER_TRYING_ON_EQUIPMENT);
|
||||
activeChar.sendPacket(new ExUserInfoEquipSlot(activeChar));
|
||||
}
|
||||
catch (Exception e)
|
||||
|
||||
+2
-1
@@ -37,7 +37,7 @@ public final class RequestPrivateStoreSell extends L2GameClientPacket
|
||||
{
|
||||
private static final String _C__9F_REQUESTPRIVATESTORESELL = "[C] 9F RequestPrivateStoreSell";
|
||||
|
||||
private static final int BATCH_LENGTH = 32; // length of the one item
|
||||
private static final int BATCH_LENGTH = 34; // length of the one item
|
||||
|
||||
private int _storePlayerId;
|
||||
private ItemRequest[] _items = null;
|
||||
@@ -61,6 +61,7 @@ public final class RequestPrivateStoreSell extends L2GameClientPacket
|
||||
readH(); // TODO analyse this
|
||||
long cnt = readQ();
|
||||
long price = readQ();
|
||||
readH(); // TODO analyse this
|
||||
|
||||
if ((objectId < 1) || (itemId < 1) || (cnt < 1) || (price < 0))
|
||||
{
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ public final class RequestReplyStartPledgeWar extends L2GameClientPacket
|
||||
}
|
||||
else
|
||||
{
|
||||
requestor.sendPacket(SystemMessageId.THE_S1_CLAN_DID_NOT_RESPOND_WAR_PROCLAMATION_HAS_BEEN_REFUSED2);
|
||||
requestor.sendPacket(SystemMessageId.THE_S1_CLAN_DID_NOT_RESPOND_WAR_PROCLAMATION_HAS_BEEN_REFUSED);
|
||||
}
|
||||
activeChar.setActiveRequester(null);
|
||||
requestor.onTransactionResponse();
|
||||
|
||||
@@ -43,6 +43,10 @@ public final class RequestShortCutReg extends L2GameClientPacket
|
||||
_page = slot / 12;
|
||||
_id = readD();
|
||||
_lvl = readD();
|
||||
if ((typeId == 2) && (_lvl > 10000))
|
||||
{
|
||||
_lvl = _lvl >> 16;
|
||||
}
|
||||
_characterType = readD();
|
||||
}
|
||||
|
||||
|
||||
+6
-8
@@ -33,14 +33,14 @@ public final class RequestWithDrawPremiumItem extends L2GameClientPacket
|
||||
private static final String _C__D0_52_REQUESTWITHDRAWPREMIUMITEM = "[C] D0:52 RequestWithDrawPremiumItem";
|
||||
|
||||
private int _itemNum;
|
||||
private int _charId;
|
||||
// private int _charId;
|
||||
private long _itemCount;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_itemNum = readD();
|
||||
_charId = readD();
|
||||
_itemNum = (int) readQ();
|
||||
// _charId = readD();
|
||||
_itemCount = readQ();
|
||||
}
|
||||
|
||||
@@ -57,11 +57,9 @@ public final class RequestWithDrawPremiumItem extends L2GameClientPacket
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (activeChar.getObjectId() != _charId)
|
||||
{
|
||||
Util.handleIllegalPlayerAction(activeChar, "[RequestWithDrawPremiumItem] Incorrect owner, Player: " + activeChar.getName(), Config.DEFAULT_PUNISH);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
* else if (activeChar.getObjectId() != _charId) { Util.handleIllegalPlayerAction(activeChar, "[RequestWithDrawPremiumItem] Incorrect owner, Player: " + activeChar.getName(), Config.DEFAULT_PUNISH); return; }
|
||||
*/
|
||||
else if (activeChar.getPremiumItemList().isEmpty())
|
||||
{
|
||||
Util.handleIllegalPlayerAction(activeChar, "[RequestWithDrawPremiumItem] Player: " + activeChar.getName() + " try to get item with empty list!", Config.DEFAULT_PUNISH);
|
||||
|
||||
+2
-1
@@ -41,7 +41,7 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket
|
||||
{
|
||||
private static final String _C__9A_SETPRIVATESTORELISTBUY = "[C] 9A SetPrivateStoreListBuy";
|
||||
|
||||
private static final int BATCH_LENGTH = 44; // length of the one item
|
||||
private static final int BATCH_LENGTH = 46; // length of the one item
|
||||
|
||||
private Item[] _items = null;
|
||||
|
||||
@@ -81,6 +81,7 @@ public final class SetPrivateStoreListBuy extends L2GameClientPacket
|
||||
defenseAttributes[i] = readH(); // Defense attributes
|
||||
}
|
||||
int appearanceId = readD(); // Appearance ID
|
||||
readH(); // ?
|
||||
boolean canUse = false;
|
||||
for (L2ItemInstance item : player.getInventory().getItemsByItemId(itemId))
|
||||
{
|
||||
|
||||
@@ -31,7 +31,6 @@ import com.l2jserver.gameserver.enums.Race;
|
||||
import com.l2jserver.gameserver.handler.IItemHandler;
|
||||
import com.l2jserver.gameserver.handler.ItemHandler;
|
||||
import com.l2jserver.gameserver.instancemanager.FortSiegeManager;
|
||||
import com.l2jserver.gameserver.model.PcCondOverride;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.effects.L2EffectType;
|
||||
import com.l2jserver.gameserver.model.holders.SkillHolder;
|
||||
@@ -153,7 +152,7 @@ public final class UseItem extends L2GameClientPacket
|
||||
if (activeChar.isFishing() && ((_itemId < 6535) || (_itemId > 6540)))
|
||||
{
|
||||
// You cannot do anything else while fishing
|
||||
activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING3);
|
||||
activeChar.sendPacket(SystemMessageId.YOU_CANNOT_DO_THAT_WHILE_FISHING);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -244,61 +243,6 @@ public final class UseItem extends L2GameClientPacket
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't allow other Race to Wear Kamael exclusive Weapons.
|
||||
if (!item.isEquipped() && item.isWeapon() && !activeChar.canOverrideCond(PcCondOverride.ITEM_CONDITIONS))
|
||||
{
|
||||
L2Weapon wpn = (L2Weapon) item.getItem();
|
||||
|
||||
switch (activeChar.getRace())
|
||||
{
|
||||
case ERTHEIA:
|
||||
{
|
||||
switch (wpn.getItemType())
|
||||
{
|
||||
case SWORD:
|
||||
case DAGGER:
|
||||
case BOW:
|
||||
case POLE:
|
||||
case NONE:
|
||||
case DUAL:
|
||||
case RAPIER:
|
||||
case ANCIENTSWORD:
|
||||
case CROSSBOW:
|
||||
case DUALDAGGER:
|
||||
activeChar.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case KAMAEL:
|
||||
{
|
||||
switch (wpn.getItemType())
|
||||
{
|
||||
case NONE:
|
||||
activeChar.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case HUMAN:
|
||||
case DWARF:
|
||||
case ELF:
|
||||
case DARK_ELF:
|
||||
case ORC:
|
||||
{
|
||||
switch (wpn.getItemType())
|
||||
{
|
||||
case RAPIER:
|
||||
case CROSSBOW:
|
||||
case ANCIENTSWORD:
|
||||
activeChar.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case L2Item.SLOT_CHEST:
|
||||
@@ -309,7 +253,7 @@ public final class UseItem extends L2GameClientPacket
|
||||
case L2Item.SLOT_FULL_ARMOR:
|
||||
case L2Item.SLOT_LEGS:
|
||||
{
|
||||
if ((activeChar.getRace() == Race.ERTHEIA) && ((item.getItem().getItemType() == ArmorType.HEAVY) || (item.getItem().getItemType() == ArmorType.SHIELD) || (item.getItem().getItemType() == ArmorType.SIGIL)))
|
||||
if ((activeChar.getRace() == Race.ERTHEIA) && (activeChar.isMageClass()) && ((item.getItem().getItemType() == ArmorType.SHIELD) || (item.getItem().getItemType() == ArmorType.SIGIL)))
|
||||
{
|
||||
activeChar.sendPacket(SystemMessageId.YOU_DO_NOT_MEET_THE_REQUIRED_CONDITION_TO_EQUIP_THAT_ITEM);
|
||||
return;
|
||||
|
||||
+14
@@ -381,6 +381,7 @@ public class RequestShapeShiftingItem extends L2GameClientPacket
|
||||
|
||||
final InventoryUpdate iu = new InventoryUpdate();
|
||||
iu.addModifiedItem(targetItem);
|
||||
|
||||
if (inventory.getItemByObjectId(stone.getObjectId()) == null)
|
||||
{
|
||||
iu.addRemovedItem(stone);
|
||||
@@ -389,6 +390,19 @@ public class RequestShapeShiftingItem extends L2GameClientPacket
|
||||
{
|
||||
iu.addModifiedItem(stone);
|
||||
}
|
||||
|
||||
if (appearanceStone.getType() == AppearanceType.NORMAL)
|
||||
{
|
||||
if (inventory.getItemByObjectId(extracItem.getObjectId()) == null)
|
||||
{
|
||||
iu.addRemovedItem(extracItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
iu.addModifiedItem(extracItem);
|
||||
}
|
||||
}
|
||||
|
||||
player.sendPacket(iu);
|
||||
|
||||
player.removeRequest(ShapeShiftingItemRequest.class);
|
||||
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.network.clientpackets.dailymission;
|
||||
|
||||
import com.l2jserver.gameserver.data.xml.impl.DailyMissionData;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestOneDayRewardReceive extends L2GameClientPacket
|
||||
{
|
||||
private int _reward;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_reward = readC();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
DailyMissionData.getInstance().rewardPlayer(_reward, player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.network.clientpackets.dailymission;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
import com.l2jserver.gameserver.network.serverpackets.dailymission.ExOneDayReceiveRewardList;
|
||||
import com.l2jserver.gameserver.network.serverpackets.dailymission.ExTodoListInzone;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestTodoList extends L2GameClientPacket
|
||||
{
|
||||
private int _tab;
|
||||
@SuppressWarnings("unused")
|
||||
private int _showAllLevels;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_tab = readC(); // Daily Reward = 9, Event = 1, Instance Zone = 2
|
||||
_showAllLevels = readC(); // Disabled = 0, Enabled = 1
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (_tab)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
player.sendPacket(new ExTodoListInzone());
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
player.sendPacket(new ExTodoListInzone());
|
||||
break;
|
||||
}
|
||||
case 9:
|
||||
{
|
||||
player.sendPacket(new ExOneDayReceiveRewardList(player));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2015 L2J Server
|
||||
*
|
||||
* This file is part of L2J Server.
|
||||
*
|
||||
* L2J Server 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.
|
||||
*
|
||||
* L2J Server 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 com.l2jserver.gameserver.network.clientpackets.dailymission;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.L2GameClientPacket;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class RequestTodoListHTML extends L2GameClientPacket
|
||||
{
|
||||
@SuppressWarnings("unused")
|
||||
private int _tab;
|
||||
@SuppressWarnings("unused")
|
||||
private String _linkName;
|
||||
|
||||
@Override
|
||||
protected void readImpl()
|
||||
{
|
||||
_tab = readC();
|
||||
_linkName = readS();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void runImpl()
|
||||
{
|
||||
final L2PcInstance player = getClient().getActiveChar();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getType()
|
||||
{
|
||||
return getClass().getSimpleName();
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,7 @@ public class AbnormalStatusUpdate extends L2GameServerPacket
|
||||
if (info.getSkill().getDisplayLevel() < 100)
|
||||
{
|
||||
writeH(info.getSkill().getDisplayLevel());
|
||||
writeH(0x00);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -76,9 +76,10 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
writeC(item.getItem().getType2()); // Item Type 2 : 00-weapon, 01-shield/armor, 02-ring/earring/necklace, 03-questitem, 04-adena, 05-item
|
||||
writeC(item.getCustomType1()); // Filler (always 0)
|
||||
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
|
||||
writeH(item.getEnchant()); // Enchant level (pet level shown in control item)
|
||||
writeC(item.getEnchant()); // Enchant level (pet level shown in control item)
|
||||
writeH(0x00); // Equipped : 00-No, 01-yes
|
||||
writeH(item.getCustomType2());
|
||||
writeC(item.getCustomType2());
|
||||
writeD(0);
|
||||
writeItemElementalAndEnchant(new ItemInfo(item));
|
||||
}
|
||||
|
||||
@@ -95,13 +96,15 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
writeC(item.getCustomType1()); // Filler (always 0)
|
||||
writeH(item.getEquipped()); // Equipped : 00-No, 01-yes
|
||||
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
|
||||
writeH(item.getEnchant()); // Enchant level (pet level shown in control item)
|
||||
writeC(item.getEnchant()); // Enchant level (pet level shown in control item)
|
||||
writeC(0);
|
||||
writeD(item.getMana());
|
||||
writeD(item.getTime());
|
||||
writeC(0x01); // GOD Item enabled = 1 disabled (red) = 0
|
||||
if (containsMask(mask, ItemListType.AUGMENT_BONUS))
|
||||
{
|
||||
writeD(item.getAugmentationBonus());
|
||||
writeD(item.get1stAugmentationId());
|
||||
writeD(item.get2ndAugmentationId());
|
||||
}
|
||||
if (containsMask(mask, ItemListType.ELEMENTAL_ATTRIBUTE))
|
||||
{
|
||||
@@ -181,7 +184,7 @@ public abstract class AbstractItemPacket extends AbstractMaskPacket<ItemListType
|
||||
// Enchant Effects
|
||||
for (int op : item.getEnchantOptions())
|
||||
{
|
||||
writeH(op);
|
||||
writeD(op);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+38
-8
@@ -414,12 +414,8 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
|
||||
}
|
||||
|
||||
case TYPE_ITEM_NAME:
|
||||
case TYPE_CASTLE_NAME:
|
||||
case TYPE_INT_NUMBER:
|
||||
case TYPE_NPC_NAME:
|
||||
case TYPE_ELEMENT_NAME:
|
||||
case TYPE_SYSTEM_STRING:
|
||||
case TYPE_INSTANCE_NAME:
|
||||
case TYPE_DOOR_NAME:
|
||||
{
|
||||
writeD(param.getIntValue());
|
||||
@@ -429,8 +425,25 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
|
||||
case TYPE_SKILL_NAME:
|
||||
{
|
||||
final int[] array = param.getIntArrayValue();
|
||||
writeD(array[0]); // SkillId
|
||||
writeH(array[1]); // SkillLevel
|
||||
final int _skillId = array[0];
|
||||
final int _skillLevel = array[1];
|
||||
writeD(_skillId); // SkillId
|
||||
if (_skillLevel < 100)
|
||||
{
|
||||
writeH(_skillLevel); // SkillLevel
|
||||
writeH(0);
|
||||
}
|
||||
else if (_skillLevel > 10000)
|
||||
{
|
||||
writeH((short) _skillLevel);
|
||||
writeH(_skillLevel >> 16);
|
||||
}
|
||||
else
|
||||
{
|
||||
int _maxLevel = SkillData.getInstance().getMaxLevel(_skillId);
|
||||
writeH(_maxLevel);
|
||||
writeH(_skillLevel);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -444,10 +457,18 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
|
||||
break;
|
||||
}
|
||||
case TYPE_CLASS_ID:
|
||||
case TYPE_CASTLE_NAME:
|
||||
case TYPE_INSTANCE_NAME:
|
||||
case TYPE_SYSTEM_STRING:
|
||||
{
|
||||
writeH(param.getIntValue());
|
||||
break;
|
||||
}
|
||||
case TYPE_ELEMENT_NAME:
|
||||
{
|
||||
writeC(param.getIntValue());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -504,6 +525,7 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
|
||||
final int[] array = param.getIntArrayValue();
|
||||
out.println(array[0]); // SkillId
|
||||
out.println(array[1]); // SkillLevel
|
||||
out.println(array[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -615,8 +637,16 @@ public abstract class AbstractMessagePacket<T extends AbstractMessagePacket<?>>
|
||||
case TYPE_SKILL_NAME:
|
||||
{
|
||||
final int[] array = param.getIntArrayValue();
|
||||
final Skill skill = SkillData.getInstance().getSkill(array[0], array[1]);
|
||||
params[i] = skill == null ? "Unknown" : skill.getName();
|
||||
if (array[1] < 10000)
|
||||
{
|
||||
final Skill skill = SkillData.getInstance().getSkill(array[0], array[1]);
|
||||
params[i] = skill == null ? "Unknown" : skill.getName();
|
||||
}
|
||||
else
|
||||
{
|
||||
final Skill skill = SkillData.getInstance().getSkill(array[0], array[1] >> 16);
|
||||
params[i] = skill == null ? "Unknown" : skill.getName();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,5 +125,6 @@ public class AcquireSkillInfo extends L2GameServerPacket
|
||||
writeQ(temp.count);
|
||||
writeD(temp.unk);
|
||||
}
|
||||
writeD(0);
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@ import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.l2jserver.gameserver.data.xml.impl.SkillTreesData;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.model.L2SkillLearn;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.holders.ItemHolder;
|
||||
@@ -51,7 +52,7 @@ public class AcquireSkillList extends L2GameServerPacket
|
||||
for (L2SkillLearn skill : _learnable)
|
||||
{
|
||||
writeD(skill.getSkillId());
|
||||
writeH(skill.getSkillLevel());
|
||||
writeD(skill.getSkillLevel());
|
||||
writeQ(skill.getLevelUpSp());
|
||||
writeC(skill.getGetLevel());
|
||||
writeC(skill.getDualClassLevel());
|
||||
@@ -68,7 +69,16 @@ public class AcquireSkillList extends L2GameServerPacket
|
||||
for (Skill skillRemove : skillRem)
|
||||
{
|
||||
writeD(skillRemove.getId());
|
||||
writeH(skillRemove.getLevel());
|
||||
if (skillRemove.getLevel() < 100)
|
||||
{
|
||||
writeD(skillRemove.getLevel());
|
||||
}
|
||||
else
|
||||
{
|
||||
int maxLevel = SkillData.getInstance().getMaxLevel(skillRemove.getId());
|
||||
writeH(maxLevel);
|
||||
writeH(skillRemove.getLevel());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,15 +22,18 @@ public class AskJoinAlly extends L2GameServerPacket
|
||||
{
|
||||
private final String _requestorName;
|
||||
private final int _requestorObjId;
|
||||
private final String _requestorAllyName;
|
||||
|
||||
/**
|
||||
* @param requestorObjId
|
||||
* @param requestorAllyName
|
||||
* @param requestorName
|
||||
*/
|
||||
public AskJoinAlly(int requestorObjId, String requestorName)
|
||||
public AskJoinAlly(int requestorObjId, String requestorAllyName, String requestorName)
|
||||
{
|
||||
_requestorName = requestorName;
|
||||
_requestorObjId = requestorObjId;
|
||||
_requestorAllyName = requestorAllyName;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,7 +41,7 @@ public class AskJoinAlly extends L2GameServerPacket
|
||||
{
|
||||
writeC(0xbb);
|
||||
writeD(_requestorObjId);
|
||||
writeS(null); // Ally Name ?
|
||||
writeS(_requestorAllyName);
|
||||
writeS(null); // TODO: Find me!
|
||||
writeS(_requestorName);
|
||||
}
|
||||
|
||||
@@ -24,13 +24,15 @@ public final class AskJoinPledge extends L2GameServerPacket
|
||||
private final String _subPledgeName;
|
||||
private final int _pledgeType;
|
||||
private final String _pledgeName;
|
||||
private final String _askjoinName;
|
||||
|
||||
public AskJoinPledge(int requestorObjId, String subPledgeName, int pledgeType, String pledgeName)
|
||||
public AskJoinPledge(int requestorObjId, String subPledgeName, int pledgeType, String pledgeName, String askjoinName)
|
||||
{
|
||||
_requestorObjId = requestorObjId;
|
||||
_subPledgeName = subPledgeName;
|
||||
_pledgeType = pledgeType;
|
||||
_pledgeName = pledgeName;
|
||||
_askjoinName = askjoinName;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,14 +40,15 @@ public final class AskJoinPledge extends L2GameServerPacket
|
||||
{
|
||||
writeC(0x2c);
|
||||
writeD(_requestorObjId);
|
||||
if (_subPledgeName != null)
|
||||
{
|
||||
writeS(_pledgeType > 0 ? _subPledgeName : _pledgeName);
|
||||
}
|
||||
writeS(_askjoinName);
|
||||
writeS(_pledgeName);
|
||||
if (_pledgeType != 0)
|
||||
{
|
||||
writeD(_pledgeType);
|
||||
}
|
||||
if (_subPledgeName != null)
|
||||
{
|
||||
writeS(_pledgeType > 0 ? _subPledgeName : _pledgeName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,8 @@ public final class BuyListSeed extends L2GameServerPacket
|
||||
writeC(0x00); // Filler (always 0)
|
||||
writeH(0x00); // Equipped : 00-No, 01-yes
|
||||
writeQ(0x00); // 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
|
||||
writeH(0x00); // Enchant level (pet level shown in control item)
|
||||
writeC(0x00); // Enchant level (pet level shown in control item)
|
||||
writeC(0x00);
|
||||
writeD(-1);
|
||||
writeD(-9999);
|
||||
writeC(0x01); // GOD Item enabled = 1 disabled (red) = 0
|
||||
|
||||
@@ -48,22 +48,6 @@ public class CharInfo extends L2GameServerPacket
|
||||
|
||||
private int _vehicleId = 0;
|
||||
|
||||
private static final int[] PAPERDOLL_ORDER = new int[]
|
||||
{
|
||||
Inventory.PAPERDOLL_UNDER,
|
||||
Inventory.PAPERDOLL_HEAD,
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
Inventory.PAPERDOLL_LHAND,
|
||||
Inventory.PAPERDOLL_GLOVES,
|
||||
Inventory.PAPERDOLL_CHEST,
|
||||
Inventory.PAPERDOLL_LEGS,
|
||||
Inventory.PAPERDOLL_FEET,
|
||||
Inventory.PAPERDOLL_CLOAK,
|
||||
Inventory.PAPERDOLL_RHAND,
|
||||
Inventory.PAPERDOLL_HAIR,
|
||||
Inventory.PAPERDOLL_HAIR2
|
||||
};
|
||||
|
||||
public CharInfo(L2PcInstance cha)
|
||||
{
|
||||
_activeChar = cha;
|
||||
@@ -131,21 +115,22 @@ public class CharInfo extends L2GameServerPacket
|
||||
writeS(_activeChar.getAppearance().getVisibleName()); // Confirmed
|
||||
writeH(_activeChar.getRace().ordinal()); // Confirmed
|
||||
writeC(_activeChar.getAppearance().getSex() ? 0x01 : 0x00); // Confirmed
|
||||
writeD(_activeChar.getBaseClass()); // Confirmed
|
||||
writeD(_activeChar.getBaseClassId()); // Confirmed
|
||||
|
||||
for (int slot : getPaperdollOrder())
|
||||
for (int slot : Inventory.PAPERDOLL_ORDER)
|
||||
{
|
||||
writeD(_activeChar.getInventory().getPaperdollItemDisplayId(slot)); // Confirmed
|
||||
}
|
||||
|
||||
for (int slot : getPaperdollOrderAugument())
|
||||
for (int slot : Inventory.PAPERDOLL_ORDER_AUGMENT)
|
||||
{
|
||||
writeD(_activeChar.getInventory().getPaperdollAugmentationId(slot)); // Confirmed
|
||||
writeD(_activeChar.getInventory().getPaperdoll1stAugmentationId(slot));
|
||||
writeD(_activeChar.getInventory().getPaperdoll2ndAugmentationId(slot));
|
||||
}
|
||||
|
||||
writeC(_armorEnchant);
|
||||
|
||||
for (int slot : getPaperdollOrderVisualId())
|
||||
for (int slot : Inventory.PAPERDOLL_ORDER_VISUAL_ID)
|
||||
{
|
||||
writeD(_activeChar.getInventory().getPaperdollItemVisualId(slot));
|
||||
}
|
||||
@@ -241,7 +226,7 @@ public class CharInfo extends L2GameServerPacket
|
||||
writeD(_activeChar.getTransformationDisplayId()); // Confirmed
|
||||
writeD(_activeChar.getAgathionId()); // Confirmed
|
||||
|
||||
writeC(0x00); // TODO: Find me!
|
||||
writeC(0x01); // TODO: Find me!
|
||||
|
||||
writeD((int) Math.round(_activeChar.getCurrentCp())); // Confirmed
|
||||
writeD(_activeChar.getMaxHp()); // Confirmed
|
||||
@@ -260,10 +245,4 @@ public class CharInfo extends L2GameServerPacket
|
||||
writeC(_activeChar.isHairAccessoryEnabled() ? 0x01 : 0x00); // Hair accessory
|
||||
writeC(_activeChar.getAbilityPointsUsed()); // Used Ability Points
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int[] getPaperdollOrder()
|
||||
{
|
||||
return PAPERDOLL_ORDER;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,6 @@ import com.l2jserver.gameserver.data.sql.impl.ClanTable;
|
||||
import com.l2jserver.gameserver.data.xml.impl.ExperienceData;
|
||||
import com.l2jserver.gameserver.model.CharSelectInfoPackage;
|
||||
import com.l2jserver.gameserver.model.L2Clan;
|
||||
import com.l2jserver.gameserver.model.entity.Hero;
|
||||
import com.l2jserver.gameserver.model.itemcontainer.Inventory;
|
||||
import com.l2jserver.gameserver.network.L2GameClient;
|
||||
|
||||
@@ -41,7 +40,6 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
private static Logger _log = Logger.getLogger(CharSelectionInfo.class.getName());
|
||||
private final String _loginName;
|
||||
private final int _sessionId;
|
||||
private int _activeId;
|
||||
private final List<CharSelectInfoPackage> _characterPackages;
|
||||
|
||||
/**
|
||||
@@ -54,15 +52,6 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
_sessionId = sessionId;
|
||||
_loginName = loginName;
|
||||
_characterPackages = loadCharacterSelectInfo(_loginName);
|
||||
_activeId = -1;
|
||||
}
|
||||
|
||||
public CharSelectionInfo(String loginName, int sessionId, int activeId)
|
||||
{
|
||||
_sessionId = sessionId;
|
||||
_loginName = loginName;
|
||||
_characterPackages = loadCharacterSelectInfo(_loginName);
|
||||
_activeId = activeId;
|
||||
}
|
||||
|
||||
public List<CharSelectInfoPackage> getCharInfo()
|
||||
@@ -81,48 +70,37 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
writeD(Config.MAX_CHARACTERS_NUMBER_PER_ACCOUNT);
|
||||
writeC(size == Config.MAX_CHARACTERS_NUMBER_PER_ACCOUNT ? 0x01 : 0x00); // if 1 can't create new char
|
||||
writeC(0x01); // play mode, if 1 can create only 2 char in regular lobby
|
||||
writeD(0x02); // if 1, korean client
|
||||
writeC(0x00); // if 1 suggest premium account
|
||||
writeC(0x02); // play mode, if 1 can create only 2 char in regular lobby
|
||||
writeD(0x00); // if 1, korean client
|
||||
|
||||
long lastAccess = 0L;
|
||||
if (_activeId == -1)
|
||||
int charId = 0;
|
||||
if (!_characterPackages.isEmpty())
|
||||
{
|
||||
for (int i = 0; i < size; i++)
|
||||
long lastAccess = -1L;
|
||||
charId = _characterPackages.get(0).getObjectId();
|
||||
|
||||
for (CharSelectInfoPackage info : _characterPackages)
|
||||
{
|
||||
final CharSelectInfoPackage charInfoPackage = _characterPackages.get(i);
|
||||
if (lastAccess < charInfoPackage.getLastAccess())
|
||||
if (info.isAvailable() && (lastAccess < info.getLastAccess()))
|
||||
{
|
||||
lastAccess = charInfoPackage.getLastAccess();
|
||||
_activeId = i;
|
||||
lastAccess = info.getLastAccess();
|
||||
charId = info.getObjectId();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < size; i++)
|
||||
for (CharSelectInfoPackage charInfoPackage : _characterPackages)
|
||||
{
|
||||
final CharSelectInfoPackage charInfoPackage = _characterPackages.get(i);
|
||||
|
||||
writeS(charInfoPackage.getName()); // char name
|
||||
writeD(charInfoPackage.getObjectId()); // char id
|
||||
writeS(_loginName); // login
|
||||
writeD(_sessionId); // session id
|
||||
writeD(0x00); // ??
|
||||
writeD(0x00); // ??
|
||||
|
||||
writeD(charInfoPackage.getSex()); // sex
|
||||
writeD(charInfoPackage.getRace()); // race
|
||||
|
||||
if (charInfoPackage.getClassId() == charInfoPackage.getBaseClassId())
|
||||
{
|
||||
writeD(charInfoPackage.getClassId());
|
||||
}
|
||||
else
|
||||
{
|
||||
writeD(charInfoPackage.getBaseClassId());
|
||||
}
|
||||
|
||||
writeD(0x01); // server id ??
|
||||
|
||||
writeS(charInfoPackage.getName());
|
||||
writeD(charInfoPackage.getObjectId());
|
||||
writeS(_loginName);
|
||||
writeD(_sessionId);
|
||||
writeD(charInfoPackage.getClanId());
|
||||
writeD(0x00);
|
||||
writeD(charInfoPackage.getSex());
|
||||
writeD(charInfoPackage.getRace());
|
||||
writeD(charInfoPackage.getBaseClassId());
|
||||
writeD(Config.SERVER_ID);
|
||||
writeD(charInfoPackage.getX());
|
||||
writeD(charInfoPackage.getY());
|
||||
writeD(charInfoPackage.getZ());
|
||||
@@ -149,52 +127,50 @@ public class CharSelectionInfo extends L2GameServerPacket
|
||||
writeD(0x00); // Ertheia
|
||||
writeD(0x00); // Ertheia
|
||||
|
||||
for (int slot : getPaperdollOrder())
|
||||
for (int slot : Inventory.PAPERDOLL_ORDER_ALL)
|
||||
{
|
||||
writeD(charInfoPackage.getPaperdollItemId(slot));
|
||||
}
|
||||
|
||||
for (int slot : getPaperdollOrderVisualId())
|
||||
for (int slot : Inventory.PAPERDOLL_ORDER_VISUAL_ID)
|
||||
{
|
||||
writeD(charInfoPackage.getPaperdollItemVisualId(slot));
|
||||
}
|
||||
|
||||
writeD(0x00); // ??
|
||||
writeD(0x00); // ??
|
||||
writeH(0x00); // ??
|
||||
writeH(charInfoPackage.getEnchantEffect(Inventory.PAPERDOLL_CHEST));
|
||||
writeH(charInfoPackage.getEnchantEffect(Inventory.PAPERDOLL_LEGS));
|
||||
writeH(charInfoPackage.getEnchantEffect(Inventory.PAPERDOLL_HEAD));
|
||||
writeH(charInfoPackage.getEnchantEffect(Inventory.PAPERDOLL_GLOVES));
|
||||
writeH(charInfoPackage.getEnchantEffect(Inventory.PAPERDOLL_FEET));
|
||||
|
||||
writeD(charInfoPackage.getHairStyle());
|
||||
writeD(charInfoPackage.getHairColor());
|
||||
writeD(charInfoPackage.getFace());
|
||||
|
||||
writeF(charInfoPackage.getMaxHp()); // hp max
|
||||
writeF(charInfoPackage.getMaxMp()); // mp max
|
||||
writeF(charInfoPackage.getMaxHp());
|
||||
writeF(charInfoPackage.getMaxMp());
|
||||
|
||||
writeD(charInfoPackage.getDeleteTimer() > 0 ? (int) ((charInfoPackage.getDeleteTimer() - System.currentTimeMillis()) / 1000) : 0);
|
||||
writeD(charInfoPackage.getClassId());
|
||||
writeD(i == _activeId ? 1 : 0);
|
||||
writeD(charId == charInfoPackage.getObjectId() ? 0x01 : 0x00);
|
||||
writeC(charInfoPackage.getWeaponEnchantEffect());
|
||||
writeD(charInfoPackage.get1stAugmentationId());
|
||||
writeD(charInfoPackage.get2ndAugmentationId());
|
||||
writeD(charInfoPackage.getTransformationId());
|
||||
|
||||
writeC(charInfoPackage.getEnchantEffect() > 127 ? 127 : charInfoPackage.getEnchantEffect());
|
||||
writeD(charInfoPackage.getAugmentationId());
|
||||
writeD(0x00);
|
||||
writeD(0x00);
|
||||
writeD(0x00);
|
||||
writeD(0x00);
|
||||
|
||||
// writeD(charInfoPackage.getTransformId()); // Used to display Transformations
|
||||
writeD(0x00); // Currently on retail when you are on character select you don't see your transformation.
|
||||
|
||||
// Freya by Vistall:
|
||||
writeD(0x00); // npdid - 16024 Tame Tiny Baby Kookaburra A9E89C
|
||||
writeD(0x00); // level
|
||||
writeD(0x00); // ?
|
||||
writeD(0x00); // food? - 1200
|
||||
writeF(0x00); // max Hp
|
||||
writeF(0x00); // cur Hp
|
||||
|
||||
// High Five by Vistall:
|
||||
writeD(charInfoPackage.getVitalityPoints()); // H5 Vitality
|
||||
writeD(0x00); // Vitality Exp Bonus
|
||||
writeD(0x00); // Vitality items used, such as potion
|
||||
writeD(charInfoPackage.getAccessLevel() == -100 ? 0x00 : 0x01); // Char is active or not
|
||||
writeC(0x00); // is noble
|
||||
writeC(Hero.getInstance().isHero(charInfoPackage.getObjectId()) ? 0x01 : 0x00); // hero glow
|
||||
writeF(0x00);
|
||||
writeF(0x00);
|
||||
writeD(charInfoPackage.getVitalityPoints());
|
||||
writeD(charInfoPackage.getVitalityPercent());
|
||||
writeD(charInfoPackage.getVitalityItemCount());
|
||||
writeD(charInfoPackage.isAvailable());
|
||||
writeC(0x00);
|
||||
writeC(charInfoPackage.isHero()); // hero glow
|
||||
writeC(charInfoPackage.isHairAccessoryEnabled() ? 0x01 : 0x00); // show hair accessory if enabled
|
||||
}
|
||||
}
|
||||
|
||||
@@ -45,9 +45,7 @@ public class Die extends L2GameServerPacket
|
||||
private final boolean _isSweepable;
|
||||
private boolean _useFeather;
|
||||
private boolean _toFortress;
|
||||
private boolean _hideAnimation;
|
||||
private List<Integer> _items = null;
|
||||
private boolean _itemsEnabled;
|
||||
|
||||
public Die(L2Character activeChar)
|
||||
{
|
||||
@@ -84,11 +82,6 @@ public class Die extends L2GameServerPacket
|
||||
_isSweepable = activeChar.isAttackable() && activeChar.isSweepActive();
|
||||
}
|
||||
|
||||
public void setHideAnimation(boolean val)
|
||||
{
|
||||
_hideAnimation = val;
|
||||
}
|
||||
|
||||
public void addItem(int itemId)
|
||||
{
|
||||
if (_items == null)
|
||||
@@ -111,11 +104,6 @@ public class Die extends L2GameServerPacket
|
||||
return _items != null ? _items : Collections.emptyList();
|
||||
}
|
||||
|
||||
public void setItemsEnabled(boolean val)
|
||||
{
|
||||
_itemsEnabled = val;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected final void writeImpl()
|
||||
{
|
||||
@@ -128,14 +116,10 @@ public class Die extends L2GameServerPacket
|
||||
writeD(_isSweepable ? 0x01 : 0x00);
|
||||
writeD(_useFeather ? 0x01 : 0x00);
|
||||
writeD(_toFortress ? 0x01 : 0x00);
|
||||
writeC(_hideAnimation ? 0x01 : 0x00);
|
||||
|
||||
writeD(getItems().size());
|
||||
for (int itemId : getItems())
|
||||
{
|
||||
writeD(itemId);
|
||||
}
|
||||
|
||||
writeD(_itemsEnabled ? 0x01 : 0x00);
|
||||
writeD(0x00);
|
||||
writeD(0x00);
|
||||
writeC(0x00);
|
||||
writeD(0x00);
|
||||
writeD(0x00);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public class EnchantResult extends L2GameServerPacket
|
||||
writeD(_enchantLevel);
|
||||
for (int option : _enchantOptions)
|
||||
{
|
||||
writeH(option);
|
||||
writeD(option);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
-1
@@ -21,6 +21,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.model.actor.L2Character;
|
||||
import com.l2jserver.gameserver.model.skills.BuffInfo;
|
||||
import com.l2jserver.gameserver.model.skills.Skill;
|
||||
@@ -34,6 +35,7 @@ public class ExAbnormalStatusUpdateFromTarget extends L2GameServerPacket
|
||||
{
|
||||
protected int _skillId;
|
||||
protected int _level;
|
||||
protected int _maxlevel;
|
||||
protected int _duration;
|
||||
protected int _caster;
|
||||
|
||||
@@ -49,6 +51,7 @@ public class ExAbnormalStatusUpdateFromTarget extends L2GameServerPacket
|
||||
|
||||
_skillId = skill.getDisplayId();
|
||||
_level = skill.getDisplayLevel();
|
||||
_maxlevel = SkillData.getInstance().getMaxLevel(_skillId);
|
||||
_duration = info.getTime();
|
||||
_caster = casterId;
|
||||
}
|
||||
@@ -86,7 +89,16 @@ public class ExAbnormalStatusUpdateFromTarget extends L2GameServerPacket
|
||||
for (Effect info : _effects)
|
||||
{
|
||||
writeD(info._skillId);
|
||||
writeH(info._level);
|
||||
if (info._level < 100)
|
||||
{
|
||||
writeH(info._level);
|
||||
writeH(0x00);
|
||||
}
|
||||
else
|
||||
{
|
||||
writeH(info._maxlevel);
|
||||
writeH(info._level);
|
||||
}
|
||||
writeH(0x00); // Combo abnormal ?
|
||||
writeH(info._duration);
|
||||
writeD(info._caster);
|
||||
|
||||
@@ -18,18 +18,24 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
/**
|
||||
* @author Mobius
|
||||
*/
|
||||
public class ExAutoSoulShot extends L2GameServerPacket
|
||||
{
|
||||
private final int _itemId;
|
||||
private final int _type;
|
||||
private final int _enabled;
|
||||
private final int _type; // 0 SS, 1 SPS, 2 Beast SS, 3 Beast SPS
|
||||
|
||||
/**
|
||||
* @param itemId
|
||||
* @param enabled
|
||||
* @param type
|
||||
*/
|
||||
public ExAutoSoulShot(int itemId, int type)
|
||||
public ExAutoSoulShot(int itemId, int enabled, int type)
|
||||
{
|
||||
_itemId = itemId;
|
||||
_enabled = enabled;
|
||||
_type = type;
|
||||
}
|
||||
|
||||
@@ -37,8 +43,9 @@ public class ExAutoSoulShot extends L2GameServerPacket
|
||||
protected final void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x0c); // sub id
|
||||
writeH(0x0C);
|
||||
writeD(_itemId);
|
||||
writeD(_enabled);
|
||||
writeD(_type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,19 +26,80 @@ public final class ExBasicActionList extends L2GameServerPacket
|
||||
//@formatter:off
|
||||
public static final int[] ACTIONS_ON_TRANSFORM =
|
||||
{
|
||||
1, 2, 3, 4,
|
||||
5, 6, 7, 8,
|
||||
9, 11, 15, 16,
|
||||
17, 18, 19, 21,
|
||||
22, 23, 40, 41,
|
||||
50, 52, 53, 54,
|
||||
55, 56, 57, 63,
|
||||
64, 65, 67, 68,
|
||||
69, 70, 74, 76,
|
||||
77, 78, 79, 80,
|
||||
81, 82, 83, 84,
|
||||
85, 86, 87, 88,
|
||||
1000, 1001, 1003,
|
||||
1, 3, 4, 5,
|
||||
6, 7, 8, 9,
|
||||
11, 15, 16, 17,
|
||||
18, 19, 21, 22,
|
||||
23, 32, 36, 39,
|
||||
40, 41, 42, 43,
|
||||
44, 45, 46, 47,
|
||||
48, 50, 52, 53,
|
||||
54, 55, 56, 57,
|
||||
63, 64, 65, 70, 86,
|
||||
1000, 1001, 1003, 1004,
|
||||
1005, 1006, 1007, 1008,
|
||||
1009, 1010, 1011, 1012,
|
||||
1013, 1014, 1015, 1016,
|
||||
1017, 1018, 1019, 1020,
|
||||
1021, 1022, 1023, 1024,
|
||||
1025, 1026, 1027, 1028,
|
||||
1029, 1030, 1031, 1032,
|
||||
1033, 1034, 1035, 1036,
|
||||
1037, 1038, 1039, 1040,
|
||||
1041, 1042, 1043, 1044,
|
||||
1045, 1046, 1047, 1048,
|
||||
1049, 1050, 1051, 1052,
|
||||
1053, 1054, 1055, 1056,
|
||||
1057, 1058, 1059, 1060,
|
||||
1061, 1062, 1063, 1064,
|
||||
1065, 1066, 1067, 1068,
|
||||
1069, 1070, 1071, 1072,
|
||||
1073, 1074, 1075, 1076,
|
||||
1077, 1078, 1079, 1080,
|
||||
1081, 1082, 1083, 1084,
|
||||
1089, 1090, 1091, 1092,
|
||||
1093, 1094, 1095, 1096,
|
||||
1097, 1098, 1099, 1100,
|
||||
1101, 1102, 1103, 1104,
|
||||
1106, 1107, 1108, 1109,
|
||||
1110, 1111, 1113, 1114,
|
||||
1115, 1116, 1117, 1118,
|
||||
1120, 1121, 1124, 1125,
|
||||
1126, 1127, 1128, 1129,
|
||||
1130, 1131, 1132, 1133,
|
||||
1134, 1135, 1136, 1137,
|
||||
1138, 1139, 1140, 1141,
|
||||
1142, 1143, 1144, 1145,
|
||||
1146, 1147, 1148, 1149,
|
||||
1150, 1151, 1152, 1153,
|
||||
1154, 1155
|
||||
};
|
||||
|
||||
public static final int[] DEFAULT_ACTION_LIST =
|
||||
{
|
||||
0, 1, 2, 3, 4,
|
||||
5, 6, 7, 8, 9,
|
||||
10, 11, 12, 13,
|
||||
14, 15, 16, 17,
|
||||
18, 19, 20, 21,
|
||||
22, 23, 24, 25,
|
||||
26, 27, 28, 29,
|
||||
30, 31, 32, 33,
|
||||
34, 35, 36, 37,
|
||||
38, 39, 40, 41,
|
||||
42, 43, 44, 45,
|
||||
46, 47, 48, 49,
|
||||
50, 51, 52, 53,
|
||||
54, 55, 56, 57,
|
||||
58, 59, 60, 61,
|
||||
62, 63, 64, 65,
|
||||
66, 67, 68, 69,
|
||||
70, 71, 72, 73,
|
||||
74, 76, 77, 78,
|
||||
79, 80, 81, 82,
|
||||
83, 84, 85, 86,
|
||||
87, 88, 89, 90,
|
||||
1000, 1001, 1002, 1003,
|
||||
1004, 1005, 1006, 1007,
|
||||
1008, 1009, 1010, 1011,
|
||||
1012, 1013, 1014, 1015,
|
||||
@@ -59,77 +120,28 @@ public final class ExBasicActionList extends L2GameServerPacket
|
||||
1072, 1073, 1074, 1075,
|
||||
1076, 1077, 1078, 1079,
|
||||
1080, 1081, 1082, 1083,
|
||||
1084, 1089, 1090, 1091,
|
||||
1092, 5000, 5001, 5002,
|
||||
5003, 5004, 5005, 5006,
|
||||
5007, 5008, 5009, 5010,
|
||||
5011, 5012, 5013, 5014,
|
||||
5015
|
||||
};
|
||||
|
||||
public static final int[] DEFAULT_ACTION_LIST =
|
||||
{
|
||||
0, 1, 2, 3,
|
||||
4, 5, 6, 7, 8,
|
||||
9, 10, 11, 12,
|
||||
13, 14, 15, 16,
|
||||
17, 18, 19, 20,
|
||||
21, 22, 23, 24,
|
||||
25, 26, 27, 28,
|
||||
29, 30, 31, 32,
|
||||
33, 34, 35, 36,
|
||||
37, 38, 39, 40,
|
||||
41, 42, 43, 44,
|
||||
45, 46, 47, 48,
|
||||
49, 50, 51, 52,
|
||||
53, 54, 55, 56,
|
||||
57, 58, 59, 60,
|
||||
61, 62, 63, 64,
|
||||
65, 66, 71, 72,
|
||||
73, 74, 75, 76,
|
||||
77, 78, 79, 80,
|
||||
81, 82, 83, 84,
|
||||
85, 86, 87, 88,
|
||||
90, 1000, 1001, 1002,
|
||||
1003, 1004, 1005, 1006,
|
||||
1007, 1008, 1009, 1010,
|
||||
1011, 1012, 1013, 1014,
|
||||
1015, 1016, 1017, 1018,
|
||||
1019, 1020, 1021, 1022,
|
||||
1023, 1024, 1025, 1026,
|
||||
1027, 1028, 1029, 1030,
|
||||
1031, 1032, 1033, 1034,
|
||||
1035, 1036, 1037, 1038,
|
||||
1039, 1040, 1041, 1042,
|
||||
1043, 1044, 1045, 1046,
|
||||
1047, 1048, 1049, 1050,
|
||||
1051, 1052, 1053, 1054,
|
||||
1055, 1056, 1057, 1058,
|
||||
1059, 1060, 1061, 1062,
|
||||
1063, 1064, 1065, 1066,
|
||||
1067, 1068, 1069, 1070,
|
||||
1071, 1072, 1073, 1074,
|
||||
1075, 1076, 1077, 1078,
|
||||
1079, 1080, 1081, 1082,
|
||||
1083, 1084, 1086, 1087,
|
||||
1088, 1089, 1090, 1091,
|
||||
1092, 1093, 1094, 1095,
|
||||
1096, 1097, 1098, 1099,
|
||||
1100, 1101, 1102, 1103,
|
||||
1104, 1105, 1106, 1107,
|
||||
1108, 1109, 1110, 1111,
|
||||
1112, 1113, 1114, 1115,
|
||||
1116, 1117, 1118, 1119,
|
||||
1120, 1121, 1122, 1123,
|
||||
1124, 1125, 1126, 1127,
|
||||
1128, 1129, 1130, 1131,
|
||||
1132, 1133, 1134, 1135,
|
||||
1136, 1137, 1138, 1139,
|
||||
1140, 1141, 1142, 1143,
|
||||
5000, 5001, 5002, 5003,
|
||||
5004, 5005, 5006, 5007,
|
||||
5008, 5009, 5010, 5011,
|
||||
5012, 5013, 5014, 5015
|
||||
1084, 1086, 1087, 1088,
|
||||
1089, 1090, 1091, 1092,
|
||||
1093, 1094, 1095, 1096,
|
||||
1097, 1098, 1099, 1100,
|
||||
1101, 1102, 1103, 1104,
|
||||
1106, 1107, 1108, 1109,
|
||||
1110, 1111, 1112, 1113,
|
||||
1114, 1115, 1116, 1117,
|
||||
1118, 1119, 1120, 1121,
|
||||
1122, 1123, 1124, 1125,
|
||||
1126, 1127, 1128, 1129,
|
||||
1130, 1131, 1132, 1133,
|
||||
1134, 1135, 1136, 1137,
|
||||
1138, 1139, 1140, 1141,
|
||||
1142, 1143, 1144, 1145,
|
||||
1146, 1147, 1148, 1149,
|
||||
1150, 1151, 1152, 1153,
|
||||
1154, 1155, 5000, 5001,
|
||||
5002, 5003, 5004, 5005,
|
||||
5006, 5007, 5008, 5009,
|
||||
5010, 5011, 5012, 5013,
|
||||
5014, 5015
|
||||
};
|
||||
//@formatter:on
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ExBeautyItemList extends L2GameServerPacket
|
||||
writeD(hair.getAdena());
|
||||
writeD(hair.getResetAdena());
|
||||
writeD(hair.getBeautyShopTicket());
|
||||
writeD(1); // Limit
|
||||
writeD(99999999); // Limit
|
||||
}
|
||||
|
||||
writeD(FACE_TYPE);
|
||||
@@ -82,7 +82,7 @@ public class ExBeautyItemList extends L2GameServerPacket
|
||||
writeD(face.getAdena());
|
||||
writeD(face.getResetAdena());
|
||||
writeD(face.getBeautyShopTicket());
|
||||
writeD(1); // Limit
|
||||
writeD(99999999); // Limit
|
||||
}
|
||||
|
||||
writeD(COLOR_TYPE);
|
||||
@@ -96,7 +96,7 @@ public class ExBeautyItemList extends L2GameServerPacket
|
||||
writeD(color.getAdena());
|
||||
writeD(color.getResetAdena());
|
||||
writeD(color.getBeautyShopTicket());
|
||||
writeD(1);
|
||||
writeD(99999999);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,14 +18,19 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
|
||||
/**
|
||||
* @author Gnat
|
||||
**/
|
||||
|
||||
public class ExBirthdayPopup extends L2GameServerPacket
|
||||
{
|
||||
public ExBirthdayPopup()
|
||||
private final L2PcInstance _activeChar;
|
||||
|
||||
public ExBirthdayPopup(L2PcInstance character)
|
||||
{
|
||||
_activeChar = character;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -33,5 +38,6 @@ public class ExBirthdayPopup extends L2GameServerPacket
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x90);
|
||||
writeD(_activeChar.getObjectId());
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,9 @@
|
||||
*/
|
||||
package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
@@ -29,6 +32,7 @@ public class ExBuySellList extends AbstractItemPacket
|
||||
private L2ItemInstance[] _sellList = null;
|
||||
private L2ItemInstance[] _refundList = null;
|
||||
private final boolean _done;
|
||||
private final List<L2ItemInstance> _items = new ArrayList<>();
|
||||
|
||||
public ExBuySellList(L2PcInstance player, boolean done)
|
||||
{
|
||||
@@ -38,6 +42,14 @@ public class ExBuySellList extends AbstractItemPacket
|
||||
_refundList = player.getRefund().getItems();
|
||||
}
|
||||
_done = done;
|
||||
|
||||
for (L2ItemInstance item : player.getInventory().getItems())
|
||||
{
|
||||
if (!item.isQuestItem())
|
||||
{
|
||||
_items.add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -46,7 +58,7 @@ public class ExBuySellList extends AbstractItemPacket
|
||||
writeC(0xFE);
|
||||
writeH(0xB8);
|
||||
writeD(0x01);
|
||||
writeD(0x00); // TODO: Find me
|
||||
writeD(_items.size());
|
||||
|
||||
if ((_sellList != null))
|
||||
{
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.items.instance.L2ItemInstance;
|
||||
|
||||
/**
|
||||
* @author Erlandys
|
||||
* @author Erlandys TODO: Fix this class to Infinity Odyssey !!!
|
||||
*/
|
||||
public class ExChangeAttributeItemList extends AbstractItemPacket
|
||||
{
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class ExConfirmAddingContact extends L2GameServerPacket
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xD2);
|
||||
writeH(0xD3);
|
||||
writeS(_charName);
|
||||
writeD(_added ? 0x01 : 0x00);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.l2jserver.gameserver.data.xml.impl.EnchantSkillGroupsData;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.model.L2EnchantSkillGroup.EnchantSkillHolder;
|
||||
import com.l2jserver.gameserver.model.L2EnchantSkillLearn;
|
||||
|
||||
@@ -31,19 +32,21 @@ public final class ExEnchantSkillInfo extends L2GameServerPacket
|
||||
|
||||
private final int _id;
|
||||
private final int _lvl;
|
||||
private final int _maxlvl;
|
||||
private boolean _maxEnchanted = false;
|
||||
|
||||
public ExEnchantSkillInfo(int id, int lvl)
|
||||
{
|
||||
_id = id;
|
||||
_lvl = lvl;
|
||||
_maxlvl = SkillData.getInstance().getMaxLevel(_id);
|
||||
|
||||
L2EnchantSkillLearn enchantLearn = EnchantSkillGroupsData.getInstance().getSkillEnchantmentBySkillId(_id);
|
||||
// do we have this skill?
|
||||
if (enchantLearn != null)
|
||||
{
|
||||
// skill already enchanted?
|
||||
if (_lvl > 100)
|
||||
if (_lvl > 1000)
|
||||
{
|
||||
_maxEnchanted = enchantLearn.isMaxEnchant(_lvl);
|
||||
|
||||
@@ -51,22 +54,22 @@ public final class ExEnchantSkillInfo extends L2GameServerPacket
|
||||
EnchantSkillHolder esd = enchantLearn.getEnchantSkillHolder(_lvl);
|
||||
|
||||
// if it exists add it
|
||||
if (esd != null)
|
||||
if ((esd != null) && !_maxEnchanted)
|
||||
{
|
||||
_routes.add(_lvl); // current enchant add firts
|
||||
_routes.add(_lvl + 1); // current enchant add firts
|
||||
}
|
||||
|
||||
int skillLvL = (_lvl % 100);
|
||||
int skillLvL = (_lvl % 1000);
|
||||
|
||||
for (int route : enchantLearn.getAllRoutes())
|
||||
{
|
||||
if (((route * 100) + skillLvL) == _lvl)
|
||||
if (((route * 1000) + skillLvL) == _lvl)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
// add other levels of all routes - same lvl as enchanted
|
||||
// lvl
|
||||
_routes.add((route * 100) + skillLvL);
|
||||
_routes.add((route * 1000) + skillLvL);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -76,7 +79,7 @@ public final class ExEnchantSkillInfo extends L2GameServerPacket
|
||||
for (int route : enchantLearn.getAllRoutes())
|
||||
{
|
||||
// add first level (+1) of all routes
|
||||
_routes.add((route * 100) + 1);
|
||||
_routes.add((route * 1000) + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,14 +91,23 @@ public final class ExEnchantSkillInfo extends L2GameServerPacket
|
||||
writeC(0xFE);
|
||||
writeH(0x2A);
|
||||
writeD(_id);
|
||||
writeD(_lvl);
|
||||
if (_lvl < 100)
|
||||
{
|
||||
writeD(_lvl);
|
||||
}
|
||||
else
|
||||
{
|
||||
writeH(_maxlvl);
|
||||
writeH(_lvl);
|
||||
}
|
||||
writeD(_maxEnchanted ? 0 : 1);
|
||||
writeD(_lvl > 100 ? 1 : 0); // enchanted?
|
||||
writeD(_lvl > 1000 ? 1 : 0); // enchanted?
|
||||
writeD(_routes.size());
|
||||
|
||||
for (int level : _routes)
|
||||
{
|
||||
writeD(level);
|
||||
writeH(_maxlvl);
|
||||
writeH(level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+71
-26
@@ -20,6 +20,7 @@ package com.l2jserver.gameserver.network.serverpackets;
|
||||
|
||||
import com.l2jserver.Config;
|
||||
import com.l2jserver.gameserver.data.xml.impl.EnchantSkillGroupsData;
|
||||
import com.l2jserver.gameserver.datatables.SkillData;
|
||||
import com.l2jserver.gameserver.model.L2EnchantSkillGroup.EnchantSkillHolder;
|
||||
import com.l2jserver.gameserver.model.L2EnchantSkillLearn;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
@@ -42,21 +43,26 @@ public class ExEnchantSkillInfoDetail extends L2GameServerPacket
|
||||
private final int _type;
|
||||
private final int _skillid;
|
||||
private final int _skilllvl;
|
||||
private final int _maxlvl;
|
||||
private final int _chance;
|
||||
private int _sp;
|
||||
private final int _adenacount;
|
||||
|
||||
public ExEnchantSkillInfoDetail(int type, int skillid, int skilllvl, L2PcInstance ply)
|
||||
{
|
||||
_type = type;
|
||||
_skillid = skillid;
|
||||
_skilllvl = skilllvl;
|
||||
_maxlvl = SkillData.getInstance().getMaxLevel(_skillid);
|
||||
|
||||
L2EnchantSkillLearn enchantLearn = EnchantSkillGroupsData.getInstance().getSkillEnchantmentBySkillId(skillid);
|
||||
EnchantSkillHolder esd = null;
|
||||
// do we have this skill?
|
||||
if (enchantLearn != null)
|
||||
{
|
||||
if (skilllvl > 100)
|
||||
if (_skilllvl > 1000)
|
||||
{
|
||||
esd = enchantLearn.getEnchantSkillHolder(skilllvl);
|
||||
esd = enchantLearn.getEnchantSkillHolder(_skilllvl);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -66,7 +72,7 @@ public class ExEnchantSkillInfoDetail extends L2GameServerPacket
|
||||
|
||||
if (esd == null)
|
||||
{
|
||||
throw new IllegalArgumentException("Skill " + skillid + " dont have enchant data for level " + skilllvl);
|
||||
throw new IllegalArgumentException("Skill " + skillid + " dont have enchant data for level " + _skilllvl);
|
||||
}
|
||||
|
||||
if (type == 0)
|
||||
@@ -93,58 +99,96 @@ public class ExEnchantSkillInfoDetail extends L2GameServerPacket
|
||||
_sp = 0;
|
||||
_adenacount = 0;
|
||||
}
|
||||
_type = type;
|
||||
_skillid = skillid;
|
||||
_skilllvl = skilllvl;
|
||||
|
||||
final int _elvl = ((_skilllvl % 100) - 1) / 10;
|
||||
switch (type)
|
||||
{
|
||||
case TYPE_NORMAL_ENCHANT:
|
||||
if (ply.getClassId().level() == 3)
|
||||
if (ply.getClassId().level() < 4)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_OLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK;
|
||||
if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.NORMAL_ENCHANT_BOOK_V3;
|
||||
}
|
||||
}
|
||||
reqCount = (((_skilllvl % 100) > 1) ? 0 : 1);
|
||||
reqCount = 1;
|
||||
break;
|
||||
case TYPE_SAFE_ENCHANT:
|
||||
if (ply.getClassId().level() == 3)
|
||||
if (ply.getClassId().level() < 4)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_OLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK;
|
||||
}
|
||||
reqCount = 1;
|
||||
break;
|
||||
case TYPE_UNTRAIN_ENCHANT:
|
||||
if (ply.getClassId().level() == 3)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.UNTRAIN_ENCHANT_BOOK_OLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.UNTRAIN_ENCHANT_BOOK;
|
||||
if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.SAFE_ENCHANT_BOOK_V3;
|
||||
}
|
||||
}
|
||||
reqCount = 1;
|
||||
break;
|
||||
case TYPE_CHANGE_ENCHANT:
|
||||
if (ply.getClassId().level() == 3)
|
||||
if (ply.getClassId().level() < 4)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_OLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK;
|
||||
if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.CHANGE_ENCHANT_BOOK_V3;
|
||||
}
|
||||
}
|
||||
reqCount = 1;
|
||||
break;
|
||||
case TYPE_IMMORTAL_ENCHANT:
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
if (ply.getClassId().level() < 4)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_elvl == 0)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL;
|
||||
}
|
||||
else if (_elvl == 1)
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL_V2;
|
||||
}
|
||||
else
|
||||
{
|
||||
bookId = EnchantSkillGroupsData.IMMORTAL_SCROLL_V3;
|
||||
}
|
||||
}
|
||||
reqCount = 1;
|
||||
break;
|
||||
default:
|
||||
@@ -165,7 +209,8 @@ public class ExEnchantSkillInfoDetail extends L2GameServerPacket
|
||||
|
||||
writeD(_type);
|
||||
writeD(_skillid);
|
||||
writeD(_skilllvl);
|
||||
writeH(_maxlvl);
|
||||
writeH(_skilllvl);
|
||||
writeQ(_sp * multi); // sp
|
||||
writeD(_chance); // exp
|
||||
writeD(0x02); // items count?
|
||||
|
||||
+1
-1
@@ -89,7 +89,7 @@ public class ExListPartyMatchingWaitingRoom extends L2GameServerPacket
|
||||
for (L2PcInstance member : _members)
|
||||
{
|
||||
writeS(member.getName());
|
||||
writeD(member.getActiveClass());
|
||||
writeD(member.getActiveClassId());
|
||||
writeD(member.getLevel());
|
||||
writeD(_currentTemplateId);
|
||||
writeD(0x00); // TODO: Instance ID reuse size
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ public class ExManagePartyRoomMember extends L2GameServerPacket
|
||||
writeD(_mode);
|
||||
writeD(_activeChar.getObjectId());
|
||||
writeS(_activeChar.getName());
|
||||
writeD(_activeChar.getActiveClass());
|
||||
writeD(_activeChar.getActiveClassId());
|
||||
writeD(_activeChar.getLevel());
|
||||
writeD(_room.getLocation());
|
||||
if (_room.getOwner().equals(_activeChar))
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ExNevitAdventEffect extends L2GameServerPacket
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xE0);
|
||||
writeH(0xE4);
|
||||
writeD(_timeLeft);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ public class ExNevitAdventPointInfoPacket extends L2GameServerPacket
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xDF);
|
||||
writeH(0xE3);
|
||||
writeD(_points); // 72 = 1%, max 7200 = 100%
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ public class ExNevitAdventTimeChange extends L2GameServerPacket
|
||||
protected void writeImpl()
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0xE1);
|
||||
writeH(0xE5);
|
||||
// state 0 - pause 1 - started
|
||||
writeC(_paused ? 0x00 : 0x01);
|
||||
// left time in ms max is 16000 its 4m and state is automatically changed to quit
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ public class ExOlympiadSpelledInfo extends L2GameServerPacket
|
||||
if ((info != null) && info.isInUse())
|
||||
{
|
||||
writeD(info.getSkill().getDisplayId());
|
||||
writeH(info.getSkill().getDisplayLevel());
|
||||
writeD(info.getSkill().getDisplayLevel());
|
||||
writeD(0x00);
|
||||
writeH(info.getTime());
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ExPartyRoomMember extends L2GameServerPacket
|
||||
{
|
||||
writeD(member.getObjectId());
|
||||
writeS(member.getName());
|
||||
writeD(member.getActiveClass());
|
||||
writeD(member.getActiveClassId());
|
||||
writeD(member.getLevel());
|
||||
writeD(_room.getLocation());
|
||||
if (_room.getOwner().equals(member))
|
||||
|
||||
@@ -34,5 +34,6 @@ public class ExPlayScene extends L2GameServerPacket
|
||||
{
|
||||
writeC(0xFE);
|
||||
writeH(0x5D);
|
||||
writeD(0x00);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,6 +75,5 @@ public class ExReplySentPost extends AbstractItemPacket
|
||||
}
|
||||
writeQ(_msg.getReqAdena());
|
||||
writeD(_msg.hasAttachments() ? 0x01 : 0x00);
|
||||
writeD(_msg.isReturned() ? 0x01 : 00);
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user