Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java
- index 828f57e..797e0a3 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2ClassMasterInstance.java
- @@ -345,6 +345,14 @@
- {
- showQuestionMark(player);
- }
- +
- + // After class change is successful, equip items based on class
- + player.equipItemsBasedOnClass();
- +
- return true;
- }
- diff --git a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- index 4bfbeef..649e2a1 100644
- --- a/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- +++ b/aCis_gameserver/java/net/sf/l2j/gameserver/model/actor/instance/L2PcInstance.java
- @@ -15470,4 +15470,84 @@
- isPVEMode = b;
- }
- +// Determina quais itens devem equipar com base na classe do personagem
- + public void equipItemsBasedOnClass() {
- + int[] itemIds;
- +
- + switch (this.getClassId()) {
- + case warrior:
- + itemIds = new int[]{352, 2378, 2411, 2425, 2449, 2525, 881, 881, 850, 850, 913, 297, 1463, 728, 1539, 736, 9612};
- + break;
- + case knight:
- + case elvenKnight:
- + case palusKnight:
- + case scavenger:
- + case artisan:
- + itemIds = new int[]{352, 2378, 2411, 2425, 2449, 2499, 881, 881, 850, 850, 913, 2493, 159, 1463, 728, 1539, 736, 9612};
- + break;
- + case rogue:
- + case elvenScout:
- + case assassin:
- + itemIds = new int[]{395, 417, 2424, 2448, 2412, 225, 881, 881, 850, 850, 913, 280, 1463, 728, 1539, 736, 9612};
- + break;
- + case wizard:
- + case cleric:
- + case elvenWizard:
- + case oracle:
- + case darkWizard:
- + case shillienOracle:
- + case orcShaman:
- + itemIds = new int[]{437, 470, 2450, 2426, 2412, 189, 881, 881, 850, 850, 913, 629, 1463, 728, 1539, 736, 9613};
- + break;
- + case orcRaider:
- + itemIds = new int[]{352, 2378, 2411, 2425, 2449, 70, 881, 881, 850, 850, 913, 297, 1463, 728, 1539, 736, 9612};
- + break;
- + case orcMonk:
- + itemIds = new int[]{395, 417, 2424, 2448, 2412, 262, 881, 881, 850, 850, 913, 1463, 728, 1539, 736, 9612};
- + break;
- + default:
- + // Classe não encontrada, sair
- + return;
- + }
- +
- + equipItems(itemIds);
- +
- + // Adicionar itens ao inventário
- + this.getInventory().addItem("Soul Shot Grade D", 1463, 2000, this, null);
- + this.getInventory().addItem("Spirit Shot Grade D", 3948, 2000, this, null);
- + this.getInventory().addItem("Mana Potion", 728, 200, this, null);
- + this.getInventory().addItem("Greater Healing Potion", 1539, 200, this, null);
- + this.getInventory().addItem("Scroll of Scape", 736, 5, this, null);
- + }
- +
- + private void equipItems(int... itemIds) {
- + for (int itemId : itemIds) {
- + ItemInstance item = this.getInventory().addItem("Armor", itemId, 1, this, null);
- + // Verificar se o item pode ser equipado
- + if (item.getItem().getBodyPart() != 0) {
- + this.getInventory().equipItemAndRecord(item);
- + }
- + }
- +
- + this.getInventory().updateDatabase();
- + this.sendPacket(new ItemList(this, true));
- + MagicSkillUse MSU = new MagicSkillUse(this, this, 2024, 1, 1, 0);
- + this.broadcastPacket(MSU);
- + }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement