Commit Graph

11 Commits

Author SHA1 Message Date
ayase
9b5499db9c AZEROTHCORE compatibility (#271)
* Done Compatible AZEROTHCORE.

* Fix TC build

* Try fix whitespace (trailing and tabs2spaces)

* Remove undefs and TC_LOG defines

* Revert indentation change

* Indentation and style change

* Add more possible SQL types to query

* change bg hooks OnBGEnd parameter type.
2018-06-06 18:42:46 +03:00
Rochet2
08b22dd5bb Fix uint32_t errors (VS 2013)
Thanks to Foereaper for testing.
2016-02-08 22:27:00 +02:00
Rochet2
2fce645b7e new year 2016-01-05 20:19:47 +02:00
Rochet2
7ec215b2d7 Enable GameObject faction check for worldobject searchers and fix a typo 2015-09-21 21:47:21 +03:00
Rochet2
f51217b0c4 Fix https://github.com/ElunaLuaEngine/Eluna/issues/164 and close https://github.com/ElunaLuaEngine/Eluna/issues/163 2015-08-19 23:17:00 +03:00
Rochet2
1bc22faa7f Add some bug and warning fixes as well as some enchantment from mthread branch 2015-08-08 15:37:22 +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
Tommy
803a835668 Happy New Year 2015 2015-01-01 13:59:33 -05:00
Rochet2
07d25f5031 Eluna Fix static analysis noted warnings and errors 2014-12-23 23:21:13 +02:00
Rochet2
4784c2052a Eluna: Correct whitespace 2014-09-20 22:07:24 +03:00
Rochet2
94528114c9 Eluna fix typo in filename thanks Antz :3 2014-07-17 16:41:48 +03:00