mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-02 03:15:52 -04:00
Fixed an issue where items weren't being properly removed when respeccing
This commit is contained in:
@@ -674,13 +674,14 @@ public class PlayerService implements INetworkDispatch {
|
||||
*/
|
||||
public void resetLevel(CreatureObject creature) {
|
||||
PlayerObject player = (PlayerObject) creature.getSlottedObject("ghost");
|
||||
SWGObject inventory = creature.getSlottedObject("inventory");
|
||||
|
||||
try {
|
||||
for (Long equipmentId : new ArrayList<Long>(creature.getEquipmentList())) {
|
||||
|
||||
SWGObject equipment = core.objectService.getObject(equipmentId);
|
||||
|
||||
if (equipment == null) {
|
||||
if (equipment == null || equipment.getTemplate().startsWith("object/tangible/hair/")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -693,7 +694,7 @@ public class PlayerService implements INetworkDispatch {
|
||||
case "object/weapon/creature/shared_creature_default_weapon.iff":
|
||||
continue;
|
||||
default:
|
||||
core.equipmentService.unequip(creature, equipment);
|
||||
creature.transferTo(creature, inventory, equipment);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user