/** * Loads friends list for active (primary) character * * @access public * @static WoW_Account::LoadFriendsListForPrimaryCharacter() * @category Account Manager Class * @return bool **/ private static function LoadFriendsListForPrimaryCharacter() { if (!self::GetSessionInfo('wow_sid')) { return false; } if (!self::IsHaveActiveCharacter()) { return false; } if (self::$friends_data) { return true; } if (!self::IsCharactersLoaded()) { if (!self::LoadCharacters()) { return false; } } DB::ConnectToDB(DB_CHARACTERS, self::GetActiveCharacterInfo('realmId') | 1); self::$friends_data = DB::Characters()->select("\n SELECT\n `character_social`.`friend`,\n `characters`.`guid`,\n `characters`.`name`,\n `characters`.`race` AS `race_id`,\n `characters`.`class` AS `class_id`,\n `characters`.`gender`,\n `characters`.`level`\n FROM `character_social`\n JOIN `characters` ON `characters`.`guid` = `character_social`.`friend`\n WHERE `character_social`.`guid` = %d", self::GetActiveCharacterInfo('guid')); return true; }