Last active
September 29, 2024 22:13
-
-
Save Williams0ff/8f2def5205ae9ee0cf78bd137d293365 to your computer and use it in GitHub Desktop.
L2jOne - Auto Items
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/ClassMaster.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/ClassMaster.java | |
index 8a024382..a31acc7e 100644 | |
--- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/ClassMaster.java | |
+++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/ClassMaster.java | |
@@ -228,7 +281,28 @@ public final class ClassMaster extends Folk | |
player.getSubClasses().get(player.getClassIndex()).setClassId(player.getActiveClass()); | |
else | |
player.setBaseClass(player.getActiveClass()); | |
- | |
+ | |
+ if (newJobLevel == 1 || newJobLevel == 2 || newJobLevel == 3 && !player.isSubClassActive()) | |
+ { | |
+ for (NewbieItem holder : PlayerData.getInstance().getTemplate(player.getClassId()).getItems()) | |
+ { | |
+ final ItemInstance item = player.getInventory().addItem(holder.id(), holder.count()); | |
+ if (item != null) | |
+ { | |
+ if (item.isEquipable() && holder.isEquipped()) | |
+ player.getInventory().equipItemAndRecord(item); | |
+ | |
+ if (holder.enchant() != 0) | |
+ item.setEnchantLevel(holder.enchant(), player); | |
+ | |
+ player.sendIU(); | |
+ } | |
+ } | |
+ } | |
+ | |
player.refreshHennaList(); | |
player.broadcastUserInfo(); | |
return true; | |
diff --git a/aCis_datapack/data/xml/classes/humanFighter.xml b/aCis_datapack/data/xml/classes/humanFighter.xml | |
index b8e9dd64..63cc6b73 100644 | |
--- a/aCis_datapack/data/xml/classes/humanFighter.xml | |
+++ b/aCis_datapack/data/xml/classes/humanFighter.xml | |
@@ -234,12 +251,26 @@ | |
+ <items> | |
+ <item id="2411" count="1" enchantLevel="3" isEquipped="true"/> <!-- Brigandine Helmet --> | |
+ <item id="352" count="1" enchantLevel="3" isEquipped="true"/> <!-- Brigandine Tunic --> | |
+ <item id="2378" count="1" enchantLevel="3" isEquipped="true"/> <!-- Brigandine Gaiters --> | |
+ <item id="2449" count="1" enchantLevel="3" isEquipped="true"/> <!-- Brigandine Gauntlets --> | |
+ <item id="2425" count="1" enchantLevel="3" isEquipped="true"/> <!-- Brigandine Boots --> | |
+ <item id="2493" count="1" enchantLevel="3" isEquipped="true"/> <!-- Brigandine Shield --> | |
+ <item id="2499" count="1" enchantLevel="3" isEquipped="true"/> <!-- Elven Long Sword --> | |
+ <item id="913" count="1" enchantLevel="3" isEquipped="true"/> <!-- Elven Necklace --> | |
+ <item id="850" count="1" enchantLevel="3" isEquipped="true"/> <!-- Elven Earring --> | |
+ <item id="850" count="1" enchantLevel="3" isEquipped="true"/> <!-- Elven Earring --> | |
+ <item id="881" count="1" enchantLevel="3" isEquipped="true"/> <!-- Elven Ring --> | |
+ <item id="881" count="1" enchantLevel="3" isEquipped="true"/> <!-- Elven Ring --> | |
+ </items> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment