mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-02 20:56:37 +00:00
Reworked RespawnFromHover framework to allow future customization (scripting) of respawn options.
Added event_respawn to be triggered when a client respawns from hover into the current zone (may not be set up correctly!).
This commit is contained in:
@@ -179,6 +179,16 @@ struct XTarget_Struct
|
||||
char Name[65];
|
||||
};
|
||||
|
||||
struct RespawnOption
|
||||
{
|
||||
std::string name;
|
||||
uint32 zoneid;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float heading;
|
||||
};
|
||||
|
||||
|
||||
const uint32 POPUPID_UPDATE_SHOWSTATSWINDOW = 1000000;
|
||||
|
||||
@@ -1043,6 +1053,11 @@ public:
|
||||
bool MoveItemToInventory(ItemInst *BInst, bool UpdateClient = false);
|
||||
void HandleRespawnFromHover(uint32 Option);
|
||||
bool IsHoveringForRespawn() { return RespawnFromHoverTimer.Enabled(); }
|
||||
std::list<RespawnOption> respawn_options;
|
||||
void AddRespawnOption(std::string option_name, uint32 zoneid, float x, float y, float z, float h = 0, bool initial_selection = false, int8 position = -1);
|
||||
bool RemoveRespawnOption(std::string option_name);
|
||||
bool RemoveRespawnOption(uint8 position);
|
||||
void ClearRespawnOptions() { respawn_options.clear(); }
|
||||
void SetPendingRezzData(int XP, uint32 DBID, uint16 SpellID, const char *CorpseName) { PendingRezzXP = XP; PendingRezzDBID = DBID; PendingRezzSpellID = SpellID; PendingRezzCorpseName = CorpseName; }
|
||||
bool IsRezzPending() { return PendingRezzSpellID > 0; }
|
||||
void ClearHover();
|
||||
@@ -1449,6 +1464,8 @@ private:
|
||||
|
||||
Timer ItemTickTimer;
|
||||
std::map<std::string,std::string> accountflags;
|
||||
|
||||
uint8 initial_respawn_selection;
|
||||
};
|
||||
|
||||
#include "parser.h"
|
||||
|
||||
Reference in New Issue
Block a user