#312 fixed spell used by, spell tought by, npc teaches
This commit is contained in:
parent
b568a0e045
commit
5c7b0c0d3a
11
npc.php
11
npc.php
@ -159,12 +159,13 @@ if (!$npc = load_cache(1, intval($id))) {
|
|||||||
// Если это просто тренер
|
// Если это просто тренер
|
||||||
$teachspells = $DB->select('
|
$teachspells = $DB->select('
|
||||||
SELECT ?#, spellID
|
SELECT ?#, spellID
|
||||||
FROM ?_npc_trainer, '.$UDWBaseconf['aowow']['db'].'.?_aowow_spell, '.$UDWBaseconf['aowow']['db'].'.?_aowow_spellicons
|
FROM host_mojotrollz_aowow_test.aowow_spell, host_mojotrollz_aowow_test.aowow_spellicons
|
||||||
WHERE
|
WHERE
|
||||||
entry=?d
|
|
||||||
AND spellID=Spell
|
( spellID IN (SELECT spell FROM npc_trainer WHERE entry=?) OR
|
||||||
AND id=spellicon
|
spellID IN (SELECT ntt.spell FROM npc_trainer_template ntt LEFT JOIN creature_template ct ON ntt.entry = ct.TrainerTemplateId WHERE ct.entry=?))
|
||||||
', $spell_cols[2], $npc['entry']
|
AND id=spellicon
|
||||||
|
', $spell_cols[2], $npc['entry'],$npc['entry']
|
||||||
);
|
);
|
||||||
if ($teachspells) {
|
if ($teachspells) {
|
||||||
if (!(IsSet($npc['teaches'])))
|
if (!(IsSet($npc['teaches'])))
|
||||||
|
|||||||
11
spell.php
11
spell.php
@ -285,9 +285,10 @@ if (!$spell = load_cache(13, intval($id))) {
|
|||||||
FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factiontemplate, ?_creature_template c
|
FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factiontemplate, ?_creature_template c
|
||||||
{ LEFT JOIN (?_locales_creature l) ON c.entry = l.entry AND ? }
|
{ LEFT JOIN (?_locales_creature l) ON c.entry = l.entry AND ? }
|
||||||
WHERE
|
WHERE
|
||||||
c.entry IN (SELECT entry FROM ?_npc_trainer WHERE spell=?d)
|
(c.entry IN (SELECT entry FROM ?_npc_trainer WHERE spell=?d) OR
|
||||||
|
c.entry IN (SELECT ct.entry FROM npc_trainer_template ntt LEFT JOIN creature_template ct ON ntt.entry = ct.TrainerTemplateId WHERE spell=?d))
|
||||||
AND factiontemplateID=FactionAlliance
|
AND factiontemplateID=FactionAlliance
|
||||||
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $spell['entry']
|
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $spell['entry'], $spell['entry']
|
||||||
);
|
);
|
||||||
if ($taughtbytrainers) {
|
if ($taughtbytrainers) {
|
||||||
foreach ($taughtbytrainers as $i => $npcrow)
|
foreach ($taughtbytrainers as $i => $npcrow)
|
||||||
@ -406,9 +407,13 @@ if (!$spell = load_cache(13, intval($id))) {
|
|||||||
{ , name_loc?d AS name_loc, subname_loc' . $_SESSION['locale'] . ' AS subname_loc }
|
{ , name_loc?d AS name_loc, subname_loc' . $_SESSION['locale'] . ' AS subname_loc }
|
||||||
FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factiontemplate, ?_creature_template c
|
FROM '.$UDWBaseconf['aowow']['db'].'.?_aowow_factiontemplate, ?_creature_template c
|
||||||
{ LEFT JOIN (?_locales_creature l) ON c.entry = l.entry AND ? }
|
{ LEFT JOIN (?_locales_creature l) ON c.entry = l.entry AND ? }
|
||||||
|
LEFT JOIN creature_ai_scripts cas ON c.entry = cas.creature_id
|
||||||
WHERE
|
WHERE
|
||||||
factiontemplateID=FactionAlliance
|
factiontemplateID=FactionAlliance
|
||||||
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry']
|
AND ( (cas.action1_type = 11 AND cas.action1_param1 = ?) OR
|
||||||
|
(cas.action2_type = 11 AND cas.action2_param1 = ?) OR
|
||||||
|
(cas.action3_type = 11 AND cas.action3_param1 = ?) )
|
||||||
|
', $npc_cols[0], ($_SESSION['locale'] > 0) ? $_SESSION['locale'] : DBSIMPLE_SKIP, ($_SESSION['locale'] > 0) ? 1 : DBSIMPLE_SKIP, $spell['entry'], $spell['entry'], $spell['entry'], $spell['entry'],$spell['entry'],$spell['entry'],$spell['entry']
|
||||||
);
|
);
|
||||||
if ($usedbynpc) {
|
if ($usedbynpc) {
|
||||||
$spell['usedbynpc'] = array();
|
$spell['usedbynpc'] = array();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user