From 2866dbe20a1c8bd9953ebfed36139c127acc458b Mon Sep 17 00:00:00 2001 From: MobiusDevelopment <8391001+MobiusDevelopment@users.noreply.github.com> Date: Fri, 27 Sep 2019 13:47:24 +0000 Subject: [PATCH] Initial changes. --- L2J_Mobius_7.0_PreludeOfWar/.project | 2 +- L2J_Mobius_7.0_PreludeOfWar/build.xml | 8 +- .../dist/game/config/Character.ini | 5 - .../dist/game/config/Server.ini | 4 +- .../dist/game/data/TeleportListData.xml | 102 +++ .../scripts/handlers/EffectMasterHandler.java | 2 - .../scripts/handlers/bypasshandlers/Wear.java | 2 +- .../effecthandlers/CrystalGradeModify.java | 60 -- .../effecthandlers/RemoveEquipPenalty.java | 65 -- .../itemhandlers/BlessedSoulShots.java | 12 - .../itemhandlers/BlessedSpiritShot.java | 14 - .../handlers/itemhandlers/SoulShots.java | 12 - .../handlers/itemhandlers/SpiritShot.java | 14 - .../dist/game/data/skillTrees/Commons.xml | 11 - .../augmentation/options/33900-33999.xml | 338 +++++++++- .../augmentation/options/34000-34099.xml | 403 ++++++++++++ .../augmentation/options/34100-34199.xml | 296 +++++++++ .../game/data/stats/items/80600-80699.xml | 83 +++ .../game/data/stats/items/80800-80899.xml | 60 ++ .../game/data/stats/skills/00200-00299.xml | 17 - .../game/data/stats/skills/17500-17599.xml | 45 -- .../game/data/stats/skills/22000-22099.xml | 8 - .../game/data/stats/skills/26000-26099.xml | 11 - .../game/data/stats/skills/28300-28399.xml | 5 - .../game/data/stats/skills/35300-35399.xml | 600 +++++++++++++++--- .../game/data/stats/skills/documentation.txt | 2 - .../dist/game/data/xsd/TeleportListData.xsd | 22 + .../java/org/l2jmobius/Config.java | 2 - .../org/l2jmobius/gameserver/GameServer.java | 2 + .../data/xml/impl/TeleportListData.java | 87 +++ .../gameserver/enums/UserInfoType.java | 12 +- .../gameserver/model/actor/Creature.java | 1 - .../model/actor/instance/PlayerInstance.java | 110 ---- .../model/actor/stat/PlayerStat.java | 2 - .../model/holders/TeleportListHolder.java | 63 ++ .../model/itemcontainer/Inventory.java | 45 +- .../gameserver/network/ExIncomingPackets.java | 240 +++---- .../gameserver/network/OutgoingPackets.java | 8 +- .../clientpackets/ExRequestTeleport.java | 74 +++ .../network/clientpackets/RequestAutoUse.java | 61 ++ .../clientpackets/RequestEnchantItem.java | 4 +- .../clientpackets/RequestShortCutDel.java | 2 +- .../clientpackets/RequestShortCutReg.java | 3 +- .../gameserver/network/serverpackets/Die.java | 100 +-- .../serverpackets/EtcStatusUpdate.java | 4 +- .../network/serverpackets/ExItemAnnounce.java | 46 ++ .../serverpackets/ShopPreviewList.java | 9 +- .../network/serverpackets/ShortCutInit.java | 2 + .../serverpackets/ShortCutRegister.java | 4 + .../network/serverpackets/UserInfo.java | 27 +- .../launcher/Gameserver.launch | 6 +- .../launcher/Loginserver.launch | 6 +- L2J_Mobius_7.0_PreludeOfWar/readme.txt | 13 +- 53 files changed, 2390 insertions(+), 746 deletions(-) create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/TeleportListData.xml delete mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java delete mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/RemoveEquipPenalty.java create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/34000-34099.xml create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/34100-34199.xml create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/items/80600-80699.xml create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/items/80800-80899.xml create mode 100644 L2J_Mobius_7.0_PreludeOfWar/dist/game/data/xsd/TeleportListData.xsd create mode 100644 L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/impl/TeleportListData.java create mode 100644 L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/holders/TeleportListHolder.java create mode 100644 L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java create mode 100644 L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestAutoUse.java create mode 100644 L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java diff --git a/L2J_Mobius_7.0_PreludeOfWar/.project b/L2J_Mobius_7.0_PreludeOfWar/.project index ceb57caf3d..1ed966fd7d 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/.project +++ b/L2J_Mobius_7.0_PreludeOfWar/.project @@ -1,6 +1,6 @@ - L2J_Mobius_6.0_Fafurion + L2J_Mobius_7.0_PreludeOfWar diff --git a/L2J_Mobius_7.0_PreludeOfWar/build.xml b/L2J_Mobius_7.0_PreludeOfWar/build.xml index 52f71a7265..c8ab6b7035 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/build.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/build.xml @@ -1,6 +1,6 @@ - + This file is part of the L2J Mobius project. @@ -131,15 +131,15 @@ - + - + - + diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Character.ini b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Character.ini index caf0e4144f..46785a0469 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Character.ini +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Character.ini @@ -785,11 +785,6 @@ PartyXpCutoffGapPercent = 100;30;0 # Default: False DisableTutorial = False -# Expertise penalty -# If disabled, player will not receive penalty for equip higher grade items -# Default: True -ExpertisePenalty = True - # Player can in client define his own key mapping and for save it must be stored server side. # Default: True StoreCharUiSettings = True diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Server.ini b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Server.ini index a9e0fb852f..394daf7164 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Server.ini +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/config/Server.ini @@ -101,8 +101,8 @@ MaximumOnlineUsers = 2000 # Numbers of protocol revisions that server allows to connect. # Delimiter is ; # WARNING: Changing the protocol revision may result in incompatible communication and many errors in game! -# Fafurion: 166 -AllowedProtocolRevisions = 166 +# Prelude of War: 228 +AllowedProtocolRevisions = 228 # Displays server type next to the server name on character selection. # Notes: diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/TeleportListData.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/TeleportListData.xml new file mode 100644 index 0000000000..7674b8e52c --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/TeleportListData.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java index a9319e4d65..7e258c6bdd 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/EffectMasterHandler.java @@ -103,7 +103,6 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("CriticalDamagePosition", CriticalDamagePosition::new); EffectHandler.getInstance().registerHandler("CriticalRate", CriticalRate::new); EffectHandler.getInstance().registerHandler("CriticalRatePositionBonus", CriticalRatePositionBonus::new); - EffectHandler.getInstance().registerHandler("CrystalGradeModify", CrystalGradeModify::new); EffectHandler.getInstance().registerHandler("Crystallize", Crystallize::new); EffectHandler.getInstance().registerHandler("CubicMastery", CubicMastery::new); EffectHandler.getInstance().registerHandler("DamageBlock", DamageBlock::new); @@ -286,7 +285,6 @@ public class EffectMasterHandler EffectHandler.getInstance().registerHandler("ReflectSkill", ReflectSkill::new); EffectHandler.getInstance().registerHandler("RefuelAirship", RefuelAirship::new); EffectHandler.getInstance().registerHandler("Relax", Relax::new); - EffectHandler.getInstance().registerHandler("RemoveEquipPenalty", RemoveEquipPenalty::new); EffectHandler.getInstance().registerHandler("ReplaceSkillBySkill", ReplaceSkillBySkill::new); EffectHandler.getInstance().registerHandler("ResetInstanceEntry", ResetInstanceEntry::new); EffectHandler.getInstance().registerHandler("ResistAbnormalByCategory", ResistAbnormalByCategory::new); diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/bypasshandlers/Wear.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/bypasshandlers/Wear.java index a519bc7ffb..23d5e48cac 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/bypasshandlers/Wear.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/bypasshandlers/Wear.java @@ -80,7 +80,7 @@ public class Wear implements IBypassHandler player.setInventoryBlockingStatus(true); - player.sendPacket(new ShopPreviewList(buyList, player.getAdena(), player.getExpertiseLevel())); + player.sendPacket(new ShopPreviewList(buyList, player.getAdena())); } @Override diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java deleted file mode 100644 index 0d307a3240..0000000000 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/CrystalGradeModify.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package handlers.effecthandlers; - -import org.l2jmobius.gameserver.model.StatsSet; -import org.l2jmobius.gameserver.model.actor.Creature; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.effects.AbstractEffect; -import org.l2jmobius.gameserver.model.items.instance.ItemInstance; -import org.l2jmobius.gameserver.model.skills.Skill; - -/** - * Crystal Grade Modify effect implementation. - * @author Zoey76 - */ -public class CrystalGradeModify extends AbstractEffect -{ - private final int _amount; - - public CrystalGradeModify(StatsSet params) - { - _amount = params.getInt("_amount", 0); - } - - @Override - public boolean canStart(Creature effector, Creature effected, Skill skill) - { - return effected.isPlayer(); - } - - @Override - public void onStart(Creature effector, Creature effected, Skill skill, ItemInstance item) - { - effected.getActingPlayer().setExpertisePenaltyBonus(_amount); - } - - @Override - public void onExit(Creature effector, Creature effected, Skill skill) - { - final PlayerInstance player = effected.getActingPlayer(); - if (player != null) - { - player.setExpertisePenaltyBonus(0); - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/RemoveEquipPenalty.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/RemoveEquipPenalty.java deleted file mode 100644 index 0a44550fbf..0000000000 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/effecthandlers/RemoveEquipPenalty.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * This file is part of the L2J Mobius project. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -package handlers.effecthandlers; - -import org.l2jmobius.gameserver.model.StatsSet; -import org.l2jmobius.gameserver.model.actor.Creature; -import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; -import org.l2jmobius.gameserver.model.effects.AbstractEffect; -import org.l2jmobius.gameserver.model.items.instance.ItemInstance; -import org.l2jmobius.gameserver.model.items.type.CrystalType; -import org.l2jmobius.gameserver.model.skills.Skill; - -/** - * An effect that removes equipment grade penalty. Its the base effect for the grade penalty mechanics. - * @author Nik - */ -public class RemoveEquipPenalty extends AbstractEffect -{ - private final CrystalType _grade; - - public RemoveEquipPenalty(StatsSet params) - { - _grade = params.getEnum("grade", CrystalType.class); - } - - @Override - public boolean canStart(Creature effector, Creature effected, Skill skill) - { - return effected.isPlayer(); - } - - @Override - public void onStart(Creature effector, Creature effected, Skill skill, ItemInstance item) - { - final PlayerInstance player = effected.getActingPlayer(); - if (player != null) - { - player.setExpertiseLevel(_grade); - } - } - - @Override - public void onExit(Creature effector, Creature effected, Skill skill) - { - final PlayerInstance player = effected.getActingPlayer(); - if (player != null) - { - player.setExpertiseLevel(null); - } - } -} \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java index b3d18deeae..c7d283be69 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSoulShots.java @@ -27,7 +27,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.items.Weapon; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; -import org.l2jmobius.gameserver.model.items.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -68,17 +67,6 @@ public class BlessedSoulShots implements IItemHandler return false; } - final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SOULSHOT) && (weaponInst.getItem().getCrystalTypePlus() == item.getItem().getCrystalTypePlus()); - - if (!gradeCheck) - { - if (!player.getAutoSoulShot().contains(itemId)) - { - player.sendPacket(SystemMessageId.THE_SOULSHOT_YOU_ARE_ATTEMPTING_TO_USE_DOES_NOT_MATCH_THE_GRADE_OF_YOUR_EQUIPPED_WEAPON); - } - return false; - } - player.soulShotLock.lock(); try { diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java index b0320b1d8c..31060d0c23 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/BlessedSpiritShot.java @@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.items.Weapon; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; -import org.l2jmobius.gameserver.model.items.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -70,19 +69,6 @@ public class BlessedSpiritShot implements IItemHandler return false; } - // Check for correct grade - final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SPIRITSHOT) && (weaponInst.getItem().getCrystalTypePlus() == item.getItem().getCrystalTypePlus()); - - if (!gradeCheck) - { - if (!player.getAutoSoulShot().contains(itemId)) - { - player.sendPacket(SystemMessageId.YOUR_SPIRITSHOT_DOES_NOT_MATCH_THE_WEAPON_S_GRADE); - } - - return false; - } - // Consume Blessed SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java index 5a26892859..bc385f68f4 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SoulShots.java @@ -27,7 +27,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.items.Weapon; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; -import org.l2jmobius.gameserver.model.items.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -65,17 +64,6 @@ public class SoulShots implements IItemHandler return false; } - final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SOULSHOT) && (weaponInst.getItem().getCrystalTypePlus() == item.getItem().getCrystalTypePlus()); - - if (!gradeCheck) - { - if (!player.getAutoSoulShot().contains(itemId)) - { - player.sendPacket(SystemMessageId.THE_SOULSHOT_YOU_ARE_ATTEMPTING_TO_USE_DOES_NOT_MATCH_THE_GRADE_OF_YOUR_EQUIPPED_WEAPON); - } - return false; - } - player.soulShotLock.lock(); try { diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java index cde7c00c79..1b50b2a7be 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/scripts/handlers/itemhandlers/SpiritShot.java @@ -26,7 +26,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; import org.l2jmobius.gameserver.model.holders.ItemSkillHolder; import org.l2jmobius.gameserver.model.items.Weapon; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; -import org.l2jmobius.gameserver.model.items.type.ActionType; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.util.Broadcast; @@ -70,19 +69,6 @@ public class SpiritShot implements IItemHandler return false; } - // Check for correct grade - final boolean gradeCheck = item.isEtcItem() && (item.getEtcItem().getDefaultAction() == ActionType.SPIRITSHOT) && (weaponInst.getItem().getCrystalTypePlus() == item.getItem().getCrystalTypePlus()); - - if (!gradeCheck) - { - if (!player.getAutoSoulShot().contains(itemId)) - { - player.sendPacket(SystemMessageId.YOUR_SPIRITSHOT_DOES_NOT_MATCH_THE_WEAPON_S_GRADE); - } - - return false; - } - // Consume SpiritShot if player has enough of them if (!player.destroyItemWithoutTrace("Consume", item.getObjectId(), weaponItem.getSpiritShotCount(), null, false)) { diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/skillTrees/Commons.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/skillTrees/Commons.xml index 535ec42454..2db0c2382f 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/skillTrees/Commons.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/skillTrees/Commons.xml @@ -2,17 +2,6 @@ - - - - - - - - - - - diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/33900-33999.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/33900-33999.xml index a5aa5e978c..713ab9c7fd 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/33900-33999.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/33900-33999.xml @@ -2,74 +2,376 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/34000-34099.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/34000-34099.xml new file mode 100644 index 0000000000..6c9917a093 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/34000-34099.xml @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/34100-34199.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/34100-34199.xml new file mode 100644 index 0000000000..64f3e95425 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/augmentation/options/34100-34199.xml @@ -0,0 +1,296 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/items/80600-80699.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/items/80600-80699.xml new file mode 100644 index 0000000000..b590d310a5 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/items/80600-80699.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/items/80800-80899.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/items/80800-80899.xml new file mode 100644 index 0000000000..83d2be9204 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/items/80800-80899.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/00200-00299.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/00200-00299.xml index d00f207522..5d87fecc4b 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/00200-00299.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/00200-00299.xml @@ -2449,23 +2449,6 @@ P 5 - - - - D - C - B - A - S - S80 - S84 - R - R95 - R99 - R110 - - - diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/17500-17599.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/17500-17599.xml index bbf38b607a..d91dda29b8 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/17500-17599.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/17500-17599.xml @@ -1910,11 +1910,6 @@ - - - 1 - - @@ -1925,11 +1920,6 @@ - - - 2 - - @@ -1940,11 +1930,6 @@ - - - 3 - - @@ -1955,11 +1940,6 @@ - - - 4 - - @@ -1970,11 +1950,6 @@ - - - 5 - - @@ -1985,11 +1960,6 @@ - - - 6 - - @@ -2000,11 +1970,6 @@ - - - 8 - - @@ -2015,11 +1980,6 @@ - - - 9 - - @@ -2030,11 +1990,6 @@ - - - 10 - - A1 diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/22000-22099.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/22000-22099.xml index 2dd7fdccb7..b9d6e533eb 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/22000-22099.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/22000-22099.xml @@ -1241,14 +1241,6 @@ - - - - 3 - 5 - - - true diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/26000-26099.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/26000-26099.xml index c0a5cd43a0..934849aee6 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/26000-26099.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/26000-26099.xml @@ -1290,17 +1290,6 @@ - - - - 1 - 2 - 3 - 4 - 5 - - - diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/28300-28399.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/28300-28399.xml index 6f107c7dc2..a07174c53a 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/28300-28399.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/28300-28399.xml @@ -461,10 +461,5 @@ - - - 11 - - diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/35300-35399.xml b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/35300-35399.xml index 337dcad275..d6499b6164 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/35300-35399.xml +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/35300-35399.xml @@ -28,6 +28,13 @@ 2 PER + + 15 + DIFF + + POLE + + @@ -75,6 +82,10 @@ 2 PER + + 2 + 80 + @@ -172,12 +183,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -193,12 +201,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -214,12 +219,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -235,12 +237,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -256,12 +255,9 @@ 2 - 3 - 4 - 5 - 5 - 5 - 5 + 3 + 4 + 5 DIFF @@ -277,12 +273,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -298,12 +291,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -319,12 +309,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -340,12 +327,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -361,12 +345,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -382,12 +363,9 @@ 1 - 2 - 3 - 4 - 4 - 4 - 4 + 2 + 3 + 4 PER @@ -1410,7 +1388,7 @@ 25 25 25 - 25 + 25 0 @@ -1464,7 +1442,7 @@ 25 25 25 - 25 + 25 0 @@ -1785,7 +1763,7 @@ 25 25 25 - 25 + 25 0 @@ -1839,7 +1817,7 @@ 25 25 25 - 25 + 25 0 @@ -2126,7 +2104,7 @@ 25 25 25 - 25 + 25 0 @@ -2193,7 +2171,7 @@ 25 25 25 - 25 + 25 0 @@ -2266,9 +2244,477 @@ icon.skill0100 A1 - true - 40 - 15000 - -100 - + + A1 + + + + P + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + PER + + + + + + P + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + PER + + + + + + P + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + PER + + + + + P + + + P + + + P + + + P + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + + + + + + P + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + + + + + + P + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + + + + + P + + + P + + + P + + + + P + + + + 0 + 1 + 2 + 3 + 5 + 7 + 9 + 11 + 14 + 17 + 20 + + PER + + + + + + P + + + + 0 + -1 + -2 + -3 + -5 + -7 + -9 + -11 + -14 + -17 + -20 + + PER + + + + + + P + + + + 0 + -1 + -2 + -3 + -5 + -7 + -9 + -11 + -14 + -17 + -20 + + PER + 0 + + + + 0 + -1 + -2 + -3 + -5 + -7 + -9 + -11 + -14 + -17 + -20 + + PER + 1 + + + + + P + + + P + + + P + + + + P + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + PER + + + + + + P + + + + 0 + 1 + 2 + 3 + 5 + 6 + 7 + 9 + 11 + 13 + 15 + + PER + + + + + + P + + + + 0 + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 10 + + PER + + + + + + P + + + + 0 + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 10 + + PER + + + + + + P + + + + 0 + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 10 + + PER + + + + + + P + + + + 0 + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 10 + + PER + + + + + + P + + + + 0 + 1 + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 10 + + PER + + + + + P + + + P + + + P + + + P + + + P + + + P + + + P + + + P + + + A1 + + + A1 + + + A1 + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt index 6588e71bf7..af9d0f7ce6 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/stats/skills/documentation.txt @@ -73,7 +73,6 @@ CriticalDamage: Critical Damage stat. CriticalDamagePosition: Critical Damage depending on position stat. CriticalRate: Critical Rate stat. CriticalRatePositionBonus: Critical Rate depending on position stat. Ignores the critical rate cap of 500. -CrystalGradeModify: Sets your Expertise Grade level. With this effect you can make lv. 40 player (C Grade) to wear S grade. Crystallize: Allows the player to crystallize items up to a certain grade. CubicMastery: Max cubics stat. DamageBlock: Blocks Hp or Mp damage/heal. @@ -255,7 +254,6 @@ ReflectMagic: Deflects magical damage back to the attacker. ReflectSkill: Deflects physical/magical debuffs back to the attacker. RefuelAirship: Increases Airship's fuel. Relax: Sits down and increases HP regeneration until full. -RemoveEquipPenalty: Removes equipment grade penalty. Its the base effect for the grade penalty mechanics. ReplaceSkillBySkill: While active replaces a skill with an alternative skill. (l2jmobius) ResetInstanceEntry: Resets instance re-entry time. (l2jmobius) ResistAbnormalByCategory: Buff/debuff resist stat. diff --git a/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/xsd/TeleportListData.xsd b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/xsd/TeleportListData.xsd new file mode 100644 index 0000000000..e046c59a40 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/dist/game/data/xsd/TeleportListData.xsd @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java index 8b2bea4a40..eb47873e0b 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/Config.java @@ -300,7 +300,6 @@ public class Config public static int[][] PARTY_XP_CUTOFF_GAPS; public static int[] PARTY_XP_CUTOFF_GAP_PERCENTS; public static boolean DISABLE_TUTORIAL; - public static boolean EXPERTISE_PENALTY; public static boolean STORE_RECIPE_SHOPLIST; public static boolean STORE_UI_SETTINGS; public static String[] FORBIDDEN_NAMES; @@ -1905,7 +1904,6 @@ public class Config PARTY_XP_CUTOFF_GAP_PERCENTS[i] = Integer.parseInt(percents[i]); } DISABLE_TUTORIAL = Character.getBoolean("DisableTutorial", false); - EXPERTISE_PENALTY = Character.getBoolean("ExpertisePenalty", true); STORE_RECIPE_SHOPLIST = Character.getBoolean("StoreRecipeShopList", false); STORE_UI_SETTINGS = Character.getBoolean("StoreCharUiSettings", true); FORBIDDEN_NAMES = Character.getString("ForbiddenNames", "").split(","); diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/GameServer.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/GameServer.java index 6a486e16fd..6147a61c6a 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/GameServer.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/GameServer.java @@ -99,6 +99,7 @@ import org.l2jmobius.gameserver.data.xml.impl.SkillData; import org.l2jmobius.gameserver.data.xml.impl.SkillTreesData; import org.l2jmobius.gameserver.data.xml.impl.SpawnsData; import org.l2jmobius.gameserver.data.xml.impl.StaticObjectData; +import org.l2jmobius.gameserver.data.xml.impl.TeleportListData; import org.l2jmobius.gameserver.data.xml.impl.TeleportersData; import org.l2jmobius.gameserver.data.xml.impl.TransformData; import org.l2jmobius.gameserver.data.xml.impl.VariationData; @@ -345,6 +346,7 @@ public class GameServer printSection("Cache"); HtmCache.getInstance(); CrestTable.getInstance(); + TeleportListData.getInstance(); TeleportersData.getInstance(); MatchingRoomManager.getInstance(); PetitionManager.getInstance(); diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/impl/TeleportListData.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/impl/TeleportListData.java new file mode 100644 index 0000000000..32367722fd --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/data/xml/impl/TeleportListData.java @@ -0,0 +1,87 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.l2jmobius.gameserver.data.xml.impl; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Logger; + +import org.w3c.dom.Document; + +import org.l2jmobius.commons.util.IXmlReader; +import org.l2jmobius.gameserver.model.StatsSet; +import org.l2jmobius.gameserver.model.holders.TeleportListHolder; + +/** + * @author NviX + */ +public class TeleportListData implements IXmlReader +{ + private static Logger LOGGER = Logger.getLogger(TeleportListData.class.getName()); + private final List _teleports = new ArrayList<>(); + private int _teleportsCount = 0; + + protected TeleportListData() + { + load(); + } + + @Override + public void load() + { + _teleports.clear(); + parseDatapackFile("data/TeleportListData.xml"); + _teleportsCount = _teleports.size(); + LOGGER.info(getClass().getSimpleName() + ": Loaded " + _teleportsCount + " teleports."); + } + + @Override + public void parseDocument(Document doc, File f) + { + forEach(doc, "list", listNode -> forEach(listNode, "teleport", teleportNode -> + { + final StatsSet set = new StatsSet(parseAttributes(teleportNode)); + final int tpId = set.getInt("id"); + final int x = set.getInt("x"); + final int y = set.getInt("y"); + final int z = set.getInt("z"); + final int tpPrice = set.getInt("price"); + _teleports.add(new TeleportListHolder(tpId, x, y, z, tpPrice)); + })); + } + + public List getTeleports() + { + return _teleports; + } + + public int getTeleportsCount() + { + return _teleportsCount; + } + + public static TeleportListData getInstance() + { + return SingletonHolder.INSTANCE; + } + + private static class SingletonHolder + { + protected static final TeleportListData INSTANCE = new TeleportListData(); + } +} \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/enums/UserInfoType.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/enums/UserInfoType.java index c285e64b1c..11a8d4bc5f 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/enums/UserInfoType.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/enums/UserInfoType.java @@ -41,15 +41,17 @@ public enum UserInfoType implements IUpdateTypeComponent ATK_ELEMENTAL(0x0E, 5), CLAN(0x0F, 32), - SOCIAL(0x10, 22), - VITA_FAME(0x11, 15), - SLOTS(0x12, 9), + SOCIAL(0x10, 30), + VITA_FAME(0x11, 19), + SLOTS(0x12, 12), MOVEMENTS(0x13, 4), COLOR(0x14, 10), - INVENTORY_LIMIT(0x15, 9), + INVENTORY_LIMIT(0x15, 13), TRUE_HERO(0x16, 9), - ATT_SPIRITS(0x17, 26); + ATT_SPIRITS(0x17, 26), + + UNKNOWN_196(0x18, 6); /** Int mask. */ private final int _mask; diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java index 5a2b059d96..e3d841e005 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/Creature.java @@ -2700,7 +2700,6 @@ public abstract class Creature extends WorldObject implements ISkillsHolder, IDe { final PlayerInstance player = getActingPlayer(); player.refreshOverloaded(true); - player.refreshExpertisePenalty(); sendPacket(info); if (broadcastFull) diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java index f1392081f8..295f7ca969 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/instance/PlayerInstance.java @@ -46,7 +46,6 @@ import java.util.stream.Collectors; import org.l2jmobius.Config; import org.l2jmobius.commons.concurrent.ThreadPool; import org.l2jmobius.commons.database.DatabaseFactory; -import org.l2jmobius.commons.util.CommonUtil; import org.l2jmobius.commons.util.Rnd; import org.l2jmobius.gameserver.GameTimeController; import org.l2jmobius.gameserver.ItemsAutoDestroy; @@ -238,7 +237,6 @@ import org.l2jmobius.gameserver.model.items.Weapon; import org.l2jmobius.gameserver.model.items.instance.ItemInstance; import org.l2jmobius.gameserver.model.items.type.ActionType; import org.l2jmobius.gameserver.model.items.type.ArmorType; -import org.l2jmobius.gameserver.model.items.type.CrystalType; import org.l2jmobius.gameserver.model.items.type.EtcItemType; import org.l2jmobius.gameserver.model.items.type.WeaponType; import org.l2jmobius.gameserver.model.matching.MatchingRoom; @@ -696,10 +694,6 @@ public class PlayerInstance extends Playable private int _createItemLevel; private int _createCommonItemLevel; private ItemGrade _crystallizeGrade = ItemGrade.NONE; - private CrystalType _expertiseLevel = CrystalType.NONE; - private int _expertiseArmorPenalty = 0; - private int _expertiseWeaponPenalty = 0; - private int _expertisePenaltyBonus = 0; private final Map, AbstractRequest> _requests = new ConcurrentHashMap<>(); @@ -2029,26 +2023,6 @@ public class PlayerInstance extends Playable broadcastReputation(); } - public int getExpertiseArmorPenalty() - { - return _expertiseArmorPenalty; - } - - public int getExpertiseWeaponPenalty() - { - return _expertiseWeaponPenalty; - } - - public int getExpertisePenaltyBonus() - { - return _expertisePenaltyBonus; - } - - public void setExpertisePenaltyBonus(int bonus) - { - _expertisePenaltyBonus = bonus; - } - public int getWeightPenalty() { return _dietMode ? 0 : _curWeightPenalty; @@ -2108,69 +2082,6 @@ public class PlayerInstance extends Playable } } - public void refreshExpertisePenalty() - { - if (!Config.EXPERTISE_PENALTY) - { - return; - } - - final CrystalType expertiseLevel = _expertiseLevel.plusLevel(_expertisePenaltyBonus); - - int armorPenalty = 0; - int weaponPenalty = 0; - - for (ItemInstance item : _inventory.getPaperdollItems(item -> (item != null) && ((item.getItemType() != EtcItemType.ARROW) && (item.getItemType() != EtcItemType.BOLT)) && item.getItem().getCrystalType().isGreater(expertiseLevel))) - { - if (item.isArmor()) - { - // Armor penalty level increases depending on amount of penalty armors equipped, not grade level difference. - armorPenalty = CommonUtil.constrain(armorPenalty + 1, 0, 4); - } - else - { - // Weapon penalty level increases based on grade difference. - weaponPenalty = CommonUtil.constrain(item.getItem().getCrystalType().getLevel() - expertiseLevel.getLevel(), 0, 4); - } - } - - boolean changed = false; - - if ((_expertiseWeaponPenalty != weaponPenalty) || (getSkillLevel(CommonSkill.WEAPON_GRADE_PENALTY.getId()) != weaponPenalty)) - { - _expertiseWeaponPenalty = weaponPenalty; - if (_expertiseWeaponPenalty > 0) - { - addSkill(SkillData.getInstance().getSkill(CommonSkill.WEAPON_GRADE_PENALTY.getId(), _expertiseWeaponPenalty)); - } - else - { - removeSkill(CommonSkill.WEAPON_GRADE_PENALTY.getId(), true); - } - changed = true; - } - - if ((_expertiseArmorPenalty != armorPenalty) || (getSkillLevel(CommonSkill.ARMOR_GRADE_PENALTY.getId()) != armorPenalty)) - { - _expertiseArmorPenalty = armorPenalty; - if (_expertiseArmorPenalty > 0) - { - addSkill(SkillData.getInstance().getSkill(CommonSkill.ARMOR_GRADE_PENALTY.getId(), _expertiseArmorPenalty)); - } - else - { - removeSkill(CommonSkill.ARMOR_GRADE_PENALTY.getId(), true); - } - changed = true; - } - - if (changed) - { - sendSkillList(); // Update expertise penalty icon in skill list. - sendPacket(new EtcStatusUpdate(this)); - } - } - public void useEquippableItem(ItemInstance item, boolean abortAttack) { // Equip or unEquip @@ -2238,8 +2149,6 @@ public class PlayerInstance extends Playable } } - refreshExpertisePenalty(); - broadcastUserInfo(); final InventoryUpdate iu = new InventoryUpdate(); @@ -6372,7 +6281,6 @@ public class PlayerInstance extends Playable public void updateAndBroadcastStatus(int broadcastType) { refreshOverloaded(true); - refreshExpertisePenalty(); // Send a Server->Client packet UserInfo to this PlayerInstance and CharInfo to all PlayerInstance in its _KnownPlayers (broadcast) if (broadcastType == 1) { @@ -6810,9 +6718,6 @@ public class PlayerInstance extends Playable // Update the overloaded status of the PlayerInstance player.refreshOverloaded(false); - // Update the expertise status of the PlayerInstance - player.refreshExpertisePenalty(); - player.restoreFriendList(); player.loadRecommendations(); @@ -9998,7 +9903,6 @@ public class PlayerInstance extends Playable } refreshOverloaded(true); - refreshExpertisePenalty(); broadcastUserInfo(); // Clear resurrect xp calculation @@ -10368,20 +10272,6 @@ public class PlayerInstance extends Playable } } - /** - * Expertise of the PlayerInstance (None=0, D=1, C=2, B=3, A=4, S=5, S80=6, S84=7, R=8, R95=9, R99=10) - * @return CrystalTyperepresenting expertise level.. - */ - public CrystalType getExpertiseLevel() - { - return _expertiseLevel; - } - - public void setExpertiseLevel(CrystalType crystalType) - { - _expertiseLevel = crystalType != null ? crystalType : CrystalType.NONE; - } - @Override public void teleToLocation(ILocational loc, boolean allowRandomOffset) { diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java index 5347e79ac0..078c7ef569 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/actor/stat/PlayerStat.java @@ -287,8 +287,6 @@ public class PlayerStat extends PlayableStat getActiveChar().broadcastStatusUpdate(); // Update the overloaded status of the PlayerInstance getActiveChar().refreshOverloaded(true); - // Update the expertise status of the PlayerInstance - getActiveChar().refreshExpertisePenalty(); // Send a Server->Client packet UserInfo to the PlayerInstance getActiveChar().sendPacket(new UserInfo(getActiveChar())); // Send acquirable skill list diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/holders/TeleportListHolder.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/holders/TeleportListHolder.java new file mode 100644 index 0000000000..5dd6197d13 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/holders/TeleportListHolder.java @@ -0,0 +1,63 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.l2jmobius.gameserver.model.holders; + +/** + * @author NviX + */ +public class TeleportListHolder +{ + private final int _locId; + private final int _x; + private final int _y; + private final int _z; + private final int _price; + + public TeleportListHolder(int locId, int x, int y, int z, int price) + { + _locId = locId; + _x = x; + _y = y; + _z = z; + _price = price; + } + + public int getLocId() + { + return _locId; + } + + public int getX() + { + return _x; + } + + public int getY() + { + return _y; + } + + public int getZ() + { + return _z; + } + + public int getPrice() + { + return _price; + } +} \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java index b0e8a9bd72..b9f44d7b09 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/model/itemcontainer/Inventory.java @@ -462,13 +462,6 @@ public abstract class Inventory extends ItemContainer } final PlayerInstance player = (PlayerInstance) inventory.getOwner(); - - // Any items equipped that result in expertise penalty do not give any skills at all. - if (item.getItem().getCrystalType().isGreater(player.getExpertiseLevel())) - { - return; - } - final AtomicBoolean update = new AtomicBoolean(); final AtomicBoolean updateTimestamp = new AtomicBoolean(); @@ -1549,10 +1542,6 @@ public abstract class Inventory extends ItemContainer try { unEquipItemInSlot(slot); - if (getOwner().isPlayer()) - { - ((PlayerInstance) getOwner()).refreshExpertisePenalty(); - } } finally { @@ -1682,15 +1671,7 @@ public abstract class Inventory extends ItemContainer } if (pdollSlot >= 0) { - final ItemInstance old = setPaperdollItem(pdollSlot, null); - if (old != null) - { - if (getOwner().isPlayer()) - { - ((PlayerInstance) getOwner()).refreshExpertisePenalty(); - } - } - return old; + return setPaperdollItem(pdollSlot, null); } return null; } @@ -2123,7 +2104,7 @@ public abstract class Inventory extends ItemContainer case 1: { // 4 Balance Artifact Equip - if ((item.getId() >= 48969) && (item.getId() <= 48985)) + if (((item.getId() >= 48969) && (item.getId() <= 48985)) || ((item.getId() >= 80656) && (item.getId() <= 80662))) { for (int i = PAPERDOLL_ARTIFACT1; i < (PAPERDOLL_ARTIFACT1 + 4); i++) { @@ -2136,7 +2117,7 @@ public abstract class Inventory extends ItemContainer } // 1 Spirit Artifact Equip - if ((item.getId() >= 48957) && (item.getId() <= 48960)) + if (((item.getId() >= 48957) && (item.getId() <= 48960)) || ((item.getId() >= 80647) && (item.getId() <= 80649))) { for (int i = PAPERDOLL_ARTIFACT13; i < (PAPERDOLL_ARTIFACT13 + 1); i++) { @@ -2149,7 +2130,7 @@ public abstract class Inventory extends ItemContainer } // 1 Protection Artifact Equip - if ((item.getId() >= 48961) && (item.getId() <= 48964)) + if (((item.getId() >= 48961) && (item.getId() <= 48964)) || ((item.getId() >= 80650) && (item.getId() <= 80652))) { for (int i = PAPERDOLL_ARTIFACT16; i < (PAPERDOLL_ARTIFACT16 + 1); i++) { @@ -2162,7 +2143,7 @@ public abstract class Inventory extends ItemContainer } // 1 Support Artifact Equip - if ((item.getId() >= 48965) && (item.getId() <= 48968)) + if (((item.getId() >= 48965) && (item.getId() <= 48968)) || ((item.getId() >= 80653) && (item.getId() <= 80655))) { for (int i = PAPERDOLL_ARTIFACT19; i < (PAPERDOLL_ARTIFACT19 + 1); i++) { @@ -2179,7 +2160,7 @@ public abstract class Inventory extends ItemContainer case 2: { // 8 Balance Artifact Equip - if ((item.getId() >= 48969) && (item.getId() <= 48985)) + if (((item.getId() >= 48969) && (item.getId() <= 48985)) || ((item.getId() >= 80656) && (item.getId() <= 80662))) { for (int i = PAPERDOLL_ARTIFACT1; i < (PAPERDOLL_ARTIFACT1 + 8); i++) { @@ -2192,7 +2173,7 @@ public abstract class Inventory extends ItemContainer } // 2 Spirit Artifact Equip - if ((item.getId() >= 48957) && (item.getId() <= 48960)) + if (((item.getId() >= 48957) && (item.getId() <= 48960)) || ((item.getId() >= 80647) && (item.getId() <= 80649))) { for (int i = PAPERDOLL_ARTIFACT13; i < (PAPERDOLL_ARTIFACT13 + 2); i++) { @@ -2205,7 +2186,7 @@ public abstract class Inventory extends ItemContainer } // 2 Protection Artifact Equip - if ((item.getId() >= 48961) && (item.getId() <= 48964)) + if (((item.getId() >= 48961) && (item.getId() <= 48964)) || ((item.getId() >= 80650) && (item.getId() <= 80652))) { for (int i = PAPERDOLL_ARTIFACT16; i < (PAPERDOLL_ARTIFACT16 + 2); i++) { @@ -2218,7 +2199,7 @@ public abstract class Inventory extends ItemContainer } // 2 Support Artifact Equip - if ((item.getId() >= 48965) && (item.getId() <= 48968)) + if (((item.getId() >= 48965) && (item.getId() <= 48968)) || ((item.getId() >= 80653) && (item.getId() <= 80655))) { for (int i = PAPERDOLL_ARTIFACT19; i < (PAPERDOLL_ARTIFACT19 + 2); i++) { @@ -2235,7 +2216,7 @@ public abstract class Inventory extends ItemContainer case 3: { // 12 Balance Artifact Equip - if ((item.getId() >= 48969) && (item.getId() <= 48985)) + if (((item.getId() >= 48969) && (item.getId() <= 48985)) || ((item.getId() >= 80656) && (item.getId() <= 80662))) { for (int i = PAPERDOLL_ARTIFACT1; i < (PAPERDOLL_ARTIFACT1 + 12); i++) { @@ -2248,7 +2229,7 @@ public abstract class Inventory extends ItemContainer } // 3 Spirit Artifact Equip - if ((item.getId() >= 48957) && (item.getId() <= 48960)) + if (((item.getId() >= 48957) && (item.getId() <= 48960)) || ((item.getId() >= 80647) && (item.getId() <= 80649))) { for (int i = PAPERDOLL_ARTIFACT13; i < (PAPERDOLL_ARTIFACT13 + 3); i++) { @@ -2261,7 +2242,7 @@ public abstract class Inventory extends ItemContainer } // 3 Protection Artifact Equip - if ((item.getId() >= 48961) && (item.getId() <= 48964)) + if (((item.getId() >= 48961) && (item.getId() <= 48964)) || ((item.getId() >= 80650) && (item.getId() <= 80652))) { for (int i = PAPERDOLL_ARTIFACT16; i < (PAPERDOLL_ARTIFACT16 + 3); i++) { @@ -2274,7 +2255,7 @@ public abstract class Inventory extends ItemContainer } // 3 Support Artifact Equip - if ((item.getId() >= 48965) && (item.getId() <= 48968)) + if (((item.getId() >= 48965) && (item.getId() <= 48968)) || ((item.getId() >= 80653) && (item.getId() <= 80655))) { for (int i = PAPERDOLL_ARTIFACT19; i < (PAPERDOLL_ARTIFACT19 + 3); i++) { diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java index 54e9c97541..b001363800 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/ExIncomingPackets.java @@ -349,118 +349,134 @@ public enum ExIncomingPackets implements IIncomingPackets REQUEST_STOP_MOVE(0xED, RequestStopMove::new, ConnectionState.IN_GAME), REQUEST_ABILITY_WND_OPEN(0xEE, RequestAbilityWndOpen::new, ConnectionState.IN_GAME), REQUEST_ABILITY_WND_CLOSE(0xEF, RequestAbilityWndClose::new, ConnectionState.IN_GAME), - EX_PC_CAFE_REQUEST_OPEN_WINDOW_WITHOUT_NPC(0xF0, ExPCCafeRequestOpenWindowWithoutNPC::new, ConnectionState.IN_GAME), - REQUEST_LUCKY_GAME_START_INFO(0xF1, RequestLuckyGameStartInfo::new, ConnectionState.IN_GAME), - REQUEST_LUCKY_GAME_PLAY(0xF2, RequestLuckyGamePlay::new, ConnectionState.IN_GAME), - NOTIFY_TRAINING_ROOM_END(0xF3, NotifyTrainingRoomEnd::new, ConnectionState.IN_GAME), - REQUEST_NEW_ENCHANT_PUSH_ONE(0xF4, RequestNewEnchantPushOne::new, ConnectionState.IN_GAME), - REQUEST_NEW_ENCHANT_REMOVE_ONE(0xF5, RequestNewEnchantRemoveOne::new, ConnectionState.IN_GAME), - REQUEST_NEW_ENCHANT_PUSH_TWO(0xF6, RequestNewEnchantPushTwo::new, ConnectionState.IN_GAME), - REQUEST_NEW_ENCHANT_REMOVE_TWO(0xF7, RequestNewEnchantRemoveTwo::new, ConnectionState.IN_GAME), - REQUEST_NEW_ENCHANT_CLOSE(0xF8, RequestNewEnchantClose::new, ConnectionState.IN_GAME), - REQUEST_NEW_ENCHANT_TRY(0xF9, RequestNewEnchantTry::new, ConnectionState.IN_GAME), - REQUEST_NEW_ENCHANT_RETRY_TO_PUT_ITEMS(0xFA, RequestNewEnchantRetryToPutItems::new, ConnectionState.IN_GAME), - REQUEST_TARGET_ACTION_MENU(0xFE, RequestTargetActionMenu::new, ConnectionState.IN_GAME), - EX_SEND_SELECTED_QUEST_ZONE_ID(0xFF, ExSendSelectedQuestZoneID::new, ConnectionState.IN_GAME), - REQUEST_ALCHEMY_SKILL_LIST(0x100, RequestAlchemySkillList::new, ConnectionState.IN_GAME), - REQUEST_ALCHEMY_TRY_MIX_CUBE(0x101, RequestAlchemyTryMixCube::new, ConnectionState.IN_GAME), - REQUEST_ALCHEMY_CONVERSION(0x102, RequestAlchemyConversion::new, ConnectionState.IN_GAME), - SEND_EXECUTED_UI_EVENTS_COUNT(0x103, null, ConnectionState.IN_GAME), - EX_SEND_CLIENT_INI(0x104, null, ConnectionState.AUTHENTICATED), - REQUEST_EX_AUTO_FISH(0x105, ExRequestAutoFish::new, ConnectionState.IN_GAME), - REQUEST_VIP_ATTENDANCE_ITEM_LIST(0x106, RequestVipAttendanceItemList::new, ConnectionState.IN_GAME), - REQUEST_VIP_ATTENDANCE_CHECK(0x107, RequestVipAttendanceCheck::new, ConnectionState.IN_GAME), - REQUEST_ITEM_ENSOUL(0x108, RequestItemEnsoul::new, ConnectionState.IN_GAME), - REQUEST_CASTLE_WAR_SEASON_REWARD(0x109, null, ConnectionState.IN_GAME), - REQUEST_VIP_PRODUCT_LIST(0x10A, null, ConnectionState.IN_GAME), - REQUEST_VIP_LUCKY_GAME_INFO(0x10B, null, ConnectionState.IN_GAME), - REQUEST_VIP_LUCKY_GAME_ITEM_LIST(0x10C, null, ConnectionState.IN_GAME), - REQUEST_VIP_LUCKY_GAME_BONUS(0x10D, null, ConnectionState.IN_GAME), - EX_REQUEST_VIP_INFO(0x10E, null, ConnectionState.IN_GAME), - REQUEST_CAPTCHA_ANSWER(0x10F, null, ConnectionState.IN_GAME), - REQUEST_REFRESH_CAPTCHA_IMAGE(0x110, null, ConnectionState.IN_GAME), - REQUEST_PLEDGE_SIGN_IN_FOR_OPEN_JOINING_METHOD(0x111, RequestPledgeSignInForOpenJoiningMethod::new, ConnectionState.IN_GAME), - EX_REQUEST_MATCH_ARENA(0x112, null, ConnectionState.IN_GAME), - EX_CONFIRM_MATCH_ARENA(0x113, null, ConnectionState.IN_GAME), - EX_CANCEL_MATCH_ARENA(0x114, null, ConnectionState.IN_GAME), - EX_CHANGE_CLASS_ARENA(0x115, null, ConnectionState.IN_GAME), - EX_CONFIRM_CLASS_ARENA(0x116, null, ConnectionState.IN_GAME), - REQUEST_OPEN_DECO_NPCUI(0x117, null, ConnectionState.IN_GAME), - REQUEST_CHECK_AGIT_DECO_AVAILABILITY(0x118, null, ConnectionState.IN_GAME), - REQUEST_USER_FACTION_INFO(0x119, RequestUserFactionInfo::new, ConnectionState.IN_GAME), - EX_EXIT_ARENA(0x11A, null, ConnectionState.IN_GAME), - REQUEST_EVENT_BALTHUS_TOKEN(0x11B, null, ConnectionState.IN_GAME), - REQUEST_PARTY_MATCHING_HISTORY(0x11C, null, ConnectionState.IN_GAME), - EX_ARENA_CUSTOM_NOTIFICATION(0x11D, null, ConnectionState.IN_GAME), - REQUEST_TODO_LIST(0x11E, null, ConnectionState.IN_GAME), - REQUEST_TODO_LIST_HTML(0x11F, null, ConnectionState.IN_GAME), - REQUEST_ONE_DAY_REWARD_RECEIVE(0x120, null, ConnectionState.IN_GAME), - REQUEST_QUEUE_TICKET(0x121, null, ConnectionState.IN_GAME), - REQUEST_PLEDGE_BONUS_OPEN(0x122, RequestPledgeBonusOpen::new, ConnectionState.IN_GAME), - REQUEST_PLEDGE_BONUS_REWARD_LIST(0x123, RequestPledgeBonusRewardList::new, ConnectionState.IN_GAME), - REQUEST_PLEDGE_BONUS_REWARD(0x124, RequestPledgeBonusReward::new, ConnectionState.IN_GAME), - REQUEST_SSO_AUTHN_TOKEN(0x125, null, ConnectionState.IN_GAME), - REQUEST_QUEUE_TICKET_LOGIN(0x126, null, ConnectionState.IN_GAME), - REQUEST_BLOCK_MEMO_INFO(0x127, null, ConnectionState.IN_GAME), - REQUEST_TRY_EN_SOUL_EXTRACTION(0x128, RequestTryEnSoulExtraction::new, ConnectionState.IN_GAME), - REQUEST_RAIDBOSS_SPAWN_INFO(0x129, RequestRaidBossSpawnInfo::new, ConnectionState.IN_GAME), - REQUEST_RAID_SERVER_INFO(0x12A, RequestRaidServerInfo::new, ConnectionState.IN_GAME), - REQUEST_SHOW_AGIT_SIEGE_INFO(0x12B, null, ConnectionState.IN_GAME), - REQUEST_ITEM_AUCTION_STATUS(0x12C, null, ConnectionState.IN_GAME), - REQUEST_MONSTER_BOOK_OPEN(0x12D, RequestMonsterBookOpen::new, ConnectionState.IN_GAME), - REQUEST_MONSTER_BOOK_CLOSE(0x12E, RequestMonsterBookClose::new, ConnectionState.IN_GAME), - REQUEST_MONSTER_BOOK_REWARD(0x12F, RequestMonsterBookReward::new, ConnectionState.IN_GAME), - EXREQUEST_MATCH_GROUP(0x130, null, ConnectionState.IN_GAME), - EXREQUEST_MATCH_GROUP_ASK(0x131, null, ConnectionState.IN_GAME), - EXREQUEST_MATCH_GROUP_ANSWER(0x132, null, ConnectionState.IN_GAME), - EXREQUEST_MATCH_GROUP_WITHDRAW(0x133, null, ConnectionState.IN_GAME), - EXREQUEST_MATCH_GROUP_OUST(0x134, null, ConnectionState.IN_GAME), - EXREQUEST_MATCH_GROUP_CHANGE_MASTER(0x135, null, ConnectionState.IN_GAME), - REQUEST_UPGRADE_SYSTEM_RESULT(0x136, RequestUpgradeSystemResult::new, ConnectionState.IN_GAME), - EX_CARD_UPDOWN_PICK_NUMB(0x137, null, ConnectionState.IN_GAME), - EX_CARD_UPDOWN_GAME_REWARD_REQUEST(0x138, null, ConnectionState.IN_GAME), - EX_CARD_UPDOWN_GAME_RETRY(0x139, null, ConnectionState.IN_GAME), - EX_CARD_UPDOWN_GAME_QUIT(0x13A, null, ConnectionState.IN_GAME), - EX_ARENA_RANK_ALL(0x13B, null, ConnectionState.IN_GAME), - EX_ARENA_MYRANK(0x13C, null, ConnectionState.IN_GAME), - EX_SWAP_AGATHION_SLOT_ITEMS(0x13D, null, ConnectionState.IN_GAME), - EX_PLEDGE_CONTRIBUTION_RANK(0x13E, null, ConnectionState.IN_GAME), - EX_PLEDGE_CONTRIBUTION_INFO(0x13F, null, ConnectionState.IN_GAME), - EX_PLEDGE_CONTRIBUTION_REWARD(0x140, null, ConnectionState.IN_GAME), - EX_PLEDGE_LEVEL_UP(0x141, RequestExPledgeLevelUp::new, ConnectionState.IN_GAME), - EX_PLEDGE_MISSION_INFO(0x142, null, ConnectionState.IN_GAME), - EX_PLEDGE_MISSION_REWARD(0x143, null, ConnectionState.IN_GAME), - EX_PLEDGE_MASTERY_INFO(0x144, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME), - EX_PLEDGE_MASTERY_SET(0x145, RequestExPledgeMasterySet::new, ConnectionState.IN_GAME), - EX_PLEDGE_MASTERY_RESET(0x146, RequestExPledgeMasteryReset::new, ConnectionState.IN_GAME), - EX_PLEDGE_SKILL_INFO(0x147, RequestExPledgeSkillInfo::new, ConnectionState.IN_GAME), - EX_PLEDGE_SKILL_ACTIVATE(0x148, RequestExPledgeSkillActivate::new, ConnectionState.IN_GAME), - EX_PLEDGE_ITEM_LIST(0x149, RequestExPledgeItemList::new, ConnectionState.IN_GAME), - EX_PLEDGE_ITEM_ACTIVATE(0x14A, null, ConnectionState.IN_GAME), - EX_PLEDGE_ANNOUNCE(0x14B, RequestExPledgeAnnounce::new, ConnectionState.IN_GAME), - EX_PLEDGE_ANNOUNCE_SET(0x14C, null, ConnectionState.IN_GAME), - EX_CREATE_PLEDGE(0x14D, null, ConnectionState.IN_GAME), - EX_PLEDGE_ITEM_INFO(0x14E, null, ConnectionState.IN_GAME), - EX_PLEDGE_ITEM_BUY(0x14F, RequestExPledgeItemBuy::new, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_INFO(0x150, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_EXTRACT_INFO(0x151, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_EXTRACT(0x152, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_EVOLUTION_INFO(0x153, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_EVOLUTION(0x154, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_SET_TALENT(0x155, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_INIT_TALENT(0x156, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_ABSORB_INFO(0x157, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_ABSORB(0x158, null, ConnectionState.IN_GAME), - EX_REQUEST_LOCKED_ITEM(0x159, null, ConnectionState.IN_GAME), - EX_REQUEST_UNLOCKED_ITEM(0x15A, null, ConnectionState.IN_GAME), - EX_LOCKED_ITEM_CANCEL(0x15B, null, ConnectionState.IN_GAME), - EX_UNLOCKED_ITEM_CANCEL(0x15C, null, ConnectionState.IN_GAME), - EX_ELEMENTAL_SPIRIT_CHANGE_TYPE(0x15D, null, ConnectionState.IN_GAME), // 152 - REQUEST_BLOCK_LIST_FOR_AD(0x15E, null, ConnectionState.IN_GAME), - REQUEST_USER_BAN_INFO(0x15F, null, ConnectionState.IN_GAME), - EX_INTERACT_MODIFY(0x160, null, ConnectionState.IN_GAME), // 152 - EX_TRY_ENCHANT_ARTIFACT(0x161, null, ConnectionState.IN_GAME), // 152 - EX_XIGN_CODE(0x162, null, ConnectionState.IN_GAME); // 152 + REQUEST_LUCKY_GAME_START_INFO(0xF0, RequestLuckyGameStartInfo::new, ConnectionState.IN_GAME), + REQUEST_LUCKY_GAME_PLAY(0xF1, RequestLuckyGamePlay::new, ConnectionState.IN_GAME), + NOTIFY_TRAINING_ROOM_END(0xF2, NotifyTrainingRoomEnd::new, ConnectionState.IN_GAME), + REQUEST_NEW_ENCHANT_PUSH_ONE(0xF3, RequestNewEnchantPushOne::new, ConnectionState.IN_GAME), + REQUEST_NEW_ENCHANT_REMOVE_ONE(0xF4, RequestNewEnchantRemoveOne::new, ConnectionState.IN_GAME), + REQUEST_NEW_ENCHANT_PUSH_TWO(0xF5, RequestNewEnchantPushTwo::new, ConnectionState.IN_GAME), + REQUEST_NEW_ENCHANT_REMOVE_TWO(0xF6, RequestNewEnchantRemoveTwo::new, ConnectionState.IN_GAME), + REQUEST_NEW_ENCHANT_CLOSE(0xF7, RequestNewEnchantClose::new, ConnectionState.IN_GAME), + REQUEST_NEW_ENCHANT_TRY(0xF8, RequestNewEnchantTry::new, ConnectionState.IN_GAME), + REQUEST_NEW_ENCHANT_RETRY_TO_PUT_ITEMS(0xF9, RequestNewEnchantRetryToPutItems::new, ConnectionState.IN_GAME), + EX_REQUEST_CARD_REWARD_LIST(0xFA, null, ConnectionState.IN_GAME), + EX_REQUEST_ACCOUNT_ATTENDANCE_INFO(0xFB, null, ConnectionState.IN_GAME), + EX_REQUEST_ACCOUNT_ATTENDANCE_REWARD(0xFC, null, ConnectionState.IN_GAME), + REQUEST_TARGET_ACTION_MENU(0xFD, RequestTargetActionMenu::new, ConnectionState.IN_GAME), + EX_SEND_SELECTED_QUEST_ZONE_ID(0xFE, ExSendSelectedQuestZoneID::new, ConnectionState.IN_GAME), + REQUEST_ALCHEMY_SKILL_LIST(0xFF, RequestAlchemySkillList::new, ConnectionState.IN_GAME), + REQUEST_ALCHEMY_TRY_MIX_CUBE(0x100, RequestAlchemyTryMixCube::new, ConnectionState.IN_GAME), + REQUEST_ALCHEMY_CONVERSION(0x101, RequestAlchemyConversion::new, ConnectionState.IN_GAME), + SEND_EXECUTED_UI_EVENTS_COUNT(0x102, null, ConnectionState.IN_GAME), + EX_SEND_CLIENT_INI(0x103, null, ConnectionState.AUTHENTICATED), + REQUEST_EX_AUTO_FISH(0x104, ExRequestAutoFish::new, ConnectionState.IN_GAME), + REQUEST_VIP_ATTENDANCE_ITEM_LIST(0x105, RequestVipAttendanceItemList::new, ConnectionState.IN_GAME), + REQUEST_VIP_ATTENDANCE_CHECK(0x106, RequestVipAttendanceCheck::new, ConnectionState.IN_GAME), + REQUEST_ITEM_ENSOUL(0x107, RequestItemEnsoul::new, ConnectionState.IN_GAME), + REQUEST_CASTLE_WAR_SEASON_REWARD(0x108, null, ConnectionState.IN_GAME), + REQUEST_VIP_PRODUCT_LIST(0x109, null, ConnectionState.IN_GAME), + REQUEST_VIP_LUCKY_GAME_INFO(0x10A, null, ConnectionState.IN_GAME), + REQUEST_VIP_LUCKY_GAME_ITEM_LIST(0x10B, null, ConnectionState.IN_GAME), + REQUEST_VIP_LUCKY_GAME_BONUS(0x10C, null, ConnectionState.IN_GAME), + EX_REQUEST_VIP_INFO(0x10D, null, ConnectionState.IN_GAME), + REQUEST_CAPTCHA_ANSWER(0x10E, null, ConnectionState.IN_GAME), + REQUEST_REFRESH_CAPTCHA_IMAGE(0x10F, null, ConnectionState.IN_GAME), + REQUEST_PLEDGE_SIGN_IN_FOR_OPEN_JOINING_METHOD(0x110, RequestPledgeSignInForOpenJoiningMethod::new, ConnectionState.IN_GAME), + EX_REQUEST_MATCH_ARENA(0x111, null, ConnectionState.IN_GAME), + EX_CONFIRM_MATCH_ARENA(0x112, null, ConnectionState.IN_GAME), + EX_CANCEL_MATCH_ARENA(0x113, null, ConnectionState.IN_GAME), + EX_CHANGE_CLASS_ARENA(0x114, null, ConnectionState.IN_GAME), + EX_CONFIRM_CLASS_ARENA(0x115, null, ConnectionState.IN_GAME), + REQUEST_OPEN_DECO_NPCUI(0x116, null, ConnectionState.IN_GAME), + REQUEST_CHECK_AGIT_DECO_AVAILABILITY(0x117, null, ConnectionState.IN_GAME), + REQUEST_USER_FACTION_INFO(0x118, RequestUserFactionInfo::new, ConnectionState.IN_GAME), + EX_EXIT_ARENA(0x119, null, ConnectionState.IN_GAME), + REQUEST_EVENT_BALTHUS_TOKEN(0x11A, null, ConnectionState.IN_GAME), + REQUEST_PARTY_MATCHING_HISTORY(0x11B, null, ConnectionState.IN_GAME), + EX_ARENA_CUSTOM_NOTIFICATION(0x11C, null, ConnectionState.IN_GAME), + REQUEST_TODO_LIST(0x11D, null, ConnectionState.IN_GAME), + REQUEST_TODO_LIST_HTML(0x11E, null, ConnectionState.IN_GAME), + REQUEST_ONE_DAY_REWARD_RECEIVE(0x11F, null, ConnectionState.IN_GAME), + REQUEST_QUEUE_TICKET(0x120, null, ConnectionState.IN_GAME), + REQUEST_PLEDGE_BONUS_OPEN(0x121, RequestPledgeBonusOpen::new, ConnectionState.IN_GAME), + REQUEST_PLEDGE_BONUS_REWARD_LIST(0x122, RequestPledgeBonusRewardList::new, ConnectionState.IN_GAME), + REQUEST_PLEDGE_BONUS_REWARD(0x123, RequestPledgeBonusReward::new, ConnectionState.IN_GAME), + REQUEST_SSO_AUTHN_TOKEN(0x124, null, ConnectionState.IN_GAME), + REQUEST_QUEUE_TICKET_LOGIN(0x125, null, ConnectionState.IN_GAME), + REQUEST_BLOCK_MEMO_INFO(0x126, null, ConnectionState.IN_GAME), + REQUEST_TRY_EN_SOUL_EXTRACTION(0x127, RequestTryEnSoulExtraction::new, ConnectionState.IN_GAME), + REQUEST_RAIDBOSS_SPAWN_INFO(0x128, RequestRaidBossSpawnInfo::new, ConnectionState.IN_GAME), + REQUEST_RAID_SERVER_INFO(0x129, RequestRaidServerInfo::new, ConnectionState.IN_GAME), + REQUEST_SHOW_AGIT_SIEGE_INFO(0x12A, null, ConnectionState.IN_GAME), + REQUEST_ITEM_AUCTION_STATUS(0x12B, null, ConnectionState.IN_GAME), + REQUEST_MONSTER_BOOK_OPEN(0x12C, RequestMonsterBookOpen::new, ConnectionState.IN_GAME), + REQUEST_MONSTER_BOOK_CLOSE(0x12D, RequestMonsterBookClose::new, ConnectionState.IN_GAME), + REQUEST_MONSTER_BOOK_REWARD(0x12E, RequestMonsterBookReward::new, ConnectionState.IN_GAME), + EXREQUEST_MATCH_GROUP(0x12F, null, ConnectionState.IN_GAME), + EXREQUEST_MATCH_GROUP_ASK(0x130, null, ConnectionState.IN_GAME), + EXREQUEST_MATCH_GROUP_ANSWER(0x131, null, ConnectionState.IN_GAME), + EXREQUEST_MATCH_GROUP_WITHDRAW(0x132, null, ConnectionState.IN_GAME), + EXREQUEST_MATCH_GROUP_OUST(0x133, null, ConnectionState.IN_GAME), + EXREQUEST_MATCH_GROUP_CHANGE_MASTER(0x134, null, ConnectionState.IN_GAME), + REQUEST_UPGRADE_SYSTEM_RESULT(0x135, RequestUpgradeSystemResult::new, ConnectionState.IN_GAME), + EX_CARD_UPDOWN_PICK_NUMB(0x136, null, ConnectionState.IN_GAME), + EX_CARD_UPDOWN_GAME_REWARD_REQUEST(0x137, null, ConnectionState.IN_GAME), + EX_CARD_UPDOWN_GAME_RETRY(0x138, null, ConnectionState.IN_GAME), + EX_CARD_UPDOWN_GAME_QUIT(0x139, null, ConnectionState.IN_GAME), + EX_ARENA_RANK_ALL(0x13A, null, ConnectionState.IN_GAME), + EX_ARENA_MYRANK(0x13B, null, ConnectionState.IN_GAME), + EX_SWAP_AGATHION_SLOT_ITEMS(0x13C, null, ConnectionState.IN_GAME), + EX_PLEDGE_CONTRIBUTION_RANK(0x13D, null, ConnectionState.IN_GAME), + EX_PLEDGE_CONTRIBUTION_INFO(0x13E, null, ConnectionState.IN_GAME), + EX_PLEDGE_CONTRIBUTION_REWARD(0x13F, null, ConnectionState.IN_GAME), + EX_PLEDGE_LEVEL_UP(0x140, RequestExPledgeLevelUp::new, ConnectionState.IN_GAME), + EX_PLEDGE_MISSION_INFO(0x141, null, ConnectionState.IN_GAME), + EX_PLEDGE_MISSION_REWARD(0x142, null, ConnectionState.IN_GAME), + EX_PLEDGE_MASTERY_INFO(0x143, RequestExPledgeMasteryInfo::new, ConnectionState.IN_GAME), + EX_PLEDGE_MASTERY_SET(0x144, RequestExPledgeMasterySet::new, ConnectionState.IN_GAME), + EX_PLEDGE_MASTERY_RESET(0x145, RequestExPledgeMasteryReset::new, ConnectionState.IN_GAME), + EX_PLEDGE_SKILL_INFO(0x146, RequestExPledgeSkillInfo::new, ConnectionState.IN_GAME), + EX_PLEDGE_SKILL_ACTIVATE(0x147, RequestExPledgeSkillActivate::new, ConnectionState.IN_GAME), + EX_PLEDGE_ITEM_LIST(0x148, RequestExPledgeItemList::new, ConnectionState.IN_GAME), + EX_PLEDGE_ITEM_ACTIVATE(0x149, null, ConnectionState.IN_GAME), + EX_PLEDGE_ANNOUNCE(0x14A, RequestExPledgeAnnounce::new, ConnectionState.IN_GAME), + EX_PLEDGE_ANNOUNCE_SET(0x14B, null, ConnectionState.IN_GAME), + EX_CREATE_PLEDGE(0x14C, null, ConnectionState.IN_GAME), + EX_PLEDGE_ITEM_INFO(0x14D, null, ConnectionState.IN_GAME), + EX_PLEDGE_ITEM_BUY(0x14E, RequestExPledgeItemBuy::new, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_INFO(0x14F, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_EXTRACT_INFO(0x150, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_EXTRACT(0x151, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_EVOLUTION_INFO(0x152, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_EVOLUTION(0x153, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_SET_TALENT(0x154, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_INIT_TALENT(0x155, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_ABSORB_INFO(0x156, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_ABSORB(0x157, null, ConnectionState.IN_GAME), + EX_REQUEST_LOCKED_ITEM(0x158, null, ConnectionState.IN_GAME), + EX_REQUEST_UNLOCKED_ITEM(0x159, null, ConnectionState.IN_GAME), + EX_LOCKED_ITEM_CANCEL(0x15A, null, ConnectionState.IN_GAME), + EX_UNLOCKED_ITEM_CANCEL(0x15B, null, ConnectionState.IN_GAME), + EX_ELEMENTAL_SPIRIT_CHANGE_TYPE(0x15C, null, ConnectionState.IN_GAME), // 152 + REQUEST_BLOCK_LIST_FOR_AD(0x15D, null, ConnectionState.IN_GAME), + REQUEST_USER_BAN_INFO(0x15E, null, ConnectionState.IN_GAME), + EX_INTERACT_MODIFY(0x15F, null, ConnectionState.IN_GAME), // 152 + EX_TRY_ENCHANT_ARTIFACT(0x160, null, ConnectionState.IN_GAME), // 152 + EX_XIGN_CODE(0x161, null, ConnectionState.IN_GAME), // 152 + EX_OPEN_HTML(0x164, null, ConnectionState.IN_GAME), // 228 + EX_REQUEST_CLASS_CHANGE(0x165, null, ConnectionState.IN_GAME), // 228 + EX_REQUEST_CLASS_CHANGE_VERIFYING(0x166, null, ConnectionState.IN_GAME), // 228 + EX_REQUEST_TELEPORT(0x167, ExRequestTeleport::new, ConnectionState.IN_GAME), // 228 + EX_COSTUME_COLLECTION_SKILL_ACTIVE(0x16B, null, ConnectionState.IN_GAME), // 228 + REQUEST_AUTO_USE_POTION(0x171, null, ConnectionState.IN_GAME), // 228 + REQUEST_AUTO_USE(0x177, null, ConnectionState.IN_GAME), // 228 + EX_TIME_RESTRICT_FIELD_LIST(0x17F, null, ConnectionState.IN_GAME), // 228 + EX_TIME_RESTRICT_FIELD_USER_ENTER(0x180, null, ConnectionState.IN_GAME), // 228 + EX_RANKING_CHAR_INFO(0x181, null, ConnectionState.IN_GAME), // 228 + EX_RANKING_CHAR_HISTORY(0x182, null, ConnectionState.IN_GAME), // 228 + EX_RANKING_CHAR_RANKERS(0x183, null, ConnectionState.IN_GAME), // 228 + EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_ATTACKER_LIST(0x186, null, ConnectionState.IN_GAME), // 228 + EX_LETTER_COLLECTOR_TAKE_REWARD(0x18D, null, ConnectionState.IN_GAME); // 228 public static final ExIncomingPackets[] PACKET_ARRAY; diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/OutgoingPackets.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/OutgoingPackets.java index 0e30ecd5a8..2cbeff9b23 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/OutgoingPackets.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/OutgoingPackets.java @@ -796,7 +796,13 @@ public enum OutgoingPackets EX_USER_BAN_INFO(0xFE, 0x201), EX_TRY_ENCHANT_ARTIFACT_RESULT(0xFE, 0x202), // 152 EX_XIGN_CODE(0xFE, 0x203), // 152 - EX_MAX(0xFE, 0x204); // 152 + EX_MAX(0xFE, 0x204), // 152 + EX_COIN_COUNT(0xFE, 0x209), // 228 + EX_SEND_COSTUME_LIST(0xFE, 0x20F), // 228 + EX_COSTUME_SHORTCUT_LIST(0xFE, 0x215), // 228 + EX_AUTOPLAY_SETTING(0xFE, 0x221), // 228 + EX_UNK_225(0xFE, 0x225), // 228 + EX_MERCENARY_CASTLEWAR_CASTLE_SIEGE_HUD_INFO(0xFE, 0x235); // 228 private final int _id1; private final int _id2; diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java new file mode 100644 index 0000000000..599560064c --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/ExRequestTeleport.java @@ -0,0 +1,74 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.l2jmobius.gameserver.network.clientpackets; + +import org.l2jmobius.commons.network.PacketReader; +import org.l2jmobius.gameserver.data.xml.impl.TeleportListData; +import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance; +import org.l2jmobius.gameserver.model.holders.TeleportListHolder; +import org.l2jmobius.gameserver.network.GameClient; +import org.l2jmobius.gameserver.network.SystemMessageId; + +/** + * @author NviX + */ +public class ExRequestTeleport implements IClientIncomingPacket +{ + private int _locId; + + @Override + public boolean read(GameClient client, PacketReader packet) + { + _locId = packet.readD(); + return true; + } + + @Override + public void run(GameClient client) + { + final PlayerInstance player = client.getPlayer(); + if (player == null) + { + return; + } + + boolean success = false; + + for (TeleportListHolder teleport : TeleportListData.getInstance().getTeleports()) + { + if (teleport.getLocId() == _locId) + { + if (player.getAdena() < teleport.getPrice()) + { + player.sendPacket(SystemMessageId.YOU_DO_NOT_HAVE_ENOUGH_ADENA); + return; + } + + player.reduceAdena("teleport", teleport.getPrice(), player, true); + player.teleToLocation(teleport.getX(), teleport.getY(), teleport.getZ()); + success = true; + break; + } + } + + if (!success) + { + LOGGER.info("No registered teleport location for id: " + _locId); + return; + } + } +} \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestAutoUse.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestAutoUse.java new file mode 100644 index 0000000000..62a5b629d2 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestAutoUse.java @@ -0,0 +1,61 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.l2jmobius.gameserver.network.clientpackets; + +import org.l2jmobius.commons.network.PacketReader; +import org.l2jmobius.gameserver.network.GameClient; + +/** + * @author NviX + */ +public class RequestAutoUse implements IClientIncomingPacket +{ + @Override + public boolean read(GameClient client, PacketReader packet) + { + int unk1 = packet.readC(); // C - true. This is summary amount of next data received. + LOGGER.info("received packet RequestAutoUse with unk1:" + unk1); + int unk2 = packet.readC(); + LOGGER.info("and unk2: " + unk2); + int unk3 = packet.readC(); // Can target mobs, that attacked by other players? + LOGGER.info("and unk3: " + unk3); + int unk4 = packet.readC(); // Auto pickup? + LOGGER.info("and unk4: " + unk4); + int unk5 = packet.readC(); + LOGGER.info("and unk5: " + unk5); + int unk6 = packet.readC(); + LOGGER.info("and unk6: " + unk6); + int unk7 = packet.readC(); // short range :1; long: 0 + LOGGER.info("and unk7: " + unk7); + int unk8 = packet.readC(); // received 51 when logged in game... + LOGGER.info("and unk8: " + unk8); + int unk9 = packet.readC(); + LOGGER.info("and unk9: " + unk9); + int unk10 = packet.readC(); + LOGGER.info("and unk10: " + unk10); + int unk11 = packet.readC(); + LOGGER.info("and unk11: " + unk11); + int unk12 = packet.readC(); // enable/ disable? + LOGGER.info("and unk12: " + unk12); + return true; + } + + @Override + public void run(GameClient client) + { + } +} \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java index 2e9efbe9ea..1fc266ce20 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestEnchantItem.java @@ -37,6 +37,7 @@ import org.l2jmobius.gameserver.model.skills.Skill; import org.l2jmobius.gameserver.network.GameClient; import org.l2jmobius.gameserver.network.SystemMessageId; import org.l2jmobius.gameserver.network.serverpackets.EnchantResult; +import org.l2jmobius.gameserver.network.serverpackets.ExItemAnnounce; import org.l2jmobius.gameserver.network.serverpackets.InventoryUpdate; import org.l2jmobius.gameserver.network.serverpackets.MagicSkillUse; import org.l2jmobius.gameserver.network.serverpackets.SystemMessage; @@ -230,13 +231,14 @@ public class RequestEnchantItem implements IClientIncomingPacket // announce the success final int minEnchantAnnounce = item.isArmor() ? 6 : 7; final int maxEnchantAnnounce = item.isArmor() ? 0 : 15; - if ((item.getEnchantLevel() == minEnchantAnnounce) || (item.getEnchantLevel() == maxEnchantAnnounce)) + if ((item.getEnchantLevel() >= minEnchantAnnounce) || (item.getEnchantLevel() == maxEnchantAnnounce)) { final SystemMessage sm = new SystemMessage(SystemMessageId.C1_HAS_SUCCESSFULLY_ENCHANTED_A_S2_S3); sm.addString(player.getName()); sm.addInt(item.getEnchantLevel()); sm.addItemName(item); player.broadcastPacket(sm); + player.broadcastPacket(new ExItemAnnounce(item)); final Skill skill = CommonSkill.FIREWORK.getSkill(); if (skill != null) diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutDel.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutDel.java index c13cd0dd8d..fa2f6199bb 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutDel.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutDel.java @@ -46,7 +46,7 @@ public class RequestShortCutDel implements IClientIncomingPacket return; } - if ((_page > 19) || (_page < 0)) + if ((_page > 23) || (_page < 0)) { return; } diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java index 665b42c95f..0533a88e7b 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/clientpackets/RequestShortCutReg.java @@ -40,6 +40,7 @@ public class RequestShortCutReg implements IClientIncomingPacket final int slot = packet.readD(); _slot = slot % 12; _page = slot / 12; + packet.readC(); // 228 _id = packet.readD(); _lvl = packet.readH(); _subLvl = packet.readH(); // Sublevel @@ -50,7 +51,7 @@ public class RequestShortCutReg implements IClientIncomingPacket @Override public void run(GameClient client) { - if ((client.getPlayer() == null) || (_page > 19) || (_page < 0)) + if ((client.getPlayer() == null) || (_page > 23) || (_page < 0)) { return; } diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/Die.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/Die.java index 5edfb4670c..5be8975753 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/Die.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/Die.java @@ -16,10 +16,6 @@ */ package org.l2jmobius.gameserver.network.serverpackets; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - import org.l2jmobius.commons.network.PacketWriter; import org.l2jmobius.gameserver.instancemanager.CastleManager; import org.l2jmobius.gameserver.instancemanager.FortManager; @@ -31,25 +27,18 @@ import org.l2jmobius.gameserver.model.entity.Fort; import org.l2jmobius.gameserver.network.OutgoingPackets; /** - * @author UnAfraid, Nos + * @author Mobius */ public class Die implements IClientOutgoingPacket { private final int _objectId; - private boolean _toVillage; - private boolean _toClanHall; - private boolean _toCastle; - private boolean _toOutpost; private final boolean _isSweepable; - private boolean _useFeather; - private boolean _toFortress; - private boolean _hideAnimation; - private List _items = null; - private boolean _itemsEnabled; + private int _flags = 0; public Die(Creature creature) { _objectId = creature.getObjectId(); + _isSweepable = creature.isAttackable() && creature.isSweepActive(); if (creature.isPlayer()) { final Clan clan = creature.getActingPlayer().getClan(); @@ -70,47 +59,32 @@ public class Die implements IClientOutgoingPacket isInFortDefense = (siegeClan == null) && fort.getSiege().checkIsDefender(clan); } - _toVillage = creature.canRevive() && !creature.isPendingRevive(); - _toClanHall = (clan != null) && (clan.getHideoutId() > 0); - _toCastle = ((clan != null) && (clan.getCastleId() > 0)) || isInCastleDefense; - _toOutpost = ((siegeClan != null) && !isInCastleDefense && !isInFortDefense && !siegeClan.getFlag().isEmpty()); - _useFeather = creature.getAccessLevel().allowFixedRes() || creature.getInventory().haveItemForSelfResurrection(); - _toFortress = ((clan != null) && (clan.getFortId() > 0)) || isInFortDefense; + // ClanHall check. + if ((clan != null) && (clan.getHideoutId() > 0)) + { + _flags += 2; + } + // Castle check. + if (((clan != null) && (clan.getCastleId() > 0)) || isInCastleDefense) + { + _flags += 4; + } + // Fortress check. + if (((clan != null) && (clan.getFortId() > 0)) || isInFortDefense) + { + _flags += 8; + } + // Outpost check. + if (((siegeClan != null) && !isInCastleDefense && !isInFortDefense && !siegeClan.getFlag().isEmpty())) + { + _flags += 16; + } + // Feather check. + if (creature.getAccessLevel().allowFixedRes() || creature.getInventory().haveItemForSelfResurrection()) + { + _flags += 32; + } } - - _isSweepable = creature.isAttackable() && creature.isSweepActive(); - } - - public void setHideAnimation(boolean val) - { - _hideAnimation = val; - } - - public void addItem(int itemId) - { - if (_items == null) - { - _items = new ArrayList<>(8); - } - - if (_items.size() < 8) - { - _items.add(itemId); - } - else - { - throw new IndexOutOfBoundsException("Die packet doesn't support more then 8 items!"); - } - } - - public List getItems() - { - return _items != null ? _items : Collections.emptyList(); - } - - public void setItemsEnabled(boolean val) - { - _itemsEnabled = val; } @Override @@ -119,20 +93,10 @@ public class Die implements IClientOutgoingPacket OutgoingPackets.DIE.writeId(packet); packet.writeD(_objectId); - packet.writeD(_toVillage ? 0x01 : 0x00); - packet.writeD(_toClanHall ? 0x01 : 0x00); - packet.writeD(_toCastle ? 0x01 : 0x00); - packet.writeD(_toOutpost ? 0x01 : 0x00); - packet.writeD(_isSweepable ? 0x01 : 0x00); - packet.writeD(_useFeather ? 0x01 : 0x00); - packet.writeD(_toFortress ? 0x01 : 0x00); - packet.writeD(0x00); // Disables use Feather button for X seconds - packet.writeD(0x00); // Adventure's Song - packet.writeC(_hideAnimation ? 0x01 : 0x00); - - packet.writeD(_itemsEnabled ? 0x01 : 0x00); - packet.writeD(getItems().size()); - getItems().forEach(packet::writeD); + packet.writeC(_flags); + packet.writeC(0); + packet.writeC(_isSweepable ? 1 : 0); + packet.writeC(0); // 1: Resurrection during siege. return true; } } diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/EtcStatusUpdate.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/EtcStatusUpdate.java index 067704be8d..dc4020d29f 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/EtcStatusUpdate.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/EtcStatusUpdate.java @@ -44,8 +44,8 @@ public class EtcStatusUpdate implements IClientOutgoingPacket packet.writeC(_player.getCharges()); // 1-7 increase force, lvl packet.writeD(_player.getWeightPenalty()); // 1-4 weight penalty, lvl (1=50%, 2=66.6%, 3=80%, 4=100%) - packet.writeC(_player.getExpertiseWeaponPenalty()); // Weapon Grade Penalty [1-4] - packet.writeC(_player.getExpertiseArmorPenalty()); // Armor Grade Penalty [1-4] + packet.writeC(0); // Weapon Grade Penalty [1-4] + packet.writeC(0); // Armor Grade Penalty [1-4] packet.writeC(0); // Death Penalty [1-15, 0 = disabled)], not used anymore in Ertheia packet.writeC(_player.getChargedSouls()); packet.writeC(_mask); diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java new file mode 100644 index 0000000000..1280b26696 --- /dev/null +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ExItemAnnounce.java @@ -0,0 +1,46 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package org.l2jmobius.gameserver.network.serverpackets; + +import org.l2jmobius.commons.network.PacketWriter; +import org.l2jmobius.gameserver.model.items.instance.ItemInstance; +import org.l2jmobius.gameserver.network.OutgoingPackets; + +/** + * @author NviX + */ +public class ExItemAnnounce implements IClientOutgoingPacket +{ + private final ItemInstance _item; + + public ExItemAnnounce(ItemInstance item) + { + _item = item; + } + + @Override + public boolean write(PacketWriter packet) + { + OutgoingPackets.EX_ITEM_ANNOUNCE.writeId(packet); + packet.writeC(0x00); + packet.writeString(_item.getName()); // name of item + packet.writeD(_item.getId()); // item id + packet.writeD(_item.getEnchantLevel()); // enchant level + packet.writeC(0x00); + return true; + } +} \ No newline at end of file diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShopPreviewList.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShopPreviewList.java index 6322b9efcd..b0dced41df 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShopPreviewList.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShopPreviewList.java @@ -23,7 +23,6 @@ import org.l2jmobius.commons.network.PacketWriter; import org.l2jmobius.gameserver.model.buylist.Product; import org.l2jmobius.gameserver.model.buylist.ProductList; import org.l2jmobius.gameserver.model.items.Item; -import org.l2jmobius.gameserver.model.items.type.CrystalType; import org.l2jmobius.gameserver.network.OutgoingPackets; public class ShopPreviewList implements IClientOutgoingPacket @@ -31,14 +30,12 @@ public class ShopPreviewList implements IClientOutgoingPacket private final int _listId; private final Collection _list; private final long _money; - private CrystalType _expertise; - public ShopPreviewList(ProductList list, long currentMoney, CrystalType expertise) + public ShopPreviewList(ProductList list, long currentMoney) { _listId = list.getListId(); _list = list.getProducts(); _money = currentMoney; - _expertise = expertise; } public ShopPreviewList(Collection lst, int listId, long currentMoney) @@ -60,7 +57,7 @@ public class ShopPreviewList implements IClientOutgoingPacket int newlength = 0; for (Product product : _list) { - if (!product.getItem().getCrystalType().isGreater(_expertise) && product.getItem().isEquipable()) + if (product.getItem().isEquipable()) { newlength++; } @@ -69,7 +66,7 @@ public class ShopPreviewList implements IClientOutgoingPacket for (Product product : _list) { - if (!product.getItem().getCrystalType().isGreater(_expertise) && product.getItem().isEquipable()) + if (product.getItem().isEquipable()) { packet.writeD(product.getItemId()); packet.writeH(product.getItem().getType2()); // item type2 diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java index c14e792f42..09f2a5e58a 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutInit.java @@ -46,6 +46,8 @@ public class ShortCutInit implements IClientOutgoingPacket packet.writeD(sc.getType().ordinal()); packet.writeD(sc.getSlot() + (sc.getPage() * 12)); + packet.writeC(0x00); // 228 + switch (sc.getType()) { case ITEM: diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java index 7ee3ea5f46..b4ffcdafb2 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/ShortCutRegister.java @@ -40,6 +40,9 @@ public class ShortCutRegister implements IClientOutgoingPacket packet.writeD(_shortcut.getType().ordinal()); packet.writeD(_shortcut.getSlot() + (_shortcut.getPage() * 12)); // C4 Client + + packet.writeC(0x00); // 228 + switch (_shortcut.getType()) { case ITEM: @@ -72,6 +75,7 @@ public class ShortCutRegister implements IClientOutgoingPacket { packet.writeD(_shortcut.getId()); packet.writeD(_shortcut.getCharacterType()); + break; } } return true; diff --git a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java index 256534ea6b..8af333ae39 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java +++ b/L2J_Mobius_7.0_PreludeOfWar/java/org/l2jmobius/gameserver/network/serverpackets/UserInfo.java @@ -53,6 +53,7 @@ public class UserInfo extends AbstractMaskPacket private final byte[] _masks = new byte[] { + (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00 @@ -133,7 +134,7 @@ public class UserInfo extends AbstractMaskPacket packet.writeD(_player.getObjectId()); packet.writeD(_initSize); - packet.writeH(24); + packet.writeH(25); // 196 packet.writeB(_masks); if (containsMask(UserInfoType.RELATION)) @@ -301,7 +302,7 @@ public class UserInfo extends AbstractMaskPacket if (containsMask(UserInfoType.SOCIAL)) { - packet.writeH(22); + packet.writeH(30); // 228 packet.writeC(_player.getPvpFlag()); packet.writeD(_player.getReputation()); // Reputation packet.writeC(_player.getNobleLevel()); @@ -311,15 +312,21 @@ public class UserInfo extends AbstractMaskPacket packet.writeD(_player.getPvpKills()); packet.writeH(_player.getRecomLeft()); packet.writeH(_player.getRecomHave()); + packet.writeD(0x00); // 196 + packet.writeD(0x00); // 228 } if (containsMask(UserInfoType.VITA_FAME)) { - packet.writeH(15); + packet.writeH(19); // 196 packet.writeD(_player.getVitalityPoints()); packet.writeC(0x00); // Vita Bonus packet.writeD(_player.getFame()); packet.writeD(_player.getRaidbossPoints()); + packet.writeC(0x00); // 196 + packet.writeC(0x00); // 196 + packet.writeC(0x00); // 196 + packet.writeC(0x00); // 196 } if (containsMask(UserInfoType.SLOTS)) @@ -360,11 +367,17 @@ public class UserInfo extends AbstractMaskPacket if (containsMask(UserInfoType.INVENTORY_LIMIT)) { - packet.writeH(9); + packet.writeH(13); packet.writeH(0x00); packet.writeH(0x00); packet.writeH(_player.getInventoryLimit()); + packet.writeC(_player.isCursedWeaponEquipped() ? CursedWeaponsManager.getInstance().getLevel(_player.getCursedWeaponEquippedId()) : 0); + + packet.writeC(0x00); // 196 + packet.writeC(0x00); // 196 + packet.writeC(0x00); // 196 + packet.writeC(0x00); // 196 } if (containsMask(UserInfoType.TRUE_HERO)) @@ -386,6 +399,12 @@ public class UserInfo extends AbstractMaskPacket packet.writeD(0x00); } + if (containsMask(UserInfoType.UNKNOWN_196)) // 196 + { + packet.writeH(6); // 196 + packet.writeD(0x00); // 196 + } + return true; } diff --git a/L2J_Mobius_7.0_PreludeOfWar/launcher/Gameserver.launch b/L2J_Mobius_7.0_PreludeOfWar/launcher/Gameserver.launch index 14f085e7db..3acbc73c1e 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/launcher/Gameserver.launch +++ b/L2J_Mobius_7.0_PreludeOfWar/launcher/Gameserver.launch @@ -1,7 +1,7 @@ - + @@ -11,7 +11,7 @@ - + - + diff --git a/L2J_Mobius_7.0_PreludeOfWar/launcher/Loginserver.launch b/L2J_Mobius_7.0_PreludeOfWar/launcher/Loginserver.launch index f8715acc60..ff9236e49a 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/launcher/Loginserver.launch +++ b/L2J_Mobius_7.0_PreludeOfWar/launcher/Loginserver.launch @@ -1,7 +1,7 @@ - + @@ -12,7 +12,7 @@ - + - + diff --git a/L2J_Mobius_7.0_PreludeOfWar/readme.txt b/L2J_Mobius_7.0_PreludeOfWar/readme.txt index 2493935626..7e7328aa94 100644 --- a/L2J_Mobius_7.0_PreludeOfWar/readme.txt +++ b/L2J_Mobius_7.0_PreludeOfWar/readme.txt @@ -1,9 +1,6 @@ -L2J-Mobius Fafurion +L2J-Mobius Prelude of War -Client mirror 1: https://mega.nz/#!AHA1EQgQ!cjt1DxvIh4CIFkuyqEGMLLmfOcZslfWfH-vWjCYhYrc -Use mega downloader to download https://megadownloader.en.softonic.com/ - -Client mirror 2: https://drive.google.com/uc?id=1yeYwrQEIcmAz5Ha1R05c3QgntRPy9y0V&export=download +Client: Geodata: https://www.mediafire.com/file/17gbt8jt1tyo5gi/L2J_Mobius_6.0_Fafurion_Geodata.zip JDK: https://www.mediafire.com/file/k25pt0umuf16uoh/openjdk-12.0.2_windows-x64_bin.zip @@ -96,12 +93,16 @@ Etina's Fate: -Parsed new items from client -Artifact item support -Fafurion: +Fafurion: https://eu.4game.com/patchnotes/lineage2/132/ -Support for R110 items -Spawned new areas -Retail gatekeeper teleports -Equipment upgrade system +Prelude of War: https://eu.4game.com/patchnotes/lineage2/176/ +-Teleport list system. +-Removed item grade penalty. + Events: -Birth of Draco -Character Birthday