mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Expeditions] [Quest API] Add expedition IsLocked to Quest API (#1292)
This commit is contained in:
parent
5035451af7
commit
739b975cad
@ -125,6 +125,8 @@ public:
|
||||
bool RemoveMember(const std::string& remove_char_name);
|
||||
void SetMemberStatus(Client* client, ExpeditionMemberStatus status);
|
||||
void SwapMember(Client* add_client, const std::string& remove_char_name);
|
||||
|
||||
bool IsLocked() const { return m_is_locked; }
|
||||
void SetLocked(bool lock_expedition, ExpeditionLockMessage lock_msg,
|
||||
bool update_db = false, uint32_t msg_color = Chat::Yellow);
|
||||
|
||||
|
||||
@ -161,6 +161,11 @@ bool Lua_Expedition::HasReplayLockout() {
|
||||
return self->HasReplayLockout();
|
||||
}
|
||||
|
||||
bool Lua_Expedition::IsLocked() {
|
||||
Lua_Safe_Call_Bool();
|
||||
return self->IsLocked();
|
||||
}
|
||||
|
||||
void Lua_Expedition::RemoveCompass() {
|
||||
Lua_Safe_Call_Void();
|
||||
self->SetDzCompass(0, 0, 0, 0, true);
|
||||
@ -270,6 +275,7 @@ luabind::scope lua_register_expedition() {
|
||||
.def("GetZoneVersion", &Lua_Expedition::GetZoneVersion)
|
||||
.def("HasLockout", (bool(Lua_Expedition::*)(std::string))&Lua_Expedition::HasLockout)
|
||||
.def("HasReplayLockout", (bool(Lua_Expedition::*)(void))&Lua_Expedition::HasReplayLockout)
|
||||
.def("IsLocked", &Lua_Expedition::IsLocked)
|
||||
.def("RemoveCompass", (void(Lua_Expedition::*)(void))&Lua_Expedition::RemoveCompass)
|
||||
.def("RemoveLockout", (void(Lua_Expedition::*)(std::string))&Lua_Expedition::RemoveLockout)
|
||||
.def("SetCompass", (void(Lua_Expedition::*)(uint32_t, float, float, float))&Lua_Expedition::SetCompass)
|
||||
|
||||
@ -76,6 +76,7 @@ public:
|
||||
int GetZoneVersion();
|
||||
bool HasLockout(std::string event_name);
|
||||
bool HasReplayLockout();
|
||||
bool IsLocked();
|
||||
void RemoveCompass();
|
||||
void RemoveLockout(std::string event_name);
|
||||
void SetCompass(uint32_t zone_id, float x, float y, float z);
|
||||
|
||||
@ -383,6 +383,20 @@ XS(XS_Expedition_HasReplayLockout) {
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Expedition_IsLocked);
|
||||
XS(XS_Expedition_IsLocked) {
|
||||
dXSARGS;
|
||||
if (items != 1) {
|
||||
Perl_croak(aTHX_ "Usage: Expedition::IsLocked(THIS)");
|
||||
}
|
||||
|
||||
Expedition* THIS = nullptr;
|
||||
VALIDATE_THIS_IS_EXPEDITION;
|
||||
|
||||
ST(0) = boolSV(THIS->IsLocked());
|
||||
XSRETURN(1);
|
||||
}
|
||||
|
||||
XS(XS_Expedition_RemoveCompass);
|
||||
XS(XS_Expedition_RemoveCompass) {
|
||||
dXSARGS;
|
||||
@ -653,6 +667,7 @@ XS(boot_Expedition) {
|
||||
newXSproto(strcpy(buf, "GetZoneVersion"), XS_Expedition_GetZoneVersion, file, "$");
|
||||
newXSproto(strcpy(buf, "HasLockout"), XS_Expedition_HasLockout, file, "$$");
|
||||
newXSproto(strcpy(buf, "HasReplayLockout"), XS_Expedition_HasReplayLockout, file, "$");
|
||||
newXSproto(strcpy(buf, "IsLocked"), XS_Expedition_IsLocked, file, "$");
|
||||
newXSproto(strcpy(buf, "RemoveCompass"), XS_Expedition_RemoveCompass, file, "$");
|
||||
newXSproto(strcpy(buf, "RemoveLockout"), XS_Expedition_RemoveLockout, file, "$$");
|
||||
newXSproto(strcpy(buf, "SetCompass"), XS_Expedition_SetCompass, file, "$$$$$");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user