mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 07:18:37 +00:00
[Dynamic Zones] Implement dz switch id (#2343)
This adds the `dz_switch_id` field to doors and dynamic_zones. It will allow for compasses to be automatically added to dz entrances and will support moving clients to the dz on use without needing to script it. These can be imported for switches/doors from live packet dumps. Also removes compass packet encoders (same struct in all clients)
This commit is contained in:
@@ -212,6 +212,12 @@ void Lua_Expedition::SetSecondsRemaining(uint32_t seconds_remaining)
|
||||
self->GetDynamicZone()->SetSecondsRemaining(seconds_remaining);
|
||||
}
|
||||
|
||||
void Lua_Expedition::SetSwitchID(int dz_switch_id)
|
||||
{
|
||||
Lua_Safe_Call_Void();
|
||||
self->GetDynamicZone()->SetSwitchID(dz_switch_id, true);
|
||||
}
|
||||
|
||||
void Lua_Expedition::SetZoneInLocation(float x, float y, float z, float heading) {
|
||||
Lua_Safe_Call_Void();
|
||||
self->GetDynamicZone()->SetZoneInLocation(x, y, z, heading, true);
|
||||
@@ -269,6 +275,7 @@ luabind::scope lua_register_expedition() {
|
||||
.def("SetSafeReturn", (void(Lua_Expedition::*)(uint32_t, float, float, float, float))&Lua_Expedition::SetSafeReturn)
|
||||
.def("SetSafeReturn", (void(Lua_Expedition::*)(std::string, float, float, float, float))&Lua_Expedition::SetSafeReturn)
|
||||
.def("SetSecondsRemaining", &Lua_Expedition::SetSecondsRemaining)
|
||||
.def("SetSwitchID", &Lua_Expedition::SetSwitchID)
|
||||
.def("SetZoneInLocation", (void(Lua_Expedition::*)(float, float, float, float))&Lua_Expedition::SetZoneInLocation)
|
||||
.def("UpdateLockoutDuration", (void(Lua_Expedition::*)(std::string, uint32_t))&Lua_Expedition::UpdateLockoutDuration)
|
||||
.def("UpdateLockoutDuration", (void(Lua_Expedition::*)(std::string, uint32_t, bool))&Lua_Expedition::UpdateLockoutDuration);
|
||||
|
||||
Reference in New Issue
Block a user