mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 17:26:30 +00:00
Push
This commit is contained in:
@@ -838,6 +838,36 @@ void Lua_Zone::Signal(int signal_id)
|
|||||||
self->Signal(signal_id);
|
self->Signal(signal_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
luabind::object Lua_Zone::GetPausedTimers(lua_State* L) {
|
||||||
|
auto t = luabind::newtable(L);
|
||||||
|
if (d_) {
|
||||||
|
auto self = reinterpret_cast<NativeType*>(d_);
|
||||||
|
auto l = self->GetPausedTimers();
|
||||||
|
int i = 1;
|
||||||
|
for (const auto& v : l) {
|
||||||
|
t[i] = v;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
luabind::object Lua_Zone::GetTimers(lua_State* L) {
|
||||||
|
auto t = luabind::newtable(L);
|
||||||
|
if (d_) {
|
||||||
|
auto self = reinterpret_cast<NativeType*>(d_);
|
||||||
|
auto l = self->GetTimers();
|
||||||
|
int i = 1;
|
||||||
|
for (const auto& v : l) {
|
||||||
|
t[i] = v;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
luabind::scope lua_register_zone() {
|
luabind::scope lua_register_zone() {
|
||||||
return luabind::class_<Lua_Zone>("Zones")
|
return luabind::class_<Lua_Zone>("Zones")
|
||||||
.def(luabind::constructor<>())
|
.def(luabind::constructor<>())
|
||||||
@@ -906,6 +936,7 @@ luabind::scope lua_register_zone() {
|
|||||||
.def("GetMinimumStatus", &Lua_Zone::GetMinimumStatus)
|
.def("GetMinimumStatus", &Lua_Zone::GetMinimumStatus)
|
||||||
.def("GetNote", &Lua_Zone::GetNote)
|
.def("GetNote", &Lua_Zone::GetNote)
|
||||||
.def("GetNPCMaximumAggroDistance", &Lua_Zone::GetNPCMaximumAggroDistance)
|
.def("GetNPCMaximumAggroDistance", &Lua_Zone::GetNPCMaximumAggroDistance)
|
||||||
|
.def("GetPausedTimers", &Lua_Zone::GetPausedTimers)
|
||||||
.def("GetPEQZone", &Lua_Zone::GetPEQZone)
|
.def("GetPEQZone", &Lua_Zone::GetPEQZone)
|
||||||
.def("GetRainChance", (int(Lua_Zone::*)(void))&Lua_Zone::GetRainChance)
|
.def("GetRainChance", (int(Lua_Zone::*)(void))&Lua_Zone::GetRainChance)
|
||||||
.def("GetRainChance", (int(Lua_Zone::*)(uint8))&Lua_Zone::GetRainChance)
|
.def("GetRainChance", (int(Lua_Zone::*)(uint8))&Lua_Zone::GetRainChance)
|
||||||
@@ -929,6 +960,7 @@ luabind::scope lua_register_zone() {
|
|||||||
.def("GetTimeZone", &Lua_Zone::GetTimeZone)
|
.def("GetTimeZone", &Lua_Zone::GetTimeZone)
|
||||||
.def("GetTimerDuration", &Lua_Zone::GetTimerDuration)
|
.def("GetTimerDuration", &Lua_Zone::GetTimerDuration)
|
||||||
.def("GetTimerRemainingTime", &Lua_Zone::GetTimerRemainingTime)
|
.def("GetTimerRemainingTime", &Lua_Zone::GetTimerRemainingTime)
|
||||||
|
.def("GetTimers", &Lua_Zone::GetTimers)
|
||||||
.def("GetZoneDescription", &Lua_Zone::GetZoneDescription)
|
.def("GetZoneDescription", &Lua_Zone::GetZoneDescription)
|
||||||
.def("GetZoneID", &Lua_Zone::GetZoneID)
|
.def("GetZoneID", &Lua_Zone::GetZoneID)
|
||||||
.def("GetZoneType", &Lua_Zone::GetZoneType)
|
.def("GetZoneType", &Lua_Zone::GetZoneType)
|
||||||
|
|||||||
@@ -158,6 +158,8 @@ public:
|
|||||||
void StopAllTimers();
|
void StopAllTimers();
|
||||||
void Signal(int signal_id);
|
void Signal(int signal_id);
|
||||||
void SendPayload(int payload_id, std::string payload_value);
|
void SendPayload(int payload_id, std::string payload_value);
|
||||||
|
luabind::object GetPausedTimers(lua_State* L);
|
||||||
|
luabind::object GetTimers(lua_State* L);
|
||||||
|
|
||||||
// data buckets
|
// data buckets
|
||||||
void SetBucket(const std::string& bucket_name, const std::string& bucket_value);
|
void SetBucket(const std::string& bucket_name, const std::string& bucket_value);
|
||||||
|
|||||||
@@ -4673,10 +4673,8 @@ std::vector<std::string> QuestManager::GetPausedTimers(Mob* m)
|
|||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
if (m && !PTimerList.empty()) {
|
if (m && !PTimerList.empty()) {
|
||||||
LogError("m valid | !PTimerList.empty()");
|
|
||||||
for (auto e = PTimerList.begin(); e != PTimerList.end(); e++) {
|
for (auto e = PTimerList.begin(); e != PTimerList.end(); e++) {
|
||||||
if (e->owner == m) {
|
if (e->owner == m) {
|
||||||
LogError("e->owner == m | e->name [{}]", e->name);
|
|
||||||
v.emplace_back(e->name);
|
v.emplace_back(e->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4690,10 +4688,8 @@ std::vector<std::string> QuestManager::GetTimers(Mob* m)
|
|||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
if (m && !QTimerList.empty()) {
|
if (m && !QTimerList.empty()) {
|
||||||
LogError("m valid | !QTimerList.empty()");
|
|
||||||
for (auto e = QTimerList.begin(); e != QTimerList.end(); e++) {
|
for (auto e = QTimerList.begin(); e != QTimerList.end(); e++) {
|
||||||
if (e->mob == m) {
|
if (e->mob == m) {
|
||||||
LogError("e->mob == m | e->name [{}]", e->name);
|
|
||||||
v.emplace_back(e->name);
|
v.emplace_back(e->name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user