[svn] * Added some player info cache to the core. Thanx to Rognar for patch, visaglis for testing and bugging me to add it.

--HG--
branch : trunk
This commit is contained in:
KingPin
2008-10-21 12:43:24 -05:00
parent d0325e2536
commit ed94fdb8bc
5 changed files with 156 additions and 0 deletions
+21
View File
@@ -209,6 +209,23 @@ enum ConditionType
#define MAX_CONDITION 11 // maximum value in ConditionType enum
//Player's info
typedef struct _tagCachePlayerInfo
{
std::string sPlayerName;
uint32 unfield;
uint32 unLevel;
uint8 unClass;
//Arena
uint32 unArenaInfoId0;
uint32 unArenaInfoId1;
uint32 unArenaInfoId2;
uint32 unArenaInfoSlot0;
uint32 unArenaInfoSlot1;
uint32 unArenaInfoSlot2;
}CachePlayerInfo, *PCachePlayerInfo;
typedef HM_NAMESPACE::hash_map<uint32, PCachePlayerInfo> CachePlayerInfoMap;
struct PlayerCondition
{
ConditionType condition; // additional condition type
@@ -568,6 +585,10 @@ class ObjectMgr
uint32 GenerateMailID();
uint32 GenerateItemTextID();
uint32 GeneratePetNumber();
void LoadPlayerInfoInCache();
PCachePlayerInfo GetPlayerInfoFromCache(uint32 unPlayerGuid) const;
CachePlayerInfoMap m_mPlayerInfoMap;
uint32 CreateItemText(std::string text);
std::string GetItemText( uint32 id )