Adjusted rank levels to match data levels

This commit is contained in:
Cekis
2019-03-09 13:40:52 -08:00
committed by GitHub
parent 88f1eceb3b
commit 326a47e5cf

View File

@@ -39,55 +39,55 @@ try{
po.current_gcw_points as points_for_week,
CASE
WHEN po.current_gcw_rating < 0 THEN 'Not Ranked'
WHEN po.current_gcw_rating = 0 THEN 'Private'
WHEN po.current_gcw_rating = 1 AND tano.pvp_faction = 370444368 THEN 'Trooper'
WHEN po.current_gcw_rating = 1 THEN 'Lance Corporal'
WHEN po.current_gcw_rating = 2 AND tano.pvp_faction = 370444368 THEN 'High Trooper'
WHEN po.current_gcw_rating = 2 THEN 'Corporal'
WHEN po.current_gcw_rating = 3 THEN 'Sergeant'
WHEN po.current_gcw_rating = 4 AND tano.pvp_faction = 370444368 THEN 'Senior Sergeant'
WHEN po.current_gcw_rating = 4 THEN 'Master Sergeant'
WHEN po.current_gcw_rating = 5 THEN 'Sergeant Major'
WHEN po.current_gcw_rating = 6 THEN 'Lieutenant'
WHEN po.current_gcw_rating = 7 THEN 'Captain'
WHEN po.current_gcw_rating = 8 THEN 'Major'
WHEN po.current_gcw_rating = 9 AND tano.pvp_faction = 370444368 THEN 'Commander'
WHEN po.current_gcw_rating = 9 THEN 'Lt. Colonel'
WHEN po.current_gcw_rating = 10 THEN 'Colonel'
WHEN po.current_gcw_rating = 11 THEN 'General'
WHEN po.current_gcw_rating < 5000 THEN 'Private'
WHEN po.current_gcw_rating < 10000 AND tano.pvp_faction = 370444368 THEN 'Trooper'
WHEN po.current_gcw_rating < 10000 THEN 'Lance Corporal'
WHEN po.current_gcw_rating < 15000 AND tano.pvp_faction = 370444368 THEN 'High Trooper'
WHEN po.current_gcw_rating < 15000 THEN 'Corporal'
WHEN po.current_gcw_rating < 20000 THEN 'Sergeant'
WHEN po.current_gcw_rating < 25000 AND tano.pvp_faction = 370444368 THEN 'Senior Sergeant'
WHEN po.current_gcw_rating < 25000 THEN 'Master Sergeant'
WHEN po.current_gcw_rating < 30000 THEN 'Sergeant Major'
WHEN po.current_gcw_rating < 35000 THEN 'Lieutenant'
WHEN po.current_gcw_rating < 40000 THEN 'Captain'
WHEN po.current_gcw_rating < 45000 THEN 'Major'
WHEN po.current_gcw_rating < 50000 AND tano.pvp_faction = 370444368 THEN 'Commander'
WHEN po.current_gcw_rating < 50000 THEN 'Lt. Colonel'
WHEN po.current_gcw_rating < 55000 THEN 'Colonel'
WHEN po.current_gcw_rating >= 55000 THEN 'General'
END as current_rank,
po.current_pvp_kills as kills_for_week,
po.lifetime_gcw_points as lifetime_gcw_points,
po.lifetime_pvp_kills as lifetime_pvp_kills,
CASE
WHEN po.max_gcw_imperial_rating < 0 THEN 'Not Ranked'
WHEN po.max_gcw_imperial_rating = 0 THEN 'Private'
WHEN po.max_gcw_imperial_rating = 1 THEN 'Lance Corporal'
WHEN po.max_gcw_imperial_rating = 2 THEN 'Corporal'
WHEN po.max_gcw_imperial_rating = 3 THEN 'Sergeant'
WHEN po.max_gcw_imperial_rating = 4 THEN 'Master Sergeant'
WHEN po.max_gcw_imperial_rating = 5 THEN 'Sergeant Major'
WHEN po.max_gcw_imperial_rating = 6 THEN 'Lieutenant'
WHEN po.max_gcw_imperial_rating = 7 THEN 'Captain'
WHEN po.max_gcw_imperial_rating = 8 THEN 'Major'
WHEN po.max_gcw_imperial_rating = 9 THEN 'Lt. Colonel'
WHEN po.max_gcw_imperial_rating = 10 THEN 'Colonel'
WHEN po.max_gcw_imperial_rating = 11 THEN 'General'
WHEN po.max_gcw_imperial_rating < 5000 THEN 'Private'
WHEN po.max_gcw_imperial_rating < 10000 THEN 'Lance Corporal'
WHEN po.max_gcw_imperial_rating < 15000 THEN 'Corporal'
WHEN po.max_gcw_imperial_rating < 20000 THEN 'Sergeant'
WHEN po.max_gcw_imperial_rating < 25000 THEN 'Master Sergeant'
WHEN po.max_gcw_imperial_rating < 30000 THEN 'Sergeant Major'
WHEN po.max_gcw_imperial_rating < 35000 THEN 'Lieutenant'
WHEN po.max_gcw_imperial_rating < 40000 THEN 'Captain'
WHEN po.max_gcw_imperial_rating < 45000 THEN 'Major'
WHEN po.max_gcw_imperial_rating < 50000 THEN 'Lt. Colonel'
WHEN po.max_gcw_imperial_rating < 55000 THEN 'Colonel'
WHEN po.max_gcw_imperial_rating >= THEN 'General'
END as highest_imperial_rank,
CASE
WHEN po.current_gcw_rating < 0 THEN 'Not Ranked'
WHEN po.current_gcw_rating = 0 THEN 'Private'
WHEN po.current_gcw_rating = 1 THEN 'Trooper'
WHEN po.current_gcw_rating = 2 THEN 'High Trooper'
WHEN po.current_gcw_rating = 3 THEN 'Sergeant'
WHEN po.current_gcw_rating = 4 THEN 'Senior Sergeant'
WHEN po.current_gcw_rating = 5 THEN 'Sergeant Major'
WHEN po.current_gcw_rating = 6 THEN 'Lieutenant'
WHEN po.current_gcw_rating = 7 THEN 'Captain'
WHEN po.current_gcw_rating = 8 THEN 'Major'
WHEN po.current_gcw_rating = 9 THEN 'Commander'
WHEN po.current_gcw_rating = 10 THEN 'Colonel'
WHEN po.current_gcw_rating = 11 THEN 'General'
WHEN po.current_gcw_rating < 5000 THEN 'Private'
WHEN po.current_gcw_rating < 10000 THEN 'Trooper'
WHEN po.current_gcw_rating < 15000 THEN 'High Trooper'
WHEN po.current_gcw_rating < 20000 THEN 'Sergeant'
WHEN po.current_gcw_rating < 25000 THEN 'Senior Sergeant'
WHEN po.current_gcw_rating < 30000 THEN 'Sergeant Major'
WHEN po.current_gcw_rating < 35000 THEN 'Lieutenant'
WHEN po.current_gcw_rating < 40000 THEN 'Captain'
WHEN po.current_gcw_rating < 45000 THEN 'Major'
WHEN po.current_gcw_rating < 50000 THEN 'Commander'
WHEN po.current_gcw_rating < 55000 THEN 'Colonel'
WHEN po.current_gcw_rating >= 55000 THEN 'General'
END as highest_rebel_rank
from
player_objects po
@@ -119,4 +119,4 @@ try{
catch(PDOException $e){
echo ($e->getMessage());
}
?>
?>