mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-02 03:15:52 -04:00
Merge conflict resolve
This commit is contained in:
@@ -108,8 +108,6 @@ public class SpawnService {
|
||||
creature.setLootGroups(mobileTemplate.getLootGroups());
|
||||
|
||||
creature.setOptionsBitmask(mobileTemplate.getOptionsBitmask());
|
||||
if (mobileTemplate.getConversationFileName().length()>0)
|
||||
creature.setAttachment("conversationFile",mobileTemplate.getConversationFileName());
|
||||
|
||||
creature.setFaction(mobileTemplate.getFaction());
|
||||
creature.setFactionStatus(mobileTemplate.getFactionStatus());
|
||||
@@ -223,6 +221,7 @@ public class SpawnService {
|
||||
armor = 6000;
|
||||
core.skillModService.addSkillMod(creature, "expertise_innate_protection_all", armor);
|
||||
}
|
||||
<<<<<<< HEAD
|
||||
|
||||
if (mobileTemplate.isAIEnabled()){
|
||||
if (!mobileTemplate.isNoAI()){ // NoAI is for QuestGivers that don't fight to save resources
|
||||
@@ -237,6 +236,17 @@ public class SpawnService {
|
||||
}
|
||||
|
||||
creature.setAttachment("radial_filename", "npc/mobile");
|
||||
=======
|
||||
|
||||
AIActor actor = new AIActor(creature, creature.getPosition(), scheduler);
|
||||
creature.setAttachment("AI", actor);
|
||||
if (mobileTemplate.getConversationFileName().length()>0){
|
||||
creature.setAttachment("radial_filename", "object/conversation");
|
||||
creature.setAttachment("conversationFile", mobileTemplate.getConversationFileName());
|
||||
}
|
||||
else creature.setAttachment("radial_filename", "npc/mobile");
|
||||
actor.setMobileTemplate(mobileTemplate);
|
||||
>>>>>>> origin/master
|
||||
|
||||
|
||||
if(cell == null) {
|
||||
@@ -457,7 +467,15 @@ public class SpawnService {
|
||||
LairTemplate lairTemplate = lairTemplates.get(lairSpawnTemplate);
|
||||
if(lairTemplate == null)
|
||||
return null;
|
||||
TangibleObject lairObject = (TangibleObject) core.objectService.createObject(lairTemplate.getLairCRC(), 0, planet, position, new Quaternion(1, 0, 0, 0));
|
||||
|
||||
TangibleObject lairObject = null;
|
||||
if (lairTemplate.getLairCRC()==null){
|
||||
String lairCRC = lairTemplate.getLairCRCs().get(new Random().nextInt(lairTemplate.getLairCRCs().size()));
|
||||
System.out.println("Lair CRC " + lairCRC);
|
||||
lairObject = (TangibleObject) core.objectService.createObject(lairCRC, 0, planet, position, new Quaternion(1, 0, 0, 0));
|
||||
} else {
|
||||
lairObject = (TangibleObject) core.objectService.createObject(lairTemplate.getLairCRC().trim(), 0, planet, position, new Quaternion(1, 0, 0, 0));
|
||||
}
|
||||
|
||||
if(lairObject == null)
|
||||
return null;
|
||||
@@ -473,6 +491,9 @@ public class SpawnService {
|
||||
|
||||
lairObject.setAttachment("AI", lairActor);
|
||||
|
||||
if (lairTemplate.getBossTemplate()!=null)
|
||||
lairActor.setBossTemplate(lairTemplate.getBossTemplate());
|
||||
|
||||
core.simulationService.add(lairObject, position.x, position.z, true);
|
||||
lairActor.spawnNewCreatures();
|
||||
|
||||
@@ -527,6 +548,18 @@ public class SpawnService {
|
||||
lairTemplates.put(name, new LairTemplate(name, mobiles, mobileLimit, lairCRC));
|
||||
}
|
||||
|
||||
public void addLairTemplate(String name, Vector<String> mobiles, int mobileLimit, Vector<String> lairCRCs) {
|
||||
lairTemplates.put(name, new LairTemplate(name, mobiles, mobileLimit, lairCRCs));
|
||||
}
|
||||
|
||||
public void addLairTemplate(String name, Vector<String> mobiles, int mobileLimit, Vector<String> lairCRCs, String bossTemplate) {
|
||||
lairTemplates.put(name, new LairTemplate(name, mobiles, mobileLimit, lairCRCs));
|
||||
}
|
||||
|
||||
public void addLairTemplate(String name, String mobile, int mobileLimit, Vector<String> lairCRCs, String bossTemplate) {
|
||||
lairTemplates.put(name, new LairTemplate(name, mobile, mobileLimit, lairCRCs));
|
||||
}
|
||||
|
||||
public void loadLairGroups() {
|
||||
Path p = Paths.get("scripts/mobiles/lairgroups");
|
||||
FileVisitor<Path> fv = new SimpleFileVisitor<Path>() {
|
||||
|
||||
Reference in New Issue
Block a user