Compat/TDB
* drop references to script_waypoint and waypoints tables, removed in >91dcae540e>f3b691dcb0* db requirement bump
This commit is contained in:
parent
289d5062bd
commit
9db943e8f4
5 changed files with 32 additions and 47 deletions
|
|
@ -27,7 +27,7 @@ Also, this project is not meant to be used for commercial purposes of any kind!
|
|||
+ [Internationalization](https://www.php.net/manual/en/book.intl.php)
|
||||
+ [GNU Multiple Precision](https://www.php.net/manual/en/book.gmp.php) (When using TrinityCore as auth source)
|
||||
+ MySQL ≥ 5.7.0 OR MariaDB ≥ 10.6.4 OR similar
|
||||
+ [TDB 335.21101](https://github.com/TrinityCore/TrinityCore/releases/tag/TDB335.21101) (no other other providers are supported at this time)
|
||||
+ [TDB 335.25101](https://github.com/TrinityCore/TrinityCore/releases/tag/TDB335.25101) including updates up to [TrinityCore/TrinityCore@f3b691d](https://github.com/TrinityCore/TrinityCore/commit/f3b691dcb085014ec3f0e2c60ab94fc9c00e8aa8) (no other other providers are supported at this time)
|
||||
+ WIN: php.exe needs to be added to the `PATH` system variable, if it isn't already.
|
||||
+ Tools require cmake: Please refer to the individual repositories for detailed information
|
||||
+ [MPQExtractor](https://github.com/Sarjuuk/MPQExtractor) / [FFmpeg](https://ffmpeg.org/download.html) / (optional: [BLPConverter](https://github.com/Sarjuuk/BLPConverter))
|
||||
|
|
|
|||
|
|
@ -74,29 +74,20 @@ class AdminSpawnoverrideResponse extends TextResponse
|
|||
// if creature try for waypoints
|
||||
if ($type == Type::NPC)
|
||||
{
|
||||
$jobs = array(
|
||||
'SELECT -w.`id` AS "entry", w.`point` AS "pointId", w.`position_x` AS "posX", w.`position_y` AS "posY" FROM creature_addon ca JOIN waypoint_data w ON w.`id` = ca.`path_id` WHERE ca.`guid` = ?d AND ca.`path_id` <> 0',
|
||||
'SELECT `entry`, `pointId`, `location_x` AS "posX", `location_y` AS "posY" FROM `script_waypoint` WHERE `entry` = ?d',
|
||||
'SELECT `entry`, `pointId`, `position_x` AS "posX", `position_y` AS "posY" FROM `waypoints` WHERE `entry` = ?d'
|
||||
);
|
||||
|
||||
foreach ($jobs as $idx => $job)
|
||||
if ($swp = DB::World()->select('SELECT -w.`id` AS "entry", w.`point` AS "pointId", w.`position_x` AS "posX", w.`position_y` AS "posY" FROM creature_addon ca JOIN waypoint_data w ON w.`id` = ca.`path_id` WHERE ca.`guid` = ?d AND ca.`path_id` <> 0', $guid))
|
||||
{
|
||||
if ($swp = DB::World()->select($job, $idx ? $wPos[$guid]['id'] : $guid))
|
||||
foreach ($swp as $w)
|
||||
{
|
||||
foreach ($swp as $w)
|
||||
if ($point = WorldPosition::toZonePos($wPos[$guid]['mapId'], $w['posX'], $w['posY'], $area, $floor))
|
||||
{
|
||||
if ($point = WorldPosition::toZonePos($wPos[$guid]['mapId'], $w['posX'], $w['posY'], $area, $floor))
|
||||
{
|
||||
$p = array(
|
||||
'posX' => $point[0]['posX'],
|
||||
'posY' => $point[0]['posY'],
|
||||
'areaId' => $point[0]['areaId'],
|
||||
'floor' => $point[0]['floor']
|
||||
);
|
||||
$p = array(
|
||||
'posX' => $point[0]['posX'],
|
||||
'posY' => $point[0]['posY'],
|
||||
'areaId' => $point[0]['areaId'],
|
||||
'floor' => $point[0]['floor']
|
||||
);
|
||||
|
||||
DB::Aowow()->query('UPDATE ?_creature_waypoints SET ?a WHERE `creatureOrPath` = ?d AND `point` = ?d', $p, $w['entry'], $w['pointId']);
|
||||
}
|
||||
DB::Aowow()->query('UPDATE ?_creature_waypoints SET ?a WHERE `creatureOrPath` = ?d AND `point` = ?d', $p, $w['entry'], $w['pointId']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class SmartAction
|
|||
public const ACTION_SUMMON_GO = 50; // Spawns Gameobject, use target_type to set spawn position.
|
||||
public const ACTION_KILL_UNIT = 51; // Kills Creature.
|
||||
public const ACTION_ACTIVATE_TAXI = 52; // Sends player to flight path. You have to be close to Flight Master, which gives Taxi ID you need.
|
||||
public const ACTION_WP_START = 53; // Creature starts Waypoint Movement. Use waypoints table to create movement.
|
||||
public const ACTION_WP_START = 53; // Creature starts Waypoint Movement. Use waypoint_data table to create movement.
|
||||
public const ACTION_WP_PAUSE = 54; // Creature pauses its Waypoint Movement for given time.
|
||||
public const ACTION_WP_STOP = 55; // Creature stops its Waypoint Movement.
|
||||
public const ACTION_ADD_ITEM = 56; // Adds item(s) to player.
|
||||
|
|
|
|||
|
|
@ -12,8 +12,8 @@ if (!defined('AOWOW_REVISION'))
|
|||
define('JSON_AOWOW_POWER', JSON_PRETTY_PRINT | JSON_NUMERIC_CHECK | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
|
||||
define('FILTER_FLAG_STRIP_AOWOW', FILTER_FLAG_STRIP_LOW | FILTER_FLAG_STRIP_HIGH | FILTER_FLAG_STRIP_BACKTICK);
|
||||
|
||||
define('TDB_WORLD_MINIMUM_VER', 21101);
|
||||
define('TDB_WORLD_EXPECTED_VER', 24041);
|
||||
define('TDB_WORLD_MINIMUM_VER', 25101);
|
||||
define('TDB_WORLD_EXPECTED_VER', 25101);
|
||||
|
||||
// as of 01.01.2024 https://www.wowhead.com/wotlk/de/spell=40120/{seo}
|
||||
// https://www.wowhead.com/wotlk/es/search=vuelo
|
||||
|
|
|
|||
|
|
@ -24,19 +24,19 @@ CLISetup::registerSetup("sql", new class extends SetupScript
|
|||
);
|
||||
|
||||
protected $dbcSourceFiles = ['worldmaparea', 'map', 'taxipathnode', 'soundemitters', 'areatrigger', 'areatable'];
|
||||
protected $worldDependency = ['creature', 'creature_addon', 'creature_template_addon', 'gameobject', 'gameobject_template', 'vehicle_accessory', 'vehicle_accessory_template', 'script_waypoint', 'waypoints', 'waypoint_data', 'smart_scripts', 'areatrigger_teleport'];
|
||||
protected $worldDependency = ['creature', 'creature_addon', 'creature_template_addon', 'gameobject', 'gameobject_template', 'vehicle_accessory', 'vehicle_accessory_template', 'waypoint_data', 'smart_scripts', 'areatrigger_teleport'];
|
||||
protected $setupAfter = [['dungeonmap', 'worldmaparea', 'zones'], ['img-maps']];
|
||||
|
||||
private $transports = [];
|
||||
private $overrideData = [];
|
||||
|
||||
private $steps = array(
|
||||
0x01 => ['creature', Type::NPC, false, '`creature` spawns', ],
|
||||
0x02 => ['gameobject', Type::OBJECT, false, '`gameobject` spawns', ],
|
||||
0x04 => ['soundemitter', Type::SOUND, false, 'SoundEmitters.dbc positions', ],
|
||||
0x08 => ['areatrigger', Type::AREATRIGGER, false, 'AreaTrigger.dbc positions and teleporter endpoints' ],
|
||||
0x10 => ['instances', Type::ZONE, false, 'Map.dbc instance portals positions' ],
|
||||
0x20 => ['waypoints', Type::NPC, true, 'NPC waypoints from `script_waypoint`, `waypoints` & `waypoint_data`'],
|
||||
0x01 => ['creature', Type::NPC, false, '`creature` spawns', ],
|
||||
0x02 => ['gameobject', Type::OBJECT, false, '`gameobject` spawns', ],
|
||||
0x04 => ['soundemitter', Type::SOUND, false, 'SoundEmitters.dbc positions', ],
|
||||
0x08 => ['areatrigger', Type::AREATRIGGER, false, 'AreaTrigger.dbc positions and teleporter endpoints'],
|
||||
0x10 => ['instances', Type::ZONE, false, 'Map.dbc instance portals positions' ],
|
||||
0x20 => ['waypoints', Type::NPC, true, 'NPC waypoints from `waypoint_data`' ]
|
||||
);
|
||||
|
||||
|
||||
|
|
@ -276,27 +276,21 @@ CLISetup::registerSetup("sql", new class extends SetupScript
|
|||
|
||||
private function waypoints() : array
|
||||
{
|
||||
// todo (med): at least `waypoints` can contain paths that do not belong to a creature but get assigned by SmartAI (or script) during runtime
|
||||
// todo (med): `waypoint_data` can contain paths that do not belong to a creature but get assigned by SmartAI (or script) during runtime
|
||||
// in the future guid should be optional and additional parameters substituting guid should be passed down from NpcPage after SmartAI has been evaluated
|
||||
|
||||
// assume that creature_template_addon data isn't stupid and only creatures with a single spawn are referenced here
|
||||
return DB::World()->select(
|
||||
'SELECT c.`guid`, w.`entry` AS `creatureOrPath`, w.`pointId` AS `point`, c.`zoneId` AS `areaId`, c.`map`, w.`waittime` AS `wait`, w.`location_x` AS `posX`, w.`location_y` AS `posY`
|
||||
FROM creature c
|
||||
JOIN script_waypoint w ON c.`id` = w.`entry` UNION
|
||||
SELECT c.`guid`, w.`entry` AS `creatureOrPath`, w.`pointId` AS `point`, c.`zoneId` AS `areaId`, c.`map`, 0 AS `wait`, w.`position_x` AS `posX`, w.`position_y` AS `posY`
|
||||
FROM creature c
|
||||
JOIN waypoints w ON c.`id` = w.`entry` UNION
|
||||
SELECT c.`guid`, -w.`id` AS `creatureOrPath`, w.`point`, c.`zoneId` AS `areaId`, c.`map`, w.`delay` AS `wait`, w.`position_x` AS `posX`, w.`position_y` AS `posY`
|
||||
FROM creature c
|
||||
JOIN creature_addon ca ON ca.`guid` = c.`guid`
|
||||
JOIN waypoint_data w ON w.`id` = ca.`path_id`
|
||||
WHERE ca.`path_id` <> 0 UNION
|
||||
SELECT c.`guid`, -w.`id` AS `creatureOrPath`, w.`point`, c.`zoneId` AS `areaId`, c.`map`, w.`delay` AS `wait`, w.`position_x` AS `posX`, w.`position_y` AS `posY`
|
||||
FROM creature c
|
||||
JOIN creature_template_addon cta ON cta.`entry` = c.`id`
|
||||
JOIN waypoint_data w ON w.`id` = cta.`path_id`
|
||||
WHERE cta.`path_id` <> 0'
|
||||
'SELECT c.`guid`, -w.`id` AS `creatureOrPath`, w.`point`, c.`zoneId` AS `areaId`, c.`map`, w.`delay` AS `wait`, w.`position_x` AS `posX`, w.`position_y` AS `posY`
|
||||
FROM creature c
|
||||
JOIN creature_addon ca ON ca.`guid` = c.`guid`
|
||||
JOIN waypoint_data w ON w.`id` = ca.`path_id`
|
||||
WHERE ca.`path_id` <> 0 UNION
|
||||
SELECT c.`guid`, -w.`id` AS `creatureOrPath`, w.`point`, c.`zoneId` AS `areaId`, c.`map`, w.`delay` AS `wait`, w.`position_x` AS `posX`, w.`position_y` AS `posY`
|
||||
FROM creature c
|
||||
JOIN creature_template_addon cta ON cta.`entry` = c.`id`
|
||||
JOIN waypoint_data w ON w.`id` = cta.`path_id`
|
||||
WHERE cta.`path_id` <> 0'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue