mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
[Quest API] Add EVENT_CRYSTAL_GAIN and EVENT_CRYSTAL_LOSS to Perl/Lua (#3735)
* [Quest API] Add EVENT_CRYSTAL_GAIN and EVENT_CRYSTAL_LOSS - Add `$client->AddEbonCrystals(amount)`. - Add `$client->AddRadiantCrystals(amount)`. - Add `$client->RemoveEbonCrystals(amount)`. - Add `$client->RemoveRadiantCrystals(amount)`. - Add `EVENT_CRYSTAL_GAIN`. - Add `EVENT_CRYSTAL_LOSS`. - Export `$ebon_amount`, `$radiant_amount`, and `$is_reclaim`. - Add `client:AddEbonCrystals(amount)`. - Add `client:AddRadiantCrystals(amount)`. - Add `client:RemoveEbonCrystals(amount)`. - Add `client:RemoveRadiantCrystals(amount)`. - Add `event_crystal_gain`. - Add `event_crystal_loss`. - Export `e.ebon_amount`, `e.radiant_amount`, and `e.is_reclaim`. - Allows operators to add or remove Ebon/Radiant Crystals directly. - Allows operators to track gain/loss of Ebon/Radiant Crystals. * Update perl_client.cpp * Update lua_client.cpp
This commit is contained in:
@@ -191,6 +191,9 @@ const char *QuestEventSubroutines[_LargestEventID] = {
|
||||
"EVENT_LDON_POINTS_LOSS",
|
||||
"EVENT_ALT_CURRENCY_GAIN",
|
||||
"EVENT_ALT_CURRENCY_LOSS",
|
||||
"EVENT_CRYSTAL_GAIN",
|
||||
"EVENT_CRYSTAL_LOSS",
|
||||
|
||||
// Add new events before these or Lua crashes
|
||||
"EVENT_SPELL_EFFECT_BOT",
|
||||
"EVENT_SPELL_EFFECT_BUFF_TIC_BOT"
|
||||
@@ -2281,6 +2284,15 @@ void PerlembParser::ExportEventVariables(
|
||||
break;
|
||||
}
|
||||
|
||||
case EVENT_CRYSTAL_GAIN:
|
||||
case EVENT_CRYSTAL_LOSS: {
|
||||
Seperator sep(data);
|
||||
ExportVar(package_name.c_str(), "ebon_amount", sep.arg[0]);
|
||||
ExportVar(package_name.c_str(), "radiant_amount", sep.arg[1]);
|
||||
ExportVar(package_name.c_str(), "is_reclaim", sep.arg[2]);
|
||||
break;
|
||||
}
|
||||
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user