Skip to content

Commit

Permalink
[254] Added internal database handler to Characters class (for future…
Browse files Browse the repository at this point in the history
… development)
  • Loading branch information
Shadez committed Jun 20, 2010
1 parent 24ea5cb commit bea7bd0
Show file tree
Hide file tree
Showing 12 changed files with 84 additions and 47 deletions.
5 changes: 3 additions & 2 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 217
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -50,7 +50,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
Expand Down
5 changes: 3 additions & 2 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 203
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -41,7 +41,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
$isCharacter = false;
Expand Down
5 changes: 3 additions & 2 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 203
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -38,7 +38,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
Expand Down
5 changes: 3 additions & 2 deletions character-feed-data.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 195
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -38,7 +38,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
$isCharacter = false;
Expand Down
5 changes: 3 additions & 2 deletions character-feed.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 203
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -38,7 +38,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
$isCharacter = false;
Expand Down
5 changes: 3 additions & 2 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 236
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -38,7 +38,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
Expand Down
8 changes: 6 additions & 2 deletions character-model.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 237
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -38,7 +38,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
$isCharacter = false;
Expand Down Expand Up @@ -119,6 +120,9 @@
);

$xml->XMLWriter()->startElement('character');
if($utils->IsAccountHaveCurrentCharacter($characters->GetGUID(), $armory->currentRealmInfo['id'])) {
$xml->XMLWriter()->writeAttribute('owned', 1);
}
$xml->XMLWriter()->startElement('models');
$xml->XMLWriter()->startElement('model');
foreach($model_data as $model_key => $model_value) {
Expand Down
5 changes: 3 additions & 2 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 203
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -38,7 +38,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
Expand Down
10 changes: 7 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 203
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -41,7 +41,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
// Get page cache
if($isCharacter && $armory->armoryconfig['useCache'] == true && !isset($_GET['skipCache'])) {
Expand Down Expand Up @@ -111,7 +112,10 @@
}
$xml->XMLWriter()->endElement(); //arenaTeams
}
$xml->XMLWriter()->endElement(); //character
$xml->XMLWriter()->startElement('modelBasePath');
$xml->XMLWriter()->writeAttribute('value', 'http://eu.media.battle.net.edgesuite.net/');
$xml->XMLWriter()->endElement(); //modelBasePath
$xml->XMLWriter()->endElement(); //character
/** Character tab **/
$xml->XMLWriter()->startElement('characterTab');
$xml->XMLWriter()->startElement('talentSpecs');
Expand Down
5 changes: 3 additions & 2 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 203
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -47,7 +47,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
$achievements->guid = $characters->GetGUID();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
Expand Down
9 changes: 7 additions & 2 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 203
* @revision 254
* @copyright (c) 2009-2010 Shadez
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
Expand Down Expand Up @@ -40,7 +40,8 @@
else {
$name = false;
}
$characters->BuildCharacter($name);
$realmId = $utils->GetRealmIdByName($_GET['r']);
$characters->BuildCharacter($name, $realmId);
$isCharacter = $characters->CheckPlayer();
if(!isset($_GET['r']) || !$armory->currentRealmInfo) {
$isCharacter = false;
Expand Down Expand Up @@ -126,6 +127,10 @@
$xml->XMLWriter()->endElement(); //glyphs
$xml->XMLWriter()->endElement(); //talentGroup
}
/* Hunter's pet talents */
if($characters->GetClass() == CLASS_HUNTER && $characters->GetActivePetData() == true) {
// Talent counting here
}
$xml->XMLWriter()->endElement(); //talents
$xml->XMLWriter()->endElement(); //characterInfo
$xml->XMLWriter()->endElement(); //page
Expand Down
Loading

0 comments on commit bea7bd0

Please sign in to comment.