Commit Graph

121 Commits

Author SHA1 Message Date
Axel Cocat
b23b33713a feat: add chat handler methods 2022-02-09 23:11:38 +01:00
Nefertumm
1b8168545f Fix(Hooks): Update OnReputationChange method 2022-02-01 18:02:17 -03:00
55Honey
bbd8f12e57 Merge pull request #2 from r-o-b-o-t-o/feat/http-requests
feat: add HttpRequest method
2021-10-20 21:11:21 +02:00
Yehonal
a3f12188b8 New player event: PLAYER_EVENT_ON_PET_ADDED_TO_WORLD (#3)
Co-authored-by: UltraNix <ultranix@gmail.com>
2021-10-08 08:56:19 +02:00
Axel Cocat
84f201b6b0 feat: add HttpRequest method 2021-08-06 16:55:05 +02:00
Winfidonarleyan
dc300fe5cd chore(Misc): make AzerothCore new api support 2021-05-06 01:51:07 +07: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
570a45b703 Remove return value from OnDummyEffect to fix bug in spell procs - thanks to Vincent 2020-02-03 00:10:08 +02:00
Rochet2
8697e932ae Fix mangos two build 2018-10-18 20:42:44 +03: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
00ba8e518c Fix inefficient InvalidateObjects 2018-04-25 21:54:18 +03:00
Rochet2
3fe34b205f Fix TC build 2018-03-10 05:31:41 +02:00
Rochet2
d9415332bb Remove unused dialog status from hook 2018-01-03 16:06:25 +02:00
Rochet2
8b3cbd1c7d Add game event start/stop hooks https://github.com/ElunaLuaEngine/Eluna/issues/143 2017-07-19 18:41:39 +03:00
Rochet2
73fdcfe83f Remove AttackedBy hook. Use CREATURE_EVENT_ON_DAMAGE_TAKEN instead - for more read 1660bb7d27 (TC removed it) 2017-06-17 00:32:15 +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
214b5e28af Fix includes 2016-12-27 19:31:10 +02:00
Rochet2
b6270285f8 Fix cmangos tbc compile 2016-12-09 23:57:40 +02:00
Rochet2
af151e5c08 Try fix ace errors on cmangos linux 2016-11-27 21:19:20 +02:00
Rochet2
67ea403f10 Fix cmangos (classic) build 2016-11-27 20:53:42 +02:00
Rochet2
c42b8c09b6 TC cmake changes and dynamic linking support 2016-04-01 18:43:04 +03:00
Rochet2
4cd17fd9d9 packet send hook can no longer return new packet 2016-03-14 21:42:12 +02:00
Rochet2
2fce645b7e new year 2016-01-05 20:19:47 +02:00
Rochet2
e41fed0c0d Add missing header for recursive ace mutex 2015-11-05 20:24:53 +02:00
Tommy
9d9e72e598 Updated method documentation and cleaned up
Method documentation should be completed. Only thing left now is polishing up (fixing typos, update wording, add enumerator data to method documentation that doesn't have it, etc)..

Cleaned whitespaces

Corrected/Fixed up some comments

Removed all known documented method comments in LuaFunctions.cpp. Commented out methods are now marked as undocumented until they are uncommented & documented in their respective header files.

Removed 'Getter, Setter, Boolean, Other' comments in method files

Documented VehicleMethods, the rest of PlayerMethods, UnitMethods, CreatureMethods and GuildMethods.

Refer to #101 for more information
2015-09-16 04:14:32 -04:00
Rochet2
83e001b2ac Remove functions not to be used or cant be used and fix TC build 2015-08-26 17:05:34 +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
Patman64
7397c98a61 Merge new_bindings, closes #151
Refer to 6194ddb43c for new C++11 required changes for mangos based cores
2015-06-01 20:37:32 +03:00
Patman64
3490d21bcd Make the register functions optionally return a cancel callback.
It's now possible to have complete flexibility with cancelling bindings,
i.e. it's possible to re-implement all of the other ways to cancel bindings
using the callback.

This sytem has been designed with complete safety in mind:
 - It is safe to call the callback more than once (does nothing after the
   first call).
 - The callback does not expire, and can be stored for as long as
   necessary.
 - If a callback is returned, there is no other way to cancel the binding
   (again, due to safety).
2015-05-01 20:29:48 -04:00
Rochet2
871a3ec42d Fix performance warning 2015-03-15 01:37:17 +02:00
Rochet2
a2955a3081 Fix shutdown crash 2015-03-12 18:54:06 +02:00
Rochet2
6a731d24ea Change AH hooks to work with TC 2015-02-15 02:09:15 +02:00
Salja
540c351460 add bid to AUCTION_EVENT_ON_ADD
Signed-off-by: Salja <salja8840@gmail.com>
2015-01-25 23:44:26 +01: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
734f720aca add player and item to auctionshouse hooks, not sure is better move back to player events ?
Signed-off-by: Salja <salja8840@gmail.com>
2015-01-25 22:47:16 +01:00
Rochet2
22e2195d00 Fix build 2015-01-20 18:36:35 +02: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
3d645d8048 Add StackTracePlus, Rewrite not to recreate eluna on reload 2015-01-20 17:05:41 +02:00
Patman64
9575a970f3 Move hooks to separate files. 2015-01-19 00:32:52 -05:00
Patman64
5492a68e7b Add GAMEOBJECT_EVENT_ON_USE. 2015-01-15 00:09:47 -05: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
5e7b0ee0f7 Fix TC build, analysis warnings and triggering addon message hooks 2015-01-06 12:43:53 +02:00
Patman64
15f161fa1e Clean-up Eluna lock macro. 2015-01-05 22:52:46 -05:00
Patman64
e2f81b7336 Make the Eluna mutex static.
It was previously unsafe to reload Eluna because it had to be reloaded
with the mutex unlocked. This is because the mutex's lifespan was shorter
than the Eluna instance it was guarding.
2015-01-05 22:50:51 -05:00
Patman64
1194074fb2 Simplify ReplaceArgument. 2015-01-05 21:20:14 -05:00
Rochet2
0e7367e23d Fix hookmgr rewrite
Fix:
 - crash on reload
 - crash on error in call
 - a warning from type change
2015-01-05 16:38:19 +02:00
Patman64
4349a80d8e Allow updating argument values between handler calls.
This allows handlers that return values to see the returned values of previous
handlers. E.g. if Handler A modifies the value from 10 to 20, Handler B
will receive 20 as an argument instead of the original 10.
2015-01-04 21:38:18 -05:00