Merge pull request #174 from Ziggeh/master

Trading fix, Jedi abilities, profession restrictions on items
This commit is contained in:
Ziggeh
2013-12-28 06:22:23 -08:00
29 changed files with 474 additions and 13 deletions
+20
View File
@@ -0,0 +1,20 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_dm'):
command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10))
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+20
View File
@@ -0,0 +1,20 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_dm'):
command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10))
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+20
View File
@@ -0,0 +1,20 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_dm'):
command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10))
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+20
View File
@@ -0,0 +1,20 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_dm'):
command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10))
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+20
View File
@@ -0,0 +1,20 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_dm'):
command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10))
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+20
View File
@@ -0,0 +1,20 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_dm'):
command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10))
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+20
View File
@@ -0,0 +1,20 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_dm'):
command.setCooldown(command.getCooldown() + (actor.getSkillMod('expertise_cooldown_line_fs_dm').getBase()/10))
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+16
View File
@@ -0,0 +1,16 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+16
View File
@@ -0,0 +1,16 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+16
View File
@@ -0,0 +1,16 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+16
View File
@@ -0,0 +1,16 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+16
View File
@@ -0,0 +1,16 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+16
View File
@@ -0,0 +1,16 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+16
View File
@@ -0,0 +1,16 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_damage_line_fs_dm'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillMod('expertise_damage_line_fs_dm').getBase())/100))
if actor.getSkillMod('expertise_critical_line_fs_dm'):
command.setCriticalChance(command.getCriticalChance() + actor.getSkillMod('expertise_critical_line_fs_dm').getBase())
if actor.getSkillMod('expertise_action_line_fs_dm'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillMod('expertise_action_line_fs_dm').getBase())/100))
return
def run(core, actor, target, commandString):
return
+18
View File
@@ -0,0 +1,18 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_sweep'):
command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10))
if actor.getSkillMod('expertise_damage_line_fs_sweep'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100))
if actor.getSkillMod('expertise_action_line_fs_sweep'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100))
return
def run(core, actor, target, commandString):
return
+18
View File
@@ -0,0 +1,18 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_sweep'):
command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10))
if actor.getSkillMod('expertise_damage_line_fs_sweep'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100))
if actor.getSkillMod('expertise_action_line_fs_sweep'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100))
return
def run(core, actor, target, commandString):
return
+18
View File
@@ -0,0 +1,18 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_sweep'):
command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10))
if actor.getSkillMod('expertise_damage_line_fs_sweep'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100))
if actor.getSkillMod('expertise_action_line_fs_sweep'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100))
return
def run(core, actor, target, commandString):
return
+18
View File
@@ -0,0 +1,18 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_sweep'):
command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10))
if actor.getSkillMod('expertise_damage_line_fs_sweep'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100))
if actor.getSkillMod('expertise_action_line_fs_sweep'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100))
return
def run(core, actor, target, commandString):
return
+18
View File
@@ -0,0 +1,18 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_sweep'):
command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10))
if actor.getSkillMod('expertise_damage_line_fs_sweep'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100))
if actor.getSkillMod('expertise_action_line_fs_sweep'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100))
return
def run(core, actor, target, commandString):
return
+18
View File
@@ -0,0 +1,18 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_sweep'):
command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10))
if actor.getSkillMod('expertise_damage_line_fs_sweep'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100))
if actor.getSkillMod('expertise_action_line_fs_sweep'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100))
return
def run(core, actor, target, commandString):
return
+18
View File
@@ -0,0 +1,18 @@
import sys
def setup(core, actor, target, command):
if actor.getSkillMod('expertise_cooldown_line_fs_sweep'):
command.setCooldown(command.getCooldown() + (actor.getSkillModBase('expertise_cooldown_line_fs_sweep')/10))
if actor.getSkillMod('expertise_damage_line_fs_sweep'):
command.setAddedDamage(command.getAddedDamage() + ((command.getAddedDamage() * actor.getSkillModBase('expertise_damage_line_fs_sweep'))/100))
if actor.getSkillMod('expertise_action_line_fs_sweep'):
command.setActionCost(command.getActionCost() - ((command.getActionCost() * actor.getSkillModBase('expertise_action_line_fs_sweep'))/100))
return
def run(core, actor, target, commandString):
return
+3
View File
@@ -4,6 +4,9 @@ def setup():
return
def run(core, actor, target, commandString):
if core.equipmentService.canEquip(actor, target) is False:
return
parsedMsg = commandString.split(' ', 3)
objService = core.objectService
containerID = long(parsedMsg[1])
+3
View File
@@ -4,6 +4,9 @@ def setup():
return
def run(core, actor, target, commandString):
if core.equipmentService.canEquip(actor, target) is False:
return
parsedMsg = commandString.split(' ', 3)
objService = core.objectService
containerID = long(parsedMsg[1])
+3
View File
@@ -4,6 +4,9 @@ def setup():
return
def run(core, actor, target, commandString):
if core.equipmentService.canEquip(actor, target) is False:
return
parsedMsg = commandString.split(' ', 3)
objService = core.objectService
containerID = long(parsedMsg[1])
@@ -0,0 +1,13 @@
import sys
def setup(core, object):
object.setStfFilename('static_item_n')
object.setStfName('item_npe_fs_robe_02_02')
object.setDetailFilename('static_item_d')
object.setDetailName('item_npe_fs_robe_02_02')
object.setIntAttribute('cat_stat_mod_bonus.@stat_n:constitution_modified', 21)
object.setStringAttribute('protection_level', 'Faint')
object.setStringAttribute('class_required', 'Jedi')
object.setIntAttribute('required_combat_level', 20)
return
@@ -0,0 +1,12 @@
import sys
def setup(core, object):
object.setCustomName('First Generation Lightsaber')
object.setFloatAttribute('cat_wpn_damage.wpn_attack_speed', 1)
object.setStringAttribute('class_required', 'Jedi')
object.setStringAttribute('cat_wpn_damage.wpn_damage_type', 'Energy')
object.setStringAttribute('cat_wpn_damage.damage', '200-400')
## finish this ##
return
+6 -1
View File
@@ -1,4 +1,9 @@
import sys
def get(name):
return ""
if name == 'item_npe_fs_robe_02_02':
return "object/tangible/wearables/robe/shared_robe_jedi_padawan.iff"
if name == 'weapon_roadmap_lightsaber_02_02':
return "object/weapon/melee/sword/crafted_saber/shared_sword_lightsaber_one_handed_s1.iff"
+55 -10
View File
@@ -33,6 +33,7 @@ import main.NGECore;
import engine.resources.objects.SWGObject;
import engine.resources.service.INetworkDispatch;
import engine.resources.service.INetworkRemoteEvent;
import resources.objects.player.PlayerObject;
public class EquipmentService implements INetworkDispatch {
@@ -88,11 +89,42 @@ public class EquipmentService implements INetworkDispatch {
}
}
public String getFormalProfessionName(String stfName) {
String formalName = "";
switch (stfName) {
case "force_sensitive_1a": formalName = "Jedi"; break;
case "bounty_hunter_1a": formalName = "Bounty Hunter"; break;
case "officer_1a": formalName = "Officer"; break;
case "smuggler_1a": formalName = "Smuggler"; break;
case "entertainer_1a": formalName = "Entertainer"; break;
case "spy_1a": formalName = "Spy"; break;
case "medic_1a": formalName = "Medic"; break;
case "commando_1a": formalName = "Commando"; break;
default: formalName = "Trader"; break; // Ziggy: Trader profession names are a bit irregular, so this is used.
}
return formalName;
}
public boolean canEquip(CreatureObject actor, SWGObject item) {
boolean result = true;
if (item.getStringAttribute("class_required") != null) {
String profession = ((PlayerObject) actor.getSlottedObject("ghost")).getProfession();
if (item.getStringAttribute("class_required").contentEquals(getFormalProfessionName(profession))) {
result = true;
} else{
return false;
}
}
return result;
}
public void equip(CreatureObject actor, SWGObject item) {
//if(replacedItem != null)
// unequip(actor, replacedItem);
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");
@@ -100,14 +132,16 @@ public class EquipmentService implements INetworkDispatch {
func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item));
// TODO: add health/action bonus from crafted weapon with augmentations (also seen with cybernetics)
// TODO: faction restrictions
// TODO: Species restrictions?
// TODO: Gender restrictions?
// TODO: faction restrictions - You had to be a Combatant as minimum in order to EQUIP an item.
// TODO: Species restrictions
// TODO: Gender restrictions
// TODO: crit enhancement from crafted weapons
// TODO: Jedi robes Force Protection Intensity
// TODO: check for armor category in order to add resistance to certain DoT types
// TODO: if weapon, add the weapon specific crit to display_only_critical
// TODO: bio-link
// TODO: Calculate actual armor values (REMINDER: Check if the player is wearing a jedi robe/cloak (look for force protection intensity). If they are, they shouldn't receive any additional protection from other items with armour.)
// TODO: bio-link (assign it by objectID with setAttachment and then just display it as a character name).
// TODO: item level requirement. if actorLevel >= itemLevel
// TODO: refactor equipable items that grant buffs. use setAttachment("itemBuff", "buffname")
if (actor.getSlotNameForObject(item).contentEquals("hold_r") == true)
weaponCriticalToDisplay(actor, item, true);
@@ -115,10 +149,15 @@ public class EquipmentService implements INetworkDispatch {
Map<String, Object> attributes = new TreeMap<String, Object>(item.getAttributes());
for(Entry<String, Object> e : attributes.entrySet()) {
if(e.getKey().startsWith("cat_skill_mod_bonus.@stat_n:")) {
core.skillModService.addSkillMod(actor, e.getKey().replace("cat_skill_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()));
}
if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) {
actor.setMaxAction(actor.getMaxAction() + Integer.parseInt((String) e.getValue()));
}
}
@@ -144,6 +183,12 @@ 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_attrib_mod_bonus.attr_health")) {
actor.setMaxHealth(actor.getMaxHealth() - Integer.parseInt((String) e.getValue()));
}
if(e.getKey().startsWith("cat_attrib_mod_bonus.attr_action")) {
actor.setMaxAction(actor.getMaxAction() - Integer.parseInt((String) e.getValue()));
}
}
+1 -2
View File
@@ -202,8 +202,7 @@ public class TradeService implements INetworkDispatch{
}
else {
if (objectToTrade.getIntAttribute("no_trade") == 1) {
if(objectToTrade.getAttributes().toString().contains("no_trade")) {
return;
}