fixups required for successfull setup
@@ -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' => '<user>',
|
||||
'pass' => '<pass>',
|
||||
'db' => 'world',
|
||||
'prefix' => 'aowow_'
|
||||
);
|
||||
|
||||
// -- World Database --
|
||||
// used to generate data-tables
|
||||
$AoWoWconf['world'] = array(
|
||||
'host' => '127.0.0.1',
|
||||
'user' => 'root',
|
||||
'pass' => '',
|
||||
'user' => '<user>',
|
||||
'pass' => '<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' => '<user>',
|
||||
'pass' => '<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' => '<user>',
|
||||
'pass' => '<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
|
||||
|
||||
?>
|
||||
|
||||
@@ -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
|
||||
|
||||
BIN
images/icons/quest_end_daily.gif
Normal file
|
After Width: | Height: | Size: 333 B |
BIN
images/icons/quest_start_daily.gif
Normal file
|
After Width: | Height: | Size: 315 B |
BIN
images/icons/resist-arcane.gif
Normal file
|
After Width: | Height: | Size: 371 B |
BIN
images/icons/resist-fire.gif
Normal file
|
After Width: | Height: | Size: 243 B |
BIN
images/icons/resist-frost.gif
Normal file
|
After Width: | Height: | Size: 346 B |
BIN
images/icons/resist-holy.gif
Normal file
|
After Width: | Height: | Size: 351 B |
BIN
images/icons/resist-nature.gif
Normal file
|
After Width: | Height: | Size: 361 B |
BIN
images/icons/resist-shadow.gif
Normal file
|
After Width: | Height: | Size: 346 B |
@@ -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' => '<span id="inputbox-error">'.implode("<br>", $buff).'</span>',
|
||||
'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 [];
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
53
setup/tools/dataset/base-info.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
/*
|
||||
$clMasks = [];
|
||||
$raMasks = [];
|
||||
$tbl = DB::Aowow()->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
|
||||
)
|
||||
|
||||
?>
|
||||
@@ -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
|
||||
@@ -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']
|
||||
);
|
||||
@@ -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]]))
|
||||
@@ -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;
|
||||
@@ -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';
|
||||
@@ -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).')';
|
||||
BIN
template/images/dede/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/enus/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/eses/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/frfr/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/ruru/character.gif
Normal file
|
After Width: | Height: | Size: 329 B |
BIN
template/images/ui/redbullet.jpg
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
template/images/ui/redbullet.png
Normal file
|
After Width: | Height: | Size: 938 B |
63
template/signin.tpl
Normal file
@@ -0,0 +1,63 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div id="main">
|
||||
<div id="main-precontents"></div>
|
||||
<div id="main-contents" class="main-contents">
|
||||
<div class="pad3"></div>
|
||||
<script type="text/javascript">
|
||||
function inputBoxValidate(f)
|
||||
{ldelim}
|
||||
var _ = f.elements[0];
|
||||
if(_.value.length == 0)
|
||||
{ldelim}
|
||||
$WH.ge('inputbox-error').innerHTML = LANG.message_enterusername;
|
||||
_.focus();
|
||||
return false;
|
||||
{rdelim}
|
||||
|
||||
_ = f.elements[1];
|
||||
if(_.value.length == 0)
|
||||
{ldelim}
|
||||
$WH.ge('inputbox-error').innerHTML = LANG.message_enterpassword;
|
||||
_.focus();
|
||||
return false;
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
</script>
|
||||
|
||||
<form action="?account=signin_do&next={$next}" method="post" onsubmit="return inputBoxValidate(this)">
|
||||
<div class="inputbox" style="position: relative">
|
||||
<h1>{$lang.doSignIn}</h1>
|
||||
<div id="inputbox-error">{if isset($signinError)}{$signinError}{/if}</div>
|
||||
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td align="right">{$lang.user}{$lang.colon}</td>
|
||||
<td><input type="text" name="username" value="" maxlength="16" id="username-generic" style="width: 10em" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">{$lang.pass}{$lang.colon}</td>
|
||||
<td><input type="password" name="password" style="width: 10em" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" checked="checked" /></td>
|
||||
<td>
|
||||
<label for="remember_me">{$lang.rememberMe}</label>
|
||||
<div class="pad2"></div>
|
||||
<input type="submit" value="{$lang.signIn}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br>
|
||||
<div style="position: absolute; right: 5px; bottom: 5px;">{$lang.forgot}{$lang.colon}<a href="?account=forgotusername">{$lang.user}</a> | <a href="?account=forgotpassword">{$lang.pass}</a></div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="pad3"></div>
|
||||
{if $register}<div style="text-align: center; line-height: 1.5em; font-size: 125%">{$lang.accNoneYet}? <a href="?account=signup">{$lang.accCreateNow}!</a></div>{/if}
|
||||
<script type="text/javascript">$WH.ge('username-generic').focus()</script>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{include file='footer.tpl'}
|
||||
75
template/signup.tpl
Normal file
@@ -0,0 +1,75 @@
|
||||
{include file='header.tpl'}
|
||||
|
||||
<div id="main">
|
||||
<div id="main-precontents"></div>
|
||||
<div id="main-contents" class="main-contents">
|
||||
<div class="pad3"></div>
|
||||
<script type="text/javascript">
|
||||
function inputBoxValidate(f)
|
||||
{ldelim}
|
||||
var _ = f.elements[0];
|
||||
if(_.value.length == 0)
|
||||
{ldelim}
|
||||
$WH.ge('inputbox-error').innerHTML = LANG.message_enterusername;
|
||||
_.focus();
|
||||
return false;
|
||||
{rdelim}
|
||||
|
||||
_ = f.elements[1];
|
||||
if(_.value.length == 0)
|
||||
{ldelim}
|
||||
$WH.ge('inputbox-error').innerHTML = LANG.message_enterpassword;
|
||||
_.focus();
|
||||
return false;
|
||||
{rdelim}
|
||||
|
||||
_ = f.elements[2];
|
||||
if(_.value.length == 0)
|
||||
{ldelim}
|
||||
$WH.ge('inputbox-error').innerHTML = message_passwordsdonotmatch;
|
||||
_.focus();
|
||||
return false;
|
||||
{rdelim}
|
||||
{rdelim}
|
||||
</script>
|
||||
|
||||
<form action="?account=signup_do&next={$next}" method="post" onsubmit="return inputBoxValidate(this)">
|
||||
<div class="inputbox" style="position: relative">
|
||||
<h1>{$lang.accCreate}</h1>
|
||||
<div id="inputbox-error">{if isset($signupError)}{$signupError}{/if}</div>
|
||||
<table align="center">
|
||||
<tr>
|
||||
<td align="right">{$lang.user}{$lang.colon}</td>
|
||||
<td><input type="text" name="username" value="" maxlength="16" id="username-generic" style="width: 10em" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">{$lang.pass}{$lang.colon}</td>
|
||||
<td><input type="password" name="password" style="width: 10em" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">{$lang.passConfirm}{$lang.colon}</td>
|
||||
<td><input type="password" name="c_password" style="width: 10em" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td align="right">{$lang.email}{$lang.colon}</td>
|
||||
<td><input type="text" name="email" style="width: 10em" /></td>
|
||||
</tr>
|
||||
<td align="right" valign="top"><input type="checkbox" name="remember_me" id="remember_me" value="yes" /></td>
|
||||
<td>
|
||||
<label for="remember_me">{$lang.rememberMe}</label>
|
||||
<div class="pad2"></div>
|
||||
<input type="submit" name="signup" value="{$lang.signup}" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<script type="text/javascript">$WH.ge('username-generic').focus()</script>
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{include file='footer.tpl'}
|
||||