コード例 #1
0
ファイル: search.php プロジェクト: JunkyBulgaria/WoWCS
 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     // Check query
     $searchQuery = isset($_GET['q']) ? $_GET['q'] : null;
     if ($searchQuery != null && mb_strlen($searchQuery) < 3) {
         $searchQuery = null;
     }
     if (preg_match('/\\@/', $searchQuery)) {
         $fast_access = explode('@', $searchQuery);
         if (isset($fast_access[0], $fast_access[1])) {
             header('Location: ' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . '/character/' . trim($fast_access[1]) . trim($fast_access[0]) . '/');
             exit;
         }
     }
     WoW_Search::SetSearchQuery($searchQuery);
     // Perform Search
     WoW_Search::PerformSearch();
     // Set active page
     if (isset($_GET['f']) && in_array($_GET['f'], array('search', 'wowarenateam', 'article', 'wowcharacter', 'wowitem', 'post', 'wowguild'))) {
         $page = $_GET['f'];
     } else {
         $page = 'search';
     }
     WoW_Search::SetCurrentPage($page);
     WoW_Template::SetPageIndex('search');
     WoW_Template::SetPageData('page', 'search');
     WoW_Template::SetPageData('searchQuery', $searchQuery);
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #2
0
 public function main()
 {
     WoW_Template::SetPageData('body_class', sprintf('%s  game-index', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     $url_data = WoW::GetUrlData('game');
     if (empty($url_data['action1'])) {
         WoW_Template::SetPageIndex('game');
         WoW_Template::SetPageData('page', 'game');
     } elseif ($url_data['action1'] == 'guide') {
         switch ($url_data['action2']) {
             case 'getting-started':
             case 'how-to-play':
             case 'playing-together':
             case 'late-game':
                 WoW_Template::SetPageIndex('game_guide_' . str_replace('-', '_', $url_data['action2']));
                 WoW_Template::SetPageData('body_class', 'game-guide-' . $url_data['action2']);
                 WoW_Template::SetPageData('page', 'game_guide_' . str_replace('-', '_', $url_data['action2']));
                 break;
             default:
                 WoW_Template::SetPageIndex('game_guide_what_is_wow');
                 WoW_Template::SetPageData('body_class', 'game-guide-what-is-wow');
                 WoW_Template::SetPageData('page', 'game_guide_what_is_wow');
                 break;
         }
     } elseif ($url_data['action1'] == 'race') {
         $race_id = WoW_Utils::GetRaceIDByKey($url_data['action2']);
         if ($race_id > 0) {
             WoW_Game::LoadRace($race_id);
             WoW_Template::SetPageIndex('game_race');
             WoW_Template::SetPageData('body_class', 'race-' . $url_data['action2']);
             WoW_Template::SetPageData('race', $url_data['action2']);
             WoW_Template::SetPageData('page', 'game_race');
             WoW_Template::SetPageData('raceId', $race_id);
         } else {
             WoW_Template::SetPageIndex('game_race_index');
             WoW_Template::SetPageData('body_class', 'game-race-index');
             WoW_Template::SetPageData('page', 'game_race_index');
         }
     } elseif ($url_data['action1'] == 'class') {
         $class_id = WoW_Utils::GetClassIDByKey($url_data['action2']);
         if ($class_id > 0) {
             WoW_Game::LoadClass($class_id);
             WoW_Template::SetPageIndex('game_class');
             WoW_Template::SetPageData('body_class', 'class-' . $url_data['action2']);
             WoW_Template::SetPageData('class', $url_data['action2']);
             WoW_Template::SetPageData('classId', $class_id);
             WoW_Template::SetPageData('page', 'game_class');
         } else {
             WoW_Template::SetPageIndex('game_class_index');
             WoW_Template::SetPageData('body_class', 'game-classes-index');
             WoW_Template::SetPageData('page', 'game_class_index');
         }
     } else {
         WoW_Template::ErrorPage(404);
     }
     WoW_Template::SetMenuIndex('menu-game');
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #3
0
 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     WoW_Template::SetPageIndex('realm_status');
     WoW_Template::SetPageData('page', 'realm_status');
     WoW_Template::SetMenuIndex('menu-game');
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #4
0
ファイル: home.php プロジェクト: JunkyBulgaria/WoWCS
 public function main()
 {
     WoW_Template::SetPageData('carousel', WoW::GetCarouselData());
     WoW_Template::SetPageData('wow_news', WoW::GetLastNews(20, isset($_GET['page']) ? (int) ($_GET['page'] - 1) : 0));
     WoW_Template::SetPageData('body_class', sprintf('%s homepage', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageIndex('index');
     WoW_Template::SetMenuIndex('menu-home');
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #5
0
 public function main()
 {
     if (!WoWConfig::$EnableBNPage && !isset($_GET['skipRedirect'])) {
         WoW::RedirectTo('wow/' . WoW_Locale::GetLocale());
     }
     WoW_Template::SetTemplateTheme('bn');
     WoW_Template::SetMenuIndex('index');
     WoW_Account::UserGames();
     WoW_Template::SetPageIndex('index');
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #6
0
 public function main()
 {
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     WoW_Template::SetTemplateTheme('wow');
     $url_data = WoW::GetUrlData('guild');
     $guild_error = false;
     if (!$url_data) {
         WoW_Template::ErrorPage(404);
     } elseif (!WoW_Guild::LoadGuild($url_data['name'], WoW_Utils::GetRealmIDByName($url_data['realmName']))) {
         WoW_Template::ErrorPage(404);
     } else {
         $primary = WoW_Account::GetActiveCharacter();
         WoW_Template::SetPageData('guild-authorized', false);
         if (is_array($primary) && isset($primary['realmName'])) {
             if ($primary['realmName'] == WoW_Guild::GetGuildRealmName() && $primary['guildId'] == WoW_Guild::GetGuildID()) {
                 WoW_Template::SetPageData('guild-authorized', true);
             }
         }
         switch ($url_data['action0']) {
             default:
                 WoW_Template::SetPageData('guild-page', 'summary');
                 WoW_Template::SetPageIndex('guild_page');
                 WoW_Template::SetPageData('page', 'guild_page');
                 break;
             case 'perk':
                 WoW_Template::SetPageData('guild-page', 'perks');
                 WoW_Template::SetPageIndex('guild_perks');
                 WoW_Template::SetPageData('page', 'guild_perks');
                 break;
             case 'roster':
                 switch ($url_data['action1']) {
                     default:
                         WoW_Template::SetPageIndex('guild_roster');
                         WoW_Template::SetPageData('page', 'guild_roster');
                         break;
                     case 'professions':
                         WoW_Guild::InitProfessions();
                         WoW_Template::SetPageIndex('guild_professions');
                         WoW_Template::SetPageData('page', 'guild_professions');
                         break;
                 }
                 WoW_Template::SetPageData('guild-page', 'roster');
                 break;
         }
         WoW_Template::SetPageData('guildName', $url_data['name']);
         WoW_Template::SetPageData('realmName', $url_data['realmName']);
         WoW_Template::SetMenuIndex('menu-game');
     }
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #7
0
 public function main()
 {
     WoW_Template::SetPageData('body_class', sprintf('%s  media-content', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     $url_data = WoW::GetUrlData('media');
     if (empty($url_data['action1'])) {
         WoW_Template::SetPageIndex('media');
         WoW_Template::SetPageData('page', 'media');
     } else {
         WoW_Template::ErrorPage(404);
     }
     WoW_Template::SetMenuIndex('menu-media');
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #8
0
 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     $url_data = WoW::GetUrlData('blog');
     $blog_id = $url_data['blog_id'];
     if (!$blog_id || !WoW::LoadBlog($blog_id)) {
         WoW_Template::ErrorPage(404);
     } else {
         WoW_Template::SetPageData('wow_news', WoW::GetLastNews());
         WoW_Template::SetPageData('blog_title', WoW::GetBlogData('title'));
         WoW_Template::SetPageData('overall_meta_title', WoW::GetBlogData('title'));
         WoW_Template::SetPageData('overall_meta_img', '/cms/blog_thumbnail/' . WoW::GetBlogData('image'));
         WoW_Template::SetPageIndex('blog');
         WoW_Template::SetPageData('page', 'blog');
     }
     WoW_Template::SetMenuIndex('menu-home');
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #9
0
ファイル: zone.php プロジェクト: JunkyBulgaria/WoWCS
 public function main()
 {
     WoW_Template::SetPageData('body_class', sprintf('%s zone-index expansion-3', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageIndex('zones');
     WoW_Template::SetPageData('page', 'zones');
     $url_data = WoW::GetUrlData('zone');
     if (isset($url_data['action3'])) {
         exit;
     }
     if (isset($url_data['action1']) && $url_data['action1'] != null) {
         // Try to find zone
         if (WoW_Game::IsZone($url_data['action1'])) {
             WoW_Template::SetPageData('zoneKey', $url_data['action1']);
             if (isset($url_data['action2']) && $url_data['action2'] != null) {
                 if (in_array($url_data['action2'], array('loot', 'quests', 'quest-rewards', 'achievements', 'comments'))) {
                     die('NYI');
                 }
                 if (WoW_Game::IsBoss($url_data['action2'])) {
                     WoW_Template::SetPageIndex('boss');
                     WoW_Template::SetPageData('page', 'boss');
                     WoW_Template::SetPageData('bossKey', $url_data['action2']);
                     WoW_Game::LoadBoss($url_data['action2']);
                     // save in memory
                     WoW_Template::SetPageData('body_class', sprintf('%s zone-%s boss-%s', WoW_Locale::GetLocale(LOCALE_DOUBLE), $url_data['action1'], $url_data['action2']));
                 }
             } else {
                 WoW_Template::SetPageIndex('zone');
                 WoW_Template::SetPageData('page', 'zone');
                 WoW_Game::LoadZone($url_data['action1']);
                 // save in memory
                 WoW_Template::SetPageData('body_class', sprintf('%s zone-%s', WoW_Locale::GetLocale(LOCALE_DOUBLE), $url_data['action1']));
             }
         }
     }
     WoW_Template::SetMenuIndex('menu-game');
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #10
0
ファイル: faction.php プロジェクト: JunkyBulgaria/WoWCS
 public function main()
 {
     WoW_Template::SetPageData('body_class', sprintf('%s  faction-index expansion-3', WoW_Locale::GetLocale(LOCALE_DOUBLE)));
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageIndex('faction');
     WoW_Template::SetPageData('page', 'faction');
     $url_data = WoW::GetUrlData('faction');
     if (isset($url_data['action2']) && $url_data['action2'] != null) {
         exit;
         // [PH]
     }
     if (isset($url_data['action1']) && $url_data['action1'] != null) {
         // Try to find zone
         if (WoW_Game::IsZone($url_data['action1'])) {
             WoW_Template::SetPageIndex('zone');
             WoW_Template::SetPageData('page', 'zone');
             WoW_Game::LoadZone($url_data['action1']);
             // save in memory
         }
     }
     WoW_Template::SetMenuIndex('menu-game');
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #11
0
 public static function CatchOperations(&$loaded)
 {
     // Perform log in (if required)
     if (isset($_GET['login']) || preg_match('/\\?login/', $_SERVER['REQUEST_URI'])) {
         // $_SERVER['REQUEST_URI'] check is required for mod_rewrited URL cases.
         header('Location: ' . WoW::GetWoWPath() . '/login/');
         exit;
     }
     // Perform logout (if required)
     if (isset($_GET['logout']) || preg_match('/\\?logout/', $_SERVER['REQUEST_URI'])) {
         // $_SERVER['REQUEST_URI'] check is required for mod_rewrited URL cases.
         WoW_Account::PerformLogout();
         header('Location: ' . WoW::GetWoWPath() . '/');
         exit;
     }
     // Locale
     if (isset($_GET['locale']) && !preg_match('/lookup/', $_SERVER['REQUEST_URI'])) {
         if (WoW_Locale::IsLocale($_GET['locale'], WoW_Locale::GetLocaleIDForLocale($_GET['locale']))) {
             WoW_Locale::SetLocale($_GET['locale'], WoW_Locale::GetLocaleIDForLocale($_GET['locale']));
             $loaded = true;
             setcookie('wow_locale', WoW_Locale::GetLocale(), strtotime('NEXT YEAR'), '/');
             if (isset($_SERVER['HTTP_REFERER'])) {
                 header('Location: ' . $_SERVER['HTTP_REFERER']);
                 exit;
             } else {
                 header('Location: ' . WoW::GetWoWPath() . '/');
                 exit;
             }
         }
     }
 }
コード例 #12
0
" rel="np" class="icon-posts"> </a>
                              <a href="<?php 
    echo WoW::GetWoWPath();
    ?>
/wow/<?php 
    echo WoW_Locale::GetLocale();
    ?>
/vault/character/auction/horde/" title="<?php 
    echo WoW_Locale::GetString('template_browse_auction_caption');
    ?>
" rel="np" class="icon-auctions"> </a>
                              <a href="<?php 
    echo WoW::GetWoWPath();
    ?>
/wow/<?php 
    echo WoW_Locale::GetLocale();
    ?>
/vault/character/event" title="<?php 
    echo WoW_Locale::GetString('template_browse_events_caption');
    ?>
" rel="np" class="icon-events link-last"> </a>
                            </div>
                          </div>
                          <div class="character-list">
                            <div class="primary chars-pane">
                              <div class="char-wrapper">
<?php 
    echo sprintf('<a href="javascript:;"
class="char pinned"
rel="np">
<span class="pin"></span>
コード例 #13
0
?>
';
var wowheadFullUrl = '<?php 
echo WoW::GetUrl();
?>
';
var wowheadDomain = '<?php 
echo WoW::GetDomain();
?>
';
var currentPage = '<?php 
echo WoW::GetCurrentPageUrl();
?>
';
var wowheadLocale = '<?php 
echo WoW_Locale::GetLocale(LOCALE_SPLIT);
?>
';
var wowheadLocaleID = <?php 
echo WoW_Locale::GetLocaleID();
?>
;
</script>

<script type="text/javascript">//<![CDATA[
$.extend(window, {g_staticUrl: '<?php 
echo WoW::GetStaticUrl();
?>
', g_serverTime: new Date('<?php 
echo date('Y/m/d H:i:s');
?>
コード例 #14
0
 public function LoadItem($item_entry, $itemGuid = 0, $ownerGuid = 0)
 {
     $item_row = DB::World()->selectRow("\n        SELECT\n        `a`.*,\n        %s\n        `b`.`icon`,\n        `d`.`patch`\n        FROM `item_template` AS `a`\n        LEFT JOIN `DBPREFIX_icons` AS `b` ON `b`.`displayid` = `a`.`displayid`\n        LEFT JOIN `locales_item` AS `c` ON `c`.`entry` = `a`.`entry`\n        LEFT JOIN `DBPREFIX_item_version` AS `d` ON `d`.`entry` = `a`.`entry`\n        WHERE `a`.`entry` = %d LIMIT 1", WoW_Locale::GetLocaleID() > 0 ? sprintf('`c`.`name_loc%d` AS `name_loc`, `c`.`description_loc%d` AS `desc_loc`,', WoW_Locale::GetLocaleID(), WoW_Locale::GetLocaleID()) : null, $item_entry);
     if (!$item_row) {
         WoW_Log::WriteError('%s : item #%d (GUID: %d) was not found in `item_template` table.', __METHOD__, $item_entry, $itemGuid);
         return false;
     }
     // FlagsExtra check
     if (isset($item_row['FlagsExtra'])) {
         $item_row['Flags2'] = $item_row['FlagsExtra'];
         unset($item_row['FlagsExtra']);
         // For compatibility
     }
     // Assign variables
     foreach ($item_row as $field => $value) {
         $this->{$field} = $value;
     }
     // Create arrays
     // Item mods
     for ($i = 0; $i < MAX_ITEM_PROTO_STATS + 1; $i++) {
         $key = $i + 1;
         if (isset($this->{'stat_type' . $key})) {
             $this->ItemStat[$i] = array('type' => $this->{'stat_type' . $key}, 'value' => $this->{'stat_value' . $key});
         }
     }
     // Item damages
     for ($i = 0; $i < MAX_ITEM_PROTO_DAMAGES + 1; $i++) {
         $key = $i + 1;
         if (isset($this->{'dmg_type' . $key})) {
             $this->Damage[$i] = array('type' => $this->{'dmg_type' . $key}, 'min' => $this->{'dmg_min' . $key}, 'max' => $this->{'dmg_max' . $key});
         }
     }
     // Item spells
     for ($i = 0; $i < MAX_ITEM_PROTO_SPELLS + 1; $i++) {
         $key = $i + 1;
         if (isset($this->{'spellid_' . $key})) {
             $this->Spells[$i] = array('spellid' => $this->{'spellid_' . $key}, 'trigger' => $this->{'spelltrigger_' . $key}, 'charges' => $this->{'spellcharges_' . $key}, 'ppmRate' => $this->{'spellppmRate_' . $key}, 'cooldown' => $this->{'spellcooldown_' . $key}, 'category' => $this->{'spellcategory_' . $key}, 'categorycooldown' => $this->{'spellcategorycooldown_' . $key});
         }
     }
     // Item sockets
     for ($i = 0; $i < MAX_ITEM_PROTO_SOCKETS + 1; $i++) {
         $key = $i + 1;
         if (isset($this->{'socketColor_' . $key})) {
             $this->Socket[$i] = array('color' => $this->{'socketColor_' . $key}, 'content' => $this->{'socketContent_' . $key}, 'filter' => 0, 'name' => '');
             switch ($this->Socket[$i]['color']) {
                 case 1:
                     $this->Socket[$i]['filter'] = $this->Socket[$i]['color'];
                     $this->Socket[$i]['name'] = 'meta';
                 case 2:
                     $this->Socket[$i]['filter'] = $this->Socket[$i]['color'];
                     $this->Socket[$i]['name'] = 'red';
                     break;
                 case 4:
                     $this->Socket[$i]['filter'] = 3;
                     $this->Socket[$i]['name'] = 'yellow';
                     break;
                 case 8:
                     $this->Socket[$i]['filter'] = 4;
                     $this->Socket[$i]['name'] = 'blue';
                     break;
             }
         }
     }
     // Set locale
     if (WoW_Locale::GetLocaleID() != LOCALE_EN) {
         $this->name = $this->name_loc != null ? $this->name_loc : $this->name;
         $this->description = $this->desc_loc != null ? $this->desc_loc : $this->description;
     }
     // Data to template class
     WoW_Template::SetPageData('item_name', $this->name);
     // Set class/subclass/inventory type names
     $itemsubclass = DB::World()->selectRow("SELECT `subclass_name_%s` AS `subclass`, `class_name_%s` AS `class` FROM `DBPREFIX_item_subclass` WHERE `subclass` = %d AND `class` = %d LIMIT 1", WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), $this->subclass, $this->class);
     if (is_array($itemsubclass)) {
         $this->subclass_name = $itemsubclass['subclass'];
         $this->class_name = $itemsubclass['class'];
     }
     if (in_array($this->class, array(ITEM_CLASS_ARMOR, ITEM_CLASS_WEAPON))) {
         $this->InventoryType_name = $this->InventoryType > 0 ? WoW_Locale::GetString('template_item_invtype_' . $this->InventoryType) : null;
     }
     // Faction
     if ($this->Flags2 & ITEM_FLAGS2_HORDE_ONLY) {
         $this->faction = FACTION_HORDE;
         $this->faction_convert = DB::World()->selectCell("SELECT `item_alliance` FROM `DBPREFIX_item_equivalents` WHERE `item_horde` = %d", $this->entry);
     } elseif ($this->Flags2 & ITEM_FLAGS2_ALLIANCE_ONLY) {
         $this->faction = FACTION_ALLIANCE;
         $this->faction_convert = DB::World()->selectCell("SELECT `item_horde` FROM `DBPREFIX_item_equivalents` WHERE `item_alliance` = %d", $this->entry);
     }
     // GUIDs
     $this->m_guid = $itemGuid;
     // Can be NULL.
     $this->m_owner = $ownerGuid;
     // Can be NULL.
     $this->loaded = true;
     return true;
 }
コード例 #15
0
<div id="left-results">
    <?php 
$searchResults = WoW_Search::GetSearchResults('wowguild');
if (is_array($searchResults)) {
    foreach ($searchResults as $guild) {
        echo sprintf('
    <div class="search-result">
        <div class="">
            <div class="result-title">
                <a href="%s/wow/%s/guild/%s/%s/" class="search-title">&lt;%s&gt;</a>
            </div>
            <div class="search-content">
                <div class="info">%s / %s</div>
            </div>
            <div class="search-results-url"> /wow/guild/%s/%s/</div>
        </div>
        <div class="clear"></div>
    </div>', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $guild['realmName'], $guild['name'], $guild['name'], $guild['realmName'], WoW_Locale::GetString(WoW_Utils::GetFactionId($guild['raceId']) == FACTION_ALLIANCE ? 'faction_alliance' : 'faction_horde'), $guild['realmName'], $guild['name']);
    }
}
?>
</div>
コード例 #16
0
 /**
  * @return array
  **/
 public function GetSocketInfo($num, $enchant_id_only = false)
 {
     if ($num <= 0 || $num > 4) {
         return 0;
     }
     if (isset($this->m_socketInfo[$num])) {
         return $enchant_id_only ? $this->m_socketInfo[$num]['enchant_id'] : $this->m_socketInfo[$num];
     }
     $data = array();
     switch ($this->m_server) {
         case SERVER_MANGOS:
             $socketfield = array(1 => ITEM_FIELD_ENCHANTMENT_3_2, 2 => ITEM_FIELD_ENCHANTMENT_4_2, 3 => ITEM_FIELD_ENCHANTMENT_5_2);
             $socketInfo = $this->GetUInt32Value($socketfield[$num] - 1);
             break;
         case SERVER_TRINITY:
             $socketfield = array(1 => 6, 2 => 9, 3 => 12);
             $socketInfo = $this->tc_ench[$socketfield[$num]];
             break;
         default:
             WoW_Log::WriteError('%s : unknown server type (%d)', __METHOD__, $this->m_server);
             return false;
             break;
     }
     if ($socketInfo > 0) {
         if ($enchant_id_only) {
             return $socketInfo;
         }
         $gemData = DB::Wow()->selectRow("SELECT `text_%s` AS `text`, `gem` FROM `DBPREFIX_enchantment` WHERE `id`=%d", WoW_Locale::GetLocale(), $socketInfo);
         $data['enchant_id'] = $socketInfo;
         $data['item'] = $gemData['gem'];
         $data['icon'] = WoW_Items::GetItemIcon($data['item']);
         $data['enchant'] = $gemData['text'];
         $data['quality'] = DB::World()->selectCell("SELECT `Quality` FROM `item_template` WHERE `entry` = %d", $data['item']);
         $data['name'] = WoW_Items::GetItemName($data['item']);
         $data['color'] = DB::Wow()->selectCell("SELECT `color` FROM `DBPREFIX_gemproperties` WHERE `spellitemenchantement`=%d", $socketInfo);
         $this->m_socketInfo[$num] = $data;
         // Is it neccessary?
         return $data;
     }
     return false;
 }
コード例 #17
0
         $locale_text = sprintf(WoW_Locale::GetString('template_feed_fos'), $ach_link);
     } else {
         $locale_text = sprintf(WoW_Locale::GetString('template_feed_achievement'), $ach_link, $event['points']);
     }
     echo sprintf('<li class="ach">
         <dl><dd><a href="%sachievement#%d:a%d" rel="np" onmouseover="Tooltip.show(this, \'#achv-tooltip-%d\');">
         <span  class="icon-frame frame-18" style=\'background-image: url("http://eu.battle.net/wow-assets/static/images/icons/18/%s.jpg");\'></span></a>
         %s
         <div id="achv-tooltip-%d" style="display: none"><div class="item-tooltip"><span class="icon-frame frame-56" style=\'background-image: url("http://eu.battle.net/wow-assets/static/images/icons/56/%s.jpg");\'></span>
         <h3>%s</h3><div class="color-tooltip-yellow">%s</div>
         </div></div></dd><dt>%s</dt></dl>
         </li>', WoW_Characters::GetURL(), $event['category'], $event['id'], $i, $event['icon'], $locale_text, $i, $event['icon'], $event['name'], $event['desc'], $event['date']);
     break;
 case TYPE_ITEM_FEED:
     $item_link = sprintf('<a href="%s/wow/' . WoW_Locale::GetLocale() . '/item/%d" class="color-q%d" data-item="%s">%s</a>', WoW::GetWoWPath(), $event['id'], $event['quality'], $event['data-item'], $event['name']);
     echo sprintf('<li><dl><dd><a href="%s/wow/' . WoW_Locale::GetLocale() . '/item/%d" class="color-q%d" data-item="%s">
         <span  class="icon-frame frame-18" style=\'background-image: url("http://eu.battle.net/wow-assets/static/images/icons/18/%s.jpg");\'>
         </span>
         </a>
         %s
         </dd>
         <dt>%s</dt>
         </dl>
         </li>', WoW::GetWoWPath(), $event['id'], $event['quality'], $event['data-item'], $event['icon'], sprintf(WoW_Locale::GetString('template_feed_obtained_item'), $item_link), $event['date']);
     break;
 case TYPE_BOSS_FEED:
     echo sprintf('<li class="bosskill"><dl><dd><span class="icon"></span>%s: %d
         </dd>
         <dt>%s</dt>
         </dl>
         </li>', $event['name'], $event['count'], $event['date']);
コード例 #18
0
ファイル: class.game.php プロジェクト: JunkyBulgaria/WoWCS
 public static function LoadBoss($boss_key)
 {
     self::$m_boss = DB::WoW()->selectRow("\n        SELECT\n        `a`.`boss_id` AS `id`,\n        `a`.`instance_id`,\n        `a`.`key`,\n        `a`.`name_en` AS `nameOriginal`,\n        `a`.`name_%s` AS `name`,\n        `a`.`subname_en` AS `subNameOriginal`,\n        `a`.`subname_%s` AS `subName`,\n        `a`.`description_en` AS `descriptionOriginal`,\n        `a`.`description_%s` AS `description`,\n        `a`.`level`,\n        `a`.`flags`,\n        `a`.`health_n`,\n        `a`.`health_h`,\n        `a`.`type`,\n        `b`.`zone_key`,\n        `b`.`name_%s` AS `zoneName`,\n        `b`.`name_en` AS `zoneNameOriginal`\n        FROM `DBPREFIX_instance_bosses` AS `a`\n        LEFT JOIN `DBPREFIX_instances` AS `b` ON `b`.`zone_id` = `a`.`instance_id`\n        WHERE `key` = '%s' LIMIT 1", WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), $boss_key);
     self::$m_boss['abilities'] = DB::WoW()->select("SELECT `name_%s` AS `name`, `name_en` AS `nameOriginal`, `description_%s` AS `description`, `description_en` AS `descriptionOriginal`, `icon` FROM `DBPREFIX_bosses_abilities` WHERE `boss_id` = %d", WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), self::$m_boss['id']);
     self::HandleBoss();
 }
コード例 #19
0
 public static function GetZoneName($zoneId)
 {
     return DB::WoW()->selectCell("SELECT `name_%s` FROM `DBPREFIX_areas` WHERE `id` = %d", WoW_Locale::GetLocale(), $zoneId);
 }
コード例 #20
0
ファイル: class.template.php プロジェクト: Kheros/wowhead
 private static function GetRandomTitle()
 {
     $title = DB::World()->selectRow("SELECT `title_en` AS `originalTitle`%s FROM `DBPREFIX_site_titles` ORDER BY RAND() LIMIT 1", WoW_Locale::GetLocaleID() == LOCALE_EN ? null : sprintf(', `title_%s` AS `localizedTitle`', WoW_Locale::GetLocale()));
     if (!$title) {
         return false;
     }
     if (isset($title['localizedTitle']) && $title['localizedTitle'] != '') {
         return $title['localizedTitle'];
     }
     return $title['originalTitle'];
 }
コード例 #21
0
        if ($i == 0) {
            $divOpened = true;
            echo '<div class="boss-column-portrait">';
        }
        echo sprintf('<div class="boss-avatar">
		<a href="%s/wow/%s/zone/%s/%s">
			<span class="boss-portrait"
				style="background-image: url(\'http://eu.media.blizzard.com/wow/renders/npcs/portrait/creature%d.jpg\');">
			</span>
			<span class="boss-details">
				<div class="boss-name">
					%s
				</div>
			</span>
		</a>
	</div>', WoW::GetWoWPath(), WoW_Locale::GetLocale(), $zone_info['zone_key'], $boss['key'], $boss['id'], $boss['name']);
        if ($i == $limit) {
            $divOpened = false;
            echo '</div>';
        }
        ++$i;
        if ($i > $limit) {
            $i = 0;
        }
    }
    if ($divOpened) {
        echo '</div>';
    }
}
?>
     </div>
コード例 #22
0
 public static function GetGuildPerkFromDB($perk_id = 0, $level = 0)
 {
     if ($level > 1 && $level <= 25) {
         return DB::WoW()->selectRow("SELECT `id`, `level`, `icon`, `spell_id`, `name_%s` AS `name`, `desc_%s` AS `desc` FROM `DBPREFIX_guild_perks` WHERE `level` = %d", WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), $level);
     } elseif ($perk_id > 0 && $perk_id < 25) {
         return DB::WoW()->selectRow("SELECT `id`, `level`, `icon`, `spell_id`, `name_%s` AS `name`, `desc_%s` AS `desc` FROM `DBPREFIX_guild_perks` WHERE `id` = %d", WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), $perk_id);
     }
 }
コード例 #23
0
 public static function PerformNewsSearch($limit = 0)
 {
     if (!self::$searchQuery) {
         return false;
     }
     $results = DB::WoW()->select("SELECT `id`, `image`, `title_%s` AS `title`, `desc_%s` AS `desc`, `text_%s` AS `text`, `author`, `postdate`\n        FROM `DBPREFIX_news`\n        WHERE\n        (\n            `title_%s` LIKE '%%%s%%'\n            OR\n            `desc_%s` LIKE '%%%s%%'\n            OR\n            `text_%s` LIKE '%%%s%%'\n            OR\n            `author` LIKE '%%%s%%'\n        )%s", WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), self::GetSearchQuery(), WoW_Locale::GetLocale(), self::GetSearchQuery(), WoW_Locale::GetLocale(), self::GetSearchQuery(), self::GetSearchQuery(), $limit > 0 ? ' LIMIT ' . $limit : null);
     return self::SetSearchResults('article', $results);
 }
コード例 #24
0
<!--[if IE 6]> <script type="text/javascript">
//<![CDATA[
try { document.execCommand('BackgroundImageCache', false, true) } catch(e) {}
//]]>
</script>
<![endif]-->
<script type="text/javascript">
//<![CDATA[
Core.staticUrl = '<?php 
echo WoW::GetWoWPath();
?>
/static';
Core.baseUrl = '';
Core.project = 'root';
Core.locale = '<?php 
echo WoW_Locale::GetLocale(LOCALE_DOUBLE);
?>
';
Core.buildRegion = 'eu';
Core.loggedIn = <?php 
echo WoW_Account::IsLoggedIn() ? 'true' : 'false';
?>
;
Flash.videoPlayer = '<?php 
echo WoW::GetWoWPath();
?>
/wow/player/videoplayer.swf';
Flash.videoBase = '<?php 
echo WoW::GetWoWPath();
?>
/wow/media/videos';
コード例 #25
0
 public function main()
 {
     $url_data = WoW::GetUrlData('vault');
     // Check session
     if ($url_data['action0'] != 'vault') {
         // Wrong URL parsing
         header('Location: ' . WoW::GetWoWPath() . '/wow/');
         exit;
     }
     if (!WoW_Account::IsLoggedIn()) {
         header('Location: ' . WoW::GetWoWPath() . '/login/?ref=' . urlencode($_SERVER['REQUEST_URI']));
         exit;
     }
     WoW_Template::SetTemplateTheme('wow');
     switch ($url_data['action1']) {
         case 'character':
             switch ($url_data['action2']) {
                 case 'auction':
                     $auction_side = $url_data['action3'];
                     if (!$auction_side || !in_array($auction_side, array('alliance', 'horde', 'neutral'))) {
                         WoW::RedirectTo('wow/' . WoW_Locale::GetLocale() . '/vault/character/auction/' . WoW_Account::GetActiveCharacterInfo('faction_text'));
                     }
                     // Check active character
                     if (WoW_Account::GetActiveCharacterInfo('guid') == 0) {
                         WoW::RedirectTo();
                     }
                     switch ($url_data['action4']) {
                         default:
                             WoW_Template::SetPageData('auction_side', $auction_side);
                             WoW_Template::SetPageIndex('auction_lots');
                             WoW_Template::SetPageData('page', 'auction_lots');
                             break;
                         case 'cancel':
                             // Cancelling, adding, etc. requires core support!
                             if (!isset($_POST['auc'])) {
                                 exit;
                             }
                             $auction_id = (int) $_POST['auc'];
                             header('Content-type: text/plain');
                             echo WoW_Auction::CancelAuction($auction_id);
                             exit;
                             /*
                             if(isset($_POST['auc'])) {
                                 $auction_id = (int) $_POST['auc'];
                                 // WoW REMOTE FEATURE
                             }
                             file_put_contents('cancel.txt', print_r($_POST, true));
                             exit;
                             */
                             break;
                     }
                     break;
                 default:
                     WoW_Template::ErrorPage(404);
                     break;
             }
             break;
         default:
             WoW_Template::ErrorPage(404);
             break;
     }
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #26
0
ファイル: class.npcs.php プロジェクト: Kheros/wowhead
 public static function GetNpcSpells($entry)
 {
     $cr_spells = DB::World()->select("SELECT `spell1`, `spell2`, `spell3`, `spell4` FROM `creature_template` WHERE `entry` IN (%s)", $entry);
     if (!$cr_spells) {
         return false;
     }
     $spell_id = array();
     foreach ($cr_spells as $spell) {
         for ($i = 1; $i < 5; ++$i) {
             if ($spell['spell' . $i] > 0) {
                 $spell_id[] = $spell['spell' . $i];
             }
         }
     }
     if (count($spell_id) == 0) {
         return false;
     }
     $spells = DB::World()->select("\n        SELECT\n        `a`.`id`,\n        `a`.`SpellName_en` AS `name`,\n        `a`.`SpellName_%s` AS `name_locale`,\n        `a`.`Rank_1` AS `rank`,\n        `a`.`Rank_%s` AS `rank_locale`,\n        `a`.`spellLevel` AS `level`,\n        `a`.`SchoolMask`,\n        `b`.`icon`\n        FROM `DBPREFIX_spell` AS `a`\n        LEFT JOIN `DBPREFIX_spell_icon` AS `b` ON `b`.`id` = `a`.`SpellIconID`\n        WHERE `a`.`id` IN (%s)\n        LIMIT 200\n        ", WoW_Locale::GetLocale(), WoW_Locale::GetLocale(), $spell_id);
     if (!$spells) {
         return false;
     }
     $schools = array('NORMAL', 'HOLY', 'FIRE', 'NATURE', 'FROST', 'SHADOW', 'ARCANE');
     foreach ($spells as &$spell) {
         if (WoW_Locale::GetLocaleID() != LOCALE_EN) {
             if ($spell['name_locale'] != null) {
                 $spell['name'] = $spell['name_locale'];
             }
             if ($spell['rank_locale'] != null) {
                 $spell['rank'] = $spell['rank_locale'];
             }
         }
         unset($spell['name_locale'], $spell['rank_locale']);
         $spell['school'] = 0;
         foreach ($schools as $school) {
             if ($spell['SchoolMask'] & constant('SPELL_SCHOOL_MASK_' . $school)) {
                 $spell['school'] = constant('SPELL_SCHOOL_' . $school);
             }
         }
     }
     return $spells;
 }
コード例 #27
0
			</tbody>
		</table>
	</div>
	<script type="text/javascript">
	//<![CDATA[
			$(function() {
					Professions.table = new Table('#professions', { column: 0 });
			});
	//]]>
	</script>
            <?php 
$professions = WoW_Guild::GetGuildProfessions();
$roster = WoW_Guild::GetGuildMembers();
if (is_array($professions)) {
    foreach ($professions as $prof_id => $prof) {
        $prof_info = DB::WoW()->selectRow("SELECT `name_%s` AS `name`, `icon` FROM `DBPREFIX_professions` WHERE `id` = %d LIMIT 1", WoW_Locale::GetLocale(), $prof_id);
        if (!$prof_info) {
            continue;
        }
        echo sprintf('<div id="professions-%d" class="parentTable">
                    <a href="javascript:;" class="table-bar" onclick="Professions.toggleSection(this);">
						<span class="toggler">
		<span  class="icon-frame frame-18" style=\'background-image: url("http://eu.battle.net/wow-assets/static/images/icons/18/%s.jpg");\'>
		</span>
							%s (<span class="total">%d</span>)
						</span>
					</a>
                    <div id="professions-table-%d" class="table childTable">
		<table>
			<thead><tr>
						<th class="name">
コード例 #28
0
 public function FindItemSourceInfo($entry, $type)
 {
     $source_info = false;
     switch ($type) {
         case 'sourceType.questReward':
             $source_info = DB::World()->selectRow("\n                SELECT\n                `a`.`entry` AS `questId`,\n                `a`.`Title`,\n                `a`.`ZoneOrSort` AS `questZone`,\n                %s\n                FROM `quest_template` AS `a`\n                %s\n                WHERE\n                `a`.`RewChoiceItemId1` = %d OR `a`.`RewChoiceItemId2` = %d OR `a`.`RewChoiceItemId3` = %d OR `a`.`RewChoiceItemId4` = %d OR `a`.`RewChoiceItemId5` = %d OR `a`.`RewChoiceItemId6` = %d OR\n                `a`.`RewItemId1` = %d OR `a`.`RewItemId2` = %d OR `a`.`RewItemId3` = %d OR `a`.`RewItemId4` = %d\n                LIMIT 1", WoW_Locale::GetLocale() != LOCALE_EN ? '`b`.`Title_loc' . WoW_Locale::GetLocaleId() . '` AS `Title_Loc`' : 'NULL', WoW_Locale::GetLocale() != LOCALE_EN ? 'LEFT JOIN `locale_quest` AS `b` ON `b`.`entry` = `a`.`entry`' : null, $entry, $entry, $entry, $entry, $entry, $entry, $entry, $entry, $entry, $entry);
             if (!$source_info) {
                 return false;
             }
             if (WoW_Locale::GetLocale() != LOCALE_EN && $source_info['Title_Loc'] != null) {
                 $source_info['Title'] = $source_info['Title_Loc'];
             }
             break;
         case 'sourceType.creatureDrop':
             $source_info = DB::World()->selectRow("\n                SELECT\n                `a`.`entry` AS `npcId`,\n                `b`.`name`,\n                %s\n                FROM\n                LEFT JOIN `creature_template` AS `b` ON `b`.`entry` = `a`.`entry`\n                %s\n                WHERE\n                `b`.`item` = %d\n                LIMIT 1", WoW_Locale::GetLocale() != LOCALE_EN ? '`c`.`name_loc`' . WoW_Locale::GetLocaleId() . '` AS `name_loc`' : 'NULL', WoW_Locale::GetLocale() != LOCALE_EN ? 'LEFT JOIN `locale_creature` AS `c` ON `c`.`entry` = `a`.`entry`' : null, $entry);
             if ($source_info && WoW_Locale::GetLocale() != LOCALE_EN && $source_info['name_loc'] != null) {
                 $source_info['name'] = $source_info['name_loc'];
             }
             break;
         case 'sourceType.vendor':
             break;
     }
     $source_info['type'] = $type;
     return $source_info;
 }
コード例 #29
0
ファイル: forum.php プロジェクト: JunkyBulgaria/WoWCS
 public function main()
 {
     WoW_Template::SetTemplateTheme('wow');
     WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE));
     WoW_Template::SetMenuIndex('menu-forums');
     $url_data = WoW::GetUrlData('forum');
     $page = isset($_GET['page']) && preg_match('/([0-9]+)/i', $_GET['page']) ? $_GET['page'] : 1;
     WoW_Template::SetPageData('current_page', $page);
     // Clear category/thread values
     WoW_Forums::SetCategoryId(0);
     WoW_Forums::SetThreadId(0);
     // Check preview
     if (isset($url_data['action4'], $url_data['action5'], $url_data['action6']) && $url_data['action4'] . $url_data['action5'] . $url_data['action6'] == 'topicpostpreview') {
         $post_text = isset($_POST['post']) ? $_POST['post'] : null;
         if ($post_text == null) {
             //This can not be here, it causes error when preview blank post text
             //WoW_Template::ErrorPage(500);
         }
         // Convert BB codes to HTML
         WoW_Forums::BBCodesToHTML($post_text);
         // Output json
         header('Content-type: text/json');
         echo '{"detail":"' . $post_text . '"}';
         exit;
     }
     // Set values (if any)
     if ($url_data['category_id'] > 0) {
         if (!WoW_Forums::SetCategoryId($url_data['category_id'])) {
             WoW_Template::ErrorPage(404);
             exit;
         }
         if (isset($url_data['action5']) && $url_data['action5'] == 'topic' && WoW_Account::IsHaveActiveCharacter()) {
             // Check $_POST query
             if (isset($_POST['xstoken'])) {
                 $post_allowed = true;
                 $required_post_fields = array('xstoken', 'sessionPersist', 'subject', 'postCommand_detail');
                 foreach ($required_post_fields as $field) {
                     if (!isset($_POST[$field])) {
                         $post_allowed = false;
                     }
                 }
                 if ($post_allowed) {
                     $post_info = WoW_Forums::AddNewThread($url_data['category_id'], $_POST, false);
                     if (is_array($post_info)) {
                         header('Location: ' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . '/forum/topic/' . $post_info['thread_id']);
                         exit;
                     }
                 }
             }
             // Topic create
             WoW_Template::SetPageIndex('forum_new_topic');
             WoW_Template::SetPageData('page', 'forum_new_topic');
         } else {
             WoW_Template::SetPageIndex('forum_category');
             WoW_Template::SetPageData('page', 'forum_category');
         }
     } elseif ($url_data['thread_id'] > 0) {
         if (!WoW_Forums::SetThreadId($url_data['thread_id'])) {
             WoW_Template::ErrorPage(404);
             exit;
         }
         if (isset($url_data['action4']) && $url_data['action4'] == 'topic' && preg_match('/([0-9]+)/i', $url_data['action5']) && WoW_Account::IsHaveActiveCharacter()) {
             // Check $_POST query
             if (isset($_POST['xstoken'])) {
                 $post_allowed = true;
                 $required_post_fields = array('xstoken', 'sessionPersist', 'detail');
                 foreach ($required_post_fields as $field) {
                     if (!isset($_POST[$field])) {
                         $post_allowed = false;
                     }
                 }
                 if ($post_allowed) {
                     $post_info = WoW_Forums::AddNewPost(null, $url_data['thread_id'], $_POST);
                     if (is_array($post_info)) {
                         header('Location: ' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . '/forum/topic/' . $url_data['thread_id']);
                         exit;
                     }
                 }
             }
         }
         WoW_Template::SetPageIndex('forum_thread');
         WoW_Template::SetPageData('page', 'forum_thread');
     } elseif (isset($url_data['action4']) && $url_data['action4'] == 'topic' && isset($url_data['action5']) && $url_data['action5'] == 'post' && isset($url_data['action6']) && preg_match('/([0-9]+)/i', $url_data['action6'])) {
         if (isset($url_data['action7']) && WoW_Account::IsHaveActiveCharacter()) {
             switch ($url_data['action7']) {
                 case 'frag':
                     $Quote = WoW_Forums::QuotePost($url_data['action6']);
                     header('Content-type: text/json');
                     echo '{"detail":"' . $Quote['message'] . '","name":"' . $Quote['name'] . '"}';
                     exit;
                     break;
                 case 'edit':
                     if (isset($_POST['xstoken'])) {
                         $post_allowed = true;
                         $required_post_fields = array('xstoken', 'sessionPersist', 'postCommand_detail');
                         foreach ($required_post_fields as $field) {
                             if (!isset($_POST[$field])) {
                                 $post_allowed = false;
                             }
                         }
                         if ($post_allowed) {
                             $thread_id = WoW_Forums::EditPost($url_data['action6'], $_POST);
                             if ($thread_id) {
                                 header('Location: ' . WoW::GetWoWPath() . '/wow/' . WoW_Locale::GetLocale() . '/forum/topic/' . $thread_id);
                                 exit;
                             }
                         }
                     }
                     if ($post = WoW_Forums::GetPost($url_data['action6'])) {
                         if (!WoW_Forums::SetThreadId($post['thread_id'])) {
                             WoW_Template::ErrorPage(404);
                             exit;
                         }
                         WoW_Template::SetPageData('edit_text', $post['message']);
                         WoW_Template::SetPageIndex('forum_edit_post');
                         WoW_Template::SetPageData('page', 'forum_edit_post');
                     }
                     break;
             }
         }
     } elseif ($url_data['action4'] == 'blizztracker') {
         // Set Blizz tracker as active
         WoW_Forums::SetBlizzTrackerActive();
         // Init Blizz tracker!
         WoW_Forums::InitBlizzTracker(false, $page);
         WoW_Template::SetPageIndex('forum_blizztracker');
         WoW_Template::SetPageData('page', 'forum_blizztracker');
     } else {
         // Init Blizz tracker!
         WoW_Forums::InitBlizzTracker(true);
         WoW_Template::SetPageIndex('forum_index');
         WoW_Template::SetPageData('page', 'forum_index');
         WoW_Template::SetPageData('body_class', WoW_Locale::GetLocale(LOCALE_DOUBLE) . ' station-home');
     }
     // Init the forums!
     WoW_Forums::InitForums($page);
     WoW_Template::SetPageData('forum_category_title', WoW_Forums::GetCategoryTitle());
     WoW_Template::SetPageData('forum_thread_title', WoW_Forums::GetThreadTitle());
     WoW_Template::LoadTemplate('page_index');
 }
コード例 #30
0
ファイル: class.account.php プロジェクト: JunkyBulgaria/WoWCS
 /**
  * Returns friends list for active (primary) character
  * 
  * @access   public
  * @static   WoW_Account::GetFriendsListForPrimaryCharacter()
  * @category Account Manager Class
  * @return   array
  **/
 public static function GetFriendsListForPrimaryCharacter()
 {
     if (!self::$friends_data) {
         self::LoadFriendsListForPrimaryCharacter();
         $count = count(self::$friends_data);
         for ($i = 0; $i < $count; $i++) {
             self::$friends_data[$i]['class_string'] = WoW_Locale::GetString('character_class_' . self::$friends_data[$i]['class_id'], self::$friends_data[$i]['gender']);
             self::$friends_data[$i]['race_string'] = WoW_Locale::GetString('character_race_' . self::$friends_data[$i]['race_id'], self::$friends_data[$i]['gender']);
             self::$friends_data[$i]['url'] = sprintf('%s/wow/%s/character/%s/%s', WoW::GetWoWPath(), WoW_Locale::GetLocale(), self::GetActiveCharacterInfo('realmName'), self::$friends_data[$i]['name']);
         }
     }
     return self::$friends_data;
 }