mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-10-19 09:02:54 -04:00
calculatePvpStatus() used for everything, more...
This ensures nothing is ever missed out of the pvpStatus calculation, such as faction standing. It should calculate the following: On Leave/neutral players should be #16 Combatant players should be #35 Opposing faction SF players should be #55 Opposing Combatant NPCs should be #19 Ally SF NPCs (ie.; hoth commandos) should be #4 Enemy SF NPCs (ie. hoth resistance) should be #7 Same faction NPCs should be #0 (pink) Attackable NPCs should be #1 Aggressive NPCs should be #2 or #3 NPCs you have negative faction standing with should be #2 or #3
This commit is contained in:
@@ -203,18 +203,36 @@ public class FactionService implements INetworkDispatch {
|
||||
|
||||
int pvpBitmask = target.getPvPBitmask();
|
||||
|
||||
if (target.getSlottedObject("ghost") != null) {
|
||||
if (target.getFaction() == null || (!target.getFaction().equals("rebel") && !target.getFaction().equals("imperial"))) {
|
||||
return 0;
|
||||
}
|
||||
if (target.getFactionStatus() == FactionStatus.Combatant) {
|
||||
pvpBitmask |= PvpStatus.Enemy;
|
||||
}
|
||||
|
||||
if (target.getFactionStatus() == FactionStatus.SpecialForces) {
|
||||
pvpBitmask |= PvpStatus.Overt;
|
||||
|
||||
if (target.getSlottedObject("ghost") != null) {
|
||||
pvpBitmask |= PvpStatus.Enemy;
|
||||
}
|
||||
}
|
||||
|
||||
if (target.getSlottedObject("ghost") != null) {
|
||||
pvpBitmask |= PvpStatus.Player;
|
||||
|
||||
if (player.getFactionStatus() == FactionStatus.SpecialForces &&
|
||||
((CreatureObject) target).getFactionStatus() == FactionStatus.SpecialForces) {
|
||||
if ((!player.getFaction().equals(target.getFaction()) &&
|
||||
player.getFactionStatus() == FactionStatus.SpecialForces &&
|
||||
((CreatureObject) target).getFactionStatus() == FactionStatus.SpecialForces) ||
|
||||
core.combatService.areInDuel(player, (CreatureObject) target)) {
|
||||
pvpBitmask |= (PvpStatus.Attackable | PvpStatus.Aggressive);
|
||||
}
|
||||
|
||||
if (core.combatService.areInDuel(player, (CreatureObject) target)) {
|
||||
//pvpBitmask |= PvpStatus.Dueling;
|
||||
}
|
||||
|
||||
return pvpBitmask;
|
||||
}
|
||||
|
||||
if (player.getFaction().equals(target.getFaction()) {
|
||||
return pvpBitmask;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user