mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-28 13:12:54 -04:00
Merge branch 'master' of https://github.com/ProjectSWGCore/NGECore2
This commit is contained in:
@@ -85,6 +85,9 @@ def run(core, actor, target, commandString):
|
||||
elif command == 'cust' and arg1 and arg2 and arg3:
|
||||
obj = core.objectService.getObject(long(arg1))
|
||||
obj.setCustomizationVariable(str(arg2), int(arg3))
|
||||
|
||||
elif command == 'buff' and arg1:
|
||||
core.buffService.addBuffToCreature(actor, str(arg1), actor)
|
||||
|
||||
elif command == 'stealth':
|
||||
if (actor.isInStealth()):
|
||||
|
||||
@@ -77,7 +77,8 @@ public class ObjectMenuResponse extends ObjControllerObject {
|
||||
result.put(++counter);
|
||||
result.put(radialOption.getParentId());
|
||||
result.putShort(radialOption.getOptionId());
|
||||
result.put(radialOption.getOptionType()); //result.put((byte) 3);
|
||||
//result.put(radialOption.getOptionType());
|
||||
result.put((byte) 3);
|
||||
result.put(getUnicodeString(radialOption.getDescription()));
|
||||
}
|
||||
result.put(radialCount);
|
||||
|
||||
@@ -369,7 +369,7 @@ public class CreatureMessageBuilder extends ObjectMessageBuilder {
|
||||
buff.setTotalPlayTime(0);
|
||||
buffer.put((byte) 1);
|
||||
buffer.putInt(0);
|
||||
buffer.putInt(CRC.StringtoCRC(buff.getBuffName()));
|
||||
buffer.putInt(CRC.StringtoCRC(buff.getBuffName().toLowerCase()));
|
||||
if(buff.getDuration() > 0) {
|
||||
buffer.putInt((int) (buff.getTotalPlayTime() + buff.getRemainingDuration()));
|
||||
buffer.putInt(0);
|
||||
|
||||
@@ -106,21 +106,24 @@ public class BuffService implements INetworkDispatch {
|
||||
else
|
||||
buff.setTotalPlayTime(0);
|
||||
|
||||
if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py"))
|
||||
core.scriptService.callScript("scripts/buffs/", buffName, "setup", core, buffer, buff);
|
||||
if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) core.scriptService.callScript("scripts/buffs/", buffName, "setup", core, buffer, buff);
|
||||
|
||||
for (final Buff otherBuff : target.getBuffList()) {
|
||||
if (buff.getGroup1().equals(otherBuff.getGroup1()))
|
||||
if (buff.getPriority() >= otherBuff.getPriority()) {
|
||||
if (buff.getBuffName().equals(otherBuff.getBuffName())) {
|
||||
if (buff.getBuffName().equals(otherBuff.getBuffName()))
|
||||
{
|
||||
|
||||
if(otherBuff.getStacks() < otherBuff.getMaxStacks()) {
|
||||
if(otherBuff.getStacks() < otherBuff.getMaxStacks())
|
||||
{
|
||||
|
||||
buff.setStacks(otherBuff.getStacks() + 1);
|
||||
if(target.getDotByBuff(otherBuff) != null) // reset duration when theres a dot stack
|
||||
target.getDotByBuff(otherBuff).setStartTime(buff.getStartTime());
|
||||
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
buff.setStacks(buff.getMaxStacks());
|
||||
}
|
||||
if (buff.getDuration() != -1.0)
|
||||
@@ -136,8 +139,16 @@ public class BuffService implements INetworkDispatch {
|
||||
}
|
||||
}
|
||||
|
||||
if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py"))
|
||||
core.scriptService.callScript("scripts/buffs/", buffName, "add", core, target, buff);
|
||||
if(FileUtilities.doesFileExist("scripts/buffs/" + buffName + ".py")) core.scriptService.callScript("scripts/buffs/", buffName, "add", core, target, buff);
|
||||
else
|
||||
{
|
||||
System.out.println(buff.getEffect1Name().length());
|
||||
if(buff.getEffect1Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect1Name(), (int) buff.getEffect1Value());
|
||||
if(buff.getEffect2Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect2Name(), (int) buff.getEffect2Value());
|
||||
if(buff.getEffect3Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect3Name(), (int) buff.getEffect3Value());
|
||||
if(buff.getEffect4Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect4Name(), (int) buff.getEffect4Value());
|
||||
if(buff.getEffect5Name().length() > 0) core.skillModService.addSkillMod(target, buff.getEffect5Name(), (int) buff.getEffect5Value());
|
||||
}
|
||||
|
||||
target.addBuff(buff);
|
||||
|
||||
@@ -214,8 +225,15 @@ public class BuffService implements INetworkDispatch {
|
||||
dot.getTask().cancel(true);
|
||||
creature.removeDot(dot);
|
||||
}
|
||||
if(FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py"))
|
||||
core.scriptService.callScript("scripts/buffs/", buff.getBuffName(), "remove", core, creature, buff);
|
||||
if(FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py")) core.scriptService.callScript("scripts/buffs/", buff.getBuffName(), "remove", core, creature, buff);
|
||||
else
|
||||
{
|
||||
if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect1Name(), (int) buff.getEffect1Value());
|
||||
if(buff.getEffect2Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect2Name(), (int) buff.getEffect2Value());
|
||||
if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect3Name(), (int) buff.getEffect3Value());
|
||||
if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect4Name(), (int) buff.getEffect4Value());
|
||||
if(buff.getEffect1Name().length() > 0) core.skillModService.deductSkillMod(creature, buff.getEffect5Name(), (int) buff.getEffect5Value());
|
||||
}
|
||||
creature.removeBuff(buff);
|
||||
|
||||
for (String effect : buff.getParticleEffect().split(",")) {
|
||||
|
||||
@@ -916,14 +916,14 @@ public class ObjectService implements INetworkDispatch {
|
||||
((BuildingObject) object).getTransaction().commitSync();
|
||||
}*/
|
||||
} else {
|
||||
object = createObject(template, objectId, planet, new Point3D(px + x1, py, pz + z1), new Quaternion(qw, qx, qy, qz), null, false, false);
|
||||
object = createObject(template, 0, planet, new Point3D(px + x1, py, pz + z1), new Quaternion(qw, qx, qy, qz), null, false, false);
|
||||
}
|
||||
if(object == null)
|
||||
continue;
|
||||
object.setContainerPermissions(WorldPermissions.WORLD_PERMISSIONS);
|
||||
if(radius > 256)
|
||||
object.setAttachment("bigSpawnRange", new Boolean(true));
|
||||
if (!duplicate.containsValue(objectId) && object instanceof BuildingObject)
|
||||
if (!duplicate.containsValue(objectId) && object instanceof BuildingObject && portalCRC != 0)
|
||||
persistentBuildings.add((BuildingObject) object);
|
||||
} else if(containerId != 0) {
|
||||
object = createObject(template, 0, planet, new Point3D(px, py, pz), new Quaternion(qw, qx, qy, qz), null, false, false);
|
||||
|
||||
Reference in New Issue
Block a user