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:
Zaela
2013-06-22 08:35:33 -07:00
parent e811e3975b
commit c5e4cf35c0
5 changed files with 316 additions and 111 deletions
+17
View File
@@ -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"