mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 04:56:20 +00:00
[Feature] Zone Scripting (#4908)
* [Feature] Add Zone Scripting Capabilities * Push * Update zone.cpp * Fix crashes * Lua * Add other events, finish Lua * Add EVENT_ENTER_ZONE * Final * Push * Push * [Feature] Add Zone Scripting Capabilities * Push * Update zone.cpp * Fix crashes * Add EVENT_ENTER_ZONE * Remove duplicates * Update embparser.cpp
This commit is contained in:
+30
@@ -486,6 +486,24 @@ public:
|
||||
static void ClearZoneState(uint32 zone_id, uint32 instance_id);
|
||||
void ReloadMaps();
|
||||
|
||||
void Signal(int signal_id);
|
||||
void SendPayload(int payload_id, std::string payload_value);
|
||||
|
||||
struct PausedZoneTimer {
|
||||
std::string name;
|
||||
uint32 remaining_time;
|
||||
};
|
||||
|
||||
uint32 GetTimerDuration(std::string name);
|
||||
uint32 GetTimerRemainingTime(std::string name);
|
||||
bool HasTimer(std::string name);
|
||||
bool IsPausedTimer(std::string name);
|
||||
void PauseTimer(std::string name);
|
||||
void ResumeTimer(std::string name);
|
||||
void SetTimer(std::string name, uint32 duration);
|
||||
void StopTimer(std::string name);
|
||||
void StopAllTimers();
|
||||
|
||||
private:
|
||||
bool allow_mercs;
|
||||
bool can_bind;
|
||||
@@ -552,6 +570,18 @@ private:
|
||||
std::vector<BaseDataRepository::BaseData> m_base_data = { };
|
||||
|
||||
uint32_t m_zone_server_id = 0;
|
||||
|
||||
class ZoneTimer {
|
||||
public:
|
||||
inline ZoneTimer(std::string _name, uint32 duration)
|
||||
: name(_name), timer_(duration) { timer_.Start(duration, false); }
|
||||
std::string name;
|
||||
Timer timer_;
|
||||
};
|
||||
|
||||
std::vector<ZoneTimer> zone_timers;
|
||||
std::vector<PausedZoneTimer> paused_zone_timers;
|
||||
std::deque<int> m_zone_signals;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user