This fix only impacts those that use the model field in npc_types to override race on the client.
GetModel() returns model if set, otherwise race.
As a refresher, the model field is there so the server can still see a mob as its base race for things like bane, while the client can use a new model.
FixZ needs to know about this.
Changed the wandertype IDs to an enum so we know what we're looking at.
Added new pathgrid type 8 (GridRandomCenterPoint). (SQL required) This new type causes a NPC to alternate between a random waypoint in grid_entries and a random waypoint marked with the new centerpoint column set to true. If no waypoints are marked as a centerpoint, this wandertype will not work. There is no numbering requirement or limit for centerpoints. You can have as many as you need.
New spawngroup field: wp_spawns (SQL required). Added a new spawngroup field, which is a boolean that if true changes the behavior of spawngroups this way: If the spawnpoint in the spawngroup has a grid, the NPC will spawn at a random waypoint location taken from its grid instead of the spawnpoint location.
New randompath behavior: The randompath grid type will now use the closest waypoint as its current waypoint on spawning. This allows multiple spawn locations to use the same grid without having the undesirable behavior of walking to the first waypoint through walls and ignoring waypoint nodes. NPC::GetClosestWaypoint() was renamed to NPC::GetClosestWaypoints() as it was filling a list of multiple waypoints. a new method NPC::GetClosestWaypoint() returns a single waypoint in the form of an integer.
This will take a distance you would like to move and an EQ angle you
would like to move relative to current heading (so 0 is in front, 256
behind)
Exported to Lua as well
So we've been doing heading wrong all these years. You will need to run
a script to fix your quests and required SQL to fix DB.
This fixes a ton of random issues with headings and as gives us a better
resolution on headings :P