Core/Waypoints: Refactor to split data into path and node related info in db
Port From (https://github.com/TrinityCore/TrinityCore/commit/12186ef8573f60abeff4747da58767ee71092600)
This commit is contained in:
@@ -2081,8 +2081,8 @@ namespace Game
|
||||
public void LoadCreatureTemplateAddons()
|
||||
{
|
||||
var time = Time.GetMSTime();
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
||||
SQLResult result = DB.World.Query("SELECT entry, path_id, mount, StandState, AnimTier, VisFlags, SheathState, PvPFlags, emote, aiAnimKit, movementAnimKit, meleeAnimKit, visibilityDistanceType, auras FROM creature_template_addon");
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
||||
SQLResult result = DB.World.Query("SELECT entry, PathId, mount, StandState, AnimTier, VisFlags, SheathState, PvPFlags, emote, aiAnimKit, movementAnimKit, meleeAnimKit, visibilityDistanceType, auras FROM creature_template_addon");
|
||||
|
||||
if (result.IsEmpty())
|
||||
{
|
||||
@@ -2101,7 +2101,7 @@ namespace Game
|
||||
}
|
||||
|
||||
CreatureAddon creatureAddon = new();
|
||||
creatureAddon.path_id = result.Read<uint>(1);
|
||||
creatureAddon.PathId = result.Read<uint>(1);
|
||||
creatureAddon.mount = result.Read<uint>(2);
|
||||
creatureAddon.standState = result.Read<byte>(3);
|
||||
creatureAddon.animTier = result.Read<byte>(4);
|
||||
@@ -2214,8 +2214,8 @@ namespace Game
|
||||
public void LoadCreatureAddons()
|
||||
{
|
||||
var time = Time.GetMSTime();
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
||||
SQLResult result = DB.World.Query("SELECT guid, path_id, mount, StandState, AnimTier, VisFlags, SheathState, PvPFlags, emote, aiAnimKit, movementAnimKit, meleeAnimKit, visibilityDistanceType, auras FROM creature_addon");
|
||||
// 0 1 2 3 4 5 6 7 8 9 10 11 12 13
|
||||
SQLResult result = DB.World.Query("SELECT guid, PathId, mount, StandState, AnimTier, VisFlags, SheathState, PvPFlags, emote, aiAnimKit, movementAnimKit, meleeAnimKit, visibilityDistanceType, auras FROM creature_addon");
|
||||
|
||||
if (result.IsEmpty())
|
||||
{
|
||||
@@ -2236,8 +2236,8 @@ namespace Game
|
||||
|
||||
CreatureAddon creatureAddon = new();
|
||||
|
||||
creatureAddon.path_id = result.Read<uint>(1);
|
||||
if (creData.movementType == (byte)MovementGeneratorType.Waypoint && creatureAddon.path_id == 0)
|
||||
creatureAddon.PathId = result.Read<uint>(1);
|
||||
if (creData.movementType == (byte)MovementGeneratorType.Waypoint && creatureAddon.PathId == 0)
|
||||
{
|
||||
creData.movementType = (byte)MovementGeneratorType.Idle;
|
||||
Log.outError(LogFilter.Sql, $"Creature (GUID {guid}) has movement type set to WAYPOINTMOTIONTYPE but no path assigned");
|
||||
|
||||
Reference in New Issue
Block a user