mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
[Quest API] Add EVENT_TASKACCEPTED to Player scope (#2822)
* Add EVENT_TASKACCEPTED to player scope * Formatting
This commit is contained in:
parent
c1584da9cc
commit
8031bf0bcb
@ -242,6 +242,7 @@ LuaParser::LuaParser() {
|
|||||||
PlayerArgumentDispatch[EVENT_DUEL_LOSE] = handle_player_duel_loss;
|
PlayerArgumentDispatch[EVENT_DUEL_LOSE] = handle_player_duel_loss;
|
||||||
PlayerArgumentDispatch[EVENT_LOOT] = handle_player_loot;
|
PlayerArgumentDispatch[EVENT_LOOT] = handle_player_loot;
|
||||||
PlayerArgumentDispatch[EVENT_TASK_STAGE_COMPLETE] = handle_player_task_stage_complete;
|
PlayerArgumentDispatch[EVENT_TASK_STAGE_COMPLETE] = handle_player_task_stage_complete;
|
||||||
|
PlayerArgumentDispatch[EVENT_TASK_ACCEPTED] = handle_player_task_accepted;
|
||||||
PlayerArgumentDispatch[EVENT_TASK_COMPLETE] = handle_player_task_update;
|
PlayerArgumentDispatch[EVENT_TASK_COMPLETE] = handle_player_task_update;
|
||||||
PlayerArgumentDispatch[EVENT_TASK_UPDATE] = handle_player_task_update;
|
PlayerArgumentDispatch[EVENT_TASK_UPDATE] = handle_player_task_update;
|
||||||
PlayerArgumentDispatch[EVENT_TASK_BEFORE_UPDATE] = handle_player_task_update;
|
PlayerArgumentDispatch[EVENT_TASK_BEFORE_UPDATE] = handle_player_task_update;
|
||||||
|
|||||||
@ -836,6 +836,18 @@ void handle_player_task_stage_complete(
|
|||||||
lua_setfield(L, -2, "activity_id");
|
lua_setfield(L, -2, "activity_id");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void handle_player_task_accepted(
|
||||||
|
QuestInterface* parse,
|
||||||
|
lua_State* L,
|
||||||
|
Client* client,
|
||||||
|
std::string data,
|
||||||
|
uint32 extra_data,
|
||||||
|
std::vector<std::any>* extra_pointers
|
||||||
|
) {
|
||||||
|
lua_pushinteger(L, std::stoi(data));
|
||||||
|
lua_setfield(L, -2, "task_id");
|
||||||
|
}
|
||||||
|
|
||||||
void handle_player_task_update(
|
void handle_player_task_update(
|
||||||
QuestInterface *parse,
|
QuestInterface *parse,
|
||||||
lua_State* L,
|
lua_State* L,
|
||||||
|
|||||||
@ -383,6 +383,15 @@ void handle_player_task_stage_complete(
|
|||||||
std::vector<std::any> *extra_pointers
|
std::vector<std::any> *extra_pointers
|
||||||
);
|
);
|
||||||
|
|
||||||
|
void handle_player_task_accepted(
|
||||||
|
QuestInterface* parse,
|
||||||
|
lua_State* L,
|
||||||
|
Client* client,
|
||||||
|
std::string data,
|
||||||
|
uint32 extra_data,
|
||||||
|
std::vector<std::any>* extra_pointers
|
||||||
|
);
|
||||||
|
|
||||||
void handle_player_task_update(
|
void handle_player_task_update(
|
||||||
QuestInterface *parse,
|
QuestInterface *parse,
|
||||||
lua_State* L,
|
lua_State* L,
|
||||||
|
|||||||
@ -2125,6 +2125,7 @@ void ClientTaskState::AcceptNewTask(
|
|||||||
if (npc) {
|
if (npc) {
|
||||||
parse->EventNPC(EVENT_TASK_ACCEPTED, npc, client, export_string, 0);
|
parse->EventNPC(EVENT_TASK_ACCEPTED, npc, client, export_string, 0);
|
||||||
}
|
}
|
||||||
|
parse->EventPlayer(EVENT_TASK_ACCEPTED, client, export_string, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientTaskState::ProcessTaskProximities(Client *client, float x, float y, float z)
|
void ClientTaskState::ProcessTaskProximities(Client *client, float x, float y, float z)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user