Beispiel #1
0
        if (!($quest = load_cache(QUEST_TOOLTIP, $id))) {
            require_once 'includes/allquests.php';
            $quest = GetDBQuestInfo($id, QUEST_DATAFLAG_AJAXTOOLTIP);
            $quest['tooltip'] = GetQuestTooltip($quest);
            save_cache(QUEST_TOOLTIP, $id, $quest);
        }
        $x .= '$WowheadPower.registerQuest(' . $id . ', ' . $_SESSION['locale'] . ',{';
        if ($quest['name']) {
            $x .= 'name_' . $locales[$_SESSION['locale']] . ': \'' . ajax_str_normalize($quest['name']) . '\',';
        }
        if ($quest['tooltip']) {
            $x .= 'tooltip_' . $locales[$_SESSION['locale']] . ': \'' . ajax_str_normalize($quest['tooltip']) . '\'';
        }
        $x .= '});';
        break;
    case 'achievement':
        if (!($achievement = load_cache(ACHIEVEMENT_TOOLTIP, $id))) {
            require_once 'includes/allachievements.php';
            $achievement = allachievementsinfo($id, 1);
            save_cache(ACHIEVEMENT_TOOLTIP, $id, $achievement);
        }
        $x .= '$WowheadPower.registerAchievement(' . $id . ', ' . $_SESSION['locale'] . ',{';
        $x .= 'name_' . $locales[$_SESSION['locale']] . ': \'' . ajax_str_normalize($achievement['name']) . '\',';
        $x .= 'icon:\'' . $achievement['icon'] . '\',';
        $x .= 'tooltip_' . $locales[$_SESSION['locale']] . ':\'' . ajax_str_normalize($achievement['tooltip']) . '\'';
        $x .= '});';
        break;
    default:
        break;
}
echo $x;
Beispiel #2
0
        $x .= 'name_' . $locales[$_SESSION['locale']] . ': \'' . ajax_str_normalize($achievement['name']) . '\',';
        $x .= 'icon:\'' . $achievement['icon'] . '\',';
        $x .= 'tooltip_' . $locales[$_SESSION['locale']] . ':\'' . ajax_str_normalize($achievement['tooltip']) . '\'';
        $x .= '});';
        break;
    case 'npc':
        if (!($npc = load_cache(NPC_TOOLTIP, $id))) {
            require_once 'includes/allnpcs.php';
            $npc = creatureinfo($id);
            save_cache(NPC_TOOLTIP, $id, $npc);
        }
        $x .= '$WowheadPower.registerNpc(' . $id . ', ' . $_SESSION['locale'] . ',{';
        $x .= 'name_' . $locales[$_SESSION['locale']] . ': \'' . ajax_str_normalize($npc['name']) . '\',';
        $x .= 'tooltip_' . $locales[$_SESSION['locale']] . ':\'' . ajax_str_normalize($npc['tooltip']) . '\'';
        $x .= '});';
        break;
    case 'object':
        if (!($object = load_cache(OBJECT_TOOLTIP, $id))) {
            require_once 'includes/allobjects.php';
            $object = objectinfo($id, 1);
            save_cache(OBJECT_TOOLTIP, $id, $object);
        }
        $x .= '$WowheadPower.registerObject(' . $id . ', ' . $_SESSION['locale'] . ',{';
        $x .= 'name_' . $locales[$_SESSION['locale']] . ': \'' . ajax_str_normalize($object['name']) . '\',';
        $x .= 'tooltip_' . $locales[$_SESSION['locale']] . ':\'' . ajax_str_normalize($object['tooltip']) . '\'';
        $x .= '});';
        break;
    default:
        break;
}
echo $x;