This commit is contained in:
Treeku
2014-06-04 18:31:17 +01:00
2 changed files with 33 additions and 1 deletions
@@ -41,7 +41,7 @@ def addPlanetSpawns(core, planet):
shinn_guard_o2 = stcSvc.spawnObject('shinn_guard', 'tatooine', long(0), float(3423), float(7), float(-5461), float(0), float(0), float(0), float(0), 30)
# Shinn Guards in Bunker
shinn_guard = stcSvc.spawnObject('shinn_guard', 'tatooine', building.getCellByCellName("hall1"), float(-3.3), float(0.3), float(3.6), float(0), float(0), float(0), float(0), 30)
shinn_guard = stcSvc.spawnObject('shinn_guard', 'tatooine', building.getCellByCellNumber(long(1)), float(-3.3), float(0.3), float(3.6), float(0), float(0), float(0), float(0), 30)
shinn_guard1 = stcSvc.spawnObject('shinn_guard', 'tatooine', building.getCellByCellNumber(long(3)), float(2.9), float(0.3), float(-4.0), float(0), float(0), float(0), float(0), 30)
shinn_guard2 = stcSvc.spawnObject('shinn_guard', 'tatooine', building.getCellByCellNumber(long(4)), float(3.8), float(-3.3), float(4.8), float(0), float(0), float(0), float(0), 30)
shinn_guard3 = stcSvc.spawnObject('shinn_guard', 'tatooine', building.getCellByCellNumber(long(5)), float(-4.4), float(-10.3), float(-6.1), float(0), float(0), float(0), float(0), 30)
+32
View File
@@ -612,6 +612,7 @@ public class LootService implements INetworkDispatch {
Vector<Integer> customizationValues = null;
Vector<String> itemStats = null;
Vector<String> itemSkillMods = null;
Vector<String> STFparams = null;
if(core.scriptService.getMethod(itemPath,"","itemTemplate")==null){
String errorMessage = "Loot item '" + itemName + "' has no template function assigned in its script. Please contact Charon about this issue.";
@@ -666,8 +667,12 @@ public class LootService implements INetworkDispatch {
if(core.scriptService.getMethod(itemPath,"","junkType")!=null)
junkType = (byte)core.scriptService.fetchInteger(itemPath,"junkType");
if(core.scriptService.getMethod(itemPath,"","STFparams")!=null)
STFparams = (Vector<String>)core.scriptService.fetchStringVector(itemPath,"STFparams");
System.out.println("itemTemplate " + itemTemplate);
TangibleObject droppedItem = createDroppedItem(itemTemplate,lootRollSession.getSessionPlanet());
@@ -713,6 +718,10 @@ public class LootService implements INetworkDispatch {
handleSkillMods(droppedItem, itemSkillMods);
}
if (STFparams!=null){
setSTFParams(droppedItem, STFparams);
}
// if (customizationValues!=null)
@@ -741,6 +750,21 @@ public class LootService implements INetworkDispatch {
lootRollSession.addDroppedItem(droppedItem);
}
private void setSTFParams(TangibleObject droppedItem, Vector<String>STFparams){
if (STFparams.size()!=4)
return;
String filename1 = "static_item_n";
String filename2 = "static_item_d";
filename1 = STFparams.get(0);
filename2 = STFparams.get(2);
String stfName = STFparams.get(1);
String detailName = STFparams.get(3);
droppedItem.setStfFilename(filename1);
droppedItem.setStfName(stfName);
droppedItem.setDetailFilename(filename2);
droppedItem.setDetailName(detailName);
}
private void handleCustomDropName(TangibleObject droppedItem,String customName) {
// String customItemName = droppedItem.getCustomName();
// if (customName.charAt(0) == '@' || customName.contains("_n:")) {
@@ -1023,6 +1047,7 @@ public class LootService implements INetworkDispatch {
String lootDescriptor = "";
Vector<String> itemStats = null;
Vector<String> itemSkillMods = null;
Vector<String> STFparams = null;
if(core.scriptService.getMethod(itemPath,"","itemTemplate")==null){
String errorMessage = "Loot item '" + itemName + "' has no template function assigned in its script. Please contact Charon about this issue.";
@@ -1085,6 +1110,9 @@ public class LootService implements INetworkDispatch {
if(core.scriptService.getMethod(itemPath,"","junkType")!=null)
junkType = (byte)core.scriptService.fetchInteger(itemPath,"junkType");
if(core.scriptService.getMethod(itemPath,"","STFparams")!=null)
STFparams = (Vector<String>)core.scriptService.fetchStringVector(itemPath,"STFparams");
System.out.println("itemTemplate " + itemTemplate);
@@ -1131,6 +1159,10 @@ public class LootService implements INetworkDispatch {
if (itemSkillMods!=null){
handleSkillMods(droppedItem, itemSkillMods);
}
if (STFparams!=null){
setSTFParams(droppedItem, STFparams);
}
setCustomization(droppedItem, itemName); // for now