eqemu-server/world/dynamic_zone.h
hg 15328196e2
[Expeditions] Store members on dynamic zone (#1358)
This moves members from expeditions so other systems can use them

Replace expedition_members table with dynamic_zone_members

Move 'EnableInDynamicZoneStatus' rule to DynamicZone namespace

Modify #dz list to show dz members (not instance players) and type name

Move various queries to repository methods
2021-05-24 21:14:32 -05:00

42 lines
931 B
C++

#ifndef WORLD_DYNAMIC_ZONE_H
#define WORLD_DYNAMIC_ZONE_H
#include "../common/dynamic_zone_base.h"
class Database;
class ServerPacket;
enum class DynamicZoneStatus
{
Unknown = 0,
Normal,
Expired,
ExpiredEmpty,
};
class DynamicZone : public DynamicZoneBase
{
public:
using DynamicZoneBase::DynamicZoneBase; // inherit base constructors
static DynamicZone* FindDynamicZoneByID(uint32_t dz_id);
static void HandleZoneMessage(ServerPacket* pack);
void SetSecondsRemaining(uint32_t seconds_remaining) override;
DynamicZoneStatus Process();
protected:
Database& GetDatabase() override;
void SendInstanceAddRemoveCharacter(uint32_t character_id, bool remove) override;
void SendInstanceRemoveAllCharacters() override;
void SendGlobalLocationChange(uint16_t server_opcode, const DynamicZoneLocation& location) override;
private:
void SendZonesDurationUpdate();
bool m_is_pending_early_shutdown = false;
};
#endif