mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-31 01:15:57 -04:00
@@ -39,6 +39,12 @@ def run(core, actor, target, commandString):
|
||||
|
||||
if object != None:
|
||||
actor.transferTo(actor, oldContainer, object)
|
||||
|
||||
if target.getTemplate().find('/wearables/') or target.getTemplate().find('/weapon/'):
|
||||
core.equipmentService.equip(actor, target)
|
||||
|
||||
for object in replacedObjects:
|
||||
core.equipmentService.unequip(actor, object)
|
||||
|
||||
oldContainer.transferTo(actor, container, target)
|
||||
|
||||
|
||||
@@ -78,7 +78,13 @@ def run(core, actor, target, commandString):
|
||||
replacedObjects.append(object)
|
||||
|
||||
if object != None:
|
||||
container.transferTo(actor, container, object)
|
||||
container.transferTo(actor, container, object)
|
||||
|
||||
if target.getTemplate().find('/wearables/') or target.getTemplate().find('/weapon/'):
|
||||
core.equipmentService.equip(actor, target)
|
||||
|
||||
for object in replacedObjects:
|
||||
core.equipmentService.unequip(actor, object) # Needs to be verified due to the new structure of the script
|
||||
|
||||
oldContainer.transferTo(actor, container, target)
|
||||
|
||||
|
||||
@@ -39,7 +39,13 @@ def run(core, actor, target, commandString):
|
||||
|
||||
if object != None:
|
||||
container.transferTo(actor, container, object)
|
||||
|
||||
|
||||
if target.getTemplate().find('/wearables/') or target.getTemplate().find('/weapon/'):
|
||||
core.equipmentService.equip(actor, target)
|
||||
|
||||
for object in replacedObjects:
|
||||
core.equipmentService.unequip(actor, object)
|
||||
|
||||
oldContainer.transferTo(actor, container, target)
|
||||
|
||||
return
|
||||
|
||||
@@ -157,17 +157,15 @@ 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");
|
||||
if(func != null) func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item));
|
||||
|
||||
if(func != null) func.__call__(Py.java2py(core), Py.java2py(actor), Py.java2py(item));
|
||||
if(!actor.getEquipmentList().contains(item.getObjectID()))
|
||||
{
|
||||
if(item instanceof WeaponObject) actor.setWeaponId(item.getObjectID());
|
||||
|
||||
actor.addObjectToEquipList(item);
|
||||
processItemAtrributes(actor, item, true);
|
||||
}
|
||||
|
||||
@@ -185,8 +185,6 @@ public class MountService implements INetworkDispatch {
|
||||
mount.setFaction(actor.getFaction());
|
||||
mount.setFactionStatus(actor.getFactionStatus());
|
||||
mount.setOwnerId(actor.getObjectID());
|
||||
AIActor aiActor = (AIActor) mount.getAttachment("AI");
|
||||
aiActor.setFollowObject(actor);
|
||||
|
||||
if (pcd.getTemplate().contains("vehicle")) {
|
||||
callVehicle(actor, pcd, player, mount);
|
||||
|
||||
Reference in New Issue
Block a user