Skip to content

Commit

Permalink
[340] Store achievement class instance in Characters::$m_achievementMgr
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadez committed Aug 3, 2010
1 parent 14fa391 commit ddf618a
Show file tree
Hide file tree
Showing 17 changed files with 287 additions and 194 deletions.
6 changes: 3 additions & 3 deletions character-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 299
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -56,7 +56,7 @@
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
$achievements = $characters->GetAchievementMgr();
if($_GET['r'] === false || !$armory->currentRealmInfo) {
$isCharacter = false;
}
Expand Down Expand Up @@ -263,7 +263,7 @@
exit;
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$character_element = $characters->GetHeader();
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
Expand Down
6 changes: 3 additions & 3 deletions character-arenateams.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 298
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -59,7 +59,7 @@
exit;
}
}/** Basic info **/
$achievements->guid = $characters->GetGUID();
$achievements = $characters->GetAchievementMgr();
$arenateams->guid = $characters->GetGUID();
$tabUrl = $characters->GetUrlString();
/** Header **/
Expand All @@ -83,7 +83,7 @@
exit;
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$character_element = $characters->GetHeader();
$character_arenateams = $arenateams->GetCharacterArenaTeamInfo();
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
Expand Down
6 changes: 3 additions & 3 deletions character-calendar.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 297
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -44,7 +44,7 @@
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
$achievements = $characters->GetAchievementMgr();
if($_GET['r'] === false || !$armory->currentRealmInfo) {
$isCharacter = false;
}
Expand Down Expand Up @@ -81,7 +81,7 @@
exit;
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$character_element = $characters->GetHeader();
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
Expand Down
6 changes: 3 additions & 3 deletions character-model-embed.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 297
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -44,7 +44,7 @@
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
$achievements = $characters->GetAchievementMgr();
if($_GET['r'] === false || !$armory->currentRealmInfo) {
$isCharacter = false;
}
Expand Down Expand Up @@ -81,7 +81,7 @@
exit;
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$character_element = $characters->GetHeader();
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
Expand Down
6 changes: 3 additions & 3 deletions character-reputation.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 297
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -44,7 +44,7 @@
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
$achievements = $characters->GetAchievementMgr();
if($_GET['r'] === false || !$armory->currentRealmInfo) {
$isCharacter = false;
}
Expand Down Expand Up @@ -81,7 +81,7 @@
exit;
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$character_element = $characters->GetHeader();
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
Expand Down
6 changes: 3 additions & 3 deletions character-sheet.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 309
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -62,7 +62,7 @@
// Load XSLT template
$xml->LoadXSLT('character/sheet.xsl');
/** Basic info **/
$achievements->guid = $characters->GetGUID();
$achievements = $characters->GetAchievementMgr();
$arenateams->guid = $characters->GetGUID();
$tabUrl = $characters->GetUrlString();
/** Header **/
Expand All @@ -86,7 +86,7 @@
exit;
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$character_element = $characters->GetHeader();
$character_arenateams = $arenateams->GetCharacterArenaTeamInfo();
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
Expand Down
6 changes: 3 additions & 3 deletions character-statistics.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 297
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -53,7 +53,7 @@
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
$achievements = $characters->GetAchievementMgr();
if($_GET['r'] === false || !$armory->currentRealmInfo) {
$isCharacter = false;
}
Expand Down Expand Up @@ -126,7 +126,7 @@
exit;
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$character_element = $characters->GetHeader();
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
Expand Down
6 changes: 3 additions & 3 deletions character-talents.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 309
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -59,7 +59,7 @@
}
}
/** Basic info **/
$achievements->guid = $characters->GetGUID();
$achievements = $characters->GetAchievementMgr();
$tabUrl = $characters->GetUrlString();
/** Header **/
$xml->XMLWriter()->startElement('page');
Expand All @@ -82,7 +82,7 @@
exit;
}
$character_title = $characters->GetChosenTitleInfo();
$character_element = $characters->GetHeader($achievements);
$character_element = $characters->GetHeader();
$xml->XMLWriter()->startElement('characterInfo');
if($utils->IsWriteRaw()) {
$xml->XMLWriter()->writeRaw('<character');
Expand Down
5 changes: 1 addition & 4 deletions guild-info.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 309
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -99,9 +99,7 @@
'realmUrl' => urlencode($armory->currentRealmInfo['name']),
'url' => sprintf('r=%s&gn=%s', urlencode($armory->currentRealmInfo['name']), urlencode($guilds->guildName))
);
// <guildInfo> start
$xml->XMLWriter()->startElement('guildInfo');
// <guildHeader> start
$xml->XMLWriter()->startElement('guildHeader');
foreach($guild_header as $header_key => $header_value) {
$xml->XMLWriter()->writeAttribute($header_key, $header_value);
Expand All @@ -112,7 +110,6 @@
}
$xml->XMLWriter()->endElement(); //emblem
$xml->XMLWriter()->endElement(); //guildHeader
// <guild> start
$xml->XMLWriter()->startElement('guild');
$xml->XMLWriter()->startElement('members');
$xml->XMLWriter()->writeAttribute('memberCount', $guilds->CountGuildMembers());
Expand Down
4 changes: 2 additions & 2 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 301
* @revision 340
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -185,7 +185,7 @@
if(!@include('classes/class.achievements.php')) {
die('<b>Error:</b> can not load achievements class!');
}
$achievements = new Achievements;
// Class instance will be created in Characters::GetAchievementMgr()
}
if(defined('load_items_class')) {
if(!@include('classes/class.items.php')) {
Expand Down
Loading

0 comments on commit ddf618a

Please sign in to comment.