Commit Graph

93 Commits

Author SHA1 Message Date
Rochet2 b9bc5343b4 Enable null as CastSpell target and Add IsCasting
Closes https://github.com/ElunaLuaEngine/Eluna/issues/160
2015-08-10 01:11:01 +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
Rochet2 f62c655d40 Add forgotten changes from https://github.com/ElunaLuaEngine/Eluna/commit/a49f6f03ac3c3ee3579d73f83a4c3001cb1fc9a4 2015-07-30 20:30:51 +03:00
Rochet2 02c7a06410 Add GetDBTableGuid method 2015-07-05 10:03:05 +03:00
Rochet2 85cd8e1900 Rework group methods, fix warnings and fix typos 2015-06-22 01:40:14 +03:00
Rochet2 3aa6d0544b Fix TC compile 2015-06-04 12:30:43 +03:00
Rochet2 564cf2b15b Add quest add and remove commands and make questcomplete try satisfy the requirements and act like quest complete command. Merge SetLevel and GiveLevel for player methods. 2015-05-02 02:07:50 +03:00
Rochet2 adccf1ef36 Update LuaFunctions.cpp 2015-04-30 11:48:31 +03:00
RStijn e8b9ae9d4f Added support for GameObject::GetLootRecipient() 2015-04-07 11:06:20 +03:00
Rochet2 2d672d8828 Add methods to get exact coordinate distances 2015-03-06 17:18:38 +02:00
Asandru 5f6417663e New player method unbind all instances 2015-02-15 14:12:35 +02:00
Rochet2 166dacee83 Revert 340fe17f4f partially
The UpdateUInt32Value method is not identical to Set and Set screws up gossip on TC based
2015-02-15 13:52:15 +02:00
Salja 81b049cdcd use auctionHouseEntry for all auctions hooks add buyout, etime to AUCTION_EVENT_ON_ADD
Signed-off-by: Salja <salja8840@gmail.com>
2015-01-25 23:22:45 +01:00
Salja ed0d7dd415 eluna OnLearnTalents hook and player:LearnTalent function
Signed-off-by: Salja <salja8840@gmail.com>
2015-01-20 17:17:02 +02:00
Rochet2 54c82280cd Merge pull request #139 from ElunaLuaEngine/weather_changes
Remove Weather functions and type, add Map:SetWeather
2015-01-12 19:25:23 +02:00
Patman64 dd39592ddd Allow binding event handlers to individual Creatures.
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.
2015-01-11 18:48:38 -05:00
Rochet2 d42cb350fe Remove Weather functions and type, add Map:SetWeather
Weather hook changes
2015-01-11 20:17:09 +02:00
Rochet2 882eb40acb Add method GetItemByGUID 2015-01-09 23:13:31 +02: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
Foereaper 36e8704853 Merge branch 'master' of https://github.com/elunaluaengine/eluna 2014-12-23 15:06:45 +01:00
Foereaper 6a407404ec Reimplement a few methods 2014-12-23 15:06:24 +01:00
Patman64 9c63124205 Merge branch 'clear_events' 2014-12-23 00:41:08 -05:00
Patman64 340fe17f4f Add Object method documentation and drop Object:UpdateUInt32.
UpdateUInt32 appears to be a deprecated method and isn't used anywhere
else in CMaNGOS. SetUInt32 should be used instead.
2014-12-22 00:30:22 -05:00
Patman64 bce49b99e2 Add documentation of ElunaQuery and drop GetCString method.
From the Lua user's perspective there was no difference between GetString
and GetCString, so GetCString was dropped to reduce redundancy.
2014-12-21 22:06:45 -05:00
Patman64 f15373ea43 Allow event handlers to be cleared. 2014-12-21 01:58:22 -05:00
Salja a79d456872 Merge branch 'master' into dev 2014-12-21 07:00:03 +01:00
Foereaper 20eeccf815 Added requested movement method
Todo: Implement TC equivalent

Part of #80
2014-12-21 06:08:46 +01:00
Rochet2 dcd0a0e89c Fix linux build and warnings 2014-12-20 18:24:54 +02:00
Rochet2 631e220b31 Eluna changes
* 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
2014-12-20 18:24:53 +02:00
Rochet2 5e27ac24aa Fix linux build and warnings 2014-12-19 15:16:02 +02:00
Rochet2 2c694bb4d4 Eluna changes
* 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
2014-12-19 13:02:44 +02:00
Rochet2 53ef010c3d Fix shady comment 2014-12-18 19:22:14 +02:00
Rochet2 cb7f9d5145 Eluna add int64 datatype, rename functions for osx, enhance object checking code 2014-12-15 23:29:49 +02:00
Rochet2 525e108b83 Implement log print functions 2014-12-15 23:25:08 +02:00
Rochet2 e683f48fbb Expose time diff functions 2014-12-15 23:25:08 +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 a7f4954fbe Eluna implement functions from #121, implement hidden file ignoring closes #122, enhance documentation in places, change requiring some now only allowing unique filenames 2014-11-22 17:16:41 +02:00
Rochet2 4784c2052a Eluna: Correct whitespace 2014-09-20 22:07:24 +03:00
Rochet2 5b337c7f2b Eluna remove WorldObject::GetWorldObjct, use Map::GetWorldObject 2014-09-20 18:04:34 +03:00
emudevs ea6f6bcff2 Global methods documentation
All methods should be documented, but some still need to be updated with appropriate explanation

Updated LuaFunctions.cpp and removed the comments from documented methods. Hooks comments can stay if need be
2014-09-19 00:11:20 -04:00
emudevs 7c0d2cb523 Eluna merged with TC
Certain chat methods had parameter changes. Most of these changes will be updated soon to lift the conflict between versions.
2014-09-15 00:22:03 -04:00
Rochet2 d9ff37d78d Eluna: Add cod and money to sendmail, add missing spawn types for mangos and tc for SpawnCreature 2014-09-14 00:32:25 +03:00
Rochet2 42ffd8aff8 Eluna: Implement utility GetRow() 2014-09-13 21:39:48 +03:00
Rochet2 61551494e8 Merge branch 'master' of https://github.com/ElunaLuaEngine/Eluna into luaevents 2014-09-13 16:05:30 +03:00
Rochet2 06be9650bb Eluna fix crash in timed events and prepare some for future changes. Ditched EventProcessor 2014-09-13 16:05:16 +03:00
Foereaper 0bfdf632e7 Added base BG methods and hooks
This has only been tested on Mangos Zero and will definitely need tweaking on Trinity

More methods will be added SHORTLY
2014-09-10 22:38:21 +02:00
Rochet2 b6663ba2d1 Eluna fix previous commit (tested TC wotlk) 2014-08-23 15:41:19 +03:00
Patman64 6a44dab525 Add Creature documentation. 2014-08-20 22:32:46 -04:00