mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-29 14:12:52 -04:00
Fixed issue #114
This commit is contained in:
@@ -172,7 +172,6 @@ public class EquipmentService implements INetworkDispatch {
|
||||
}
|
||||
|
||||
public void equip(CreatureObject actor, SWGObject item) {
|
||||
|
||||
String template = ((item.getAttachment("customServerTemplate") == null) ? item.getTemplate() : (item.getTemplate().split("shared_")[0] + "shared_" + ((String) item.getAttachment("customServerTemplate")) + ".iff"));
|
||||
String serverTemplate = template.replace(".iff", "");
|
||||
PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "equip");
|
||||
@@ -221,7 +220,6 @@ public class EquipmentService implements INetworkDispatch {
|
||||
|
||||
|
||||
public void unequip(CreatureObject actor, SWGObject item) {
|
||||
|
||||
String template = ((item.getAttachment("customServerTemplate") == null) ? item.getTemplate() : (item.getTemplate().split("shared_")[0] + "shared_" + ((String) item.getAttachment("customServerTemplate")) + ".iff"));
|
||||
String serverTemplate = template.replace(".iff", "");
|
||||
PyObject func = core.scriptService.getMethod("scripts/" + serverTemplate.split("shared_" , 2)[0].replace("shared_", ""), serverTemplate.split("shared_" , 2)[1], "unequip");
|
||||
@@ -241,6 +239,9 @@ public class EquipmentService implements INetworkDispatch {
|
||||
|
||||
if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) {
|
||||
core.skillModService.deductSkillMod(actor, e.getKey().replace("cat_skill_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue()));
|
||||
}
|
||||
if(e.getKey().startsWith("cat_stat_mod_bonus.@stat_n:")) {
|
||||
core.skillModService.deductSkillMod(actor, e.getKey().replace("cat_stat_mod_bonus.@stat_n:", ""), Integer.parseInt((String) e.getValue()));
|
||||
}
|
||||
if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_health")) {
|
||||
actor.setMaxHealth(actor.getMaxHealth() - Integer.parseInt((String) e.getValue()));
|
||||
|
||||
Reference in New Issue
Block a user