Patman64 31470c2cf7 Allow scripting of instances w/ persistent data
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
2015-08-01 00:35:41 +03:00
2015-07-08 11:09:20 +03:00
2015-07-08 11:09:20 +03:00
2015-07-08 11:09:20 +03:00
2015-07-08 11:09:20 +03:00
2015-03-12 18:54:06 +02:00
2015-07-08 11:09:20 +03:00
2015-01-01 13:59:33 -05:00
2015-07-08 11:09:20 +03:00
2015-06-01 20:37:32 +03:00
2015-07-08 11:09:20 +03:00
2015-06-01 20:37:32 +03:00
2015-07-08 11:09:20 +03:00
2015-06-01 20:37:32 +03:00
2015-06-01 20:37:32 +03:00
2015-07-08 11:09:20 +03:00
2015-07-08 11:09:20 +03:00
2015-07-15 18:23:31 +03:00
2015-07-08 11:09:20 +03:00
2015-07-08 11:09:20 +03:00
2015-07-08 11:09:20 +03:00
2015-07-08 11:09:20 +03:00

###Eluna

##About

Eluna Lua Engine © is a lua engine embedded to World of Warcraft emulators. Eluna supports MaNGOS, CMaNGOS and TrinityCore. We are currently working hard to make Eluna better from inside and outside.
Follow us on EmuDevs Twitter page to view the latest news about EmuDevs and about what is going on with Eluna Lua Engine ©.

If you are having trouble with installation or scripts, post in Eluna Support Forum
For documentation and reference see Eluna API and Lua reference manual.

Special thanks to MaNGOS for their continued support and use of Eluna. Please head over to their forums and show them some love!

##Documentation

##Source Eluna source code: Source
Core forks with required modifications for Eluna:

Build Status Official MaNGOS Zero with Eluna

Build Status Eluna TrinityCore WotLK
Build Status Eluna TrinityCore Cataclysm

Build Status Eluna cMaNGOS Classic
Build Status Eluna cMaNGOS TBC
Build Status Eluna cMaNGOS WotLK

##Links

##Team

Description
No description provided
Readme GPL-3.0 6.2 MiB
Languages
C++ 93.3%
JavaScript 2.1%
Python 1.4%
CSS 1.3%
CMake 0.9%
Other 1%