mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +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:
@@ -189,6 +189,8 @@ const char *QuestEventSubroutines[_LargestEventID] = {
|
||||
"EVENT_LOOT_ADDED",
|
||||
"EVENT_LDON_POINTS_GAIN",
|
||||
"EVENT_LDON_POINTS_LOSS",
|
||||
"EVENT_ALT_CURRENCY_GAIN",
|
||||
"EVENT_ALT_CURRENCY_LOSS",
|
||||
// Add new events before these or Lua crashes
|
||||
"EVENT_SPELL_EFFECT_BOT",
|
||||
"EVENT_SPELL_EFFECT_BUFF_TIC_BOT"
|
||||
@@ -2270,6 +2272,15 @@ void PerlembParser::ExportEventVariables(
|
||||
break;
|
||||
}
|
||||
|
||||
case EVENT_ALT_CURRENCY_GAIN:
|
||||
case EVENT_ALT_CURRENCY_LOSS: {
|
||||
Seperator sep(data);
|
||||
ExportVar(package_name.c_str(), "currency_id", sep.arg[0]);
|
||||
ExportVar(package_name.c_str(), "amount", sep.arg[1]);
|
||||
ExportVar(package_name.c_str(), "total", sep.arg[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user