mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-09-11 21:45:43 -04:00
GCW rank buffs should be granted
Chances are that the actual buffs themselves aren't functional, however.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import sys
|
||||
from resources.datatables import GcwRank
|
||||
|
||||
def handleRankUp(actor, newrank):
|
||||
if newrank > GcwRank.LIEUTENANT:
|
||||
actor.addAbility('pvp_retaliation_ability')
|
||||
|
||||
if newrank > GcwRank.CAPTAIN:
|
||||
actor.addAbility('pvp_adrenaline_ability')
|
||||
|
||||
if newrank > GcwRank.MAJOR:
|
||||
actor.addAbility('pvp_unstoppable_ability')
|
||||
|
||||
if newrank > GcwRank.LTCOLONEL:
|
||||
actor.addAbility('pvp_last_man_ability')
|
||||
|
||||
if newrank > GcwRank.COLONEL:
|
||||
actor.addAbility('pvp_aura_buff_self_ability')
|
||||
|
||||
if newrank > GcwRank.GENERAL:
|
||||
actor.addAbility('pvp_airstrike_ability')
|
||||
|
||||
return
|
||||
|
||||
def handleRankDown(actor, newrank):
|
||||
if newrank < GcwRank.LIEUTENANT:
|
||||
actor.removeAbility('pvp_retaliation_ability')
|
||||
|
||||
if newrank < GcwRank.CAPTAIN:
|
||||
actor.removeAbility('pvp_adrenaline_ability')
|
||||
|
||||
if newrank < GcwRank.MAJOR:
|
||||
actor.removeAbility('pvp_unstoppable_ability')
|
||||
|
||||
if newrank < GcwRank.LTCOLONEL:
|
||||
actor.removeAbility('pvp_last_man_ability')
|
||||
|
||||
if newrank < GcwRank.COLONEL:
|
||||
actor.removeAbility('pvp_aura_buff_self_ability')
|
||||
|
||||
if newrank < GcwRank.GENERAL:
|
||||
actor.removeAbility('pvp_airstrike_ability')
|
||||
|
||||
return
|
||||
@@ -0,0 +1,44 @@
|
||||
import sys
|
||||
from resources.datatables import GcwRank
|
||||
|
||||
def handleRankUp(actor, newrank):
|
||||
if newrank > GcwRank.LIEUTENANT:
|
||||
actor.addAbility('pvp_retaliation_rebel_ability')
|
||||
|
||||
if newrank > GcwRank.CAPTAIN:
|
||||
actor.addAbility('pvp_adrenaline_rebel_ability')
|
||||
|
||||
if newrank > GcwRank.MAJOR:
|
||||
actor.addAbility('pvp_unstoppable_rebel_ability')
|
||||
|
||||
if newrank > GcwRank.COMMANDER:
|
||||
actor.addAbility('pvp_last_man_rebel_ability')
|
||||
|
||||
if newrank > GcwRank.COLONEL:
|
||||
actor.addAbility('pvp_aura_buff_self_rebel_ability')
|
||||
|
||||
if newrank > GcwRank.GENERAL:
|
||||
actor.addAbility('pvp_airstrike_rebel_ability')
|
||||
|
||||
return
|
||||
|
||||
def handleRankDown(actor, newrank):
|
||||
if newrank < GcwRank.LIEUTENANT:
|
||||
actor.removeAbility('pvp_retaliation_rebel_ability')
|
||||
|
||||
if newrank < GcwRank.CAPTAIN:
|
||||
actor.removeAbility('pvp_adrenaline_rebel_ability')
|
||||
|
||||
if newrank < GcwRank.MAJOR:
|
||||
actor.removeAbility('pvp_unstoppable_rebel_ability')
|
||||
|
||||
if newrank < GcwRank.COMMANDER:
|
||||
actor.removeAbility('pvp_last_man_rebel_ability')
|
||||
|
||||
if newrank < GcwRank.COLONEL:
|
||||
actor.removeAbility('pvp_aura_buff_self_rebel_ability')
|
||||
|
||||
if newrank < GcwRank.GENERAL:
|
||||
actor.removeAbility('pvp_airstrike_rebel_ability')
|
||||
|
||||
return
|
||||
@@ -555,6 +555,11 @@ public class GCWService implements INetworkDispatch {
|
||||
|
||||
player.setCurrentRank(newrank);
|
||||
player.setRankProgress((float) Math.floor(newprogress));
|
||||
|
||||
if (newrank > oldrank)
|
||||
core.scriptService.callScript("scripts/gcw/", "gcwrank_" + actor.getFaction(), "handleRankUp", actor, newrank);
|
||||
else
|
||||
core.scriptService.callScript("scripts/gcw/", "gcwrank_" + actor.getFaction(), "handleRankDown", actor, newrank);
|
||||
}
|
||||
|
||||
public List<SWGObject> getSFPlayers() {
|
||||
|
||||
Reference in New Issue
Block a user