mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Implemented class Client::TextLink
This commit is contained in:
+51
-6
@@ -815,12 +815,57 @@ public:
|
||||
void SetStats(uint8 type,int16 set_val);
|
||||
void IncStats(uint8 type,int16 increase_val);
|
||||
void DropItem(int16 slot_id);
|
||||
bool MakeItemLink(char* &ret_link, const Item_Struct* item, uint32 aug0=0, uint32 aug1=0, uint32 aug2=0, uint32 aug3=0, uint32 aug4=0, uint32 aug5=0, uint8 evolving=0, uint8 evolvedlevel=0);
|
||||
bool MakeItemLink(char* &ret_link, const ItemInst* inst);
|
||||
bool MakeTaskLink(char* &ret_link);
|
||||
bool MakeBlankLink(char* &ret_link);
|
||||
static bool MakeBlankLink_(char* &ret_link);
|
||||
int GetItemLinkHash(const ItemInst* inst);
|
||||
|
||||
//
|
||||
// class Client::TextLink
|
||||
//
|
||||
class TextLink {
|
||||
public:
|
||||
enum LinkType { linkBlank = 0, linkItemData, linkLootItem, linkItemInst };
|
||||
|
||||
TextLink() { Reset(); }
|
||||
|
||||
void SetLinkType(LinkType linkType) { m_LinkType = linkType; }
|
||||
void SetItemData(const Item_Struct* itemData) { m_ItemData = itemData; }
|
||||
void SetLootData(const ServerLootItem_Struct* lootData) { m_LootData = lootData; }
|
||||
void SetItemInst(const ItemInst* itemInst) { m_ItemInst = itemInst; }
|
||||
void SetProxyItemID(uint32 proxyItemID) { m_ProxyItemID = proxyItemID; } // mainly for saylinks..but, not limited to
|
||||
void SetProxyText(const char* proxyText) { m_ProxyText = proxyText; } // overrides standard text use
|
||||
void SetTaskUse() { m_TaskUse = true; }
|
||||
void SetClientVersion(EQClientVersion clientVersion) { m_ClientVersion = EQLimits::ValidateClientVersion(clientVersion); }
|
||||
|
||||
std::string GenerateLink();
|
||||
bool LinkError() { return m_Error; }
|
||||
|
||||
const char* GetLink(); // contains full format: '/12x' '<LinkBody>' '<LinkText>' '/12x'
|
||||
const char* GetLinkBody(); // contains format: '<LinkBody>'
|
||||
const char* GetLinkText(); // contains format: '<LinkText>'
|
||||
std::string GetLinkString();
|
||||
std::string GetLinkBodyString();
|
||||
std::string GetLinkTextString();
|
||||
|
||||
void Reset();
|
||||
|
||||
private:
|
||||
void generate_body();
|
||||
void generate_text();
|
||||
|
||||
int m_LinkType;
|
||||
const Item_Struct* m_ItemData;
|
||||
const ServerLootItem_Struct* m_LootData;
|
||||
const ItemInst* m_ItemInst;
|
||||
uint32 m_ProxyItemID;
|
||||
const char* m_ProxyText;
|
||||
bool m_TaskUse;
|
||||
std::string m_Link;
|
||||
std::string m_LinkBody;
|
||||
std::string m_LinkText;
|
||||
EQClientVersion m_ClientVersion;
|
||||
bool m_Error;
|
||||
};
|
||||
|
||||
int GetItemLinkHash(const ItemInst* inst); // move to Item_Struct..or make use of the pre-calculated database field
|
||||
|
||||
void SendItemLink(const ItemInst* inst, bool sendtoall=false);
|
||||
void SendLootItemInPacket(const ItemInst* inst, int16 slot_id);
|
||||
void SendItemPacket(int16 slot_id, const ItemInst* inst, ItemPacketType packet_type);
|
||||
|
||||
Reference in New Issue
Block a user