This commit is contained in:
Light
2014-05-18 00:42:01 +02:00
3 changed files with 13 additions and 8 deletions
+3 -1
View File
@@ -524,7 +524,9 @@ public class NGECore {
List<CreatureObject> deletedObjects = new ArrayList<CreatureObject>();
while(cursor.hasNext()) {
SWGObject creature = (SWGObject) cursor.next();
Object next = cursor.next();
if (next == null) continue;
SWGObject creature = (SWGObject) next;
if(!characterService.playerExists(creature.getObjectID()) && creature instanceof CreatureObject)
deletedObjects.add((CreatureObject) creature);
}
+7 -6
View File
@@ -149,15 +149,15 @@ 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
{
{ */
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);
@@ -216,15 +216,16 @@ 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());
}
// }
if (!buff.getCallback().equals("none") && !buff.getCallback().equals("")) {
if (FileUtilities.doesFileExist("scripts/buffs/" + buff.getBuffName() + ".py")) {
+3 -1
View File
@@ -193,7 +193,9 @@ public class SimulationService implements INetworkDispatch {
ODBCursor cursor = core.getSWGObjectODB().getCursor();
while(cursor.hasNext()) {
SWGObject building = core.objectService.getObject(((SWGObject) cursor.next()).getObjectID());
Object next = cursor.next();
if (next == null) continue;
SWGObject building = core.objectService.getObject(((SWGObject) next).getObjectID());
if(building == null || (!(building instanceof BuildingObject) && !(building instanceof HarvesterObject)))
continue;
if(building.getAttachment("hasLoadedServerTemplate") == null)