diff --git a/includes/class.achievement.php b/includes/class.achievement.php index 78df3d24..de30088f 100644 --- a/includes/class.achievement.php +++ b/includes/class.achievement.php @@ -93,6 +93,10 @@ class AchievementList extends BaseType 'parentCat' => $this->curTpl['parentCat'], ); + // going out on a limb here: type = 1 if in level 3 of statistics tree, so, IF (statistic AND parentCat NOT statistic (1)) i guess + if ($this->curTpl['flags'] & ACHIEVEMENT_FLAG_COUNTER && $this->curTpl['parentCat'] != 1) + $data[$this->id]['type'] = 1; + if (!empty($this->curTpl['rewards'])) { $rewards = []; diff --git a/template/bricks/achievement_table.tpl b/template/bricks/achievement_table.tpl index 0c2be506..90774e5a 100644 --- a/template/bricks/achievement_table.tpl +++ b/template/bricks/achievement_table.tpl @@ -23,6 +23,7 @@ points:{$curr.points}, category:{$curr.category}, parentcat:{$curr.parentCat} + {if isset($curr.type)}, type:{$curr.type}{/if} {if isset($curr.rewards)}, rewards:{$curr.rewards}{/if} {if isset($curr.reward)}, reward:'{$curr.reward|escape:"javascript"}'{/if} {rdelim} diff --git a/template/js/global.js b/template/js/global.js index af6e79bf..6c78e311 100644 --- a/template/js/global.js +++ b/template/js/global.js @@ -11722,12 +11722,13 @@ Listview.templates = { type: 'text', width: '15%', compute: function(achievement, td) { + statistic = achievement.type ? achievement.type + '.' : ''; td.className = 'small'; - path = '?achievements='; + path = '?achievements=' + statistic; if (achievement.category != -1 && achievement.parentcat != -1) { var a2 = ce('a'); a2.className = 'q0'; - a2.href = '?achievements=' + achievement.parentcat; + a2.href = '?achievements=' + statistic + achievement.parentcat; ae(a2, ct(g_achievement_categories[achievement.parentcat])); ae(td, a2); ae(td, ce('br'));