mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-07-30 00:15:57 -04:00
Multi-stat SEA creation implemented
SEAs can have up to 3 stats now
This commit is contained in:
Binary file not shown.
@@ -1998,6 +1998,21 @@ public class LootService implements INetworkDispatch {
|
||||
|
||||
playerInventory.add(item11);
|
||||
|
||||
TangibleObject item11a = (TangibleObject)core.objectService.createObject("object/tangible/wearables/armor/composite/shared_armor_composite_bicep_r.iff", player.getPlanet());
|
||||
item11.setCustomName("Composite Armor Right Bicep");
|
||||
|
||||
item11a.setIntAttribute("cat_armor_standard_protection.armor_eff_kinetic", 6000);
|
||||
item11a.setIntAttribute("cat_armor_standard_protection.armor_eff_energy", 4000);
|
||||
item11a.setIntAttribute("cat_armor_special_protection.special_protection_type_heat", 5000);
|
||||
item11a.setIntAttribute("cat_armor_special_protection.special_protection_type_cold", 5000);
|
||||
item11a.setIntAttribute("cat_armor_special_protection.special_protection_type_acid", 5000);
|
||||
item11a.setIntAttribute("cat_armor_special_protection.special_protection_type_electricity", 5000);
|
||||
|
||||
item11a.setIntAttribute("cat_stat_mod_bonus.@stat_n:agility_modified", 25);
|
||||
item11a.setIntAttribute("cat_stat_mod_bonus.@stat_n:constitution_modified", 25);
|
||||
playerInventory.add(item11a);
|
||||
|
||||
|
||||
TangibleObject item12 = (TangibleObject)core.objectService.createObject("object/tangible/wearables/shirt/shared_shirt_s07.iff", player.getPlanet());
|
||||
item12.setCustomName("Socketed Shirt");
|
||||
item12.setIntAttribute("@obj_attr_n:sockets", 1);
|
||||
@@ -2008,23 +2023,28 @@ public class LootService implements INetworkDispatch {
|
||||
item12a.setIntAttribute("cat_stat_mod_bonus.@stat_n:agility_modified", 18);
|
||||
playerInventory.add(item12a);
|
||||
|
||||
TangibleObject item13 = (TangibleObject)core.objectService.createObject("object/tangible/component/reverse_engineering/shared_modifier_bit.iff", player.getPlanet());
|
||||
item13.setCustomName("Modifier Bit");
|
||||
playerInventory.add(item13);
|
||||
|
||||
String powerBitTemplate = "object/tangible/component/reverse_engineering/shared_power_bit.iff";
|
||||
TangibleObject powerBit = (TangibleObject) core.objectService.createObject(powerBitTemplate, player.getPlanet());
|
||||
powerBit.setCustomName("+25 2nd Order Power Bit");
|
||||
powerBit.setAttachment("PowerBitValue", 25);
|
||||
powerBit.setAttachment("PowerBitOrder", 2);
|
||||
playerInventory.add(powerBit);
|
||||
|
||||
//TangibleObject item14 = (TangibleObject)core.objectService.createObject("object/draft_schematic/reverse_engineering/shared_skill_attachment_1.iff", player.getPlanet());
|
||||
TangibleObject item14 = (TangibleObject)core.objectService.createObject("object/tangible/powerup/weapon/shared_melee_generic.iff", player.getPlanet());
|
||||
|
||||
item14.setCustomName("Skill Enhancing Attachment");
|
||||
playerInventory.add(item14);
|
||||
|
||||
TangibleObject powerBit2 = (TangibleObject) core.objectService.createObject(powerBitTemplate, player.getPlanet());
|
||||
powerBit2.setCustomName("+25 3nd Order Power Bit");
|
||||
powerBit2.setAttachment("PowerBitValue", 25);
|
||||
powerBit2.setAttachment("PowerBitOrder", 3);
|
||||
playerInventory.add(powerBit2);
|
||||
|
||||
|
||||
TangibleObject powerBit3 = (TangibleObject) core.objectService.createObject(powerBitTemplate, player.getPlanet());
|
||||
powerBit3.setCustomName("+25 1st Order Power Bit");
|
||||
powerBit3.setAttachment("PowerBitValue", 25);
|
||||
powerBit3.setAttachment("PowerBitOrder", 1);
|
||||
playerInventory.add(powerBit3);
|
||||
|
||||
|
||||
TangibleObject item23 = (TangibleObject)core.objectService.createObject("object/tangible/component/reverse_engineering/shared_modifier_bit.iff", player.getPlanet());
|
||||
item23.setCustomName("Mark X Vocab Module");
|
||||
playerInventory.add(item23);
|
||||
@@ -2046,6 +2066,45 @@ public class LootService implements INetworkDispatch {
|
||||
|
||||
core.objectService.addStackableItem(stacker2,playerInventory);
|
||||
|
||||
String SEALabel = "socket_gem_armor";
|
||||
String SEADescription = "socket_gem";
|
||||
String SEATemplate = "object/tangible/gem/shared_clothing.iff";
|
||||
TangibleObject skillEnhancingAttachment = (TangibleObject)core.objectService.createObject(SEATemplate, player.getPlanet());
|
||||
skillEnhancingAttachment.setStfFilename("item_n");
|
||||
skillEnhancingAttachment.setStfName(SEALabel);
|
||||
skillEnhancingAttachment.setDetailFilename("item_n");
|
||||
skillEnhancingAttachment.setDetailName(SEADescription);
|
||||
String effectName = "@stat_n:expertise_glancing_blow_ranged";
|
||||
int modifierValue = 5;
|
||||
skillEnhancingAttachment.setIntAttribute(effectName, modifierValue);
|
||||
Vector<String> effectNameList = new Vector<String>();
|
||||
effectNameList.add(effectName);
|
||||
Vector<Integer> effectValueList = new Vector<Integer>();
|
||||
effectValueList.add(modifierValue);
|
||||
skillEnhancingAttachment.setAttachment("SEAeffectNameList", effectNameList);
|
||||
skillEnhancingAttachment.setAttachment("SEAmodifierValueList", effectValueList);
|
||||
playerInventory.add(skillEnhancingAttachment);
|
||||
|
||||
TangibleObject skillEnhancingAttachment2 = (TangibleObject)core.objectService.createObject(SEATemplate, player.getPlanet());
|
||||
skillEnhancingAttachment2.setStfFilename("item_n");
|
||||
skillEnhancingAttachment2.setStfName(SEALabel);
|
||||
skillEnhancingAttachment2.setDetailFilename("item_n");
|
||||
skillEnhancingAttachment2.setDetailName(SEADescription);
|
||||
effectName = "@stat_n:expertise_action_weapon_5";
|
||||
String effectName2 = "@stat_n:expertise_critical_line_sp_dm";
|
||||
modifierValue = 5;
|
||||
skillEnhancingAttachment2.setIntAttribute(effectName, modifierValue);
|
||||
skillEnhancingAttachment2.setIntAttribute(effectName2, 6);
|
||||
effectNameList = new Vector<String>();
|
||||
effectNameList.add(effectName);
|
||||
effectNameList.add(effectName2);
|
||||
effectValueList = new Vector<Integer>();
|
||||
effectValueList.add(modifierValue);
|
||||
effectValueList.add(6);
|
||||
skillEnhancingAttachment2.setAttachment("SEAeffectNameList", effectNameList);
|
||||
skillEnhancingAttachment2.setAttachment("SEAmodifierValueList", effectValueList);
|
||||
playerInventory.add(skillEnhancingAttachment2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3043,6 +3043,7 @@ public class ReverseEngineeringService implements INetworkDispatch {
|
||||
TangibleObject powerBit = (TangibleObject) core.objectService.createObject(powerBitTemplate, engineer.getPlanet());
|
||||
powerBit.setCustomName("+" + powerBitValue + " " + powerBitOrderString + " Order Power Bit");
|
||||
powerBit.setAttachment("PowerBitValue", powerBitValue);
|
||||
powerBit.setAttachment("PowerBitOrder", powerBitOrder);
|
||||
engineerInventory.add(powerBit);
|
||||
}
|
||||
}
|
||||
@@ -3188,6 +3189,7 @@ public class ReverseEngineeringService implements INetworkDispatch {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void createSEA(CreatureObject engineer, TangibleObject retool){
|
||||
final Vector<SWGObject> reToolContentList = new Vector<SWGObject>();
|
||||
SWGObject engineerInventory = engineer.getSlottedObject("inventory");
|
||||
@@ -3236,19 +3238,19 @@ public class ReverseEngineeringService implements INetworkDispatch {
|
||||
// Assuming munition
|
||||
String SEALabel = "socket_gem_armor";
|
||||
String SEADescription = "socket_gem";
|
||||
String SEATemplate = "object/tangible/powerup/base/shared_armor_base.iff";
|
||||
String SEATemplate = "object/tangible/gem/shared_clothing.iff";
|
||||
|
||||
PlayerObject player = (PlayerObject) engineer.getSlottedObject("ghost");
|
||||
String profession = player.getProfession();
|
||||
if (profession=="Domestic"){
|
||||
SEALabel = "socket_gem_clothing";
|
||||
SEADescription = "socket_gem";
|
||||
SEATemplate = "object/tangible/powerup/base/shared_base.iff";
|
||||
SEATemplate = "object/tangible/gem/shared_clothing.iff";
|
||||
}
|
||||
if (profession=="Engineer"){
|
||||
SEALabel = "socket_gem_weapon";
|
||||
SEADescription = "socket_gem";
|
||||
SEATemplate = "object/tangible/powerup/base/shared_weapon_base.iff";
|
||||
SEATemplate = "object/tangible/gem/shared_clothing.iff";
|
||||
}
|
||||
|
||||
core.objectService.destroyObject(bit1.getObjectID());
|
||||
@@ -3260,7 +3262,136 @@ public class ReverseEngineeringService implements INetworkDispatch {
|
||||
skillEnhancingAttachment.setStfName(SEALabel);
|
||||
skillEnhancingAttachment.setDetailFilename("item_n");
|
||||
skillEnhancingAttachment.setDetailName(SEADescription);
|
||||
skillEnhancingAttachment.setIntAttribute(effectName, modifierValue);
|
||||
skillEnhancingAttachment.setIntAttribute(effectName, modifierValue);
|
||||
Vector<String> effectNameList = new Vector<String>();
|
||||
effectNameList.add(effectName);
|
||||
Vector<Integer> effectValueList = new Vector<Integer>();
|
||||
effectValueList.add(modifierValue);
|
||||
skillEnhancingAttachment.setAttachment("SEAeffectNameList", effectNameList);
|
||||
skillEnhancingAttachment.setAttachment("SEAmodifierValueList", effectValueList);
|
||||
engineerInventory.add(skillEnhancingAttachment);
|
||||
}
|
||||
}
|
||||
|
||||
// Multi-stat SEA
|
||||
if (reToolContentList.size()==3){
|
||||
TangibleObject bit1 = (TangibleObject) reToolContentList.get(0);
|
||||
TangibleObject bit2 = (TangibleObject) reToolContentList.get(1);
|
||||
TangibleObject bit3 = (TangibleObject) reToolContentList.get(2);
|
||||
|
||||
String effectName = "";
|
||||
int ratio = 1;
|
||||
int powermodifierValue = 1;
|
||||
int modifierValue = 1;
|
||||
int powerBitOrder = 1;
|
||||
Vector<String> effectNameList = new Vector<String>();
|
||||
Vector<Integer> effectValueList = new Vector<Integer>();
|
||||
|
||||
//verify RE tool content requirement
|
||||
List<String> contentVerification = new ArrayList<String>();
|
||||
contentVerification.add("modifier_bit");
|
||||
contentVerification.add("power_bit");
|
||||
contentVerification.add("sea");
|
||||
|
||||
if (bit1.getTemplate().contains("modifier_bit")){
|
||||
effectName = bit1.getStringAttribute("@crafting:mod_bit_type");
|
||||
ratio = bit1.getIntAttribute("@crafting:mod_bit_ratio");
|
||||
contentVerification.remove("modifier_bit");
|
||||
}
|
||||
if (bit1.getTemplate().contains("power_bit")){
|
||||
powermodifierValue = (int) bit1.getAttachment("PowerBitValue");
|
||||
powerBitOrder = (int) bit1.getAttachment("PowerBitOrder");
|
||||
contentVerification.remove("power_bit");
|
||||
}
|
||||
if (bit1.getTemplate().contains("object/tangible/gem/shared_clothing.iff")){
|
||||
effectNameList = (Vector<String>) bit1.getAttachment("SEAeffectNameList");
|
||||
effectValueList = (Vector<Integer>) bit1.getAttachment("SEAmodifierValueList");
|
||||
if (effectNameList.size()==3)
|
||||
return;
|
||||
contentVerification.remove("sea");
|
||||
}
|
||||
|
||||
if (bit2.getTemplate().contains("modifier_bit")){
|
||||
effectName = bit2.getStringAttribute("@crafting:mod_bit_type");
|
||||
ratio = bit2.getIntAttribute("@crafting:mod_bit_ratio");
|
||||
contentVerification.remove("modifier_bit");
|
||||
}
|
||||
if (bit2.getTemplate().contains("power_bit")){
|
||||
powermodifierValue = (int) bit2.getAttachment("PowerBitValue");
|
||||
powerBitOrder = (int) bit2.getAttachment("PowerBitOrder");
|
||||
contentVerification.remove("power_bit");
|
||||
}
|
||||
if (bit2.getTemplate().contains("object/tangible/gem/shared_clothing.iff")){
|
||||
effectNameList = (Vector<String>) bit2.getAttachment("SEAeffectNameList");
|
||||
effectValueList = (Vector<Integer>) bit2.getAttachment("SEAmodifierValueList");
|
||||
if (effectNameList.size()==3)
|
||||
return;
|
||||
contentVerification.remove("sea");
|
||||
}
|
||||
|
||||
if (bit3.getTemplate().contains("modifier_bit")){
|
||||
effectName = bit3.getStringAttribute("@crafting:mod_bit_type");
|
||||
ratio = bit3.getIntAttribute("@crafting:mod_bit_ratio");
|
||||
contentVerification.remove("modifier_bit");
|
||||
}
|
||||
if (bit3.getTemplate().contains("power_bit")){
|
||||
powermodifierValue = (int) bit3.getAttachment("PowerBitValue");
|
||||
powerBitOrder = (int) bit3.getAttachment("PowerBitOrder");
|
||||
contentVerification.remove("power_bit");
|
||||
}
|
||||
if (bit3.getTemplate().contains("object/tangible/gem/shared_clothing.iff")){
|
||||
effectNameList = (Vector<String>) bit3.getAttachment("SEAeffectNameList");
|
||||
effectValueList = (Vector<Integer>) bit3.getAttachment("SEAmodifierValueList");
|
||||
if (effectNameList.size()==3)
|
||||
return;
|
||||
contentVerification.remove("sea");
|
||||
}
|
||||
|
||||
if (contentVerification.size()==0){
|
||||
modifierValue = powermodifierValue;
|
||||
modifierValue = modifierValue/ratio; // int cast truncates
|
||||
|
||||
// Assuming munition
|
||||
String SEALabel = "socket_gem_armor";
|
||||
String SEADescription = "socket_gem";
|
||||
String SEATemplate = "object/tangible/gem/shared_clothing.iff";
|
||||
|
||||
PlayerObject player = (PlayerObject) engineer.getSlottedObject("ghost");
|
||||
String profession = player.getProfession();
|
||||
if (profession=="Domestic"){
|
||||
SEALabel = "socket_gem_clothing";
|
||||
SEADescription = "socket_gem";
|
||||
SEATemplate = "object/tangible/gem/shared_clothing.iff";
|
||||
}
|
||||
if (profession=="Engineer"){
|
||||
SEALabel = "socket_gem_weapon";
|
||||
SEADescription = "socket_gem";
|
||||
SEATemplate = "object/tangible/gem/shared_clothing.iff";
|
||||
}
|
||||
|
||||
core.objectService.destroyObject(bit1.getObjectID());
|
||||
core.objectService.destroyObject(bit2.getObjectID());
|
||||
core.objectService.destroyObject(bit3.getObjectID());
|
||||
|
||||
if (powerBitOrder>effectNameList.size()){ // Only add a stat if the power bit is higher
|
||||
effectNameList.add(effectName);
|
||||
effectValueList.add(modifierValue);
|
||||
}
|
||||
|
||||
TangibleObject skillEnhancingAttachment = (TangibleObject) core.objectService.createObject(SEATemplate, engineer.getPlanet());
|
||||
|
||||
skillEnhancingAttachment.setStfFilename("item_n");
|
||||
skillEnhancingAttachment.setStfName(SEALabel);
|
||||
skillEnhancingAttachment.setDetailFilename("item_n");
|
||||
skillEnhancingAttachment.setDetailName(SEADescription);
|
||||
|
||||
for (int i=0;i<effectNameList.size();i++){
|
||||
skillEnhancingAttachment.setIntAttribute(effectNameList.get(i), effectValueList.get(i));
|
||||
}
|
||||
|
||||
skillEnhancingAttachment.setAttachment("SEAeffectNameArray", effectNameList);
|
||||
skillEnhancingAttachment.setAttachment("SEAmodifierValueArray", effectValueList);
|
||||
|
||||
engineerInventory.add(skillEnhancingAttachment);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user