mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-14 00:02:07 -04:00
Refactored WeaponObject
The scripting of weapons should be much, much easier now. See the included examples in DevService. Attributes such as attack speed and range are now being read/written to the actual items attributes.
This commit is contained in:
@@ -331,13 +331,7 @@ public class CharacterService implements INetworkDispatch {
|
||||
object.addObjectToEquipList(appInventory);
|
||||
|
||||
WeaponObject defaultWeapon = (WeaponObject) core.objectService.createObject("object/weapon/creature/shared_creature_default_weapon.iff", object.getPlanet());
|
||||
defaultWeapon.setDamageType("@obj_attr_n:armor_eff_kinetic");
|
||||
defaultWeapon.setStringAttribute("cat_wpn_damage.damage", "0-0");
|
||||
defaultWeapon.setMaxDamage(100);
|
||||
defaultWeapon.setMinDamage(50);
|
||||
|
||||
object.addObjectToEquipList(defaultWeapon);
|
||||
|
||||
object._add(defaultWeapon);
|
||||
object.setWeaponId(defaultWeapon.getObjectID());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user