Fixed issue #114

This commit is contained in:
Seefo
2014-03-23 16:04:57 -04:00
parent bd228e971a
commit c0fcda14df
2 changed files with 3 additions and 5 deletions
+3 -2
View File
@@ -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()));