mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-12 02:13:48 -04:00
Fixed healing of AI, temp fix for faction error
This commit is contained in:
@@ -233,7 +233,7 @@ public class TangibleObject extends SWGObject {
|
||||
Client observer = it.next();
|
||||
|
||||
if (observer.getParent() != null) {
|
||||
observer.getSession().write(new UpdatePVPStatusMessage(this.getObjectID(), NGECore.getInstance().factionService.calculatePvpStatus(observer, this), getFaction()).serialize());
|
||||
observer.getSession().write(new UpdatePVPStatusMessage(this.getObjectID(), NGECore.getInstance().factionService.calculatePvpStatus((CreatureObject) observer.getParent(), this), getFaction()).serialize());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -847,6 +847,8 @@ public class CombatService implements INetworkDispatch {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(target.getAttachment("AI") != null) return false;
|
||||
|
||||
if(healer.getFaction().equals(target.getFaction())) {
|
||||
|
||||
if(healer.getFactionStatus() < target.getFactionStatus())
|
||||
|
||||
@@ -203,11 +203,12 @@ public class FactionService implements INetworkDispatch {
|
||||
|
||||
int pvpBitmask = target.getPvPBitmask();
|
||||
|
||||
if (target.getFactionStatus() == FactionStatus.Combatant) {
|
||||
// Seefo: Casting target to type CreatureObject as temporary fix. I am unsure whether or not we want to put a factionStatus member inside of TangibleObject.
|
||||
if (((CreatureObject) target).getFactionStatus() == FactionStatus.Combatant) {
|
||||
pvpBitmask |= PvpStatus.Enemy;
|
||||
}
|
||||
|
||||
if (target.getFactionStatus() == FactionStatus.SpecialForces) {
|
||||
if (((CreatureObject) target).getFactionStatus() == FactionStatus.SpecialForces) {
|
||||
pvpBitmask |= PvpStatus.Overt;
|
||||
|
||||
if (target.getSlottedObject("ghost") != null) {
|
||||
@@ -232,7 +233,7 @@ public class FactionService implements INetworkDispatch {
|
||||
return pvpBitmask;
|
||||
}
|
||||
|
||||
if (player.getFaction().equals(target.getFaction()) {
|
||||
if (player.getFaction().equals(target.getFaction())) {
|
||||
return pvpBitmask;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user