NPCs/Bosses

* link boss loot chests to boss
Home/Locales
 * properly set selected locale if featuredbox is not displayed

(also include fresh db dump)
This commit is contained in:
Sarjuuk
2015-10-27 23:52:18 +01:00
parent b6e1bcaeac
commit e69811c4de
12 changed files with 224 additions and 65 deletions

View File

@@ -405,6 +405,7 @@ $lang = array(
'cat' => [0 => "Anderes", 9 => "Bücher", 3 => "Behälter", -5 => "Truhen", 25 => "Fischschwärme", -3 => "Kräuter", -4 => "Erzadern", -2 => "Quest", -6 => "Werkzeuge"],
'type' => [ 9 => "Buch", 3 => "Behälter", -5 => "Truhe", 25 => "", -3 => "Kraut", -4 => "Erzvorkommen", -2 => "Quest", -6 => ""],
'unkPosition' => "Der Standort dieses Objekts ist nicht bekannt.",
'npcLootPH' => 'Der Behälter <b>%s</b> beinhaltet die Beute vom Kampf gegen <a href="?npc=%d">%s</a>. Er erscheint nach seinem Tod.',
'key' => "Schlüssel",
'focus' => "Zauberfokus",
'focusDesc' => "Zauber, die diesen Fokus benötigen, können an diesem Objekt gewirkt werden.",

View File

@@ -400,6 +400,7 @@ $lang = array(
'cat' => [0 => "Other", 9 => "Books", 3 => "Containers", -5 => "Chests", 25 => "Fishing Pools", -3 => "Herbs", -4 => "Mineral Veins", -2 => "Quest", -6 => "Tools"],
'type' => [ 9 => "Book", 3 => "Container", -5 => "Chest", 25 => "", -3 => "Herb", -4 => "Mineral Vein", -2 => "Quest", -6 => ""],
'unkPosition' => "The location of this object is unknown.",
'npcLootPH' => 'The <b>%s</b> contains the loot from the fight against <a href="?npc=%d">%s</a>. It spawns after his death.',
'key' => "Key",
'focus' => "Spell Focus",
'focusDesc' => "Spells requiring this Focus can be cast near this Object",

View File

@@ -406,6 +406,7 @@ $lang = array(
'cat' => [0 => "Otros", 9 => "Libros", 3 => "Contenedores", -5 => "Cofres", 25 => "Bancos de peces", -3 => "Hierbas", -4 => "Venas de minerales", -2 => "Misiones", -6 => "Herramientas"],
'type' => [ 9 => "Libro", 3 => "Contenedore", -5 => "Cofre", 25 => "", -3 => "Hierba", -4 => "Filóne de mineral", -2 => "Misión", -6 => ""],
'unkPosition' => "No se conoce la ubicación de esta entidad.",
'npcLootPH' => '[The <b>%s</b> contains the loot from the fight against <a href="?npc=%d">%s</a>. It spawns after his death.]',
'key' => "Llave",
'focus' => "[Spell Focus]",
'focusDesc' => "[Spells requiring this Focus can be cast near this Object]",

View File

@@ -405,6 +405,7 @@ $lang = array(
'cat' => [0 => "Autre", 9 => "Livres", 3 => "Conteneurs", -5 => "Coffres", 25 => "Bancs de poissons", -3 => "Herbes", -4 => "Filons de minerai", -2 => "Quêtes", -6 => "Outils"],
'type' => [ 9 => "Livre", 3 => "Conteneur", -5 => "Coffre", 25 => "", -3 => "Herbe", -4 => "Filon de minerai", -2 => "Quête", -6 => ""],
'unkPosition' => "L'emplacement de cette entité est inconnu.",
'npcLootPH' => '[The <b>%s</b> contains the loot from the fight against <a href="?npc=%d">%s</a>. It spawns after his death.]',
'key' => "Clé",
'focus' => "[Spell Focus]",
'focusDesc' => "[Spells requiring this Focus can be cast near this Object]",

View File

@@ -405,6 +405,7 @@ $lang = array(
'cat' => [0 => "Другое", 9 => "Книги", 3 => "Контейнеры", -5 => "Сундуки", 25 => "Рыболовные лунки",-3 => "Травы", -4 => "Полезные ископаемые", -2 => "Задания", -6 => "Инструменты"],
'type' => [ 9 => "Книга", 3 => "Контейнер", -5 => "Сундук", 25 => "", -3 => "Растение", -4 => "Полезное ископаемое", -2 => "Задание", -6 => ""],
'unkPosition' => "Местонахождение этого объекта неизвестно.",
'npcLootPH' => '[The <b>%s</b> contains the loot from the fight against <a href="?npc=%d">%s</a>. It spawns after his death.]',
'key' => "Ключ",
'focus' => "[Spell Focus]",
'focusDesc' => "[Spells requiring this Focus can be cast near this Object]",

View File

@@ -53,15 +53,15 @@ class NpcPage extends GenericPage
{
$this->addJS('?data=zones&locale='.User::$localeId.'&t='.$_SESSION['dataKey']);
$_typeFlags = $this->subject->getField('typeFlags');
$_altIds = [];
$_altNPCs = null;
$position = null;
$accessory = [];
$_typeFlags = $this->subject->getField('typeFlags');
$_altIds = [];
$_altNPCs = null;
$placeholder = null;
$accessory = [];
// difficulty entries of self
if ($this->subject->getField('cuFlags') & NPC_CU_DIFFICULTY_DUMMY)
$position = [$this->subject->getField('parentId'), $this->subject->getField('parent', true)];
$placeholder = [$this->subject->getField('parentId'), $this->subject->getField('parent', true)];
else
{
for ($i = 1; $i < 4; $i++)
@@ -85,7 +85,7 @@ class NpcPage extends GenericPage
{
if (count($maps) == 1) // should only exist in one instance
{
switch ((new ZoneList(array(['id', $maps], 1)))->getField('type'))
switch (DB::Aowow()->selectCell('SELECT `type` FROM ?_zones WHERE id = ?d', $maps[0]))
{
case 2:
case 5: $mapType = 1; break;
@@ -317,7 +317,7 @@ class NpcPage extends GenericPage
$this->map = $map;
$this->infobox = '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]';
$this->position = $position;
$this->placeholder = $placeholder;
$this->accessory = $accessory;
$this->quotes = $this->getQuotes();
$this->reputation = $this->getOnKillRep($_altIds, $mapType);
@@ -571,9 +571,9 @@ class NpcPage extends GenericPage
*/
$sourceFor = array(
[LOOT_CREATURE, $this->subject->getField('lootId'), '$LANG.tab_drops', 'drops', ['Listview.extraCols.percent'], [] , []],
[LOOT_PICKPOCKET, $this->subject->getField('pickpocketLootId'), '$LANG.tab_pickpocketing', 'pickpocketing', ['Listview.extraCols.percent'], ['side', 'slot', 'reqlevel'], []],
[LOOT_SKINNING, $this->subject->getField('skinLootId'), '$LANG.'.$skinTab[0], $skinTab[1], ['Listview.extraCols.percent'], ['side', 'slot', 'reqlevel'], []]
[LOOT_CREATURE, $this->subject->getField('lootId'), '$LANG.tab_drops', 'drops', [] ],
[LOOT_PICKPOCKET, $this->subject->getField('pickpocketLootId'), '$LANG.tab_pickpocketing', 'pickpocketing', ['side', 'slot', 'reqlevel']],
[LOOT_SKINNING, $this->subject->getField('skinLootId'), '$LANG.'.$skinTab[0], $skinTab[1], ['side', 'slot', 'reqlevel']]
);
// temp: manually add loot for difficulty-versions
@@ -588,22 +588,29 @@ class NpcPage extends GenericPage
if ($_altIds)
{
$sourceFor[0][2] = $langref[1];
$sourceFor[0][2] = $mapType == 1 ? $langref[-1] : $langref[1];
foreach ($_altNPCs->iterate() as $id => $__)
{
$mode = $_altIds[$id];
array_splice($sourceFor, 1, 0, [[LOOT_CREATURE, $_altNPCs->getField('lootId'), $langref[$mode + 1], 'drops-'.$mode, ['Listview.extraCols.percent'], [], []]]);
$mode = ($_altIds[$id] + 1) * ($mapType == 1 ? -1 : 1);
if ($lootGO = DB::Aowow()->selectRow('SELECT o.id, o.lootId, o.name_loc0, o.name_loc2, o.name_loc3, o.name_loc6, o.name_loc8 FROM ?_loot_link l JOIN ?_objects o ON o.id = l.objectId WHERE l.npcId = ?d', $id))
array_splice($sourceFor, 1, 0, [[LOOT_GAMEOBJECT, $lootGO['lootId'], $langref[$mode], 'drops-object-'.abs($mode), [], 'note' => '$$WH.sprintf(LANG.lvnote_npcobjectsource, '.$lootGO['id'].', \''.Util::jsEscape(Util::localizedString($lootGO, 'name')).'\')']]);
if ($lootId = $_altNPCs->getField('lootId'))
array_splice($sourceFor, 1, 0, [[LOOT_CREATURE, $lootId, $langref[$mode], 'drops-'.abs($mode), []]]);
}
}
if ($lootGOs = DB::Aowow()->select('SELECT o.id, IF(npcId < 0, 1, 0) AS modeDummy, o.lootId, o.name_loc0, o.name_loc2, o.name_loc3, o.name_loc6, o.name_loc8 FROM ?_loot_link l JOIN ?_objects o ON o.id = l.objectId WHERE ABS(l.npcId) = ?d', $this->typeId))
foreach ($lootGOs as $idx => $lgo)
array_splice($sourceFor, 1, 0, [[LOOT_GAMEOBJECT, $lgo['lootId'], $mapType ? $langref[($mapType == 1 ? -1 : 1) + ($lgo['modeDummy'] ? 1 : 0)] : '$LANG.tab_drops', 'drops-object-'.$idx, [], 'note' => '$$WH.sprintf(LANG.lvnote_npcobjectsource, '.$lgo['id'].', \''.Util::jsEscape(Util::localizedString($lgo, 'name')).'\')']]);
$reqQuest = [];
foreach ($sourceFor as $sf)
{
$creatureLoot = new Loot();
if ($creatureLoot->getByContainer($sf[0], $sf[1]))
{
if ($_ = $creatureLoot->extraCols)
$sf[4] = array_merge($sf[4], $_);
$extraCols = $creatureLoot->extraCols;
$extraCols[] = 'Listview.extraCols.percent';
$this->extendGlobalData($creatureLoot->jsGlobals);
@@ -612,23 +619,27 @@ class NpcPage extends GenericPage
if (!$lv['quest'])
continue;
$sf[4][] = 'Listview.extraCols.condition';
$extraCols[] = 'Listview.extraCols.condition';
$reqQuest[$lv['id']] = 0;
$lv['condition'][0][$this->typeId][] = [[CND_QUESTTAKEN, &$reqQuest[$lv['id']]]];
}
$this->lvTabs[] = array(
$lootTab = array(
'file' => 'item',
'data' => $creatureLoot->getResult(),
'params' => array(
'name' => $sf[2],
'id' => $sf[3],
'extraCols' => $sf[4] ? "$[".implode(', ', array_unique($sf[4]))."]" : null,
'hiddenCols' => $sf[5] ? "$".Util::toJSON($sf[5]) : null,
'visibleCols' => $sf[6] ? '$'.Util::toJSON($sf[6]) : null,
'extraCols' => "$[".implode(', ', array_unique($extraCols))."]",
'hiddenCols' => $sf[4] ? "$".Util::toJSON($sf[4]) : null,
'sort' => "$['-percent', 'name']",
)
);
if (!empty($sf['note']))
$lootTab['params']['note'] = $sf['note'];
$this->lvTabs[] = $lootTab;
}
}

View File

@@ -18,13 +18,6 @@ class ObjectPage extends GenericPage
protected $mode = CACHE_TYPE_PAGE;
protected $js = ['swfobject.js'];
/* NOTE
much like items GOs should have difficulty versions of itself, that are spawned for bosses, but this data is mostly contained in scripts
also certain chests/caches/ect should be linked to their boss mob
all of this has to be done manually
*/
public function __construct($pageCall, $id)
{
parent::__construct($pageCall, $id);
@@ -235,12 +228,26 @@ class ObjectPage extends GenericPage
$map['extra'][$areaId] = ZoneList::getName($areaId);
}
// consider pooled spawns
$this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null;
$this->pageText = $pageText;
$this->map = $map;
$this->redButtons = array(
// todo (low): consider pooled spawns
$relBoss = null;
if ($_ = DB::Aowow()->selectCell('SELECT ABS(npcId) FROM ?_loot_link WHERE objectId = ?d', $this->typeId))
{
// difficulty dummy
if ($c = DB::Aowow()->selectRow('SELECT id, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8 FROM ?_creature WHERE difficultyEntry1 = ?d OR difficultyEntry2 = ?d OR difficultyEntry3 = ?d', $_, $_, $_))
$relBoss = [$c['id'], Util::localizedString($c, 'name')];
// base creature
else if ($c = DB::Aowow()->selectRow('SELECT id, name_loc0, name_loc2, name_loc3, name_loc6, name_loc8 FROM ?_creature WHERE id = ?d', $_))
$relBoss = [$c['id'], Util::localizedString($c, 'name')];
}
$this->infobox = $infobox ? '[ul][li]'.implode('[/li][li]', $infobox).'[/li][/ul]' : null;
$this->pageText = $pageText;
$this->map = $map;
$this->relBoss = $relBoss;
$this->redButtons = array(
BUTTON_WOWHEAD => true,
BUTTON_LINKS => true,
BUTTON_VIEW3D => ['displayId' => $this->subject->getField('displayId'), 'type' => TYPE_OBJECT, 'typeId' => $this->typeId]
@@ -384,8 +391,9 @@ class ObjectPage extends GenericPage
$goLoot = new Loot();
if ($goLoot->getByContainer(LOOT_GAMEOBJECT, $_))
{
$extraCols = $goLoot->extraCols;
$hiddenCols = ['source', 'side', 'slot', 'reqlevel'];
$extraCols = $goLoot->extraCols;
$extraCols[] = 'Listview.extraCols.percent';
$hiddenCols = ['source', 'side', 'slot', 'reqlevel'];
$this->extendGlobalData($goLoot->jsGlobals);
@@ -400,14 +408,10 @@ class ObjectPage extends GenericPage
continue;
$extraCols[] = 'Listview.extraCols.condition';
$reqQuest[$lv['id']] = 0;
$lv['condition'][0][$this->typeId][] = [[CND_QUESTTAKEN, &$reqQuest[$lv['id']]]];
}
$extraCols[] = 'Listview.extraCols.percent';
$this->lvTabs[] = array(
'file' => 'item',
'data' => $goLoot->getResult(),
@@ -415,7 +419,8 @@ class ObjectPage extends GenericPage
'name' => '$LANG.tab_contains',
'id' => 'contains',
'extraCols' => "$[".implode(', ', array_unique($extraCols))."]",
'hiddenCols' => $hiddenCols ? '$'.Util::toJSON(array_values($hiddenCols)) : null
'hiddenCols' => $hiddenCols ? '$'.Util::toJSON(array_values($hiddenCols)) : null,
'sort' => "$['-percent', 'name']"
)
);
}

View File

@@ -1,8 +1,8 @@
-- MySQL dump 10.13 Distrib 5.5.30, for Linux (x86_64)
-- MySQL dump 10.16 Distrib 10.1.8-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: sarjuuk_aowow
-- ------------------------------------------------------
-- Server version 5.5.30-30.1
-- Server version 10.1.8-MariaDB-1~trusty
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -133,7 +133,7 @@ DROP TABLE IF EXISTS `aowow_account_weightscales`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_account_weightscales` (
`id` int(32) NOT NULL,
`id` int(32) NOT NULL AUTO_INCREMENT,
`userId` int(10) unsigned NOT NULL,
`name` varchar(32) NOT NULL,
`weights` text NOT NULL,
@@ -542,8 +542,8 @@ DROP TABLE IF EXISTS `aowow_dbversion`;
CREATE TABLE `aowow_dbversion` (
`date` int(10) unsigned NOT NULL DEFAULT '0',
`part` tinyint(3) unsigned NOT NULL DEFAULT '0',
`sql` text,
`build` text
`sql` text NOT NULL,
`build` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -1354,6 +1354,21 @@ CREATE TABLE `aowow_lock` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_loot_link`
--
DROP TABLE IF EXISTS `aowow_loot_link`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `aowow_loot_link` (
`npcId` mediumint(8) NOT NULL,
`objectId` mediumint(8) unsigned NOT NULL,
UNIQUE KEY `npcId` (`npcId`),
KEY `objectId` (`objectId`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `aowow_mailtemplate`
--
@@ -2216,9 +2231,9 @@ CREATE TABLE `aowow_talents` (
`col` tinyint(3) unsigned NOT NULL,
`spell` mediumint(8) unsigned NOT NULL,
`rank` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`id`, `rank`),
INDEX `spell` (`spell`),
INDEX `class` (`class`)
PRIMARY KEY (`id`,`rank`),
KEY `spell` (`spell`),
KEY `class` (`class`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -2290,7 +2305,7 @@ CREATE TABLE `aowow_titles` (
`female_loc6` varchar(35) NOT NULL,
`female_loc8` varchar(41) NOT NULL,
PRIMARY KEY (`id`),
INDEX `bitIdx` (`bitIdx`)
KEY `bitIdx` (`bitIdx`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -2388,12 +2403,12 @@ CREATE TABLE `aowow_zones` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2015-05-10 14:03:11
-- MySQL dump 10.13 Distrib 5.5.30, for Linux (x86_64)
-- Dump completed on 2015-10-31 13:22:27
-- MySQL dump 10.16 Distrib 10.1.8-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: sarjuuk_aowow
-- ------------------------------------------------------
-- Server version 5.5.30-30.1
-- Server version 10.1.8-MariaDB-1~trusty
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
@@ -2401,7 +2416,6 @@ CREATE TABLE `aowow_zones` (
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
@@ -2432,7 +2446,7 @@ UNLOCK TABLES;
LOCK TABLES `aowow_config` WRITE;
/*!40000 ALTER TABLE `aowow_config` DISABLE KEYS */;
INSERT INTO `aowow_config` VALUES ('sql_limit_search','500',0,129,'default: 500 - max results for search'),('sql_limit_default','300',0,129,'default: 300 - max results for listviews'),('sql_limit_quicksearch','10',0,129,'default: 10 - max results for suggestions'),('sql_limit_none','0',0,129,'default: 0 - unlimited results (i wouldn\'t change that mate)'),('ttl_rss','60',0,129,'default: 60 - time to live for RSS (in seconds)'),('name','Aowow Database Viewer (ADV)',0,136,' - website title'),('name_short','Aowow',0,136,' - feed title'),('board_url','http://www.wowhead.com/forums?board=',0,136,' - another halfbaked javascript thing..'),('contact_email','feedback@aowow.org',0,136,' - displayed sender for auth-mails, ect'),('battlegroup','Pure Pwnage',0,136,' - pretend, we belong to a battlegroup to satisfy profiler-related Jscripts'),('debug','0',0,132,'default: 0 - disable cache, enable sql-errors, enable error_reporting'),('maintenance','1',0,132,'default: 0 - display brb gnomes and block access for non-staff'),('user_max_votes','50',0,129,'default: 50 - vote limit per day'),('force_ssl','0',0,132,'default: 0 - enforce SSL, if the server is behind a load balancer'),('locales','333',0,161,'default: 0x14D - allowed locales - 0:English, 2:French, 3:German, 6:Spanish, 8:Russian'),('screenshot_min_size','200',0,129,'default: 200 - minimum dimensions of uploaded screenshots in px (yes, it\'s square)'),('site_host','',0,136,' - points js to executable files'),('static_host','',0,136,' - points js to images & scripts'),('cache_decay','25200',1,129,'default: 60 * 60 * 7 - time to keep cache in seconds'),('cache_mode','1',1,161,'default: 1 - set cache method - 0:filecache, 1:memcached'),('cache_dir','',1,136,'default: cache/template - generated pages are saved here (requires CACHE_MODE: filecache)'),('acc_failed_auth_block','900',2,129,'default: 15 * 60 - how long an account is closed after exceeding FAILED_AUTH_COUNT (in seconds)'),('acc_failed_auth_count','5',2,129,'default: 5 - how often invalid passwords are tolerated'),('acc_allow_register','1',2,132,'default: 1 - allow/disallow account creation (requires AUTH_MODE: aowow)'),('acc_auth_mode','0',2,145,'default: 0 - source to auth against - 0:aowow, 1:TC auth-table, 2:external script'),('acc_create_save_decay','604800',2,129,'default: 604800 - time in wich an unconfirmed account cannot be overwritten by new registrations'),('acc_recovery_decay','300',2,129,'default: 300 - time to recover your account and new recovery requests are blocked'),('session_timeout_delay','3600',3,129,'default: 60 * 60 - non-permanent session times out in time() + X'),('session.gc_maxlifetime','604800',3,200,'default: 7*24*60*60 - lifetime of session data'),('session.gc_probability','1',3,200,'default: 0 - probability to remove session data on garbage collection'),('session.gc_divisor', 100, 3, 200, 'default: 100 - probability to remove session data on garbage collection'),('session_cache_dir','',3,136,'default: - php sessions are saved here. Leave empty to use php default directory.'),('rep_req_upvote','125',4,129,'default: 125 - required reputation to upvote comments'),('rep_req_downvote','250',4,129,'default: 250 - required reputation to downvote comments'),('rep_req_comment','75',4,129,'default: 75 - required reputation to write a comment / reply'),('rep_req_supervote','2500',4,129,'default: 2500 - required reputation for double vote effect'),('rep_req_votemore_base','2000',4,129,'default: 2000 - gains more votes past this threshold'),('rep_reward_register','100',4,129,'default: 100 - activated an account'),('rep_reward_upvoted','5',4,129,'default: 5 - comment received upvote'),('rep_reward_downvoted','0',4,129,'default: 0 - comment received downvote'),('rep_reward_good_report','10',4,129,'default: 10 - filed an accepted report'),('rep_reward_bad_report','0',4,129,'default: 0 - filed a rejected report'),('rep_reward_dailyvisit','5',4,129,'default: 5 - daily visit'),('rep_reward_user_warned','-50',4,129,'default: -50 - moderator imposed a warning'),('rep_reward_comment','1',4,129,'default: 1 - created a comment (not a reply) '),('rep_req_premium','25000',4,129,'default: 25000 - required reputation for premium status through reputation'),('rep_reward_upload','10',4,129,'default: 10 - suggested / uploaded video / screenshot was approved'),('rep_reward_article','100',4,129,'default: 100 - submitted an approved article/guide'),('rep_reward_user_suspended','-200',4,129,'default: -200 - moderator revoked rights'),('rep_req_votemore_add','250',4,129,'default: 250 - required reputation per additional vote past threshold'),('serialize_precision','4',5,65,' - some derelict code, probably unused'),('memory_limit','2048M',5,200,'default: 2048M - parsing spell.dbc is quite intense'),('default_charset','UTF-8',5,72,'default: UTF-8'),('analytics_user','',6,136,'default: - enter your GA-user here to track site stats');
INSERT INTO `aowow_config` VALUES ('sql_limit_search','500',0,129,'default: 500 - max results for search'),('sql_limit_default','300',0,129,'default: 300 - max results for listviews'),('sql_limit_quicksearch','10',0,129,'default: 10 - max results for suggestions'),('sql_limit_none','0',0,129,'default: 0 - unlimited results (i wouldn\'t change that mate)'),('ttl_rss','60',0,129,'default: 60 - time to live for RSS (in seconds)'),('name','Aowow Database Viewer (ADV)',0,136,' - website title'),('name_short','Aowow',0,136,' - feed title'),('board_url','http://www.wowhead.com/forums?board=',0,136,' - another halfbaked javascript thing..'),('contact_email','feedback@aowow.org',0,136,' - displayed sender for auth-mails, ect'),('battlegroup','Pure Pwnage',0,136,' - pretend, we belong to a battlegroup to satisfy profiler-related Jscripts'),('debug','0',0,132,'default: 0 - disable cache, enable sql-errors, enable error_reporting'),('maintenance','1',0,132,'default: 0 - display brb gnomes and block access for non-staff'),('user_max_votes','50',0,129,'default: 50 - vote limit per day'),('force_ssl','0',0,132,'default: 0 - enforce SSL, if the server is behind a load balancer'),('locales','333',0,161,'default: 0x14D - allowed locales - 0:English, 2:French, 3:German, 6:Spanish, 8:Russian'),('screenshot_min_size','200',0,129,'default: 200 - minimum dimensions of uploaded screenshots in px (yes, it\'s square)'),('site_host','',0,136,' - points js to executable files'),('static_host','',0,136,' - points js to images & scripts'),('cache_decay','25200',1,129,'default: 60 * 60 * 7 - time to keep cache in seconds'),('cache_mode','1',1,161,'default: 1 - set cache method - 0:filecache, 1:memcached'),('cache_dir','',1,136,'default: cache/template - generated pages are saved here (requires CACHE_MODE: filecache)'),('acc_failed_auth_block','900',2,129,'default: 15 * 60 - how long an account is closed after exceeding FAILED_AUTH_COUNT (in seconds)'),('acc_failed_auth_count','5',2,129,'default: 5 - how often invalid passwords are tolerated'),('acc_allow_register','1',2,132,'default: 1 - allow/disallow account creation (requires AUTH_MODE: aowow)'),('acc_auth_mode','0',2,145,'default: 0 - source to auth against - 0:aowow, 1:TC auth-table, 2:external script'),('acc_create_save_decay','604800',2,129,'default: 604800 - time in wich an unconfirmed account cannot be overwritten by new registrations'),('acc_recovery_decay','300',2,129,'default: 300 - time to recover your account and new recovery requests are blocked'),('session_timeout_delay','3600',3,129,'default: 60 * 60 - non-permanent session times out in time() + X'),('session.gc_maxlifetime','604800',3,200,'default: 7*24*60*60 - lifetime of session data'),('session.gc_probability','1',3,200,'default: 0 - probability to remove session data on garbage collection'),('session.gc_divisor',100,3,200,'default: 100 - probability to remove session data on garbage collection'),('session_cache_dir','',3,136,'default: - php sessions are saved here. Leave empty to use php default directory.'),('rep_req_upvote','125',4,129,'default: 125 - required reputation to upvote comments'),('rep_req_downvote','250',4,129,'default: 250 - required reputation to downvote comments'),('rep_req_comment','75',4,129,'default: 75 - required reputation to write a comment / reply'),('rep_req_supervote','2500',4,129,'default: 2500 - required reputation for double vote effect'),('rep_req_votemore_base','2000',4,129,'default: 2000 - gains more votes past this threshold'),('rep_reward_register','100',4,129,'default: 100 - activated an account'),('rep_reward_upvoted','5',4,129,'default: 5 - comment received upvote'),('rep_reward_downvoted','0',4,129,'default: 0 - comment received downvote'),('rep_reward_good_report','10',4,129,'default: 10 - filed an accepted report'),('rep_reward_bad_report','0',4,129,'default: 0 - filed a rejected report'),('rep_reward_dailyvisit','5',4,129,'default: 5 - daily visit'),('rep_reward_user_warned','-50',4,129,'default: -50 - moderator imposed a warning'),('rep_reward_comment','1',4,129,'default: 1 - created a comment (not a reply) '),('rep_req_premium','25000',4,129,'default: 25000 - required reputation for premium status through reputation'),('rep_reward_upload','10',4,129,'default: 10 - suggested / uploaded video / screenshot was approved'),('rep_reward_article','100',4,129,'default: 100 - submitted an approved article/guide'),('rep_reward_user_suspended','-200',4,129,'default: -200 - moderator revoked rights'),('rep_req_votemore_add','250',4,129,'default: 250 - required reputation per additional vote past threshold'),('serialize_precision','4',5,65,' - some derelict code, probably unused'),('memory_limit','2048M',5,200,'default: 2048M - parsing spell.dbc is quite intense'),('default_charset','UTF-8',5,72,'default: UTF-8'),('analytics_user','',6,136,'default: - enter your GA-user here to track site stats');
/*!40000 ALTER TABLE `aowow_config` ENABLE KEYS */;
UNLOCK TABLES;
@@ -2442,7 +2456,7 @@ UNLOCK TABLES;
LOCK TABLES `aowow_dbversion` WRITE;
/*!40000 ALTER TABLE `aowow_dbversion` DISABLE KEYS */;
INSERT INTO `aowow_dbversion` VALUES (1438878038,0,NULL,NULL);
INSERT INTO `aowow_dbversion` VALUES (1446293928,0,NULL,NULL);
/*!40000 ALTER TABLE `aowow_dbversion` ENABLE KEYS */;
UNLOCK TABLES;
@@ -2466,6 +2480,16 @@ INSERT INTO `aowow_home_featuredbox_overlay` VALUES (2,405,100,'http://example.c
/*!40000 ALTER TABLE `aowow_home_featuredbox_overlay` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `aowow_loot_link`
--
LOCK TABLES `aowow_loot_link` WRITE;
/*!40000 ALTER TABLE `aowow_loot_link` DISABLE KEYS */;
INSERT INTO `aowow_loot_link` VALUES (17537,185168),(18434,185169),(17536,185168),(18432,185169),(19218,184465),(21525,184849),(19710,184465),(21526,184849),(28234,190586),(-28234,193996),(27656,191349),(31561,193603),(26533,190663),(31217,193597),(16064,181366),(30603,193426),(16065,181366),(30601,193426),(30549,181366),(30600,193426),(16063,181366),(30602,193426),(28859,193905),(31734,193967),(32930,195046),(33909,195047),(32865,194313),(33147,194315),(33350,194957),(-33350,194958),(32845,194200),(32846,194201),(32906,194324),(33360,194325),(32871,194821),(33070,194822),(35119,195374),(35518,195375),(34928,195323),(35517,195324),(34705,195709),(36088,195710),(34702,195709),(36082,195710),(34701,195709),(36083,195710),(34657,195709),(36086,195710),(34703,195709),(36087,195710),(35572,195709),(36089,195710),(35569,195709),(36085,195710),(35571,195709),(36090,195710),(35570,195709),(36091,195710),(35617,195709),(36084,195710),(34441,195631),(34442,195632),(34443,195633),(-34443,195635),(34444,195631),(35740,195632),(35741,195633),(-35741,195635),(34445,195631),(35705,195632),(35706,195633),(-35706,195635),(34447,195631),(35683,195632),(35684,195633),(-35684,195635),(34448,195631),(35724,195632),(35725,195633),(-35725,195635),(34449,195631),(35689,195632),(35690,195633),(-35690,195635),(34450,195631),(35695,195632),(35696,195633),(-35696,195635),(34451,195631),(35671,195632),(35672,195633),(-35672,195635),(34453,195631),(35718,195632),(35719,195633),(-35719,195635),(34454,195631),(35711,195632),(35712,195633),(-35712,195635),(34455,195631),(35680,195632),(35681,195633),(-35681,195635),(34456,195631),(35708,195632),(35709,195633),(-35709,195635),(34458,195631),(35692,195632),(35693,195633),(-35693,195635),(34459,195631),(35686,195632),(35687,195633),(-35687,195635),(34460,195631),(35702,195632),(35703,195633),(-35703,195635),(34461,195631),(35743,195632),(35744,195633),(-35744,195635),(34463,195631),(35734,195632),(35735,195633),(-35735,195635),(34465,195631),(35746,195632),(35747,195633),(-35747,195635),(34466,195631),(35665,195632),(35666,195633),(-35666,195635),(34467,195631),(35662,195632),(35663,195633),(-35663,195635),(34468,195631),(35721,195632),(35722,195633),(-35722,195635),(34469,195631),(35714,195632),(35715,195633),(-35715,195635),(34470,195631),(35728,195632),(35729,195633),(-35729,195635),(34471,195631),(35668,195632),(35669,195633),(-35669,195635),(34472,195631),(35699,195632),(35700,195633),(-35700,195635),(34473,195631),(35674,195632),(35675,195633),(-35675,195635),(34474,195631),(35731,195632),(35732,195633),(-35732,195635),(34475,195631),(35737,195632),(35738,195633),(-35738,195635),(37226,201710),(-37226,202336),(36948,202178),(38157,202180),(38639,202177),(38640,202179),(36939,202178),(38156,202180),(38637,202177),(38638,202179);
/*!40000 ALTER TABLE `aowow_loot_link` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `aowow_sourcestrings`
--
@@ -2479,10 +2503,9 @@ UNLOCK TABLES;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2015-08-06 17:51:15
-- Dump completed on 2015-10-31 13:22:30

View File

@@ -0,0 +1,105 @@
DROP TABLE IF EXISTS `aowow_loot_link`;
CREATE TABLE `aowow_loot_link` (
`npcId` MEDIUMINT(8) NOT NULL,
`objectId` MEDIUMINT(8) UNSIGNED NOT NULL,
UNIQUE INDEX `npcId` (`npcId`),
INDEX `objectId` (`objectId`)
) COLLATE='utf8_general_ci' ENGINE=MyISAM;
INSERT INTO `aowow_loot_link` VALUES
-- if available HM-loot is show instead of regular loot (notably Ulduar)
-- Classic
-- no boss chests..?
-- BC
(17537, 185168), (18434, 185169), -- Ramparts NH/HC - Vazruden
(17536, 185168), (18432, 185169), -- Ramparts NH/HC - Nazan
(19218, 184465), (21525, 184849), -- The Mechanar NH/HC - Gatewatcher Gyro-Kill
(19710, 184465), (21526, 184849), -- The Mechanar NH/HC - Gatewatcher Iron-Hand
-- WotLK
(28234, 190586), (-28234, 193996), -- Halls of Stone NH/HC - Tribunal of Ages
(27656, 191349), (31561, 193603), -- Oculus NH/HC - Ley Guardian Eregos
(26533, 190663), (31217, 193597), -- CoT Stratholme NH/HC - Mal' Ganis
(16064, 181366), (30603, 193426), -- Naxxramas 10/25 - Thane Korth'azz
(16065, 181366), (30601, 193426), -- Naxxramas 10/25 - Lady Blaumeux
(30549, 181366), (30600, 193426), -- Naxxramas 10/25 - Baron Rivendare
(16063, 181366), (30602, 193426), -- Naxxramas 10/25 - Sir Zeliek
(28859, 193905), (31734, 193967), -- EoE 10/25 - Malygos
(32930, 195046), (33909, 195047), -- Ulduar 10/25 - Kologarn
(32865, 194313), (33147, 194315), -- Ulduar 10/25 - Thorim
(33350, 194957), (-33350, 194958), -- Ulduar 10/25 - Mimiron
(32845, 194200), (32846, 194201), -- Ulduar 10/25 - Hodir
(32906, 194324), (33360, 194325), -- Ulduar 10/25 - Freya
(32871, 194821), (33070, 194822), -- Ulduar 10/25 - Algalon
(35119, 195374), (35518, 195375), -- ToC5 NH/HC - Eadric the Pure
(34928, 195323), (35517, 195324), -- ToC5 NH/HC - Argent Confessor Paletress
(34705, 195709), (36088, 195710), -- Toc5 NH/HC - Marshal Jacob Alerius
(34702, 195709), (36082, 195710), -- Toc5 NH/HC - Ambrose Boltspark
(34701, 195709), (36083, 195710), -- Toc5 NH/HC - Colosos
(34657, 195709), (36086, 195710), -- Toc5 NH/HC - Jaelyne Evensong
(34703, 195709), (36087, 195710), -- Toc5 NH/HC - Lana Stouthammer
(35572, 195709), (36089, 195710), -- Toc5 NH/HC - Mokra the Skullcrusher
(35569, 195709), (36085, 195710), -- Toc5 NH/HC - Eressea Dawnsinger
(35571, 195709), (36090, 195710), -- Toc5 NH/HC - Runok Wildmane
(35570, 195709), (36091, 195710), -- Toc5 NH/HC - Zul'tore
(35617, 195709), (36084, 195710), -- Toc5 NH/HC - Deathstalker Visceri
(34441, 195631), (34442, 195632), -- ToC25 10/25 NM - Vivienne Blackwhisper
(34443, 195633), (-34443, 195635), -- ToC25 10/25 HC - Vivienne Blackwhisper
(34444, 195631), (35740, 195632), -- ToC25 10/25 NM - Thrakgar
(35741, 195633), (-35741, 195635), -- ToC25 10/25 HC - Thrakgar
(34445, 195631), (35705, 195632), -- ToC25 10/25 NM - Liandra Suncaller
(35706, 195633), (-35706, 195635), -- ToC25 10/25 HC - Liandra Suncaller
(34447, 195631), (35683, 195632), -- ToC25 10/25 NM - Caiphus the Stern
(35684, 195633), (-35684, 195635), -- ToC25 10/25 HC - Caiphus the Stern
(34448, 195631), (35724, 195632), -- ToC25 10/25 NM - Ruj'kah
(35725, 195633), (-35725, 195635), -- ToC25 10/25 HC - Ruj'kah
(34449, 195631), (35689, 195632), -- ToC25 10/25 NM - Ginselle Blightslinger
(35690, 195633), (-35690, 195635), -- ToC25 10/25 HC - Ginselle Blightslinger
(34450, 195631), (35695, 195632), -- ToC25 10/25 NM - Harkzog
(35696, 195633), (-35696, 195635), -- ToC25 10/25 HC - Harkzog
(34451, 195631), (35671, 195632), -- ToC25 10/25 NM - Birana Stormhoof
(35672, 195633), (-35672, 195635), -- ToC25 10/25 HC - Birana Stormhoof
(34453, 195631), (35718, 195632), -- ToC25 10/25 NM - Narrhok Steelbreaker
(35719, 195633), (-35719, 195635), -- ToC25 10/25 HC - Narrhok Steelbreaker
(34454, 195631), (35711, 195632), -- ToC25 10/25 NM - Maz'dinah
(35712, 195633), (-35712, 195635), -- ToC25 10/25 HC - Maz'dinah
(34455, 195631), (35680, 195632), -- ToC25 10/25 NM - Broln Stouthorn
(35681, 195633), (-35681, 195635), -- ToC25 10/25 HC - Broln Stouthorn
(34456, 195631), (35708, 195632), -- ToC25 10/25 NM - Malithas Brightblade
(35709, 195633), (-35709, 195635), -- ToC25 10/25 HC - Malithas Brightblade
(34458, 195631), (35692, 195632), -- ToC25 10/25 NM - Gorgrim Shadowcleave
(35693, 195633), (-35693, 195635), -- ToC25 10/25 HC - Gorgrim Shadowcleave
(34459, 195631), (35686, 195632), -- ToC25 10/25 NM - Erin Misthoof
(35687, 195633), (-35687, 195635), -- ToC25 10/25 HC - Erin Misthoof
(34460, 195631), (35702, 195632), -- ToC25 10/25 NM - Kavina Grovesong
(35703, 195633), (-35703, 195635), -- ToC25 10/25 HC - Kavina Grovesong
(34461, 195631), (35743, 195632), -- ToC25 10/25 NM - Tyrius Duskblade
(35744, 195633), (-35744, 195635), -- ToC25 10/25 HC - Tyrius Duskblade
(34463, 195631), (35734, 195632), -- ToC25 10/25 NM - Shaabad
(35735, 195633), (-35735, 195635), -- ToC25 10/25 HC - Shaabad
(34465, 195631), (35746, 195632), -- ToC25 10/25 NM - Velanaa
(35747, 195633), (-35747, 195635), -- ToC25 10/25 HC - Velanaa
(34466, 195631), (35665, 195632), -- ToC25 10/25 NM - Anthar Forgemender
(35666, 195633), (-35666, 195635), -- ToC25 10/25 HC - Anthar Forgemender
(34467, 195631), (35662, 195632), -- ToC25 10/25 NM - Alyssia Moonstalker
(35663, 195633), (-35663, 195635), -- ToC25 10/25 HC - Alyssia Moonstalker
(34468, 195631), (35721, 195632), -- ToC25 10/25 NM - Noozle Whizzlestick
(35722, 195633), (-35722, 195635), -- ToC25 10/25 HC - Noozle Whizzlestick
(34469, 195631), (35714, 195632), -- ToC25 10/25 NM - Melador Valestrider
(35715, 195633), (-35715, 195635), -- ToC25 10/25 HC - Melador Valestrider
(34470, 195631), (35728, 195632), -- ToC25 10/25 NM - Saamul
(35729, 195633), (-35729, 195635), -- ToC25 10/25 HC - Saamul
(34471, 195631), (35668, 195632), -- ToC25 10/25 NM - Baelnor Lightbearer
(35669, 195633), (-35669, 195635), -- ToC25 10/25 HC - Baelnor Lightbearer
(34472, 195631), (35699, 195632), -- ToC25 10/25 NM - Irieth Shadowstep
(35700, 195633), (-35700, 195635), -- ToC25 10/25 HC - Irieth Shadowstep
(34473, 195631), (35674, 195632), -- ToC25 10/25 NM - Brienna Nightfell
(35675, 195633), (-35675, 195635), -- ToC25 10/25 HC - Brienna Nightfell
(34474, 195631), (35731, 195632), -- ToC25 10/25 NM - Serissa Grimdabbler
(35732, 195633), (-35732, 195635), -- ToC25 10/25 HC - Serissa Grimdabbler
(34475, 195631), (35737, 195632), -- ToC25 10/25 NM - Shocuul
(35738, 195633), (-35738, 195635), -- ToC25 10/25 HC - Shocuul
(37226, 201710), (-37226, 202336), -- HoR NH/HC - The Lich King
(36948, 202178), (38157, 202180), -- ICC 10/25 NM - Muradin Bronzebread
(38639, 202177), (38640, 202179), -- ICC 10/25 HC - Muradin Bronzebread
(36939, 202178), (38156, 202180), -- ICC 10/25 NM - High Overlord Saurfang
(38637, 202177), (38638, 202179); -- ICC 10/25 HC - High Overlord Saurfang

View File

@@ -47,16 +47,21 @@ if ($this->news):
<div class="home-featuredbox-inner text" id="news-generic"></div>
</div>
<?php
endif;
?>
<script type="text/javascript">//<![CDATA[
<?php
if (User::$localeId):
echo " Locale.set(".User::$localeId.");\n";
endif;
echo $this->writeGlobalVars();
if (User::$localeId):
echo " Locale.set(".User::$localeId.");\n";
endif;
echo $this->writeGlobalVars();
if ($this->news):
echo " Markup.printHtml(".json_encode($this->news['text']).", 'news-generic', { allow: Markup.CLASS_ADMIN });\n";
endif;
?>
Markup.printHtml(<?=json_encode($this->news['text']); ?>, 'news-generic', { allow: Markup.CLASS_ADMIN });
//]]></script>
<?php endif; ?>
</div>
<div class="toplinks linklist"><?php $this->brick('headerMenu'); ?></div>

View File

@@ -34,8 +34,8 @@ if ($this->accessory):
echo ".</div>\n";
endif;
if (is_array($this->position)):
echo ' <div>'.Lang::npc('difficultyPH').' <a href="?npc='.$this->position[0].'">'.$this->position[1]."</a>.</div>\n";
if (is_array($this->placeholder)):
echo ' <div>'.Lang::npc('difficultyPH').' <a href="?npc='.$this->placeholder[0].'">'.$this->placeholder[1]."</a>.</div>\n";
?>
<div class="pad"></div>
<?php

View File

@@ -20,6 +20,11 @@
<?php
$this->brick('article');
if ($this->relBoss):
echo " <div>".sprintf(Lang::gameObject('npcLootPH'), $this->name, $this->relBoss[0], $this->relBoss[1])."</div>\n";
echo ' <div class="pad"></div>';
endif;
if (!empty($this->map)):
$this->brick('mapper');
else: