Skip to content

Commit

Permalink
[215] Display completed achievement criterias. es_ES locale for achie…
Browse files Browse the repository at this point in the history
…vement_criteria table temporary dropped
  • Loading branch information
Shadez committed May 28, 2010
1 parent 11b43df commit 0a7911d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
6 changes: 3 additions & 3 deletions includes/armory_loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 214
* @revision 215
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand All @@ -30,8 +30,8 @@
if(!@include('classes/class.connector.php')) {
die('<b>Error:</b> can not load connector class!');
}
define('DB_VERSION', 'armory_r214');
define('ARMORY_REVISION', 214);
define('DB_VERSION', 'armory_r215');
define('ARMORY_REVISION', 215);
$armory = new Connector();
/* Check DbVersion */
$dbVersion = $armory->aDB->selectCell("SELECT `version` FROM `armory_db_version`");
Expand Down
14 changes: 8 additions & 6 deletions includes/classes/class.achievements.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* @package World of Warcraft Armory
* @version Release Candidate 1
* @revision 214
* @revision 215
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -469,7 +469,7 @@ public function BuildAchievementCriteriaTable() {
$this->Log()->writeError('%s : player guid or achievement id not defiend', __METHOD__);
return false;
}
$data = $this->aDB->select("SELECT * FROM `armory_achievement_criteria` WHERE `referredAchievement`=? ORDER BY `order`", $this->achId);
$data = $this->aDB->select("SELECT * FROM `armory_achievement_criteria` WHERE `referredAchievement`=? ORDER BY `showOrder`", $this->achId);
if(!$data) {
$this->Log()->writeError('%s : achievement criteria for achievement #%d not found', __METHOD__, $this->achId);
return false;
Expand All @@ -480,13 +480,15 @@ public function BuildAchievementCriteriaTable() {
if($criteria['completionFlag']&ACHIEVEMENT_CRITERIA_FLAG_HIDE_CRITERIA) {
continue;
}
$achievement_criteria[$i]['id'] = $criteria['id'];
$achievement_criteria[$i]['name'] = $criteria['name_'.$this->_locale];
$m_data = $this->GetCriteriaData($criteria['id']);
if(!$m_data['counter']) {
if(!isset($m_data['counter']) || !$m_data['counter']) {
$m_data['counter'] = 0;
}
$achievement_criteria[$i]['counter'] = $m_data['counter'];
$achievement_criteria[$i]['id'] = $criteria['id'];
if(isset($m_data['date']) && $m_data['date'] > 0) {
$achievement_criteria[$i]['date'] = date('Y-m-d\TH:i:s\+01:00', $m_data['date']);
}
$achievement_criteria[$i]['name'] = $criteria['name_'.$this->_locale];
if($criteria['completionFlag']&ACHIEVEMENT_CRITERIA_FLAG_SHOW_PROGRESS_BAR || $criteria['completionFlag']&ACHIEVEMENT_FLAG_COUNTER) {
if($criteria['completionFlag']&ACHIEVEMENT_CRITERIA_FLAG_MONEY_COUNTER) {
$achievement_criteria[$i]['maxQuantityGold'] = $criteria['value'];
Expand Down
3 changes: 3 additions & 0 deletions sql/updates/armory_r215_armory_achievement_criteria.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
UPDATE `armory_db_version` SET `version` = 'armory_r215';
ALTER TABLE `armory_achievement_criteria` DROP `name_es_es`;
UPDATE `armory_achievement_category` SET `name_ru_ru` = 'Lich King (5)' WHERE `id` =14921 LIMIT 1;

0 comments on commit 0a7911d

Please sign in to comment.