TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
LFGHandler.cpp File Reference
#include "LFGMgr.h"
#include "ObjectMgr.h"
#include "Group.h"
#include "Player.h"
#include "Opcodes.h"
#include "WorldPacket.h"
#include "WorldSession.h"
+ Include dependency graph for LFGHandler.cpp:

Functions

void BuildPlayerLockDungeonBlock (WorldPacket &data, lfg::LfgLockMap const &lock)
 
void BuildPartyLockDungeonBlock (WorldPacket &data, lfg::LfgLockPartyMap const &lockMap)
 
void BuildQuestReward (WorldPacket &data, Quest const *quest, Player *player)
 

Function Documentation

void BuildPartyLockDungeonBlock ( WorldPacket data,
lfg::LfgLockPartyMap const lockMap 
)
42 {
43  data << uint8(lockMap.size());
44  for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
45  {
46  data << it->first; // Player guid
47  BuildPlayerLockDungeonBlock(data, it->second);
48  }
49 }
uint8_t uint8
Definition: g3dmath.h:164
void BuildPlayerLockDungeonBlock(WorldPacket &data, lfg::LfgLockMap const &lock)
Definition: LFGHandler.cpp:26

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BuildPlayerLockDungeonBlock ( WorldPacket data,
lfg::LfgLockMap const lock 
)
27 {
28  data << uint32(lock.size()); // Size of lock dungeons
29  for (lfg::LfgLockMap::const_iterator it = lock.begin(); it != lock.end(); ++it)
30  {
31  TC_LOG_TRACE("lfg", "BuildPlayerLockDungeonBlock:: DungeonID: %u Lock status: %u Required itemLevel: %u Current itemLevel: %f",
32  (it->first & 0x00FFFFFF), it->second.lockStatus, it->second.requiredItemLevel, it->second.currentItemLevel);
33 
34  data << uint32(it->first); // Dungeon entry (id + type)
35  data << uint32(it->second.lockStatus); // Lock status
36  data << uint32(it->second.requiredItemLevel); // Required itemLevel
37  data << uint32(it->second.currentItemLevel); // Current itemLevel
38  }
39 }
#define TC_LOG_TRACE(filterType__,...)
Definition: Log.h:195
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the caller graph for this function:

void BuildQuestReward ( WorldPacket data,
Quest const quest,
Player *  player 
)
52 {
53  uint8 rewCount = quest->GetRewItemsCount() + quest->GetRewCurrencyCount();
54 
55  data << uint32(player->GetQuestMoneyReward(quest));
56  data << uint32(player->GetQuestXPReward(quest));
57  data << uint8(rewCount);
58  if (rewCount)
59  {
60  for (uint8 i = 0; i < QUEST_REWARD_CURRENCY_COUNT; ++i)
61  {
62  if (uint32 currencyId = quest->RewardCurrencyId[i])
63  {
64  data << uint32(currencyId);
65  data << uint32(0);
66  data << uint32(quest->RewardCurrencyCount[i]);
67  data << uint8(1); // Is currency
68  }
69  }
70 
71  for (uint8 i = 0; i < QUEST_REWARD_ITEM_COUNT; ++i)
72  {
73  if (uint32 itemId = quest->RewardItemId[i])
74  {
75  //ItemTemplate const* item = sObjectMgr->GetItemTemplate(itemId);
76  data << uint32(itemId);
77  data << uint32(/*item ? item->DisplayInfoID :*/ 0);
78  data << uint32(quest->RewardItemCount[i]);
79  data << uint8(0); // Is currency
80  }
81  }
82  }
83 }
#define QUEST_REWARD_CURRENCY_COUNT
Definition: QuestDef.h:51
uint32_t uint32
Definition: Define.h:150
uint8_t uint8
Definition: g3dmath.h:164
uint8_t uint8
Definition: Define.h:152
#define QUEST_REWARD_ITEM_COUNT
Definition: QuestDef.h:47
uint32_t uint32
Definition: g3dmath.h:168

+ Here is the call graph for this function:

+ Here is the caller graph for this function: