mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-19 09:02:54 -04:00
@@ -28,7 +28,7 @@ def run(core, actor, target, commandString):
|
||||
|
||||
if target.isLootItem():
|
||||
target.setLootItem(0)
|
||||
actor.sendSystemMessage('You looted ' + target.getStf().getStfValue() + ' from corpse.', 0)
|
||||
actor.sendSystemMessage('You looted ' + target.getObjectName().getStfValue() + ' from corpse.', 0)
|
||||
|
||||
if actorContainer != None and (container.getTemplate() == "object/cell/shared_cell.iff") & core.housingService.getPermissions(actor, actorContainer):
|
||||
target.getContainer().transferTo(actor, container, target)
|
||||
@@ -95,4 +95,4 @@ def run(core, actor, target, commandString):
|
||||
#core.scriptService.callScript(path, 'unequip', module, core, actor, target)
|
||||
core.equipmentService.unequip(actor, target)
|
||||
|
||||
return
|
||||
return
|
||||
|
||||
@@ -41,6 +41,32 @@ def addTemplate(core):
|
||||
attacks = Vector()
|
||||
mobileTemplate.setDefaultAttack('saberHit')
|
||||
mobileTemplate.setAttacks(attacks)
|
||||
|
||||
|
||||
lootPoolNames_1 = ['Junk']
|
||||
lootPoolChances_1 = [100]
|
||||
lootGroupChance_1 = 65
|
||||
mobileTemplate.addToLootGroups(lootPoolNames_1,lootPoolChances_1,lootGroupChance_1)
|
||||
|
||||
lootPoolNames_2 = ['jedi_relic_1']
|
||||
lootPoolChances_2 = [100]
|
||||
lootGroupChance_2 = 85
|
||||
mobileTemplate.addToLootGroups(lootPoolNames_2,lootPoolChances_2,lootGroupChance_2)
|
||||
|
||||
lootPoolNames_3 = ['powercrystals_hiq']
|
||||
lootPoolChances_3 = [100]
|
||||
lootGroupChance_3 = 12
|
||||
mobileTemplate.addToLootGroups(lootPoolNames_3,lootPoolChances_3,lootGroupChance_3)
|
||||
|
||||
lootPoolNames_4 = ['random_stat_jewelry']
|
||||
lootPoolChances_4 = [100]
|
||||
lootGroupChance_4 = 8
|
||||
mobileTemplate.addToLootGroups(lootPoolNames_4,lootPoolChances_4,lootGroupChance_4)
|
||||
|
||||
lootPoolNames_5 = ['sithholocrons']
|
||||
lootPoolChances_5 = [100]
|
||||
lootGroupChance_5 = 3
|
||||
mobileTemplate.addToLootGroups(lootPoolNames_5,lootPoolChances_5,lootGroupChance_5)
|
||||
|
||||
core.spawnService.addMobileTemplate('dark_jedi_master', mobileTemplate)
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import sys
|
||||
|
||||
def add(core, actor, skillMod, value):
|
||||
core.skillModService.addSkillMod(actor, 'display_only_parry', skillMod.getBase() * 100)
|
||||
return
|
||||
|
||||
def deduct(core, actor, skillMod, value):
|
||||
core.skillModService.deductSkillMod(actor, 'display_only_parry', skillMod.getBase() * 100)
|
||||
return
|
||||
|
||||
@@ -88,7 +88,7 @@ public class BuildingObject extends TangibleObject implements IPersistent, Seria
|
||||
@Override
|
||||
public Baseline getOtherVariables() {
|
||||
Baseline baseline = super.getOtherVariables();
|
||||
baseline.put("maintainanceAmount", (float) 0);
|
||||
baseline.put("maintenanceAmount", (float) 0);
|
||||
baseline.put("baseMaintenanceRate", 0);
|
||||
baseline.put("deedTemplate", "");
|
||||
baseline.put("residency", false);
|
||||
|
||||
@@ -98,7 +98,10 @@ public class StaticService implements INetworkDispatch {
|
||||
public SWGObject spawnObject(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ) {
|
||||
return spawnObject(template, planetName, cellId, x, y, z, qW, qX, qY, qZ, -1);
|
||||
}
|
||||
|
||||
|
||||
public SWGObject spawnObject(String template, String planetName, SWGObject cell, float x, float y, float z, float qW, float qX, float qY, float qZ, int respawnTime) {
|
||||
return spawnObject(template, planetName, ((cell == null) ? 0L : cell.getObjectID()), x, y, z, qW, qX, qY, qZ, respawnTime);
|
||||
}
|
||||
|
||||
public SWGObject spawnObject(String template, String planetName, long cellId, float x, float y, float z, float qW, float qX, float qY, float qZ, int respawnTime) {
|
||||
Planet planet = core.terrainService.getPlanetByName(planetName);
|
||||
|
||||
@@ -45,6 +45,7 @@ import resources.buffs.DamageOverTime;
|
||||
import resources.common.FileUtilities;
|
||||
import resources.common.OutOfBand;
|
||||
import resources.datatables.DisplayType;
|
||||
import resources.datatables.FactionStatus;
|
||||
import resources.datatables.Options;
|
||||
import resources.datatables.Elemental;
|
||||
import resources.datatables.Posture;
|
||||
@@ -242,7 +243,7 @@ public class CombatService implements INetworkDispatch {
|
||||
if(!(obj instanceof TangibleObject) || obj == attacker)
|
||||
continue;
|
||||
|
||||
if(obj instanceof CreatureObject && (((CreatureObject) obj).getPosture() == 13 || ((CreatureObject) obj).getPosture() == 14))
|
||||
if(obj instanceof CreatureObject && (((CreatureObject) obj).getPosture() == Posture.Incapacitated || ((CreatureObject) obj).getPosture() == Posture.Dead))
|
||||
continue;
|
||||
|
||||
if(command.getAttackType() == 0 && !isInConeAngle(attacker, obj, (int) command.getConeLength(), (int) command.getConeWidth(), dirX, dirZ))
|
||||
@@ -316,7 +317,7 @@ public class CombatService implements INetworkDispatch {
|
||||
if(!(obj instanceof TangibleObject) || obj == attacker)
|
||||
continue;
|
||||
|
||||
if(obj instanceof CreatureObject && (((CreatureObject) obj).getPosture() == 13 || ((CreatureObject) obj).getPosture() == 14))
|
||||
if(obj instanceof CreatureObject && (((CreatureObject) obj).getPosture() == Posture.Incapacitated || ((CreatureObject) obj).getPosture() == Posture.Dead))
|
||||
continue;
|
||||
|
||||
if(command.getAttackType() == 0 && !isInConeAngle(attacker, obj, (int) command.getConeLength(), (int) command.getConeWidth(), dirX, dirZ))
|
||||
@@ -805,7 +806,7 @@ public class CombatService implements INetworkDispatch {
|
||||
if(core.mountService.isMounted(target)) core.mountService.dismount(target, (CreatureObject) target.getContainer());
|
||||
|
||||
target.setHealth(1);
|
||||
target.setPosture((byte) 13);
|
||||
target.setPosture(Posture.Incapacitated);
|
||||
target.setTurnRadius(0);
|
||||
target.setSpeedMultiplierBase(0);
|
||||
}
|
||||
@@ -816,7 +817,7 @@ public class CombatService implements INetworkDispatch {
|
||||
if(target.getPosture() != 13)
|
||||
return;
|
||||
|
||||
target.setPosture((byte) 0);
|
||||
target.setPosture(Posture.Upright);
|
||||
target.setTurnRadius(1);
|
||||
target.setSpeedMultiplierBase(1);
|
||||
|
||||
@@ -833,7 +834,7 @@ public class CombatService implements INetworkDispatch {
|
||||
} else if(target.getHealth() - damage <= 0 && target.getAttachment("AI") != null) {
|
||||
synchronized(target.getMutex()) {
|
||||
target.setHealth(0);
|
||||
target.setPosture((byte) 14);
|
||||
target.setPosture(Posture.Dead);
|
||||
}
|
||||
attacker.removeDefender(target);
|
||||
target.removeDefender(attacker);
|
||||
@@ -901,7 +902,7 @@ public class CombatService implements INetworkDispatch {
|
||||
|
||||
} else {
|
||||
|
||||
if(target.getFactionStatus() == 0)
|
||||
if(target.getFactionStatus() == FactionStatus.OnLeave)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
@@ -990,7 +991,7 @@ public class CombatService implements INetworkDispatch {
|
||||
if(!(obj instanceof CreatureObject))
|
||||
continue;
|
||||
|
||||
if(obj instanceof CreatureObject && (((CreatureObject) obj).getPosture() == 14))
|
||||
if(obj instanceof CreatureObject && (((CreatureObject) obj).getPosture() == Posture.Dead))
|
||||
continue;
|
||||
|
||||
if(!core.simulationService.checkLineOfSight(target, obj))
|
||||
@@ -1008,7 +1009,7 @@ public class CombatService implements INetworkDispatch {
|
||||
public void deathblowPlayer(CreatureObject attacker, CreatureObject target) {
|
||||
target.stopIncapTask();
|
||||
target.setIncapTask(null);
|
||||
target.setPosture((byte) 14);
|
||||
target.setPosture(Posture.Dead);
|
||||
|
||||
if (target.getSlottedObject("ghost") != null && attacker.getSlottedObject("ghost") != null) {
|
||||
boolean bountyWindow = true;
|
||||
@@ -1149,11 +1150,11 @@ public class CombatService implements INetworkDispatch {
|
||||
|
||||
CreatureObject creature = (CreatureObject) owner;
|
||||
|
||||
if(eventType != 0 || creature.getPosture() != 14)
|
||||
if(eventType != 0 || creature.getPosture() != Posture.Dead)
|
||||
return;
|
||||
|
||||
synchronized(creature.getMutex()) {
|
||||
creature.setPosture((byte) 0);
|
||||
creature.setPosture(Posture.Upright);
|
||||
creature.setTurnRadius(1);
|
||||
creature.setSpeedMultiplierBase(1);
|
||||
creature.setHealth(creature.getHealth() + 4000);
|
||||
@@ -1178,7 +1179,7 @@ public class CombatService implements INetworkDispatch {
|
||||
if(!(obj instanceof CreatureObject))
|
||||
continue;
|
||||
|
||||
if(obj instanceof CreatureObject && (((CreatureObject) obj).getPosture() != 14))
|
||||
if(obj instanceof CreatureObject && (((CreatureObject) obj).getPosture() != Posture.Dead))
|
||||
continue;
|
||||
|
||||
if(!attemptHeal(medic, (CreatureObject) obj))
|
||||
@@ -1247,29 +1248,21 @@ public class CombatService implements INetworkDispatch {
|
||||
return;
|
||||
|
||||
if(target.getSkillMod("expertise_dot_absorption_all") != null)
|
||||
damage *= (1 - target.getSkillMod("expertise_dot_absorption_all").getBase() / 100);
|
||||
damage *= (1 - target.getSkillModBase("expertise_dot_absorption_all") / 100);
|
||||
|
||||
switch(dot.getType()) {
|
||||
|
||||
case "acid":
|
||||
baseArmor = target.getSkillMod("acid").getBase();
|
||||
case "heat":
|
||||
baseArmor = target.getSkillMod("heat").getBase();
|
||||
case "cold":
|
||||
baseArmor = target.getSkillMod("cold").getBase();
|
||||
case "electricity":
|
||||
baseArmor = target.getSkillMod("electricity").getBase();
|
||||
case "energy":
|
||||
baseArmor = target.getSkillMod("energy").getBase();
|
||||
case "kinetic":
|
||||
baseArmor = target.getSkillMod("electricity").getBase();
|
||||
baseArmor = target.getSkillModBase("electricity"); // Is this a mistake or is it legitimate?
|
||||
case "poison":
|
||||
baseArmor = target.getSkillMod("acid").getBase();
|
||||
baseArmor = target.getSkillModBase("acid");
|
||||
case "disease": // disease damages action in nge
|
||||
baseArmor = 0;
|
||||
case "bleeding": // elemental type unknown
|
||||
case "fire":
|
||||
baseArmor = target.getSkillMod("heat").getBase();
|
||||
baseArmor = target.getSkillModBase("heat");
|
||||
default:
|
||||
baseArmor = target.getSkillModBase(dot.getType());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
******************************************************************************/
|
||||
package services.spawn;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
@@ -59,7 +60,7 @@ public class MobileTemplate implements Cloneable {
|
||||
private String meatType, milkType, boneType, hideType;
|
||||
private int meatAmount, milkAmount, boneAmount, hideAmount;
|
||||
private int respawnTime = 0;
|
||||
private List<LootGroup> lootGroups;
|
||||
private List<LootGroup> lootGroups = new ArrayList<LootGroup>();
|
||||
|
||||
|
||||
public Vector<String> getTemplates() {
|
||||
|
||||
@@ -100,7 +100,7 @@ public class SpawnService {
|
||||
creature.setWeaponId(mobileTemplate.getCustomWeapon().getObjectID());
|
||||
}*/
|
||||
|
||||
if(mobileTemplate.getLootGroups() != null)
|
||||
if(mobileTemplate.getLootGroups() != null && !mobileTemplate.getLootGroups().isEmpty())
|
||||
creature.setLootGroups(mobileTemplate.getLootGroups());
|
||||
|
||||
creature.setOptionsBitmask(mobileTemplate.getOptionsBitmask());
|
||||
@@ -118,7 +118,7 @@ public class SpawnService {
|
||||
level = mobileTemplate.getLevel();
|
||||
}
|
||||
|
||||
if (mobileTemplate.getMinLevel()!=0 && mobileTemplate.getMaxLevel()!=0){
|
||||
if (mobileTemplate.getMinLevel()!=0 && mobileTemplate.getMaxLevel()!=0 && level == -1){
|
||||
level = (short) (mobileTemplate.getMinLevel() + (new Random().nextInt(mobileTemplate.getMaxLevel()-mobileTemplate.getMinLevel())));
|
||||
creature.setLevel(level);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user