mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 03:31:08 +00:00
[Quest API] Add Timer Events to Perl/Lua (#4099)
* [Quest API] Add Timer Events to Perl/Lua # DRAFT * Cleanup
This commit is contained in:
+15
-1
@@ -193,6 +193,10 @@ const char* QuestEventSubroutines[_LargestEventID] = {
|
||||
"EVENT_ALT_CURRENCY_LOSS",
|
||||
"EVENT_CRYSTAL_GAIN",
|
||||
"EVENT_CRYSTAL_LOSS",
|
||||
"EVENT_TIMER_PAUSE",
|
||||
"EVENT_TIMER_RESUME",
|
||||
"EVENT_TIMER_START",
|
||||
"EVENT_TIMER_STOP",
|
||||
|
||||
// Add new events before these or Lua crashes
|
||||
"EVENT_SPELL_EFFECT_BOT",
|
||||
@@ -1668,11 +1672,21 @@ void PerlembParser::ExportEventVariables(
|
||||
break;
|
||||
}
|
||||
|
||||
case EVENT_TIMER: {
|
||||
case EVENT_TIMER:
|
||||
case EVENT_TIMER_STOP: {
|
||||
ExportVar(package_name.c_str(), "timer", data);
|
||||
break;
|
||||
}
|
||||
|
||||
case EVENT_TIMER_PAUSE:
|
||||
case EVENT_TIMER_RESUME:
|
||||
case EVENT_TIMER_START: {
|
||||
Seperator sep(data);
|
||||
ExportVar(package_name.c_str(), "timer", sep.arg[0]);
|
||||
ExportVar(package_name.c_str(), "duration", sep.arg[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
case EVENT_SIGNAL: {
|
||||
ExportVar(package_name.c_str(), "signal", data);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user