Underground update.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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));
|
||||
|
@@ -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))
|
||||
{
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -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))
|
||||
{
|
||||
|
@@ -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();
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
@@ -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();
|
||||
}
|
||||
}
|
@@ -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();
|
||||
}
|
||||
}
|
@@ -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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user