Fixing items sql statements and carriage return character error for items and spell
This commit is contained in:
committed by
Antz
parent
bfa17baf3f
commit
28885efb92
@@ -20,7 +20,7 @@ require_once 'includes/allquests.php';
|
|||||||
// для allitems($level=0) - соответствия номер-иконка
|
// для allitems($level=0) - соответствия номер-иконка
|
||||||
$item_cols[0] = array('entry', 'iconname', 'quality', 'name');
|
$item_cols[0] = array('entry', 'iconname', 'quality', 'name');
|
||||||
// для allitems($level=1) - ajax, тултип
|
// для 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) - строчки списка
|
// для 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');
|
$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)
|
// для iteminfo($level=1)
|
||||||
@@ -190,7 +190,7 @@ function allitemsinfo2(&$Row, $level=0) {
|
|||||||
// Записываем id вещи
|
// Записываем id вещи
|
||||||
$allitems[$num]['entry'] = $Row['entry'];
|
$allitems[$num]['entry'] = $Row['entry'];
|
||||||
// Ищем иконку
|
// Ищем иконку
|
||||||
$allitems[$num]['icon'] = $Row['iconname'];
|
$allitems[$num]['icon'] = trim($Row['iconname'], "\r");
|
||||||
// Качество вещи
|
// Качество вещи
|
||||||
if ($Row['quality'] == 7)
|
if ($Row['quality'] == 7)
|
||||||
$Row['quality'] = 6;
|
$Row['quality'] = 6;
|
||||||
@@ -499,7 +499,7 @@ function iteminfo2(&$Row, $level=0) {
|
|||||||
$item['name'] = !empty($Row['name_loc']) ? $Row['name_loc'] : $Row['name'];
|
$item['name'] = !empty($Row['name_loc']) ? $Row['name_loc'] : $Row['name'];
|
||||||
// Тип вещи
|
// Тип вещи
|
||||||
$item['type'] = $Row['InventoryType'];
|
$item['type'] = $Row['InventoryType'];
|
||||||
$item['icon'] = $Row['iconname'];
|
$item['icon'] = trim($Row['iconname'], "\r");
|
||||||
// Уровень вещи
|
// Уровень вещи
|
||||||
$item['level'] = $Row['ItemLevel'];
|
$item['level'] = $Row['ItemLevel'];
|
||||||
// quality stuff
|
// quality stuff
|
||||||
@@ -514,7 +514,7 @@ function iteminfo2(&$Row, $level=0) {
|
|||||||
$item['classs'] = $Row['class'];
|
$item['classs'] = $Row['class'];
|
||||||
$item['subclass'] = $Row['subclass'];
|
$item['subclass'] = $Row['subclass'];
|
||||||
// Иконка вещи
|
// Иконка вещи
|
||||||
$item['iconname'] = $Row['iconname'];
|
$item['iconname'] = trim($Row['iconname'], "\r");
|
||||||
// Кол-во вещей в пачке
|
// Кол-во вещей в пачке
|
||||||
$item['stackable'] = $Row['stackable'];
|
$item['stackable'] = $Row['stackable'];
|
||||||
// Стоимость вещи для покупки
|
// Стоимость вещи для покупки
|
||||||
|
|||||||
@@ -338,7 +338,7 @@ function spell_desc2($spellRow, $type='tooltip') {
|
|||||||
allspellsinfo2($spellRow);
|
allspellsinfo2($spellRow);
|
||||||
|
|
||||||
if (!IsSet($spellRow['duration_base']))
|
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('+', '-', '/', '*', '%', '^');
|
$signs = array('+', '-', '/', '*', '%', '^');
|
||||||
|
|
||||||
@@ -826,11 +826,11 @@ function allspellsinfo2(&$row, $level=0) {
|
|||||||
// Имя иконки спелла
|
// Имя иконки спелла
|
||||||
if (($row['effect1itemtype']) and (!($row['effect1Aura']))) {
|
if (($row['effect1itemtype']) and (!($row['effect1Aura']))) {
|
||||||
if (IsSet($allitems[$row['effect1itemtype']]['icon']))
|
if (IsSet($allitems[$row['effect1itemtype']]['icon']))
|
||||||
$allspells[$num]['icon'] = $allitems[$row['effect1itemtype']]['icon'];
|
$allspells[$num]['icon'] = trim($allitems[$row['effect1itemtype']]['icon'], "\r");
|
||||||
else
|
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 {
|
} else {
|
||||||
$allspells[$num]['icon'] = $row['iconname'];
|
$allspells[$num]['icon'] = trim($row['iconname'], "\r");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Тултип спелла
|
// Тултип спелла
|
||||||
|
|||||||
@@ -434,7 +434,8 @@ if (!$item = load_cache(5, $id)) {
|
|||||||
WHERE spellID=?d
|
WHERE spellID=?d
|
||||||
LIMIT 1', $row['spellID']
|
LIMIT 1', $row['spellID']
|
||||||
);
|
);
|
||||||
$item['createdfrom'][] = spellinfo2(array_merge($row, $skillrow));
|
$merged = array_merge($row, $skillrow);
|
||||||
|
$item['createdfrom'][] = spellinfo2($merged);
|
||||||
}
|
}
|
||||||
unset($skillrow);
|
unset($skillrow);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user