diff options
author | BlueRaja <BlueRaja.admin@gmail.com> | 2013-01-13 15:06:04 -0600 |
---|---|---|
committer | BlueRaja <BlueRaja.admin@gmail.com> | 2013-01-13 15:06:04 -0600 |
commit | 28dab5d36ab1b593ef395e64973d40d24f574dcd (patch) | |
tree | 9053a02331eba760881bba187087f18cc922b628 | |
parent | 3917765f10b0a3024634bef1ff0c49d700abdfa1 (diff) | |
download | pathery-28dab5d36ab1b593ef395e64973d40d24f574dcd.tar.xz |
Replaced wins with champion points on the achievements page & achievement unlocks
-rw-r--r-- | includes/datas.php | 36 | ||||
-rw-r--r-- | pages/achievements.php | 4 |
2 files changed, 19 insertions, 21 deletions
diff --git a/includes/datas.php b/includes/datas.php index 690b83a..6d73230 100644 --- a/includes/datas.php +++ b/includes/datas.php @@ -114,7 +114,7 @@ function getNotified($userID) { $aTypeCurrency[1] = "total moves mazed"; $aTypeCurrency[2] = "mazes played"; $aTypeCurrency[3] = "mazes with (tied) top score"; - $aTypeCurrency[4] = "maze wins"; + $aTypeCurrency[4] = "challenge points"; $aName = $aTypeNames[$aType]; $currency = $aTypeCurrency[$aType]; @@ -555,7 +555,7 @@ function getAchievementCurrency($userID, $aType) { // 1, Total Moves "Path Career" //Backdated // 2, Total Solutions (Total maps played) "Mazes Career" //Backdated // 3, Tie Top-Score on a map "Maze Mastery" //Tracked (no backdate) -// 4, Rank#1 Win Top-Score on a map "Wins" //Tracked +// 4, Champion Points! $r = 0; $sql = ''; switch ($aType) { @@ -579,11 +579,9 @@ function getAchievementCurrency($userID, $aType) { AND `type` IN (1, 2, 3, 4)"; break; case 4: - $sql = "SELECT - SUM(`value`) as t - FROM `statistics` - WHERE `userID` = '$userID' - AND `type` IN (32, 33, 34, 35)"; + $sql = "SELECT championPoints + FROM `users` + WHERE `ID` = '$userID'"; break; } if ($sql == '') @@ -618,7 +616,7 @@ function getAchievementsArray($type) { if ($type == 3) return getMazeMasteryArray(); if ($type == 4) - return getWinsArray(); + return getChampionPointsArray(); //Tutorial if ($type == 32) { $r[1] = array(1, 1, '#4444ff', 'Blue'); @@ -697,17 +695,17 @@ function getMazeMasteryArray() { } //TYPE 4 -function getWinsArray() { - //$cp[0] = array(requiredmazewins, type, 'value', 'name'); - $r[1] = array(1, 2, 'DiagonalCover_B.png', 'Light Diagnol Cover', 0); - $r[2] = array(5, 1, '#22aaaa', 'Teal'); - $r[3] = array(15, 2, 'OffsetStripesDiagonal_B.png', 'Dark Diagonal Stripes', 0); - $r[4] = array(30, 2, 'DiamondLargeDonut_W_I.png', 'Inverted Light Annulated Diamond', 0); - $r[5] = array(50, 2, 'StarsR_B.png', 'Dark Stars', 0); - $r[6] = array(75, 2, 'OffsetStripesHorizontal_B_I.png', 'Inverted Dark Horizontal Stripes', 0); - $r[7] = array(100, 2, 'CrossXLDonut_B_I.png', 'Inverted Dark Large Intersection', 0); - $r[8] = array(150, 2, 'DiamondLarge_B.png', 'Dark Large Diamond', 0); - $r[9] = array(225, 1, '#22ff22', 'Neon Lime', 1); +function getChampionPointsArray() { + //$cp[0] = array(requiredpoints, type, 'value', 'name'); + $r[1] = array(100, 2, 'DiagonalCover_B.png', 'Light Diagnol Cover', 0); + $r[2] = array(250, 1, '#22aaaa', 'Teal'); + $r[3] = array(500, 2, 'OffsetStripesDiagonal_B.png', 'Dark Diagonal Stripes', 0); + $r[4] = array(1000, 2, 'DiamondLargeDonut_W_I.png', 'Inverted Light Annulated Diamond', 0); + $r[5] = array(2000, 2, 'StarsR_B.png', 'Dark Stars', 0); + $r[6] = array(4000, 2, 'OffsetStripesHorizontal_B_I.png', 'Inverted Dark Horizontal Stripes', 0); + $r[7] = array(8000, 2, 'CrossXLDonut_B_I.png', 'Inverted Dark Large Intersection', 0); + $r[8] = array(16000, 2, 'DiamondLarge_B.png', 'Dark Large Diamond', 0); + $r[9] = array(32000, 1, '#22ff22', 'Neon Lime', 1); //$r[7] = array(75, 2, 'CircleSmall_W_I.png', 'Inverted Bright Small Circle', 0); return $r; diff --git a/pages/achievements.php b/pages/achievements.php index 1bb2195..6dbabe7 100644 --- a/pages/achievements.php +++ b/pages/achievements.php @@ -499,13 +499,13 @@ foreach($achievements as $aType => $a) { $aTypeNames[1] = "<img src='../images/Achievement_PathCareer.png' style='width:36px;height:36px;vertical-align:middle'>Path Career Level $aLevel!";
$aTypeNames[2] = "<img src='../images/Achievement_MazeCareer.png' style='width:36px;height:36px;vertical-align:middle'>Mazes Career Level $aLevel!";
$aTypeNames[3] = "<img src='../images/MedalSilverCAR.png' style='width:36px;height:36px;vertical-align:middle'>Maze Mastery Level $aLevel!";
- $aTypeNames[4] = "<img src='../images/MedalGoldCAR.png' style='width:36px;height:36px;vertical-align:middle'>Champion Level $aLevel!";
+ $aTypeNames[4] = "<img src='../images/championpoints.png' style='width:36px;height:36px;vertical-align:middle'>Champion Level $aLevel!";
$aTypeNames[32] = 'Tutorial Complete!';
$aTypeCurrency[1] = "total moves mazed";
$aTypeCurrency[2] = "mazes played";
$aTypeCurrency[3] = "mazes with (tied) top score";
- $aTypeCurrency[4] = "maze wins";
+ $aTypeCurrency[4] = "champion points";
$name = $aTypeNames[$aType];
$currency = $aTypeCurrency[$aType];
|