mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Spell/TaxiPath
* resolve taxi path routes on spells * fixed display of taxi paths on maps
This commit is contained in:
@@ -253,9 +253,6 @@ class ItemList extends BaseType
|
||||
}
|
||||
}
|
||||
|
||||
if ($reqRating)
|
||||
$data['reqRating'] = $reqRating[0];
|
||||
|
||||
if (empty($data))
|
||||
unset($result[$itemId]);
|
||||
}
|
||||
|
||||
@@ -1825,7 +1825,22 @@ class SpellPage extends GenericPage
|
||||
$foo['name'] .= $_;
|
||||
|
||||
break;
|
||||
case 123: // Send Taxi - effMV is taxiPathId. We only use paths for flightmasters for now, so spell-triggered paths are not in the table
|
||||
case 123: // Send Taxi
|
||||
$_ = DB::Aowow()->selectRow('
|
||||
SELECT tn1.name_loc0 AS start_loc0, tn1.name_loc?d AS start_loc?d, tn2.name_loc0 AS end_loc0, tn2.name_loc?d AS end_loc?d
|
||||
FROM ?_taxipath tp
|
||||
JOIN ?_taxinodes tn1 ON tp.startNodeId = tn1.id
|
||||
JOIN ?_taxinodes tn2 ON tp.endNodeId = tn2.id
|
||||
WHERE tp.id = ?d',
|
||||
User::$localeId, User::$localeId, User::$localeId, User::$localeId, $effMV
|
||||
);
|
||||
if ($_ && User::isInGroup(U_GROUP_EMPLOYEE))
|
||||
$foo['name'] .= sprintf(Util::$dfnString, 'MiscValue'.Lang::main('colon').$effMV, ' (<span class="breadcrumb-arrow">'.Util::localizedString($_, 'start').'</span>'.Util::localizedString($_, 'end').')');
|
||||
else if ($_)
|
||||
$foo['name'] .= ' (<span class="breadcrumb-arrow">'.Util::localizedString($_, 'start').'</span>'.Util::localizedString($_, 'end').')';
|
||||
else
|
||||
$foo['name'] .= ' ('.$effMV.')';
|
||||
break;
|
||||
default:
|
||||
{
|
||||
if (($effMV || $effId == 97) && $effId != 155)
|
||||
|
||||
@@ -89,7 +89,7 @@ class ZonesPage extends GenericPage
|
||||
if ($mapFile)
|
||||
{
|
||||
$somData = ['flightmaster' => []];
|
||||
$nodes = DB::Aowow()->select('SELECT id AS ARRAY_KEY, tn.* FROM ?_taxinodes tn WHERE mapId = ?d ', $spawnMap);
|
||||
$nodes = DB::Aowow()->select('SELECT id AS ARRAY_KEY, tn.* FROM ?_taxinodes tn WHERE mapId = ?d AND type <> 0 AND typeId <> 0', $spawnMap);
|
||||
$paths = DB::Aowow()->select('
|
||||
SELECT IF(tn1.reactA = tn1.reactH AND tn2.reactA = tn2.reactH, 1, 0) AS neutral,
|
||||
tp.startNodeId AS startId,
|
||||
|
||||
@@ -59,24 +59,24 @@ function taxi() // path & nodes
|
||||
tn.name_loc0, tn.name_loc2, tn.name_loc3, tn.name_loc4, tn.name_loc6, tn.name_loc8,
|
||||
tn.mapId AS origMap,
|
||||
tn.posX AS origPosX,
|
||||
tn.posY AS origPosY
|
||||
tn.posY AS origPosY,
|
||||
IF (tn.id NOT IN (15, 148, 225, 235) AND
|
||||
(
|
||||
tn.id IN (64, 250) OR
|
||||
(
|
||||
tn.name_loc0 NOT LIKE "%Transport%" AND
|
||||
tn.name_loc0 NOT LIKE "%Quest%" AND
|
||||
tn.name_loc0 NOT LIKE "%Start%" AND
|
||||
tn.name_loc0 NOT LIKE "%End%"
|
||||
)
|
||||
), 0, 1) AS scripted
|
||||
FROM
|
||||
dbc_taxinodes tn
|
||||
JOIN
|
||||
dbc_worldmaparea wma ON ( tn.mapId = wma.mapId AND tn.posX BETWEEN wma.bottom AND wma.top AND tn.posY BETWEEN wma.right AND wma.left)
|
||||
WHERE
|
||||
wma.areaId = 0 AND
|
||||
wma.mapId = tn.mapId AND
|
||||
tn.id NOT IN (15, 148, 225, 235) AND
|
||||
(
|
||||
tn.id IN (64, 250) OR
|
||||
(
|
||||
tn.name_loc0 NOT LIKE "%Transport%" AND
|
||||
tn.name_loc0 NOT LIKE "%Quest%" AND
|
||||
tn.name_loc0 NOT LIKE "%Start%" AND
|
||||
tn.name_loc0 NOT LIKE "%End%"
|
||||
)
|
||||
)
|
||||
wma.mapId = tn.mapId
|
||||
UNION
|
||||
SELECT
|
||||
tn.id,
|
||||
@@ -90,7 +90,11 @@ function taxi() // path & nodes
|
||||
tn.name_loc0, tn.name_loc2, tn.name_loc3, tn.name_loc4, tn.name_loc6, tn.name_loc8,
|
||||
tn.mapId AS origMap,
|
||||
tn.posX AS origPosX,
|
||||
tn.posY AS origPosY
|
||||
tn.posY AS origPosY,
|
||||
IF (tn.name_loc0 NOT LIKE "%Transport%" AND tn.name_loc0 NOT LIKE "%Quest%" AND tn.name_loc0 NOT LIKE "%Start%" AND tn.name_loc0 NOT LIKE "%End%",
|
||||
0,
|
||||
1
|
||||
) AS scripted
|
||||
FROM
|
||||
dbc_taxinodes tn
|
||||
JOIN
|
||||
@@ -99,11 +103,8 @@ function taxi() // path & nodes
|
||||
dbc_worldmaparea wma ON ( wmt.targetMapId = wma.mapId AND tn.posX + wmt.offsetX BETWEEN wma.bottom AND wma.top AND tn.posY + wmt.offsetY BETWEEN wma.right AND wma.left)
|
||||
WHERE
|
||||
wma.areaId = 0 AND
|
||||
wmt.sourcemapId = tn.mapId AND
|
||||
tn.name_loc0 NOT LIKE "%Transport%" AND
|
||||
tn.name_loc0 NOT LIKE "%Quest%" AND
|
||||
tn.name_loc0 NOT LIKE "%Start%" AND
|
||||
tn.name_loc0 NOT LIKE "%End%"');
|
||||
wmt.sourcemapId = tn.mapId'
|
||||
);
|
||||
|
||||
// all available flightmaster
|
||||
$fMaster = DB::World()->select(
|
||||
@@ -149,19 +150,21 @@ function taxi() // path & nodes
|
||||
|
||||
foreach ($fNodes as $n)
|
||||
{
|
||||
if (empty($n['faction']))
|
||||
{
|
||||
CLI::write(' - ['.$n['id'].'] "'.$n['name_loc0'].'" has no NPC assigned ... skipping', CLI::LOG_WARN);
|
||||
continue;
|
||||
}
|
||||
// if (empty($n['faction']))
|
||||
// {
|
||||
// CLI::write(' - ['.$n['id'].'] "'.$n['name_loc0'].'" has no NPC assigned ... skipping', CLI::LOG_WARN);
|
||||
// continue;
|
||||
// }
|
||||
|
||||
if (isset($factions[$n['faction']]))
|
||||
if ($n['scripted'] || empty($n['faction']))
|
||||
$n['type'] = $n['typeId'] = 0;
|
||||
else if (isset($factions[$n['faction']]))
|
||||
{
|
||||
$n['reactA'] = $factions[$n['faction']]['reactA'];
|
||||
$n['reactH'] = $factions[$n['faction']]['reactH'];
|
||||
}
|
||||
|
||||
unset($n['faction'], $n['origMap'], $n['origPosX'], $n['origPosY'], $n['dist']);
|
||||
unset($n['faction'], $n['origMap'], $n['origPosX'], $n['origPosY'], $n['dist'], $n['scripted']);
|
||||
|
||||
DB::Aowow()->query('REPLACE INTO ?_taxinodes VALUES (?a)', array_values($n));
|
||||
}
|
||||
|
||||
@@ -591,7 +591,7 @@ html.ie678 .line var {
|
||||
-webkit-box-shadow: 0px 0px 3px black;
|
||||
}
|
||||
|
||||
.line .flipped {
|
||||
.line.flipped {
|
||||
-o-transform: scaleY(-1);
|
||||
-moz-transform: scaleY(-1);
|
||||
-webkit-transform: scaleY(-1);
|
||||
|
||||
@@ -1641,7 +1641,7 @@ var Markup = {
|
||||
'" onclick="ModelViewer.show({ type: 1, displayId: ' + attr.npc + ', slot: ' + attr.slot + ', ' + (attr.humanoid ? 'humanoid: 1, ' : '') +
|
||||
'displayAd: 1, fromTag: 1' + (attr.link ? ", link: '" + Markup._safeJsString(attr.link) + "'" : '') + (attr.label ? ", label: '" + Markup._safeJsString(attr.label) + "'" : '') +
|
||||
' });"><img alt="' + Markup._safeHtml(attr._contents) + '" title="' + Markup._safeHtml(attr._contents) + '" src="' +
|
||||
(attr.img ? attr.img : g_staticUrl + '/modelviewer/thumbs/npc/' + attr.npc + '.png" width="150" height="150') + ' ';
|
||||
(attr.img ? attr.img : g_staticUrl + '/modelviewer/thumbs/npc/' + attr.npc + '.png" width="150" height="150"') + ' ';
|
||||
if(classes.length)
|
||||
str += 'class="' + classes.join(' ') + '"';
|
||||
if(styles.length)
|
||||
@@ -1654,7 +1654,7 @@ var Markup = {
|
||||
str = '<a' + Markup._addGlobalAttributes(attr) + ' href="#modelviewer:2:' + attr.object + '" onclick="ModelViewer.show({ type: 2, displayId: ' +
|
||||
attr.object + ', displayAd: 1, fromTag: 1' + (attr.link ? ", link: '" + Markup._safeJsString(attr.link) + "'" : '') + (attr.label ? ", label: '" + Markup._safeJsString(attr.label) + "'" : '') +
|
||||
' });"><img alt="' + Markup._safeHtml(attr._contents) + '" title="' + Markup._safeHtml(attr._contents) + '" src="' +
|
||||
(attr.img ? attr.img : g_staticUrl + '/modelviewer/thumbs/obj/' + attr.object + '.png" width="150" height="150') + ' ';
|
||||
(attr.img ? attr.img : g_staticUrl + '/modelviewer/thumbs/obj/' + attr.object + '.png" width="150" height="150"') + ' ';
|
||||
if(classes.length)
|
||||
str += 'class="' + classes.join(' ') + '"';
|
||||
if(styles.length)
|
||||
@@ -1668,7 +1668,7 @@ var Markup = {
|
||||
'" onclick="ModelViewer.show({ type: 3, displayId: ' + attr.item + ', slot: ' + attr.slot + ', displayAd: 1, fromTag: 1' +
|
||||
(attr.link ? ", link: '" + Markup._safeJsString(attr.link) + "'" : '') + (attr.label ? ", label: '" + Markup._safeJsString(attr.label) + "'" : '') +
|
||||
' });"><img alt="' + Markup._safeHtml(attr._contents) + '" title="' + Markup._safeHtml(attr._contents) + '" src="' +
|
||||
(attr.img ? attr.img : g_staticUrl + '/modelviewer/thumbs/item/' + attr.item + '.png" width="150" height="150') + ' ';
|
||||
(attr.img ? attr.img : g_staticUrl + '/modelviewer/thumbs/item/' + attr.item + '.png" width="150" height="150"') + ' ';
|
||||
if(classes.length)
|
||||
str += 'class="' + classes.join(' ') + '"';
|
||||
if(styles.length)
|
||||
@@ -2465,7 +2465,7 @@ var Markup = {
|
||||
return '';
|
||||
|
||||
src = attr.src;
|
||||
title = attr.title ? attr.title: '(Unknown)';
|
||||
title = attr.title ? attr.title : '(Unknown)';
|
||||
if (attr.hasOwnProperty('type'))
|
||||
type = attr.type;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user