diff --git a/config/config.php.in b/config/config.php.in index a9ba6dea..fe783524 100644 --- a/config/config.php.in +++ b/config/config.php.in @@ -8,18 +8,18 @@ if (!defined('AOWOW_REVISION')) // contains world-data, user-data and logs $AoWoWconf['aowow'] = array( 'host' => '127.0.0.1', - 'user' => 'root', - 'pass' => '', - 'db' => 'aowow', - 'prefix' => '' + 'user' => '', + 'pass' => '', + 'db' => 'world', + 'prefix' => 'aowow_' ); // -- World Database -- // used to generate data-tables $AoWoWconf['world'] = array( 'host' => '127.0.0.1', - 'user' => 'root', - 'pass' => '', + 'user' => '', + 'pass' => '', 'db' => 'world', 'prefix' => '' ); @@ -28,8 +28,8 @@ $AoWoWconf['world'] = array( // used to generate user-tables $AoWoWconf['auth'] = array( 'host' => '127.0.0.1', - 'user' => 'root', - 'pass' => '', + 'user' => '', + 'pass' => '', 'db' => 'auth', 'prefix' => '' ); @@ -38,8 +38,8 @@ $AoWoWconf['auth'] = array( // used to display profiles $AoWoWconf['characters'][0] = array( 'host' => '127.0.0.1', - 'user' => 'root', - 'pass' => '', + 'user' => '', + 'pass' => '', 'db' => 'characters', 'prefix' => '' ); @@ -49,11 +49,12 @@ $AoWoWconf['characters'][0] = array( // -- Site Configuration -- $AoWoWconf['ttl'] = 1 * MINUTE; // default: 60 - time to live for RSS $AoWoWconf['cacheTimer'] = 1 * WEEK; // default: 60 * 60 * 7 - Time to keep cache in seconds (Default: 1 week) -$AoWowConf['sessionTimeout'] = 1 * HOUR; // default: 60 * 60 - non-permanent session times out in time() + X -// $AoWoWconf['loginFailTime'] = 15 * MINUTE; // default: 15 * 60 - how long an account is closed after exceeding above limit -// $AoWoWconf['loginFailCount'] = 5; // default: 5 - how often invalid passwords are tollerated +$AoWoWconf['sessionTimeout'] = 1 * HOUR; // default: 60 * 60 - non-permanent session times out in time() + X +$AoWoWconf['loginFailTime'] = 15 * MINUTE; // default: 15 * 60 - how long an account is closed after exceeding above limit +$AoWoWconf['loginFailCount'] = 5; // default: 5 - how often invalid passwords are tollerated $AoWoWconf['defaultLimit'] = 300; // default: 300 - Limit of some SQL queries $AoWoWconf['searchLimit'] = 500; // default: 500 - Limit of some SQL queries +$AoWoWconf['quickSearchLimit'] = 15; // default: 10 - Limit of some SQL queries $AoWoWconf['debug'] = true; // default: false - Disable cache, show smarty console panel, enable sql-errors $AoWoWconf['map_grouping'] = 0; // default: 1 - Map object grouping factor. Meters = 10^param. 0:disabled; 1|2|3:enabled (1:recommended) $AoWoWconf['register'] = true; // Allow account creating @@ -62,6 +63,6 @@ $AoWoWconf['boardUrl'] = "http://www.wowhead.com/forums?board="; // a $AoWoWconf['name'] = 'Aowow Database Viewer (ADV)'; // Title of the website $AoWoWconf['shortName'] = 'Aowow'; // used in Feeds $AoWoWconf['battlegroup'] = 'Pure Pwnage'; // pretend, we belong to a battlegroup to satisfy profiler-related Jscripts; region can be determined from realmlist.timezone -$AoWoWconf['maintainance'] = false; // brb gnomes say hi +$AoWoWconf['maintenance'] = false; // brb gnomes say hi ?> diff --git a/datasets/item-scaling b/datasets/item-scaling index bcbcad4c..7ed756b8 100644 --- a/datasets/item-scaling +++ b/datasets/item-scaling @@ -22,7 +22,7 @@ $WH.g_convertRatingToPercent.RB = { 32: 14, 33: 0, 34: 0, - 35: 25, + 35: 25 * 1.15, 36: 10, 37: 2.5, 44: 4.69512176513672 / 1.1 diff --git a/images/icons/quest_end_daily.gif b/images/icons/quest_end_daily.gif new file mode 100644 index 00000000..6d402b25 Binary files /dev/null and b/images/icons/quest_end_daily.gif differ diff --git a/images/icons/quest_start_daily.gif b/images/icons/quest_start_daily.gif new file mode 100644 index 00000000..eb20072b Binary files /dev/null and b/images/icons/quest_start_daily.gif differ diff --git a/images/icons/resist-arcane.gif b/images/icons/resist-arcane.gif new file mode 100644 index 00000000..8024028b Binary files /dev/null and b/images/icons/resist-arcane.gif differ diff --git a/images/icons/resist-fire.gif b/images/icons/resist-fire.gif new file mode 100644 index 00000000..8f6289fb Binary files /dev/null and b/images/icons/resist-fire.gif differ diff --git a/images/icons/resist-frost.gif b/images/icons/resist-frost.gif new file mode 100644 index 00000000..56ef3250 Binary files /dev/null and b/images/icons/resist-frost.gif differ diff --git a/images/icons/resist-holy.gif b/images/icons/resist-holy.gif new file mode 100644 index 00000000..8c4a023f Binary files /dev/null and b/images/icons/resist-holy.gif differ diff --git a/images/icons/resist-nature.gif b/images/icons/resist-nature.gif new file mode 100644 index 00000000..e5717c38 Binary files /dev/null and b/images/icons/resist-nature.gif differ diff --git a/images/icons/resist-shadow.gif b/images/icons/resist-shadow.gif new file mode 100644 index 00000000..820be593 Binary files /dev/null and b/images/icons/resist-shadow.gif differ diff --git a/includes/utilities.php b/includes/utilities.php index bc6fe39c..98bf3192 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -97,7 +97,7 @@ class SmartyAoWoW extends Smarty { $buff = []; foreach ($this->notices as $data) - if (User::isInGroup($data[0])) + if (!$data[0] || User::isInGroup($data[0])) $buff[] = Util::jsEscape($data[1]); if ($buff) @@ -111,7 +111,7 @@ class SmartyAoWoW extends Smarty 'status' => 1, 'name' => 'internal error', 'style' => 'padding-left: 40px; background-image: url(template/images/report.gif); background-size: 15px 15px; background-position: 12px center; border: dashed 2px #C03030;', - 'text' => ''.implode("
", $buff).'
', + 'text' => '[span id=inputbox-error]'.implode("\n", $buff).'[/span]', ); } } @@ -122,7 +122,8 @@ class SmartyAoWoW extends Smarty if (!isset($tv['announcements'])) $tv['announcements'] = []; - $ann = DB::Aowow()->Select('SELECT * FROM ?_announcements WHERE status = 1 AND (page = ? OR page = "*")', $match[0]); + $ann = DB::Aowow()->Select('SELECT * FROM ?_announcements WHERE status = 1 AND (page = ? OR page = "*")', $match[1]); + foreach ($ann as $k => $v) { if ($t = Util::localizedString($v, 'text')) @@ -311,16 +312,20 @@ class Util 'pet', 'achievement', 'title', 'event', 'class', 'race', 'skill', null, 'currency' ); - public static $combatRatingToItemMod = array( // zero-indexed + public static $combatRatingToItemMod = array( // zero-indexed idx:CR; val:Mod null, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, null, null, null, null, null, null, 28, 29, 30, null, null, null, 37, 44 ); - public static $gtCombatRatings = array( // 44 => 4.69512176513672 / 1.1 + /* manual corrections + idx:35 => 25*1.15 => 28.75 strange, this was not mentioned anywhere + idx:44 => 4,69512176513672/1.1 => 4,268292513760655 see: gtOCTclasscombatRatingScalar.dbc (also reflects changes to haste (+30% for sham, drui, ect)) + */ + public static $gtCombatRatings = array( 12 => 1.5, 13 => 12, 14 => 15, 15 => 5, 16 => 10, 17 => 10, 18 => 8, 19 => 14, 20 => 14, 21 => 14, 22 => 10, 23 => 10, 24 => 0, 25 => 0, 26 => 0, 27 => 0, 28 => 10, 29 => 10, - 30 => 10, 31 => 10, 32 => 14, 33 => 0, 34 => 0, 35 => 25, 36 => 10, 37 => 2.5, 44 => 4.2682925138 + 30 => 10, 31 => 10, 32 => 14, 33 => 0, 34 => 0, 35 => 28.75, 36 => 10, 37 => 2.5, 44 => 4.268292513760655 ); public static $lvlIndepRating = array( // rating doesn't scale with level @@ -1356,9 +1361,14 @@ class Util // 6 => TYPE_TOTEM Rockbiter AmountX as Damage (ignore) // 7 => TYPE_USE_SPELL Engineering gadgets // 8 => TYPE_PRISMATIC_SOCKET Extra Sockets AmountX as socketCount (ignore) - public static function parseItemEnchantment($eId, $raw = false, &$misc = null) + public static function parseItemEnchantment($ench, $raw = false, &$misc = null) { - $enchant = DB::Aowow()->selectRow('SELECT *, Id AS ARRAY_KEY FROM ?_itemenchantment WHERE Id = ?d', $eId); + $enchant = []; + if (is_numeric($ench)) + $enchant = DB::Aowow()->selectRow('SELECT *, Id AS ARRAY_KEY FROM ?_itemenchantment WHERE Id = ?d', $ench); + else if (is_array($ench)) + $enchant = $ench; + if (!$enchant) return []; diff --git a/index.php b/index.php index 0800a135..48d7da12 100644 --- a/index.php +++ b/index.php @@ -12,6 +12,14 @@ if (!file_exists('config/config.php')) // include all necessities, set up basics require 'includes/kernel.php'; +if (version_compare(PHP_VERSION, '5.4.0') <= 0) +{ + if (User::isInGroup(U_GROUP_EMPLOYEE)) + $smarty->internalNotice(U_GROUP_EMPLOYEE, 'PHP Version 5.4.0 or higher required! Your version is '.PHP_VERSION."\nCore functions are unavailable!"); + else + $smarty->brb(); +} + if ($AoWoWconf['maintenance'] && !User::isInGroup(U_GROUP_EMPLOYEE)) $smarty->brb(); else if ($AoWoWconf['maintenance'] && User::isInGroup(U_GROUP_EMPLOYEE)) diff --git a/pages/account.php b/pages/account.php index 07dbd686..ee8b91ce 100644 --- a/pages/account.php +++ b/pages/account.php @@ -219,12 +219,13 @@ function signup() $smarty->assign('signup_error', Lang::$account['nameInUse']); else { - $success = $rDB->Query('INSERT INTO aowow_account (username, sha_pass_hash, email, joindate, last_ip, locale, online) VALUES (?, ?, ?, NOW(), ?, ?, 1)', + $success = DB::Auth()->query('INSERT INTO aowow_account (user, passHash, displayName, email, joindate, lastIP, locale) VALUES (?, ?, ?, ?, NOW(), ?, ?)', $_POST['username'], - User::$createUserSendPass($_POST['username'], $_POST['password']), + sha1(strtoupper($_POST['username']).':'.strtoupper($_POST['password'])), + Util::ucFirst($_POST['username']), (isset($_POST['email']))? $_POST['email'] : '', (isset($_SERVER["REMOTE_ADDR"]))? $_SERVER["REMOTE_ADDR"] : '', - $_SESSION['locale'] + 0 ); if ($success > 0) // all fine, send to login diff --git a/setup/tools/dataset/base-info.php b/setup/tools/dataset/base-info.php new file mode 100644 index 00000000..01e05a79 --- /dev/null +++ b/setup/tools/dataset/base-info.php @@ -0,0 +1,53 @@ +Select('SELECT * FROM dbc.CharBaseInfo'); + +foreach ($tbl as $data) +{ + $cl = $data['class']; + $ra = $data['race']; + + @$clMasks[$ra] |= (1 << ($cl - 1)); + @$raMasks[$cl] |= (1 << ($ra - 1)); +} + +foreach ($clMasks as $ra => $msk) + DB::Aowow()->Query('UPDATE ?_races SET classmask = ?d WHERE Id = ?d', $msk, $ra); + +foreach ($raMasks as $cl => $msk) + DB::Aowow()->Query('UPDATE ?_classes SET racemask = ?d WHERE Id = ?d', $msk, $cl); + + DB::Aowow()->Query('UPDATE ?_races SET side = side + 1'); + DB::Aowow()->Query('UPDATE ?_races SET side = 0 WHERE side = 3'); + + */ +// manually add infos about races +// leader, faction, startArea +$info = array( + null, + [29611, 72, 12], + [39605, 76, 14], + [2784, 47, 1], + [7999, 96, 141], + [10181, 68, 85], + [36648, 81, 215], + [7937, 54, 1], + [10540, 530, 14], + null, + [16802, 911, 3430], + [17468, 930, 3524] +); + +foreach ($info as $id => $data) + if ($data) + DB::Aowow()->query( + 'UPDATE ?_races SET leader = ?d, factionId = ?d, startAreaId = ?d WHERE Id = ?d', + $data[0], + $data[1], + $data[2], + $id + ) + +?> \ No newline at end of file diff --git a/setup/tools/dataset-assembler/enchants.php b/setup/tools/dataset/enchants.php similarity index 76% rename from setup/tools/dataset-assembler/enchants.php rename to setup/tools/dataset/enchants.php index 4dfd0f58..bf7a6db3 100644 --- a/setup/tools/dataset-assembler/enchants.php +++ b/setup/tools/dataset/enchants.php @@ -8,6 +8,8 @@ if (!defined('AOWOW_REVISION')) // this script requires the following dbc-files to be parsed and available // Spells, SkillLineAbility, SpellItemEnchantment + // todo (high): restructure to work more efficiently (outer loop: spells, inner loop: locales) + /* Examples 15: { name:'Leichtes Rüstungsset', @@ -50,14 +52,11 @@ if (!defined('AOWOW_REVISION')) }, */ - set_time_limit(300); - // from g_item_slots: 13:"One-Hand", 26:"Ranged", 17:"Two-Hand", $slotPointer = [13, 17, 26, 26, 13, 17, 17, 13, 17, null, 17, null, null, 13, null, 13, null, null, null, null, 17]; $locales = [LOCALE_EN, LOCALE_FR, LOCALE_DE, LOCALE_ES, LOCALE_RU]; - $enchantSpells = new SpellList([['effect1Id', 53], ['name_loc0', 'QA%', '!']]); // enchantItemPermanent && !qualityAssurance + $enchantSpells = new SpellList([['effect1Id', 53], ['name_loc0', 'QA%', '!'], SQL_LIMIT_NONE]); // enchantItemPermanent && !qualityAssurance $castItems = []; - $jsonEnchants = []; // check directory-structure foreach (Util::$localeStrings as $dir) @@ -68,22 +67,19 @@ if (!defined('AOWOW_REVISION')) foreach ($locales as $lId) { + set_time_limit(180); User::useLocale($lId); $enchantsOut = []; foreach ($enchantSpells->iterate() as $__) { - $enchant = DB::Aowow()->SelectRow('SELECT * FROM ?_itemEnchantment WHERE Id = ?d', $enchantSpells->getField('effect1MiscValue')); - if (!$enchant) // 'shouldn't' happen - continue; - // slots have to be recalculated $slot = 0; if ($enchantSpells->getField('equippedItemClass') == 4) // armor { if ($invType = $enchantSpells->getField('equippedItemInventoryTypeMask')) - $slot = $enchantSpells->getField('equippedItemInventoryTypeMask') >> 1; + $slot = $invType >> 1; else /* if (equippedItemSubClassMask == 64) */ // shields have it their own way <_< $slot = (1 << (14 - 1)); } @@ -104,9 +100,8 @@ if (!defined('AOWOW_REVISION')) } } - // costy and locale-independant -> cache - if (!isset($jsonEnchants[$enchant['id']])) - $jsonEnchants[$enchant['id']] = Util::parseItemEnchantment($enchant); + $eId = $enchantSpells->getField('effect1MiscValue'); + $jsonequip = Util::parseItemEnchantment($eId, false, $misc); // defaults $ench = array( @@ -115,21 +110,21 @@ if (!defined('AOWOW_REVISION')) 'icon' => strToLower($enchantSpells->getField('iconString')), // item over spell 'source' => [], // <0: item; >0:spell 'skill' => -1, // modified if skill - 'slots' => [], // determied per spell but set per item - 'enchantment' => Util::jsEscape(Util::localizedString($enchant, 'text')), - 'jsonequip' => $jsonEnchants[$enchant['id']], + 'slots' => [], // determined per spell but set per item + 'enchantment' => $misc['name'], + 'jsonequip' => $jsonequip, 'temp' => 0, // always 0 'classes' => 0, // modified by item ); - if ($enchant['skillLine'] > 0) - $ench['jsonequip']['reqskill'] = $enchant['skillLine']; + if (isset($misc['reqskill'])) + $ench['jsonequip']['reqskill'] = $misc['reqskill']; - if ($enchant['skillLevel'] > 0) - $ench['jsonequip']['reqskillrank'] = $enchant['skillLevel']; + if (isset($misc['reqskillrank'])) + $ench['jsonequip']['reqskill'] = $misc['reqskillrank']; - if ($enchant['requiredLevel'] > 0) - $ench['jsonequip']['reqlevel'] = $enchant['requiredLevel']; + if (isset($misc['requiredLevel'])) + $ench['jsonequip']['requiredLevel'] = $misc['requiredLevel']; // check if the spell has an entry in skill_line_ability -> Source:Profession if ($skill = DB::Aowow()->SelectCell('SELECT skillLineId FROM dbc.skillLineAbility WHERE spellId = ?d', $enchantSpells->id)) @@ -140,9 +135,9 @@ if (!defined('AOWOW_REVISION')) $ench['slots'][] = $slot; } - // check if this item can be cast via item -> Source:Item + // check if this spell can be cast via item -> Source:Item if (!isset($castItems[$enchantSpells->id])) - $castItems[$enchantSpells->id] = new ItemList([['spellId1', $enchantSpells->id], ['name', 'Scroll of Enchant%', '!']]); // do not reuse enchantment scrolls + $castItems[$enchantSpells->id] = new ItemList([['spellId1', $enchantSpells->id], ['name_loc0', 'Scroll of Enchant%', '!']]); // do not reuse enchantment scrolls $cI = &$castItems[$enchantSpells->id]; // this construct is a bit .. unwieldy foreach ($cI->iterate() as $__) @@ -171,33 +166,33 @@ if (!defined('AOWOW_REVISION')) continue; // everything gathered - if (isset($enchantsOut[$enchant['id']])) // already found, append data + if (isset($enchantsOut[$eId])) // already found, append data { - foreach ($enchantsOut[$enchant['id']] as $k => $v) + foreach ($enchantsOut[$eId] as $k => $v) { if (is_array($v)) { while ($pop = array_pop($ench[$k])) - $enchantsOut[$enchant['id']][$k][] = $pop; + $enchantsOut[$eId][$k][] = $pop; } else { if ($k == 'quality') // quality:-1 if spells and items are mixed { - if ($enchantsOut[$enchant['id']]['source'][0] > 0 && $ench['source'][0] < 0) - $enchantsOut[$enchant['id']][$k] = -1; - else if ($enchantsOut[$enchant['id']]['source'][0] < 0 && $ench['source'][0] > 0) - $enchantsOut[$enchant['id']][$k] = -1; + if ($enchantsOut[$eId]['source'][0] > 0 && $ench['source'][0] < 0) + $enchantsOut[$eId][$k] = -1; + else if ($enchantsOut[$eId]['source'][0] < 0 && $ench['source'][0] > 0) + $enchantsOut[$eId][$k] = -1; else - $enchantsOut[$enchant['id']][$k] = $ench[$k]; + $enchantsOut[$eId][$k] = $ench[$k]; } - else if ($enchantsOut[$enchant['id']][$k] <= 0) - $enchantsOut[$enchant['id']][$k] = $ench[$k]; + else if ($enchantsOut[$eId][$k] <= 0) + $enchantsOut[$eId][$k] = $ench[$k]; } } } else // nothing yet, create new - $enchantsOut[$enchant['id']] = $ench; + $enchantsOut[$eId] = $ench; } // walk over each entry and strip single-item arrays diff --git a/setup/tools/dataset-assembler/gems.php b/setup/tools/dataset/gems.php similarity index 75% rename from setup/tools/dataset-assembler/gems.php rename to setup/tools/dataset/gems.php index 8e88b6d1..79503f0f 100644 --- a/setup/tools/dataset-assembler/gems.php +++ b/setup/tools/dataset/gems.php @@ -26,26 +26,26 @@ if (!defined('AOWOW_REVISION')) $gemQuery = " SELECT - it.entry, + it.entry as itemId, it.name, li.*, IF (it.entry < 36000 OR it.ItemLevel < 70, 1 , 2) AS expansion, (it.Quality) AS quality, - i.iconname as icon, + i.inventoryicon1 as icon, ie.*, gp.colorMask as colors FROM - item_template it, - locales_item li, - dbc.gemProperties gp, - ?_icons i, - ?_itemEnchantment ie + item_template it + LEFT JOIN + locales_item li ON li.entry = it.entry + JOIN + dbc.gemProperties gp ON gp.Id = it.GemProperties + JOIN + ?_itemEnchantment ie ON gp.spellItemEnchantmentId = ie.Id + JOIN + dbc.itemdisplayinfo i ON i.Id = it.displayid WHERE - it.GemProperties <> 0 AND - li.entry = it.entry AND - gp.Id = it.GemProperties AND - i.Id = it.displayid AND - gp.spellItemEnchantmentId = ie.Id + it.GemProperties <> 0 ORDER BY it.entry DESC ; @@ -70,15 +70,15 @@ if (!defined('AOWOW_REVISION')) foreach ($gems as $pop) { // costy and locale-independant -> cache - if (!isset($jsonGems[$pop['entry']])) - $jsonGems[$pop['entry']] = Util::parseItemEnchantment($pop); + if (!isset($jsonGems[$pop['itemId']])) + $jsonGems[$pop['itemId']] = Util::parseItemEnchantment($pop); - $gemsOut[$pop['entry']] = array( - 'name' => Util::jsEscape(Util::localizedString($pop, 'name')), + $gemsOut[$pop['itemId']] = array( + 'name' => Util::localizedString($pop, 'name'), 'quality' => $pop['quality'], 'icon' => strToLower($pop['icon']), - 'enchantment' => Util::jsEscape(Util::localizedString($pop, 'text')), - 'jsonequip' => $jsonGems[$pop['entry']], + 'enchantment' => Util::localizedString($pop, 'text'), + 'jsonequip' => $jsonGems[$pop['itemId']], 'colors' => $pop['colors'], 'expansion' => $pop['expansion'] ); diff --git a/setup/tools/dataset-assembler/glyphs.php b/setup/tools/dataset/glyphs.php similarity index 100% rename from setup/tools/dataset-assembler/glyphs.php rename to setup/tools/dataset/glyphs.php diff --git a/setup/tools/dataset-assembler/itemsets.php b/setup/tools/dataset/itemsets.php similarity index 98% rename from setup/tools/dataset-assembler/itemsets.php rename to setup/tools/dataset/itemsets.php index c0ea2c4f..9b2676ed 100644 --- a/setup/tools/dataset-assembler/itemsets.php +++ b/setup/tools/dataset/itemsets.php @@ -75,7 +75,7 @@ if (!defined('AOWOW_REVISION')) foreach ($setList as $set) { $setOut = array( - 'id' => $set['itemsetID'], + 'id' => $set['id'], 'name' => (7 - $set['quality']).Util::jsEscape(Util::localizedString($set, 'name')), 'pieces' => [], 'heroic' => DB::Aowow()->SelectCell('SELECT IF (Flags & 0x8, "true", "false") FROM item_template WHERE entry = ?d', $set['item1']), @@ -98,7 +98,7 @@ if (!defined('AOWOW_REVISION')) if ($set['contentGroup']) $setOut['note'] = $set['contentGroup']; - if ($set['itemsetID'] < 0) + if ($set['id'] < 0) $setOut['idbak'] = $set['refSetId']; for ($i = 1; $i < 11; $i++) @@ -114,7 +114,7 @@ if (!defined('AOWOW_REVISION')) if (!isset($jsonBonus[$set['spell'.$i]])) { $bSpell = new SpellList(array(['s.id', $set['spell'.$i]])); - $jsonBonus[$set['spell'.$i]] = $bSpell->getStatGain(); + $jsonBonus[$set['spell'.$i]] = $bSpell->getStatGain()[$set['spell'.$i]]; } if (isset($setOut['setbonus'][$set['bonus'.$i]])) diff --git a/setup/tools/dataset-assembler/pets.php b/setup/tools/dataset/pets.php similarity index 94% rename from setup/tools/dataset-assembler/pets.php rename to setup/tools/dataset/pets.php index f87935c2..816bc78c 100644 --- a/setup/tools/dataset-assembler/pets.php +++ b/setup/tools/dataset/pets.php @@ -43,7 +43,7 @@ if (!defined('AOWOW_REVISION')) ct.family, ct.modelId1 as displayId, cdi.skin1 as skin, - cf.iconString as icon, + SUBSTRING_INDEX(cf.iconFile, "\\\\", -1) as icon, cf.petTalentType as type FROM world.creature_template ct @@ -51,9 +51,9 @@ if (!defined('AOWOW_REVISION')) ?_factionTemplate ft ON ft.Id = ct.faction_A -- no beast has different faction set for Horde JOIN - ?_creatureFamily cf ON + dbc.creatureFamily cf ON cf.Id = ct.family - JOIN + LEFT JOIN world.locales_creature lc ON lc.entry = ct.entry JOIN @@ -73,10 +73,10 @@ if (!defined('AOWOW_REVISION')) world.creature c JOIN ?_zones z ON - z.x_min < c.position_x AND - z.x_max > c.position_x AND - z.y_min < c.position_y AND - z.y_max > c.position_y AND + z.xMin < c.position_x AND + z.xMax > c.position_x AND + z.yMin < c.position_y AND + z.yMax > c.position_y AND z.mapId = c.map WHERE c.id = ?d; diff --git a/setup/tools/dataset-assembler/realms.php b/setup/tools/dataset/realms.php similarity index 100% rename from setup/tools/dataset-assembler/realms.php rename to setup/tools/dataset/realms.php diff --git a/setup/tools/dataset-assembler/talent-icons.php b/setup/tools/dataset/talent-icons.php similarity index 92% rename from setup/tools/dataset-assembler/talent-icons.php rename to setup/tools/dataset/talent-icons.php index 64494783..dc3ca50b 100644 --- a/setup/tools/dataset-assembler/talent-icons.php +++ b/setup/tools/dataset/talent-icons.php @@ -15,16 +15,16 @@ if (!defined('AOWOW_REVISION')) FROM ?_spell s JOIN - ?_talent t On + dbc.talent t On t.rank1 = s.Id JOIN - ?_talenttab tt ON - tt.Id = t.tab + dbc.talenttab tt ON + tt.Id = t.tabId WHERE tt.?# = ?d AND - tt.order = ?d + tt.tabNumber = ?d ORDER BY - t.row, t.col, t.petmask ASC ; + t.row, t.column, t.petCategory1 ASC ; '; $dims = 36; //v-pets @@ -43,7 +43,7 @@ if (!defined('AOWOW_REVISION')) for ($tree = 0; $tree < 3; $tree++) { - $what = $k ? 'classes' : 'pets'; + $what = $k ? 'classMask' : 'creatureFamilyMask'; $set = $k ? 1 << ($k - 1) : 1 << $tree; $subset = $k ? $tree : 0; $path = $k ? 'classes\\icons' : 'pets'; diff --git a/setup/tools/dataset-assembler/talents.php b/setup/tools/dataset/talents.php similarity index 89% rename from setup/tools/dataset-assembler/talents.php rename to setup/tools/dataset/talents.php index 7396b3b3..250aac39 100644 --- a/setup/tools/dataset-assembler/talents.php +++ b/setup/tools/dataset/talents.php @@ -19,6 +19,7 @@ if (!defined('AOWOW_REVISION')) // r - array:int on what the talent depends on: "r:[u, v]", u - nth talent in tree, v - required rank of u // f - array:int [pets only] creatureFamilies, that use this spell // t - array:str if the talent teaches a spell, this is the upper tooltip-table containing castTime, cost, cooldown + // j - array of modifier-arrays per rank for the Profiler [nyi] // tabs // n - name of the tab // t - array of talent-objects @@ -36,11 +37,11 @@ if (!defined('AOWOW_REVISION')) SELECT * FROM - ?_talenttab + dbc.talenttab WHERE - classes = ?d + classMask = ?d ORDER BY - `order`, `pets`', + `tabNumber`, `creatureFamilyMask`', $mask ); @@ -54,14 +55,14 @@ if (!defined('AOWOW_REVISION')) t.*, s.* FROM - ?_talent t, + dbc.talent t, ?_spell s WHERE - t.`tab`= ?d AND + t.`tabId`= ?d AND s.`Id` = t.`rank1` - ORDER by t.`row`, t.`col` + ORDER by t.`row`, t.`column` ', - $tabs[$l]['id'] + $tabs[$l]['Id'] ); $result[$l] = array( @@ -71,7 +72,7 @@ if (!defined('AOWOW_REVISION')) if (!$class) { - $petFamId = log($tabs[$l]['pets'], 2); + $petFamId = log($tabs[$l]['creatureFamilyMask'], 2); $result[$l]['icon'] = $petFamIcons[$petFamId]; $petCategories = DB::Aowow()->SelectCol('SELECT Id AS ARRAY_KEY, category FROM ?_pet WHERE type = ?d', $petFamId); $result[$l]['f'] = array_keys($petCategories); @@ -89,7 +90,7 @@ if (!defined('AOWOW_REVISION')) $s = []; $i = $talents[$j]['tId']; $n = Util::localizedString($talents[$j], 'name'); - $x = $talents[$j]['col']; + $x = $talents[$j]['column']; $y = $talents[$j]['row']; $r = null; $t = []; @@ -107,9 +108,9 @@ if (!defined('AOWOW_REVISION')) foreach ($petCategories as $k => $v) { // cant handle 64bit integer .. split - if ($v >= 32 && ((1 << ($v - 32)) & $talents[$j]['petmask2'])) + if ($v >= 32 && ((1 << ($v - 32)) & $talents[$j]['petCategory2'])) $f[] = $k; - else if ($v < 32 && ((1 << $v) & $talents[$j]['petmask'])) + else if ($v < 32 && ((1 << $v) & $talents[$j]['petCategory1'])) $f[] = $k; } @@ -119,17 +120,17 @@ if (!defined('AOWOW_REVISION')) $d[] = $tSpell->parseText()[0]; $s[] = $talents[$j]['rank'.($k + 1)]; - if ($talents[$j]['isSpell']) + if ($talents[$j]['talentSpell']) $t[] = $tSpell->getTalentHeadForCurrent(); } - if ($talents[$j]['dependsOn']) + if ($talents[$j]['reqTalent']) { // we didn't encounter the required talent yet => create reference - if (!isset($tNums[$talents[$j]['dependsOn']])) - $depLinks[$talents[$j]['dependsOn']] = $j; + if (!isset($tNums[$talents[$j]['reqTalent']])) + $depLinks[$talents[$j]['reqTalent']] = $j; - $r = [$tNums[$talents[$j]['dependsOn']], $talents[$j]['dependsOnRank'] + 1]; + $r = [$tNums[$talents[$j]['reqTalent']], $talents[$j]['reqRank'] + 1]; } $result[$l]['t'][$j] = array( @@ -190,6 +191,8 @@ if (!defined('AOWOW_REVISION')) // TalentCalc foreach ($classes as $cMask) { + set_time_limit(20); + $cId = log($cMask, 2) + 1; $file = 'datasets\\'.User::$localeString.'\\talents-'.$cId; $toFile = '$WowheadTalentCalculator.registerClass('.$cId.', '.json_encode(buildTree($cId), JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK).')'; diff --git a/template/images/dede/character.gif b/template/images/dede/character.gif new file mode 100644 index 00000000..975fc888 Binary files /dev/null and b/template/images/dede/character.gif differ diff --git a/template/images/enus/character.gif b/template/images/enus/character.gif new file mode 100644 index 00000000..975fc888 Binary files /dev/null and b/template/images/enus/character.gif differ diff --git a/template/images/eses/character.gif b/template/images/eses/character.gif new file mode 100644 index 00000000..975fc888 Binary files /dev/null and b/template/images/eses/character.gif differ diff --git a/template/images/frfr/character.gif b/template/images/frfr/character.gif new file mode 100644 index 00000000..975fc888 Binary files /dev/null and b/template/images/frfr/character.gif differ diff --git a/template/images/ruru/character.gif b/template/images/ruru/character.gif new file mode 100644 index 00000000..975fc888 Binary files /dev/null and b/template/images/ruru/character.gif differ diff --git a/template/images/ui/redbullet.jpg b/template/images/ui/redbullet.jpg new file mode 100644 index 00000000..582c9fb2 Binary files /dev/null and b/template/images/ui/redbullet.jpg differ diff --git a/template/images/ui/redbullet.png b/template/images/ui/redbullet.png new file mode 100644 index 00000000..b7461eb4 Binary files /dev/null and b/template/images/ui/redbullet.png differ diff --git a/template/signin.tpl b/template/signin.tpl new file mode 100644 index 00000000..514b791c --- /dev/null +++ b/template/signin.tpl @@ -0,0 +1,63 @@ +{include file='header.tpl'} + +
+
+
+
+ + +
+
+

{$lang.doSignIn}

+
{if isset($signinError)}{$signinError}{/if}
+ + + + + + + + + + + + + + +
{$lang.user}{$lang.colon}
{$lang.pass}{$lang.colon}
+ +
+ +
+
+
{$lang.forgot}{$lang.colon}{$lang.user} | {$lang.pass}
+
+
+ +
+ {if $register}
{$lang.accNoneYet}? {$lang.accCreateNow}!
{/if} + +
+
+
+ +{include file='footer.tpl'} diff --git a/template/signup.tpl b/template/signup.tpl new file mode 100644 index 00000000..d9f9b5fe --- /dev/null +++ b/template/signup.tpl @@ -0,0 +1,75 @@ +{include file='header.tpl'} + +
+
+
+
+ + +
+
+

{$lang.accCreate}

+
{if isset($signupError)}{$signupError}{/if}
+ + + + + + + + + + + + + + + + + + + + + +
{$lang.user}{$lang.colon}
{$lang.pass}{$lang.colon}
{$lang.passConfirm}{$lang.colon}
{$lang.email}{$lang.colon}
+ +
+ +
+
+
+ + +
+
+ +
+ +{include file='footer.tpl'}