Commit Graph

25 Commits

Author SHA1 Message Date
Rochet2
2fce645b7e new year 2016-01-05 20:19:47 +02:00
Rochet2
28161fa2fc Remove corpse methods (report if needing them) and made changes to objectaccessor required by TC
See 402a3c45ff for more
2015-09-30 22:01:36 +03:00
Rochet2
8daaf04994 Fix TC build 2015-09-24 11:48:07 +03:00
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
Rochet2
8fdd75cf4e Add inheritance comments 2015-07-08 11:09:20 +03:00
Foereaper
71dad93199 Mangos weather structure updated 2015-03-25 00:27:20 +01:00
Rochet2
424ffdc0d7 apply cmangos changes 2015-03-16 19:25:55 +02:00
Rochet2
849651d4c0 Change player access from sessions to players 2015-02-15 02:44:23 +02:00
Rochet2
d42cb350fe Remove Weather functions and type, add Map:SetWeather
Weather hook changes
2015-01-11 20:17:09 +02:00
Tommy
803a835668 Happy New Year 2015 2015-01-01 13:59:33 -05:00
Patman64
3a83b8073b Improve Map method documentation. 2014-12-22 00:57:47 -05:00
Patman64
967a8045eb Fix calling Eluna functions from coroutines.
Fixes #126.
2014-12-15 00:33:46 -05:00
Rochet2
7f496959f5 Eluna fix (c)mangos build for mthread changes 2014-12-01 19:56:44 +02:00
Rochet2
6268216a64 Eluna implement changes from new_mthread to master ~ Does not add multithread support 2014-11-30 01:37:45 +02:00
Rochet2
4784c2052a Eluna: Correct whitespace 2014-09-20 22:07:24 +03:00
Rochet2
16185423ab Eluna: fix compatibility with new guid changes, fix bg methods for cata 2014-09-20 17:27:42 +03:00
Rochet2
ce2637e322 Eluna Implement [] to parser, change all & to [] in documentation and fix a bug with CastCustomSpell 2014-08-13 17:02:21 +03:00
Rochet2
247e07fce4 Correct and add documentation 2014-08-12 20:43:42 +03:00
Foereaper
e568c8f192 Documented most Map methods 2014-08-11 23:25:27 +02:00
Rochet2
1f75dc7843 Eluna change definition checks from mangos to tc 2014-06-29 21:29:03 +02:00
Rochet2
37a0161f29 Eluna add GetWorldObject by guid to map methods. Closes #64 requires use of guid 2014-06-29 21:28:55 +02:00
Rochet2
b1f85bfc21 Eluna
Improved pushing so that a single userdata is used per object pushed.
Made everything use the singleton less, allowing more free code and easier to implement multithreading later.
Made macros for hookmgr and fixed the issue with hooks called inside hooks.
2014-06-29 21:28:49 +02:00
Rochet2
94063c1b7d Eluna Removed mutex lock and forced only one map update thread to be used. Made returning more arguments than pushed to return the return amount of nils instead. Removed a few hooks 2014-06-29 21:28:47 +02:00
Rochet2
fee6f42e2d Eluna classic support 2014-06-29 21:28:26 +02:00
Foereaper
a04de5b194 Truncating history 2014-06-29 21:27:59 +02:00