The server now dumps & stores a script's bytecode to reduce I/O hits & avoid unnecessary (re-)compilation.
Placeholdered code in preparation for script context selection from a pool.
Finished reimplementing PCH.
Tidied up some more unnecessary references and added an overload for pointers to mutexes in our Guard class to help readability.
More compile-time optimisation tweaks.
Tweaked GetServerResource() to prefer a pointer (a ref produces undefined behaviour), and _string_format() to match. This fixes the notice bug.
Whoops, this unnecessary call shouldn't have made its way into the server my isolated test.
Implemented range & type checks on repair, inn, merchant/shop, quest NPCs. Also added range checks on loot & objects.
Implemented appropriate checks to prevent the storing/trading/selling of items that explicitly prevent it (by race or item ID).
Inn slot IDs are now checked (not sure if we need to take into account additional inventory slots, we'll see). Added checks for input in previous commit.
Added the flag for items not tradeable for the first 48 hours. We won't be able to use it until we can store the expiration time, though.
Implemented zone checks to GetDistance() calls with Unit targets & fixed up the dodgy declarations (oops).
When changing to another zone, it will: reset any active dialogs (trading, merchanting, etc) & send the zone ability packet so the client knows how to handle NPC/players. Also, skills will be recast (untested, however).
Fixed a bug with the recasting of saved buffs/transformations.
Overall logic here needs fixing, but this fixes #48 (mob not caring how far they chase you).
This should hopefully keep tracing consistent (it seems to alternate between attacking and tracing which screws things up a bit). I'm looking forward to the day this system's been entirely rewritten.
Implemented a mockup of CUser::QuestV2SearchEligibleQuest() (SearchQuest()) from what I could make of the method (it's not pretty, and it definitely doesn't look right).
Added a preprocessor setting to disable script caching (for testing/development purposes *only*).
NPC IDs (and quest helper ID, if that's even what it is; I don't think it is) are now optional args.
Replaced the Lua-exposed SaveEvent() with a call to QuestV2SaveEvent().