Update PerformIngameSpawn() when spawning a gobject with the save boolean set on true, so the gobject will spawn ingame just like in the cs_gobject.cpp file, instead of not spawning at all.
Some fixes for TC and changes overall
Pass map object to hook via function arguments
The map object is no longer stored inside the instance data table.
Fix mistake in base64 decoder
It was failing whenever it encountered a '=' character, which is
completely valid.
Make ElunaInstanceAI::Load always load something
When it failed to load data, it was leaving nothing on the stack. Since
subsequent code expected Load to always load something, this was causing
issues.
Now, when Load fails to load anything, it just leaves a new empty table on
the stack.
Also: the error messages for Load have been improved.
Modify lua-marshal to allow saving of functions/userdata.
Some additional code was needed to save functions due to the inclusion of
a reference to _ENV within their upvalues (since Lua 5.2).
During encoding, a placeholder is left where the _ENV reference would be.
During decoding, a reference to the current _G is swapped with the
placeholder.
Make ElunaInstanceAI::Load re-initialize if data failed to load.
Also improve error messages by not including the raw data.
Improve storage format of upvalues
Instead of storing the upvalues by name, store by index. A wrapper is
still used in case the upvalue is nil, to prevent holes in the upvalues table.
A special field in the upvalues table, "E", is used to store the index of
the _ENV reference (if there was one). A reference to the current globals
table is set as the upvalue upon decoding.
Remove wrapping from upvalue storing, instead save amount of upvalues
It's now possible to have complete flexibility with cancelling bindings,
i.e. it's possible to re-implement all of the other ways to cancel bindings
using the callback.
This sytem has been designed with complete safety in mind:
- It is safe to call the callback more than once (does nothing after the
first call).
- The callback does not expire, and can be stored for as long as
necessary.
- If a callback is returned, there is no other way to cancel the binding
(again, due to safety).
Because GUIDs are, in fact, not globally unique on mangos, the actual
unique identifier is the GUID/instance ID pair of the Creature.
On Trinity Creatures in instances are assigned new GUIDs. This means that
the instance ID part is redundant but must be used anyway for consistency.
* Attempt fix VS 2010 pow error
* Tweak the doc parser a little to work with variable arugments ... and show
enum names and similar.
* Change push and check to work with more types like size and time (fix osx)
* Add errors to using not implemented operations on eluna objects
* Change some SQL comments to work with documentation better
* Add functions to create uint64 and int64 values (may need rename)
* Change doc generation documentation a little to make it clearer how proto is used
* Attempt fix VS 2010 pow error
* Tweak the doc parser a little to work with variable arugments ... and show
enum names and similar.
* Change push and check to work with more types like size and time (fix osx)
* Add errors to using not implemented operations on eluna objects
* Change some SQL comments to work with documentation better
* Add functions to create uint64 and int64 values (may need rename)
* Change doc generation documentation a little to make it clearer how proto is used