Καλημερα, εχω ενα προβλημα με εναν κωδικα που εχω περασει στο Eclipse , εχω βαλει οταν κανει sub ο παιχτης να του βγαινουν armor,weapon αλλα το προβλημα ειναι οτι δεν κανει update το inventory...
Οριστε ο κωδικας :
if(allowAddition)
{
String className = CharTemplateTable.getClassNameById(paramOne);
if(!player.addSubClass(paramOne, player.getTotalSubClasses() + 1))
{
player.sendMessage("The sub class could not be added.");
player.setLocked(false);
return;
}
int[] armorType = { Inventory.PAPERDOLL_RHAND, Inventory.PAPERDOLL_LHAND, Inventory.PAPERDOLL_LRHAND, Inventory.PAPERDOLL_LRHAND,
Inventory.PAPERDOLL_CHEST, Inventory.PAPERDOLL_HEAD,
Inventory.PAPERDOLL_LEGS, Inventory.PAPERDOLL_GLOVES,
Inventory.PAPERDOLL_FEET, Inventory.PAPERDOLL_BACK};
for (int items : armorType)
{
L2ItemInstance parmorInstance = player.getInventory().getPaperdollItem(items);
if (parmorInstance != null)
player.getInventory().unEquipItemInSlot(items);
}
player.broadcastPacket(new InventoryUpdate());
player.setActiveClass(player.getTotalSubClasses());
if(Config.CHECK_SKILLS_ON_ENTER && !Config.ALT_GAME_SKILL_LEARN)
{
player.checkAllowedSkills();
}
My initial plan was to port the Homunculus system from Live 502 to ClassicAden 502. But, when the interface for Homunculus is enabled, it has some hardcoded function that tries to load the dat files which leads to a crash since those files dont exist in ClassicAden. I was hoping to do some injection hoping, forcing the client to load the files.
Question
Devilfenix
Καλημερα, εχω ενα προβλημα με εναν κωδικα που εχω περασει στο Eclipse , εχω βαλει οταν κανει sub ο παιχτης να του βγαινουν armor,weapon αλλα το προβλημα ειναι οτι δεν κανει update το inventory...
Οριστε ο κωδικας :
if(allowAddition) { String className = CharTemplateTable.getClassNameById(paramOne); if(!player.addSubClass(paramOne, player.getTotalSubClasses() + 1)) { player.sendMessage("The sub class could not be added."); player.setLocked(false); return; } int[] armorType = { Inventory.PAPERDOLL_RHAND, Inventory.PAPERDOLL_LHAND, Inventory.PAPERDOLL_LRHAND, Inventory.PAPERDOLL_LRHAND, Inventory.PAPERDOLL_CHEST, Inventory.PAPERDOLL_HEAD, Inventory.PAPERDOLL_LEGS, Inventory.PAPERDOLL_GLOVES, Inventory.PAPERDOLL_FEET, Inventory.PAPERDOLL_BACK}; for (int items : armorType) { L2ItemInstance parmorInstance = player.getInventory().getPaperdollItem(items); if (parmorInstance != null) player.getInventory().unEquipItemInSlot(items); } player.broadcastPacket(new InventoryUpdate()); player.setActiveClass(player.getTotalSubClasses()); if(Config.CHECK_SKILLS_ON_ENTER && !Config.ALT_GAME_SKILL_LEARN) { player.checkAllowedSkills(); }25 answers to this question
Recommended Posts