Fixing items sql statements and carriage return character error for items and spell
This commit is contained in:
parent
bfa17baf3f
commit
28885efb92
@ -20,7 +20,7 @@ require_once 'includes/allquests.php';
|
||||
// для allitems($level=0) - соответствия номер-иконка
|
||||
$item_cols[0] = array('entry', 'iconname', 'quality', 'name');
|
||||
// для allitems($level=1) - ajax, тултип
|
||||
$item_cols[1] = array('entry', 'name', 'quality', 'iconname', 'maxcount', 'bonding', 'startquest', 'Map', 'ContainerSlots', 'class', 'InventoryType', 'subclass', 'dmg_type1', 'dmg_min1', 'dmg_max1', 'delay', 'dmg_type2', 'dmg_min2', 'dmg_max2', 'dmg_type3', 'dmg_min3', 'dmg_max3', 'dmg_type4', 'dmg_min4', 'dmg_max4', 'dmg_type5', 'dmg_min5', 'dmg_max5', 'armor', 'block', 'GemProperties', 'stat_type1', 'stat_type2', 'stat_type3', 'stat_type4', 'stat_type5', 'stat_type6', 'stat_type7', 'stat_type8', 'stat_type9', 'stat_type10', 'stat_value1', 'stat_value2', 'stat_value3', 'stat_value4', 'stat_value5', 'stat_value6', 'stat_value7', 'stat_value8', 'stat_value9', 'stat_value10', 'holy_res', 'fire_res', 'nature_res', 'frost_res', 'shadow_res', 'arcane_res', 'RandomProperty', 'MaxDurability', 'AllowableClass', 'RequiredLevel', 'RequiredSkill', 'requiredspell', 'RequiredReputationFaction', 'RequiredReputationRank', 'spellid_1', 'spellid_2', 'spellid_3', 'spellid_4', 'spellid_5', 'spelltrigger_1', 'spelltrigger_2', 'spelltrigger_3', 'spelltrigger_4', 'spelltrigger_5', 'description', 'PageText', 'BagFamily', 'RequiredSkillRank');
|
||||
$item_cols[1] = array('entry', 'name', 'quality', 'iconname', 'maxcount', 'bonding', 'startquest', 'Map', 'ContainerSlots', 'class', 'InventoryType', 'subclass', 'dmg_type1', 'dmg_min1', 'dmg_max1', 'delay', 'dmg_type2', 'dmg_min2', 'dmg_max2', 'dmg_type3', 'dmg_min3', 'dmg_max3', 'dmg_type4', 'dmg_min4', 'dmg_max4', 'dmg_type5', 'dmg_min5', 'dmg_max5', 'armor', 'block', 'stat_type1', 'stat_type2', 'stat_type3', 'stat_type4', 'stat_type5', 'stat_type6', 'stat_type7', 'stat_type8', 'stat_type9', 'stat_type10', 'stat_value1', 'stat_value2', 'stat_value3', 'stat_value4', 'stat_value5', 'stat_value6', 'stat_value7', 'stat_value8', 'stat_value9', 'stat_value10', 'holy_res', 'fire_res', 'nature_res', 'frost_res', 'shadow_res', 'arcane_res', 'RandomProperty', 'MaxDurability', 'AllowableClass', 'RequiredLevel', 'RequiredSkill', 'requiredspell', 'RequiredReputationFaction', 'RequiredReputationRank', 'spellid_1', 'spellid_2', 'spellid_3', 'spellid_4', 'spellid_5', 'spelltrigger_1', 'spelltrigger_2', 'spelltrigger_3', 'spelltrigger_4', 'spelltrigger_5', 'description', 'PageText', 'BagFamily', 'RequiredSkillRank');
|
||||
// для iteminfo($level=0) - строчки списка
|
||||
$item_cols[2] = array('name', 'quality', 'iconname', 'InventoryType', 'ItemLevel', 'RequiredLevel', 'class', 'subclass', 'stackable', 'BuyPrice', 'armor', 'dmg_type1', 'dmg_min1', 'dmg_max1', 'delay', 'dmg_type2', 'dmg_min2', 'dmg_max2', 'dmg_type3', 'dmg_min3', 'dmg_max3', 'dmg_type4', 'dmg_min4', 'dmg_max4', 'dmg_type5', 'dmg_min5', 'dmg_max5', 'ContainerSlots');
|
||||
// для iteminfo($level=1)
|
||||
@ -190,7 +190,7 @@ function allitemsinfo2(&$Row, $level=0) {
|
||||
// Записываем id вещи
|
||||
$allitems[$num]['entry'] = $Row['entry'];
|
||||
// Ищем иконку
|
||||
$allitems[$num]['icon'] = $Row['iconname'];
|
||||
$allitems[$num]['icon'] = trim($Row['iconname'], "\r");
|
||||
// Качество вещи
|
||||
if ($Row['quality'] == 7)
|
||||
$Row['quality'] = 6;
|
||||
@ -499,7 +499,7 @@ function iteminfo2(&$Row, $level=0) {
|
||||
$item['name'] = !empty($Row['name_loc']) ? $Row['name_loc'] : $Row['name'];
|
||||
// Тип вещи
|
||||
$item['type'] = $Row['InventoryType'];
|
||||
$item['icon'] = $Row['iconname'];
|
||||
$item['icon'] = trim($Row['iconname'], "\r");
|
||||
// Уровень вещи
|
||||
$item['level'] = $Row['ItemLevel'];
|
||||
// quality stuff
|
||||
@ -514,7 +514,7 @@ function iteminfo2(&$Row, $level=0) {
|
||||
$item['classs'] = $Row['class'];
|
||||
$item['subclass'] = $Row['subclass'];
|
||||
// Иконка вещи
|
||||
$item['iconname'] = $Row['iconname'];
|
||||
$item['iconname'] = trim($Row['iconname'], "\r");
|
||||
// Кол-во вещей в пачке
|
||||
$item['stackable'] = $Row['stackable'];
|
||||
// Стоимость вещи для покупки
|
||||
|
||||
@ -338,7 +338,7 @@ function spell_desc2($spellRow, $type='tooltip') {
|
||||
allspellsinfo2($spellRow);
|
||||
|
||||
if (!IsSet($spellRow['duration_base']))
|
||||
$lastduration = $DB->selectRow('SELECT * FROM ?_aowow_spellduration` WHERE durationID=? LIMIT 1', $spellRow['durationID']);
|
||||
$lastduration = $DB->selectRow('SELECT * FROM ?_aowow_spellduration WHERE durationID=? LIMIT 1', $spellRow['durationID']);
|
||||
|
||||
$signs = array('+', '-', '/', '*', '%', '^');
|
||||
|
||||
@ -826,11 +826,11 @@ function allspellsinfo2(&$row, $level=0) {
|
||||
// Имя иконки спелла
|
||||
if (($row['effect1itemtype']) and (!($row['effect1Aura']))) {
|
||||
if (IsSet($allitems[$row['effect1itemtype']]['icon']))
|
||||
$allspells[$num]['icon'] = $allitems[$row['effect1itemtype']]['icon'];
|
||||
$allspells[$num]['icon'] = trim($allitems[$row['effect1itemtype']]['icon'], "\r");
|
||||
else
|
||||
$allspells[$num]['icon'] = $DB->selectCell('SELECT iconname FROM ?_aowow_icons WHERE id=(SELECT displayid FROM ?_item_template WHERE entry=?d LIMIT 1) LIMIT 1', $row['effect1itemtype']);
|
||||
$allspells[$num]['icon'] = trim($DB->selectCell('SELECT iconname FROM ?_aowow_icons WHERE id=(SELECT displayid FROM ?_item_template WHERE entry=?d LIMIT 1) LIMIT 1', $row['effect1itemtype']) , "\r");
|
||||
} else {
|
||||
$allspells[$num]['icon'] = $row['iconname'];
|
||||
$allspells[$num]['icon'] = trim($row['iconname'], "\r");
|
||||
}
|
||||
|
||||
// Тултип спелла
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user