[Shared Tasks] Implement Activity Locking (#2339)

* Add shared task element locking

This adds the `lock_activity_id` field to the tasks table which will
automatically lock a shared task when that element becomes active.

A method was added to world analogous to zone's UnlockActivities to
determine when an activity is active with respect to task steps.

Also adds quest apis to manually lock or unlock a client's shared task

* Add comment
This commit is contained in:
hg
2022-07-30 20:57:57 -04:00
committed by GitHub
parent ea878ed27f
commit f64d072af7
15 changed files with 149 additions and 30 deletions
+6
View File
@@ -1430,6 +1430,11 @@ bool Lua_Client::IsTaskActivityActive(int task, int activity) {
return self->IsTaskActivityActive(task, activity);
}
void Lua_Client::LockSharedTask(bool lock) {
Lua_Safe_Call_Void();
return self->LockSharedTask(lock);
}
int Lua_Client::GetCorpseCount() {
Lua_Safe_Call_Int();
return self->GetCorpseCount();
@@ -2772,6 +2777,7 @@ luabind::scope lua_register_client() {
.def("LeaveGroup", (void(Lua_Client::*)(void))&Lua_Client::LeaveGroup)
.def("LoadPEQZoneFlags", (void(Lua_Client::*)(void))&Lua_Client::LoadPEQZoneFlags)
.def("LoadZoneFlags", (void(Lua_Client::*)(void))&Lua_Client::LoadZoneFlags)
.def("LockSharedTask", &Lua_Client::LockSharedTask)
.def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float))&Lua_Client::MarkSingleCompassLoc)
.def("MarkSingleCompassLoc", (void(Lua_Client::*)(float,float,float,int))&Lua_Client::MarkSingleCompassLoc)
.def("MaxSkill", (int(Lua_Client::*)(int))&Lua_Client::MaxSkill)