mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-30 15:13:10 -04:00
Merge branch 'master' of https://github.com/ProjectSWGCore/NGECore2
This commit is contained in:
@@ -12,6 +12,10 @@ def run(core, actor, target, commandString):
|
||||
actorContainer = actor.getContainer()
|
||||
|
||||
if container == None: return
|
||||
|
||||
if(container.isFull()):
|
||||
actor.sendSystemMessage('That container is full.', 0)
|
||||
return
|
||||
|
||||
if container.getTemplate().startswith("object/tangible/inventory/shared_lightsaber_inventory") or target.getContainer().getTemplate().startswith("object/tangible/inventory/shared_lightsaber_inventory"):
|
||||
core.equipmentService.calculateLightsaberAttributes(actor, target, container)
|
||||
|
||||
@@ -686,4 +686,15 @@ public class TangibleObject extends SWGObject implements Serializable {
|
||||
return messageBuilder;
|
||||
}
|
||||
|
||||
public boolean isFull()
|
||||
{
|
||||
if(getTemplateData().getAttribute("containerVolumeLimit") == null) return false;
|
||||
|
||||
int containerVolumeLimit = getTemplateData().getAttribute("containerVolumeLimit");
|
||||
|
||||
if(NGECore.getInstance().objectService.objsInContainer(this, this) >= containerVolumeLimit) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -372,8 +372,8 @@ public class EquipmentService implements INetworkDispatch {
|
||||
}
|
||||
else
|
||||
{
|
||||
minDamageBonus += Integer.parseInt(item.getAttributes().get("@obj_attr_n:componentbonuslow")); // "Min Damage Modified"
|
||||
maxDamageBonus += Integer.parseInt(item.getAttributes().get("@obj_attr_n:componentbonushigh")); // "Max Damage Modified""
|
||||
minDamageBonus += Integer.parseInt(item.getAttributes().get("@obj_attr_n:mindamage")); // "Minimum Damage"
|
||||
maxDamageBonus += Integer.parseInt(item.getAttributes().get("@obj_attr_n:maxdamage")); // "Maximum Damage"
|
||||
}
|
||||
|
||||
int saberBaseDamageMin = (int) saber.getAttachment("weaponBaseDamageMin");
|
||||
|
||||
Reference in New Issue
Block a user