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:
Treeku
2014-03-29 09:29:34 +00:00
parent 73bef32efb
commit 9ff669832b
6 changed files with 74 additions and 18 deletions
+24 -6
View File
@@ -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;
}