mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 16:51:29 +00:00
Fix for extra_pointers in Encounter methods
This commit is contained in:
parent
2c6fd44811
commit
6ff06ded43
@ -216,6 +216,8 @@ LuaParser::LuaParser() {
|
||||
SpellArgumentDispatch[EVENT_SPELL_EFFECT_TRANSLOCATE_COMPLETE] = handle_translocate_finish;
|
||||
|
||||
EncounterArgumentDispatch[EVENT_TIMER] = handle_encounter_timer;
|
||||
EncounterArgumentDispatch[EVENT_ENCOUNTER_LOAD] = handle_encounter_load;
|
||||
EncounterArgumentDispatch[EVENT_ENCOUNTER_UNLOAD] = handle_encounter_unload;
|
||||
|
||||
L = nullptr;
|
||||
}
|
||||
|
||||
@ -710,8 +710,26 @@ void handle_encounter_timer(QuestInterface *parse, lua_State* L, std::string dat
|
||||
lua_setfield(L, -2, "timer");
|
||||
}
|
||||
|
||||
void handle_encounter_load(QuestInterface *parse, lua_State* L, std::string data, uint32 extra_data,
|
||||
std::vector<EQEmu::Any> *extra_pointers) {
|
||||
if (extra_pointers) {
|
||||
std::string *str = EQEmu::any_cast<std::string*>(extra_pointers->at(0));
|
||||
lua_pushstring(L, str->c_str());
|
||||
lua_setfield(L, -2, "data");
|
||||
}
|
||||
}
|
||||
|
||||
void handle_encounter_unload(QuestInterface *parse, lua_State* L, std::string data, uint32 extra_data,
|
||||
std::vector<EQEmu::Any> *extra_pointers) {
|
||||
if (extra_pointers) {
|
||||
std::string *str = EQEmu::any_cast<std::string*>(extra_pointers->at(0));
|
||||
lua_pushstring(L, str->c_str());
|
||||
lua_setfield(L, -2, "data");
|
||||
}
|
||||
}
|
||||
|
||||
void handle_encounter_null(QuestInterface *parse, lua_State* L, std::string data, uint32 extra_data,
|
||||
std::vector<EQEmu::Any> *extra_pointers) {
|
||||
std::vector<EQEmu::Any> *extra_pointers) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -132,6 +132,10 @@ void handle_spell_null(QuestInterface *parse, lua_State* L, NPC* npc, Client* cl
|
||||
//Encounter
|
||||
void handle_encounter_timer(QuestInterface *parse, lua_State* L, std::string data, uint32 extra_data,
|
||||
std::vector<EQEmu::Any> *extra_pointers);
|
||||
void handle_encounter_load(QuestInterface *parse, lua_State* L, std::string data, uint32 extra_data,
|
||||
std::vector<EQEmu::Any> *extra_pointers);
|
||||
void handle_encounter_unload(QuestInterface *parse, lua_State* L, std::string data, uint32 extra_data,
|
||||
std::vector<EQEmu::Any> *extra_pointers);
|
||||
void handle_encounter_null(QuestInterface *parse, lua_State* L, std::string data, uint32 extra_data,
|
||||
std::vector<EQEmu::Any> *extra_pointers);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user