mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-18 04:08:27 +00:00
[Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS to Perl/Lua (#3734)
* [Quest API] Add EVENT_ALT_CURRENCY_GAIN and EVENT_ALT_CURRENCY_LOSS - Add `EVENT_ALT_CURRENCY_GAIN`. - Add `EVENT_ALT_CURRENCY_LOSS`. - Export `$currency_id`, `$amount`, and `$total. - Add `event_alt_currency_gain`. - Add `event_alt_currency_loss`. - Export `e.currency_id`, `e.amount`, and `e.total. - Convert `int8 method` to `bool is_scripted` in `Client::AddAlternateCurrencyValue`. - Properly utilize `is_scripted` parameter in `perl_client.cpp`. - Allows operators to perform events on alternate currency gains/losses. * Update lua_general.cpp * Cleanup types. * Update lua_client.cpp
This commit is contained in:
@@ -1518,6 +1518,26 @@ void handle_player_ldon_points_gain_loss(
|
||||
lua_setfield(L, -2, "points");
|
||||
}
|
||||
|
||||
void handle_player_alt_currency_gain_loss(
|
||||
QuestInterface *parse,
|
||||
lua_State* L,
|
||||
Client* client,
|
||||
std::string data,
|
||||
uint32 extra_data,
|
||||
std::vector<std::any> *extra_pointers
|
||||
) {
|
||||
Seperator sep(data.c_str());
|
||||
|
||||
lua_pushnumber(L, Strings::ToUnsignedInt(sep.arg[0]));
|
||||
lua_setfield(L, -2, "currency_id");
|
||||
|
||||
lua_pushnumber(L, Strings::ToInt(sep.arg[1]));
|
||||
lua_setfield(L, -2, "amount");
|
||||
|
||||
lua_pushnumber(L, Strings::ToUnsignedInt(sep.arg[2]));
|
||||
lua_setfield(L, -2, "total");
|
||||
}
|
||||
|
||||
// Item
|
||||
void handle_item_click(
|
||||
QuestInterface *parse,
|
||||
|
||||
Reference in New Issue
Block a user