mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +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:
+10
-1
@@ -67,6 +67,7 @@ Doors::Doors(const DoorsRepository::Doors& door) :
|
||||
invert_state = door.invert_state;
|
||||
destination_instance_id = door.dest_instance;
|
||||
is_ldon_door = door.is_ldon_door;
|
||||
m_dz_switch_id = door.dz_switch_id;
|
||||
client_version_mask = door.client_version_mask;
|
||||
|
||||
SetOpenState(false);
|
||||
@@ -207,7 +208,15 @@ void Doors::HandleClick(Client* sender, uint8 trigger) {
|
||||
}
|
||||
}
|
||||
|
||||
// todo: if IsDzDoor() call Client::MovePCDynamicZone(target_zone_id) (for systems that use dzs)
|
||||
if (m_dz_switch_id != 0)
|
||||
{
|
||||
// todo: update task touch task events with matching dz switch id
|
||||
if (sender->TryMovePCDynamicZoneSwitch(m_dz_switch_id))
|
||||
{
|
||||
safe_delete(outapp);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
uint32 required_key_item = GetKeyItem();
|
||||
uint8 disable_add_to_key_ring = GetNoKeyring();
|
||||
|
||||
Reference in New Issue
Block a user