Commit Graph

34 Commits

Author SHA1 Message Date
Axel Cocat
d533224895 add RunCommand() 2021-06-21 15:59:44 +02:00
UltraNix
c4383324fb Implemented ObjectGuid support for AzerothCore. 2021-04-21 19:55:37 +02:00
Rochet2
31f4cfd98c Fix TC build 2020-06-29 13:58:03 +03:00
Rochet2
897d5e9159 Fix TC build 2019-07-17 20:49:08 +03:00
Stoabrogga
6f28bd9c64 fix some compiler warnings about unused variables 2019-04-03 09:17:24 +00:00
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
963352e4f5 Move GetPlayers from global method to map method.
For backwards compatibility for GetPlayersInMap(mapid, instid) use GetMapById(mapid, instid):GetPlayers()
2017-07-19 19:41:49 +03:00
Rochet2
00eef91aa2 Fix clang warnings about variable usage 2017-04-13 00:51:17 +03:00
Rochet2
b7c379a42c Change Eluna to a global variable
Remove Eluna* from being passed. You can now get it through Eluna::GetEluna(L)
Change function call cleanup to lua_settop instead of manual loop
Explicitly delete the copy constructor and copy assignment operators
2017-03-19 15:48:48 +02:00
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