fix(sql): wander_distance is 0 for non-Wander NPCs

Stationary and Patrol creatures should have wander_distance=0; only
Wander behaviour uses it. Previously the editor's wanderRadius template
default of 10.0 was being written for every spawn, making stationary
guards drift around in-game.
This commit is contained in:
Kelsi 2026-05-06 04:46:57 -07:00
parent 2d41e560f2
commit 70366dc5f6

View file

@ -116,7 +116,9 @@ bool SQLExporter::exportCreatures(const std::vector<CreatureSpawn>& spawns,
<< wowX << ", " << wowY << ", " << wowZ << ", "
<< orientRad << ", "
<< (s.respawnTimeMs / 1000) << ", "
<< s.wanderRadius << ", "
// wander_distance only meaningful for Wander behaviour; Patrol uses
// waypoint_data and Stationary doesn't move at all.
<< (s.behavior == CreatureBehavior::Wander ? s.wanderRadius : 0.0f) << ", "
<< static_cast<int>(movementType)
<< ") ON DUPLICATE KEY UPDATE `position_x`=" << wowX << ";\n";
}