mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-06 00:32:25 +00:00
Final
This commit is contained in:
parent
a0ef23618f
commit
fb0747fe02
@ -6633,6 +6633,7 @@ void perl_register_quest()
|
||||
package.add("faction", (void(*)(int, int, int))&Perl__faction);
|
||||
package.add("factionvalue", &Perl__FactionValue);
|
||||
package.add("failtask", &Perl__failtask);
|
||||
package.add("completetask", &Perl__uncompletetask);
|
||||
package.add("uncompletetask", &Perl__uncompletetask);
|
||||
package.add("firsttaskinset", &Perl__firsttaskinset);
|
||||
package.add("follow", (void(*)(int))&Perl__follow);
|
||||
|
||||
@ -722,6 +722,10 @@ void lua_fail_task(int task_id) {
|
||||
quest_manager.failtask(task_id);
|
||||
}
|
||||
|
||||
bool lua_complete_task(int task_id) {
|
||||
return quest_manager.completetask(task_id);
|
||||
}
|
||||
|
||||
bool lua_uncomplete_task(int task_id) {
|
||||
return quest_manager.uncompletetask(task_id);
|
||||
}
|
||||
@ -5974,6 +5978,7 @@ luabind::scope lua_register_general() {
|
||||
luabind::def("reset_task_activity", &lua_reset_task_activity),
|
||||
luabind::def("assign_task", &lua_assign_task),
|
||||
luabind::def("fail_task", &lua_fail_task),
|
||||
luabind::def("complete_task", &lua_complete_task),
|
||||
luabind::def("uncomplete_task", &lua_uncomplete_task),
|
||||
luabind::def("task_time_left", &lua_task_time_left),
|
||||
luabind::def("is_task_completed", &lua_is_task_completed),
|
||||
|
||||
@ -2959,6 +2959,17 @@ void QuestManager::failtask(int taskid) {
|
||||
initiator->FailTask(taskid);
|
||||
}
|
||||
|
||||
bool QuestManager::completetask(int task_id) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
|
||||
if (!RuleB(TaskSystem, EnableTaskSystem) || !initiator) {
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
return initiator->CompleteTask(task_id);
|
||||
}
|
||||
|
||||
bool QuestManager::uncompletetask(int task_id) {
|
||||
QuestManagerCurrentQuestVars();
|
||||
|
||||
|
||||
@ -224,6 +224,7 @@ public:
|
||||
void resettaskactivity(int task, int activity);
|
||||
void assigntask(int taskid, bool enforce_level_requirement = false);
|
||||
void failtask(int taskid);
|
||||
bool completetask(int task_id);
|
||||
bool uncompletetask(int task_id);
|
||||
int tasktimeleft(int taskid);
|
||||
bool istaskcompleted(int task_id);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user