Core/Dungeon Finder: Use lfg namespace to encapsulate all LFG classes, structs and enums
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
#include "LFG.h"
|
||||
#include "Language.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
std::string ConcatenateDungeons(LfgDungeonSet const& dungeons)
|
||||
{
|
||||
std::string dungeonstr = "";
|
||||
if (!dungeons.empty())
|
||||
{
|
||||
std::ostringstream o;
|
||||
LfgDungeonSet::const_iterator it = dungeons.begin();
|
||||
o << (*it);
|
||||
for (++it; it != dungeons.end(); ++it)
|
||||
o << ", " << uint32(*it);
|
||||
dungeonstr = o.str();
|
||||
}
|
||||
return dungeonstr;
|
||||
}
|
||||
|
||||
std::string GetRolesString(uint8 roles)
|
||||
{
|
||||
std::string rolesstr = "";
|
||||
|
||||
if (roles & PLAYER_ROLE_TANK)
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_TANK));
|
||||
|
||||
if (roles & PLAYER_ROLE_HEALER)
|
||||
{
|
||||
if (!rolesstr.empty())
|
||||
rolesstr.append(", ");
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_HEALER));
|
||||
}
|
||||
|
||||
if (roles & PLAYER_ROLE_DAMAGE)
|
||||
{
|
||||
if (!rolesstr.empty())
|
||||
rolesstr.append(", ");
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_DAMAGE));
|
||||
}
|
||||
|
||||
if (roles & PLAYER_ROLE_LEADER)
|
||||
{
|
||||
if (!rolesstr.empty())
|
||||
rolesstr.append(", ");
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_LEADER));
|
||||
}
|
||||
|
||||
if (rolesstr.empty())
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_NONE));
|
||||
|
||||
return rolesstr;
|
||||
}
|
||||
|
||||
std::string GetStateString(LfgState state)
|
||||
{
|
||||
int32 entry = LANG_LFG_ERROR;
|
||||
switch (state)
|
||||
{
|
||||
case LFG_STATE_NONE:
|
||||
entry = LANG_LFG_STATE_NONE;
|
||||
break;
|
||||
case LFG_STATE_ROLECHECK:
|
||||
entry = LANG_LFG_STATE_ROLECHECK;
|
||||
break;
|
||||
case LFG_STATE_QUEUED:
|
||||
entry = LANG_LFG_STATE_QUEUED;
|
||||
break;
|
||||
case LFG_STATE_PROPOSAL:
|
||||
entry = LANG_LFG_STATE_PROPOSAL;
|
||||
break;
|
||||
case LFG_STATE_DUNGEON:
|
||||
entry = LANG_LFG_STATE_DUNGEON;
|
||||
break;
|
||||
case LFG_STATE_BOOT:
|
||||
entry = LANG_LFG_STATE_BOOT;
|
||||
break;
|
||||
case LFG_STATE_FINISHED_DUNGEON:
|
||||
entry = LANG_LFG_STATE_FINISHED_DUNGEON;
|
||||
break;
|
||||
case LFG_STATE_RAIDBROWSER:
|
||||
entry = LANG_LFG_STATE_RAIDBROWSER;
|
||||
break;
|
||||
}
|
||||
|
||||
return std::string(sObjectMgr->GetTrinityStringForDBCLocale(entry));
|
||||
}
|
||||
|
||||
} // namespace lfg
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
enum LFGEnum
|
||||
{
|
||||
LFG_TANKS_NEEDED = 1,
|
||||
@@ -99,4 +102,10 @@ typedef std::list<uint64> LfgGuidList;
|
||||
typedef std::map<uint64, uint8> LfgRolesMap;
|
||||
typedef std::map<uint64, uint64> LfgGroupsMap;
|
||||
|
||||
std::string ConcatenateDungeons(LfgDungeonSet const& dungeons);
|
||||
std::string GetRolesString(uint8 roles);
|
||||
std::string GetStateString(LfgState state);
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
#endif
|
||||
|
||||
@@ -18,6 +18,9 @@
|
||||
#include "LFG.h"
|
||||
#include "LFGGroupData.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
LfgGroupData::LfgGroupData(): m_State(LFG_STATE_NONE), m_OldState(LFG_STATE_NONE),
|
||||
m_Leader(0), m_Dungeon(0), m_KicksLeft(LFG_GROUP_MAX_KICKS)
|
||||
{ }
|
||||
@@ -122,3 +125,5 @@ uint8 LfgGroupData::GetKicksLeft() const
|
||||
{
|
||||
return m_KicksLeft;
|
||||
}
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "LFG.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
enum LfgGroupEnum
|
||||
{
|
||||
LFG_GROUP_MAX_KICKS = 3,
|
||||
@@ -75,4 +78,6 @@ class LfgGroupData
|
||||
uint8 m_KicksLeft; ///< Number of kicks left
|
||||
};
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
#include "GameEventMgr.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
LFGMgr::LFGMgr(): m_QueueTimer(0), m_lfgProposalId(1),
|
||||
m_options(sWorld->getIntConfig(CONFIG_LFG_OPTIONSMASK))
|
||||
{
|
||||
@@ -95,89 +98,6 @@ void LFGMgr::_SaveToDB(uint64 guid, uint32 db_guid)
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
std::string LFGMgr::ConcatenateDungeons(LfgDungeonSet const& dungeons)
|
||||
{
|
||||
std::string dungeonstr = "";
|
||||
if (!dungeons.empty())
|
||||
{
|
||||
std::ostringstream o;
|
||||
LfgDungeonSet::const_iterator it = dungeons.begin();
|
||||
o << (*it);
|
||||
for (++it; it != dungeons.end(); ++it)
|
||||
o << ", " << uint32(*it);
|
||||
dungeonstr = o.str();
|
||||
}
|
||||
return dungeonstr;
|
||||
}
|
||||
|
||||
std::string LFGMgr::GetRolesString(uint8 roles)
|
||||
{
|
||||
std::string rolesstr = "";
|
||||
|
||||
if (roles & PLAYER_ROLE_TANK)
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_TANK));
|
||||
|
||||
if (roles & PLAYER_ROLE_HEALER)
|
||||
{
|
||||
if (!rolesstr.empty())
|
||||
rolesstr.append(", ");
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_HEALER));
|
||||
}
|
||||
|
||||
if (roles & PLAYER_ROLE_DAMAGE)
|
||||
{
|
||||
if (!rolesstr.empty())
|
||||
rolesstr.append(", ");
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_DAMAGE));
|
||||
}
|
||||
|
||||
if (roles & PLAYER_ROLE_LEADER)
|
||||
{
|
||||
if (!rolesstr.empty())
|
||||
rolesstr.append(", ");
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_LEADER));
|
||||
}
|
||||
|
||||
if (rolesstr.empty())
|
||||
rolesstr.append(sObjectMgr->GetTrinityStringForDBCLocale(LANG_LFG_ROLE_NONE));
|
||||
|
||||
return rolesstr;
|
||||
}
|
||||
|
||||
std::string LFGMgr::GetStateString(LfgState state)
|
||||
{
|
||||
int32 entry = LANG_LFG_ERROR;
|
||||
switch (state)
|
||||
{
|
||||
case LFG_STATE_NONE:
|
||||
entry = LANG_LFG_STATE_NONE;
|
||||
break;
|
||||
case LFG_STATE_ROLECHECK:
|
||||
entry = LANG_LFG_STATE_ROLECHECK;
|
||||
break;
|
||||
case LFG_STATE_QUEUED:
|
||||
entry = LANG_LFG_STATE_QUEUED;
|
||||
break;
|
||||
case LFG_STATE_PROPOSAL:
|
||||
entry = LANG_LFG_STATE_PROPOSAL;
|
||||
break;
|
||||
case LFG_STATE_DUNGEON:
|
||||
entry = LANG_LFG_STATE_DUNGEON;
|
||||
break;
|
||||
case LFG_STATE_BOOT:
|
||||
entry = LANG_LFG_STATE_BOOT;
|
||||
break;
|
||||
case LFG_STATE_FINISHED_DUNGEON:
|
||||
entry = LANG_LFG_STATE_FINISHED_DUNGEON;
|
||||
break;
|
||||
case LFG_STATE_RAIDBROWSER:
|
||||
entry = LANG_LFG_STATE_RAIDBROWSER;
|
||||
break;
|
||||
}
|
||||
|
||||
return std::string(sObjectMgr->GetTrinityStringForDBCLocale(entry));
|
||||
}
|
||||
|
||||
/// Load rewards for completing dungeons
|
||||
void LFGMgr::LoadRewards()
|
||||
{
|
||||
@@ -2065,3 +1985,5 @@ bool LFGMgr::inLfgDungeonMap(uint64 guid, uint32 map, Difficulty difficulty)
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
@@ -30,6 +30,9 @@ class Group;
|
||||
class Player;
|
||||
class Quest;
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
enum LfgOptions
|
||||
{
|
||||
LFG_OPTION_ENABLE_DUNGEON_FINDER = 0x01,
|
||||
@@ -371,9 +374,6 @@ class LFGMgr
|
||||
bool IsSeasonActive(uint32 dungeonId);
|
||||
|
||||
std::string DumpQueueInfo(bool full = false);
|
||||
static std::string ConcatenateDungeons(LfgDungeonSet const& dungeons);
|
||||
static std::string GetRolesString(uint8 roles);
|
||||
static std::string GetStateString(LfgState state);
|
||||
|
||||
void LoadLFGDungeons(bool reload = false);
|
||||
LFGDungeonData const* GetLFGDungeon(uint32 id);
|
||||
@@ -429,5 +429,7 @@ class LFGMgr
|
||||
LfgGuidList teleportStore; ///< Players being teleported
|
||||
};
|
||||
|
||||
#define sLFGMgr ACE_Singleton<LFGMgr, ACE_Null_Mutex>::instance()
|
||||
} // namespace lfg
|
||||
|
||||
#define sLFGMgr ACE_Singleton<lfg::LFGMgr, ACE_Null_Mutex>::instance()
|
||||
#endif
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
|
||||
#include "LFGPlayerData.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
LfgPlayerData::LfgPlayerData(): m_State(LFG_STATE_NONE), m_OldState(LFG_STATE_NONE),
|
||||
m_Team(0), m_Group(0), m_Roles(0), m_Comment("")
|
||||
{}
|
||||
@@ -122,3 +125,5 @@ LfgDungeonSet const& LfgPlayerData::GetSelectedDungeons() const
|
||||
{
|
||||
return m_SelectedDungeons;
|
||||
}
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "LFG.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
/**
|
||||
Stores all lfg data needed about the player.
|
||||
*/
|
||||
@@ -68,4 +71,6 @@ class LfgPlayerData
|
||||
LfgDungeonSet m_SelectedDungeons; ///< Selected Dungeons when joined LFG
|
||||
};
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,6 +27,9 @@
|
||||
#include "World.h"
|
||||
#include "GroupMgr.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
/**
|
||||
Given a list of guids returns the concatenation using | as delimiter
|
||||
|
||||
@@ -431,7 +434,7 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
|
||||
{
|
||||
std::ostringstream o;
|
||||
for (LfgRolesMap::const_iterator it = debugRoles.begin(); it != debugRoles.end(); ++it)
|
||||
o << ", " << it->first << ": " << sLFGMgr->GetRolesString(it->second);
|
||||
o << ", " << it->first << ": " << GetRolesString(it->second);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "LFGQueue::CheckCompatibility: (%s) Roles not compatible%s", strGuids.c_str(), o.str().c_str());
|
||||
SetCompatibles(strGuids, LFG_INCOMPATIBLES_NO_ROLES);
|
||||
@@ -441,12 +444,12 @@ LfgCompatibility LFGQueue::CheckCompatibility(LfgGuidList check)
|
||||
LfgGuidList::iterator itguid = check.begin();
|
||||
proposalDungeons = QueueDataStore[*itguid].dungeons;
|
||||
std::ostringstream o;
|
||||
o << ", " << *itguid << ": (" << sLFGMgr->ConcatenateDungeons(proposalDungeons) << ")";
|
||||
o << ", " << *itguid << ": (" << ConcatenateDungeons(proposalDungeons) << ")";
|
||||
for (++itguid; itguid != check.end(); ++itguid)
|
||||
{
|
||||
LfgDungeonSet temporal;
|
||||
LfgDungeonSet &dungeons = QueueDataStore[*itguid].dungeons;
|
||||
o << ", " << *itguid << ": (" << sLFGMgr->ConcatenateDungeons(dungeons) << ")";
|
||||
o << ", " << *itguid << ": (" << ConcatenateDungeons(dungeons) << ")";
|
||||
std::set_intersection(proposalDungeons.begin(), proposalDungeons.end(), dungeons.begin(), dungeons.end(), std::inserter(temporal, temporal.begin()));
|
||||
proposalDungeons = temporal;
|
||||
}
|
||||
@@ -671,3 +674,5 @@ void LFGQueue::UpdateBestCompatibleInQueue(LfgQueueDataContainer::iterator itrQu
|
||||
--queueData.dps;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
@@ -20,6 +20,9 @@
|
||||
|
||||
#include "LFG.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
enum LfgCompatibility
|
||||
{
|
||||
LFG_COMPATIBILITY_PENDING,
|
||||
@@ -140,4 +143,6 @@ class LFGQueue
|
||||
LfgGuidList newToQueueStore; ///< New groups to add to queue
|
||||
};
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
#endif
|
||||
|
||||
@@ -29,6 +29,9 @@
|
||||
#include "ObjectAccessor.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
LFGPlayerScript::LFGPlayerScript() : PlayerScript("LFGPlayerScript")
|
||||
{
|
||||
}
|
||||
@@ -208,3 +211,5 @@ void LFGGroupScript::OnInviteMember(Group* group, uint64 guid)
|
||||
if (leader && !gguid)
|
||||
sLFGMgr->LeaveLfg(leader);
|
||||
}
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
class Player;
|
||||
class Group;
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
|
||||
class LFGPlayerScript : public PlayerScript
|
||||
{
|
||||
public:
|
||||
@@ -50,3 +53,5 @@ class LFGGroupScript : public GroupScript
|
||||
void OnChangeLeader(Group* group, uint64 newLeaderGuid, uint64 oldLeaderGuid);
|
||||
void OnInviteMember(Group* group, uint64 guid);
|
||||
};
|
||||
|
||||
} // namespace lfg
|
||||
|
||||
@@ -11913,7 +11913,7 @@ InventoryResult Player::CanUseItem(ItemTemplate const* proto) const
|
||||
|
||||
InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObject const* lootedObject) const
|
||||
{
|
||||
LfgDungeonSet const& dungeons = sLFGMgr->GetSelectedDungeons(GetGUID());
|
||||
lfg::LfgDungeonSet const& dungeons = sLFGMgr->GetSelectedDungeons(GetGUID());
|
||||
if (dungeons.empty())
|
||||
return EQUIP_ERR_OK; // not using LFG
|
||||
|
||||
@@ -11923,10 +11923,7 @@ InventoryResult Player::CanRollForItemInLFG(ItemTemplate const* proto, WorldObje
|
||||
// check if looted object is inside the lfg dungeon
|
||||
bool lootedObjectInDungeon = false;
|
||||
Map const* map = lootedObject->GetMap();
|
||||
if (uint32 dungeonId = sLFGMgr->GetDungeon(GetGroup()->GetGUID(), true))
|
||||
if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonId))
|
||||
if (uint32(dungeon->map) == map->GetId() && dungeon->difficulty == map->GetDifficulty())
|
||||
lootedObjectInDungeon = true;
|
||||
lootedObjectInDungeon = sLFGMgr->inLfgDungeonMap(GetGroup()->GetGUID(), map->GetId(), map->GetDifficulty());
|
||||
|
||||
if (!lootedObjectInDungeon)
|
||||
return EQUIP_ERR_OK;
|
||||
@@ -23426,14 +23423,14 @@ PartyResult Player::CanUninviteFromGroup() const
|
||||
if (!sLFGMgr->GetKicksLeft(gguid))
|
||||
return ERR_PARTY_LFG_BOOT_LIMIT;
|
||||
|
||||
LfgState state = sLFGMgr->GetState(gguid);
|
||||
if (state == LFG_STATE_BOOT)
|
||||
lfg::LfgState state = sLFGMgr->GetState(gguid);
|
||||
if (state == lfg::LFG_STATE_BOOT)
|
||||
return ERR_PARTY_LFG_BOOT_IN_PROGRESS;
|
||||
|
||||
if (grp->GetMembersCount() <= LFG_GROUP_KICK_VOTES_NEEDED)
|
||||
if (grp->GetMembersCount() <= lfg::LFG_GROUP_KICK_VOTES_NEEDED)
|
||||
return ERR_PARTY_LFG_BOOT_TOO_FEW_PLAYERS;
|
||||
|
||||
if (state == LFG_STATE_FINISHED_DUNGEON)
|
||||
if (state == lfg::LFG_STATE_FINISHED_DUNGEON)
|
||||
return ERR_PARTY_LFG_BOOT_DUNGEON_COMPLETE;
|
||||
|
||||
if (grp->isRollLootActive())
|
||||
@@ -23463,22 +23460,12 @@ PartyResult Player::CanUninviteFromGroup() const
|
||||
|
||||
bool Player::isUsingLfg()
|
||||
{
|
||||
return sLFGMgr->GetState(GetGUID()) != LFG_STATE_NONE;
|
||||
return sLFGMgr->GetState(GetGUID()) != lfg::LFG_STATE_NONE;
|
||||
}
|
||||
|
||||
bool Player::inRandomLfgDungeon()
|
||||
{
|
||||
if (isUsingLfg())
|
||||
{
|
||||
const LfgDungeonSet& dungeons = sLFGMgr->GetSelectedDungeons(GetGUID());
|
||||
if (!dungeons.empty())
|
||||
{
|
||||
LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(*dungeons.begin());
|
||||
if (dungeon && (dungeon->type == LFG_TYPE_RANDOM || dungeon->seasonal))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return sLFGMgr->inRandomLfgDungeon(GetGUID());
|
||||
}
|
||||
|
||||
void Player::SetBattlegroundOrBattlefieldRaid(Group* group, int8 subgroup)
|
||||
|
||||
@@ -1496,7 +1496,7 @@ void Group::SendUpdateToPlayer(uint64 playerGUID, MemberSlot* slot)
|
||||
data << uint8(slot->roles);
|
||||
if (isLFGGroup())
|
||||
{
|
||||
data << uint8(sLFGMgr->GetState(m_guid) == LFG_STATE_FINISHED_DUNGEON ? 2 : 0); // FIXME - Dungeon save status? 2 = done
|
||||
data << uint8(sLFGMgr->GetState(m_guid) == lfg::LFG_STATE_FINISHED_DUNGEON ? 2 : 0); // FIXME - Dungeon save status? 2 = done
|
||||
data << uint32(sLFGMgr->GetDungeon(m_guid));
|
||||
}
|
||||
|
||||
|
||||
@@ -23,20 +23,20 @@
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
|
||||
void BuildPlayerLockDungeonBlock(WorldPacket& data, LfgLockMap const& lock)
|
||||
void BuildPlayerLockDungeonBlock(WorldPacket& data, lfg::LfgLockMap const& lock)
|
||||
{
|
||||
data << uint32(lock.size()); // Size of lock dungeons
|
||||
for (LfgLockMap::const_iterator it = lock.begin(); it != lock.end(); ++it)
|
||||
for (lfg::LfgLockMap::const_iterator it = lock.begin(); it != lock.end(); ++it)
|
||||
{
|
||||
data << uint32(it->first); // Dungeon entry (id + type)
|
||||
data << uint32(it->second); // Lock status
|
||||
}
|
||||
}
|
||||
|
||||
void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMap)
|
||||
void BuildPartyLockDungeonBlock(WorldPacket& data, lfg::LfgLockPartyMap const& lockMap)
|
||||
{
|
||||
data << uint8(lockMap.size());
|
||||
for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
|
||||
for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
|
||||
{
|
||||
data << uint64(it->first); // Player guid
|
||||
BuildPlayerLockDungeonBlock(data, it->second);
|
||||
@@ -45,7 +45,7 @@ void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMa
|
||||
|
||||
void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
|
||||
{
|
||||
if (!sLFGMgr->isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER) ||
|
||||
if (!sLFGMgr->isOptionEnabled(lfg::LFG_OPTION_ENABLE_DUNGEON_FINDER | lfg::LFG_OPTION_ENABLE_RAID_BROWSER) ||
|
||||
(GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID() &&
|
||||
(GetPlayer()->GetGroup()->GetMembersCount() == MAXGROUPSIZE || !GetPlayer()->GetGroup()->isLFGGroup())))
|
||||
{
|
||||
@@ -66,7 +66,7 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
|
||||
return;
|
||||
}
|
||||
|
||||
LfgDungeonSet newDungeons;
|
||||
lfg::LfgDungeonSet newDungeons;
|
||||
for (int8 i = 0; i < numDungeons; ++i)
|
||||
{
|
||||
uint32 dungeon;
|
||||
@@ -167,21 +167,21 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
GetPlayerInfo().c_str());
|
||||
|
||||
// Get Random dungeons that can be done at a certain level and expansion
|
||||
LfgDungeonSet randomDungeons;
|
||||
lfg::LfgDungeonSet randomDungeons;
|
||||
uint8 level = GetPlayer()->getLevel();
|
||||
uint8 expansion = GetPlayer()->GetSession()->Expansion();
|
||||
|
||||
LFGDungeonContainer& LfgDungeons = sLFGMgr->GetLFGDungeonMap();
|
||||
for (LFGDungeonContainer::const_iterator itr = LfgDungeons.begin(); itr != LfgDungeons.end(); ++itr)
|
||||
lfg::LFGDungeonContainer& LfgDungeons = sLFGMgr->GetLFGDungeonMap();
|
||||
for (lfg::LFGDungeonContainer::const_iterator itr = LfgDungeons.begin(); itr != LfgDungeons.end(); ++itr)
|
||||
{
|
||||
LFGDungeonData const& dungeon = itr->second;
|
||||
if ((dungeon.type == LFG_TYPE_RANDOM || (dungeon.seasonal && sLFGMgr->IsSeasonActive(dungeon.id)))
|
||||
lfg::LFGDungeonData const& dungeon = itr->second;
|
||||
if ((dungeon.type == lfg::LFG_TYPE_RANDOM || (dungeon.seasonal && sLFGMgr->IsSeasonActive(dungeon.id)))
|
||||
&& dungeon.expansion <= expansion && dungeon.minlevel <= level && level <= dungeon.maxlevel)
|
||||
randomDungeons.insert(dungeon.Entry());
|
||||
}
|
||||
|
||||
// Get player locked Dungeons
|
||||
LfgLockMap const& lock = sLFGMgr->GetLockedDungeons(guid);
|
||||
lfg::LfgLockMap const& lock = sLFGMgr->GetLockedDungeons(guid);
|
||||
uint32 rsize = uint32(randomDungeons.size());
|
||||
uint32 lsize = uint32(lock.size());
|
||||
|
||||
@@ -189,10 +189,10 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
WorldPacket data(SMSG_LFG_PLAYER_INFO, 1 + rsize * (4 + 1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4) + 4 + lsize * (1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4));
|
||||
|
||||
data << uint8(randomDungeons.size()); // Random Dungeon count
|
||||
for (LfgDungeonSet::const_iterator it = randomDungeons.begin(); it != randomDungeons.end(); ++it)
|
||||
for (lfg::LfgDungeonSet::const_iterator it = randomDungeons.begin(); it != randomDungeons.end(); ++it)
|
||||
{
|
||||
data << uint32(*it); // Dungeon Entry (id + type)
|
||||
LfgReward const* reward = sLFGMgr->GetRandomDungeonReward(*it, level);
|
||||
lfg::LfgReward const* reward = sLFGMgr->GetRandomDungeonReward(*it, level);
|
||||
Quest const* quest = NULL;
|
||||
bool done = false;
|
||||
if (reward)
|
||||
@@ -250,7 +250,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
return;
|
||||
|
||||
// Get the locked dungeons of the other party members
|
||||
LfgLockPartyMap lockMap;
|
||||
lfg::LfgLockPartyMap lockMap;
|
||||
for (GroupReference* itr = group->GetFirstMember(); itr != NULL; itr = itr->next())
|
||||
{
|
||||
Player* plrg = itr->getSource();
|
||||
@@ -265,7 +265,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
|
||||
}
|
||||
|
||||
uint32 size = 0;
|
||||
for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
|
||||
for (lfg::LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
|
||||
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PARTY_INFO %s", GetPlayerInfo().c_str());
|
||||
@@ -297,7 +297,7 @@ void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
|
||||
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
|
||||
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
LfgUpdateData updateData = sLFGMgr->GetLfgStatus(guid);
|
||||
lfg::LfgUpdateData updateData = sLFGMgr->GetLfgStatus(guid);
|
||||
|
||||
if (GetPlayer()->GetGroup())
|
||||
{
|
||||
@@ -313,19 +313,19 @@ void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgUpdatePlayer(LfgUpdateData const& updateData)
|
||||
void WorldSession::SendLfgUpdatePlayer(lfg::LfgUpdateData const& updateData)
|
||||
{
|
||||
bool queued = false;
|
||||
uint8 size = uint8(updateData.dungeons.size());
|
||||
|
||||
switch (updateData.updateType)
|
||||
{
|
||||
case LFG_UPDATETYPE_JOIN_QUEUE:
|
||||
case LFG_UPDATETYPE_ADDED_TO_QUEUE:
|
||||
case lfg::LFG_UPDATETYPE_JOIN_QUEUE:
|
||||
case lfg::LFG_UPDATETYPE_ADDED_TO_QUEUE:
|
||||
queued = true;
|
||||
break;
|
||||
case LFG_UPDATETYPE_UPDATE_STATUS:
|
||||
queued = updateData.state == LFG_STATE_QUEUED;
|
||||
case lfg::LFG_UPDATETYPE_UPDATE_STATUS:
|
||||
queued = updateData.state == lfg::LFG_STATE_QUEUED;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -343,14 +343,14 @@ void WorldSession::SendLfgUpdatePlayer(LfgUpdateData const& updateData)
|
||||
data << uint8(0); // unk - Always 0
|
||||
|
||||
data << uint8(size);
|
||||
for (LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
|
||||
for (lfg::LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
|
||||
data << uint32(*it);
|
||||
data << updateData.comment;
|
||||
}
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData)
|
||||
void WorldSession::SendLfgUpdateParty(const lfg::LfgUpdateData& updateData)
|
||||
{
|
||||
bool join = false;
|
||||
bool queued = false;
|
||||
@@ -358,15 +358,15 @@ void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData)
|
||||
|
||||
switch (updateData.updateType)
|
||||
{
|
||||
case LFG_UPDATETYPE_ADDED_TO_QUEUE: // Rolecheck Success
|
||||
case lfg::LFG_UPDATETYPE_ADDED_TO_QUEUE: // Rolecheck Success
|
||||
queued = true;
|
||||
// no break on purpose
|
||||
case LFG_UPDATETYPE_PROPOSAL_BEGIN:
|
||||
case lfg::LFG_UPDATETYPE_PROPOSAL_BEGIN:
|
||||
join = true;
|
||||
break;
|
||||
case LFG_UPDATETYPE_UPDATE_STATUS:
|
||||
join = updateData.state != LFG_STATE_ROLECHECK && updateData.state != LFG_STATE_NONE;
|
||||
queued = updateData.state == LFG_STATE_QUEUED;
|
||||
case lfg::LFG_UPDATETYPE_UPDATE_STATUS:
|
||||
join = updateData.state != lfg::LFG_STATE_ROLECHECK && updateData.state != lfg::LFG_STATE_NONE;
|
||||
queued = updateData.state == lfg::LFG_STATE_QUEUED;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -387,7 +387,7 @@ void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData)
|
||||
data << uint8(0); // unk - Always 0
|
||||
|
||||
data << uint8(size);
|
||||
for (LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
|
||||
for (lfg::LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
|
||||
data << uint32(*it);
|
||||
data << updateData.comment;
|
||||
}
|
||||
@@ -406,9 +406,9 @@ void WorldSession::SendLfgRoleChosen(uint64 guid, uint8 roles)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck)
|
||||
void WorldSession::SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& roleCheck)
|
||||
{
|
||||
LfgDungeonSet dungeons;
|
||||
lfg::LfgDungeonSet dungeons;
|
||||
if (roleCheck.rDungeonId)
|
||||
dungeons.insert(roleCheck.rDungeonId);
|
||||
else
|
||||
@@ -418,13 +418,13 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck)
|
||||
WorldPacket data(SMSG_LFG_ROLE_CHECK_UPDATE, 4 + 1 + 1 + dungeons.size() * 4 + 1 + roleCheck.roles.size() * (8 + 1 + 4 + 1));
|
||||
|
||||
data << uint32(roleCheck.state); // Check result
|
||||
data << uint8(roleCheck.state == LFG_ROLECHECK_INITIALITING);
|
||||
data << uint8(roleCheck.state == lfg::LFG_ROLECHECK_INITIALITING);
|
||||
data << uint8(dungeons.size()); // Number of dungeons
|
||||
if (!dungeons.empty())
|
||||
{
|
||||
for (LfgDungeonSet::iterator it = dungeons.begin(); it != dungeons.end(); ++it)
|
||||
for (lfg::LfgDungeonSet::iterator it = dungeons.begin(); it != dungeons.end(); ++it)
|
||||
{
|
||||
LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(*it);
|
||||
lfg::LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(*it);
|
||||
data << uint32(dungeon ? dungeon->Entry() : 0); // Dungeon
|
||||
}
|
||||
}
|
||||
@@ -441,7 +441,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck)
|
||||
Player* player = ObjectAccessor::FindPlayer(guid);
|
||||
data << uint8(player ? player->getLevel() : 0); // Level
|
||||
|
||||
for (LfgRolesMap::const_iterator it = roleCheck.roles.begin(); it != roleCheck.roles.end(); ++it)
|
||||
for (lfg::LfgRolesMap::const_iterator it = roleCheck.roles.begin(); it != roleCheck.roles.end(); ++it)
|
||||
{
|
||||
if (it->first == roleCheck.leader)
|
||||
continue;
|
||||
@@ -458,10 +458,10 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgJoinResult(LfgJoinResultData const& joinData)
|
||||
void WorldSession::SendLfgJoinResult(lfg::LfgJoinResultData const& joinData)
|
||||
{
|
||||
uint32 size = 0;
|
||||
for (LfgLockPartyMap::const_iterator it = joinData.lockmap.begin(); it != joinData.lockmap.end(); ++it)
|
||||
for (lfg::LfgLockPartyMap::const_iterator it = joinData.lockmap.begin(); it != joinData.lockmap.end(); ++it)
|
||||
size += 8 + 4 + uint32(it->second.size()) * (4 + 4);
|
||||
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_JOIN_RESULT %s checkResult: %u checkValue: %u",
|
||||
@@ -475,7 +475,7 @@ void WorldSession::SendLfgJoinResult(LfgJoinResultData const& joinData)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgQueueStatus(LfgQueueStatusData const& queueData)
|
||||
void WorldSession::SendLfgQueueStatus(lfg::LfgQueueStatusData const& queueData)
|
||||
{
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_QUEUE_STATUS %s dungeon: %u, waitTime: %d, "
|
||||
"avgWaitTime: %d, waitTimeTanks: %d, waitTimeHealer: %d, waitTimeDps: %d, "
|
||||
@@ -498,7 +498,7 @@ void WorldSession::SendLfgQueueStatus(LfgQueueStatusData const& queueData)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgPlayerReward(LfgPlayerRewardData const& rewardData)
|
||||
void WorldSession::SendLfgPlayerReward(lfg::LfgPlayerRewardData const& rewardData)
|
||||
{
|
||||
if (!rewardData.rdungeonEntry || !rewardData.sdungeonEntry || !rewardData.quest)
|
||||
return;
|
||||
@@ -532,42 +532,42 @@ void WorldSession::SendLfgPlayerReward(LfgPlayerRewardData const& rewardData)
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgBootProposalUpdate(LfgPlayerBoot const& boot)
|
||||
void WorldSession::SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
LfgAnswer playerVote = boot.votes.find(guid)->second;
|
||||
lfg::LfgAnswer playerVote = boot.votes.find(guid)->second;
|
||||
uint8 votesNum = 0;
|
||||
uint8 agreeNum = 0;
|
||||
uint32 secsleft = uint8((boot.cancelTime - time(NULL)) / 1000);
|
||||
for (LfgAnswerContainer::const_iterator it = boot.votes.begin(); it != boot.votes.end(); ++it)
|
||||
for (lfg::LfgAnswerContainer::const_iterator it = boot.votes.begin(); it != boot.votes.end(); ++it)
|
||||
{
|
||||
if (it->second != LFG_ANSWER_PENDING)
|
||||
if (it->second != lfg::LFG_ANSWER_PENDING)
|
||||
{
|
||||
++votesNum;
|
||||
if (it->second == LFG_ANSWER_AGREE)
|
||||
if (it->second == lfg::LFG_ANSWER_AGREE)
|
||||
++agreeNum;
|
||||
}
|
||||
}
|
||||
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_BOOT_PROPOSAL_UPDATE %s inProgress: %u - "
|
||||
"didVote: %u - agree: %u - victim: %u votes: %u - agrees: %u - left: %u - "
|
||||
"needed: %u - reason %s",
|
||||
GetPlayerInfo().c_str(), uint8(boot.inProgress), uint8(playerVote != LFG_ANSWER_PENDING),
|
||||
uint8(playerVote == LFG_ANSWER_AGREE), GUID_LOPART(boot.victim), votesNum, agreeNum,
|
||||
secsleft, LFG_GROUP_KICK_VOTES_NEEDED, boot.reason.c_str());
|
||||
GetPlayerInfo().c_str(), uint8(boot.inProgress), uint8(playerVote != lfg::LFG_ANSWER_PENDING),
|
||||
uint8(playerVote == lfg::LFG_ANSWER_AGREE), GUID_LOPART(boot.victim), votesNum, agreeNum,
|
||||
secsleft, lfg::LFG_GROUP_KICK_VOTES_NEEDED, boot.reason.c_str());
|
||||
WorldPacket data(SMSG_LFG_BOOT_PROPOSAL_UPDATE, 1 + 1 + 1 + 8 + 4 + 4 + 4 + 4 + boot.reason.length());
|
||||
data << uint8(boot.inProgress); // Vote in progress
|
||||
data << uint8(playerVote != LFG_ANSWER_PENDING); // Did Vote
|
||||
data << uint8(playerVote == LFG_ANSWER_AGREE); // Agree
|
||||
data << uint8(playerVote != lfg::LFG_ANSWER_PENDING); // Did Vote
|
||||
data << uint8(playerVote == lfg::LFG_ANSWER_AGREE); // Agree
|
||||
data << uint64(boot.victim); // Victim GUID
|
||||
data << uint32(votesNum); // Total Votes
|
||||
data << uint32(agreeNum); // Agree Count
|
||||
data << uint32(secsleft); // Time Left
|
||||
data << uint32(LFG_GROUP_KICK_VOTES_NEEDED); // Needed Votes
|
||||
data << uint32(lfg::LFG_GROUP_KICK_VOTES_NEEDED); // Needed Votes
|
||||
data << boot.reason.c_str(); // Kick reason
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
void WorldSession::SendLfgUpdateProposal(LfgProposal const& proposal)
|
||||
void WorldSession::SendLfgUpdateProposal(lfg::LfgProposal const& proposal)
|
||||
{
|
||||
uint64 guid = GetPlayer()->GetGUID();
|
||||
uint64 gguid = proposal.players.find(guid)->second.group;
|
||||
@@ -580,12 +580,12 @@ void WorldSession::SendLfgUpdateProposal(LfgProposal const& proposal)
|
||||
// show random dungeon if player selected random dungeon and it's not lfg group
|
||||
if (!silent)
|
||||
{
|
||||
LfgDungeonSet const& playerDungeons = sLFGMgr->GetSelectedDungeons(guid);
|
||||
lfg::LfgDungeonSet const& playerDungeons = sLFGMgr->GetSelectedDungeons(guid);
|
||||
if (playerDungeons.find(proposal.dungeonId) == playerDungeons.end())
|
||||
dungeonEntry = (*playerDungeons.begin());
|
||||
}
|
||||
|
||||
if (LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonEntry))
|
||||
if (lfg::LFGDungeonData const* dungeon = sLFGMgr->GetLFGDungeon(dungeonEntry))
|
||||
dungeonEntry = dungeon->Entry();
|
||||
|
||||
WorldPacket data(SMSG_LFG_PROPOSAL_UPDATE, 4 + 1 + 4 + 4 + 1 + 1 + proposal.players.size() * (4 + 1 + 1 + 1 + 1 +1));
|
||||
@@ -596,9 +596,9 @@ void WorldSession::SendLfgUpdateProposal(LfgProposal const& proposal)
|
||||
data << uint8(silent); // Show proposal window
|
||||
data << uint8(proposal.players.size()); // Group size
|
||||
|
||||
for (LfgProposalPlayerContainer::const_iterator it = proposal.players.begin(); it != proposal.players.end(); ++it)
|
||||
for (lfg::LfgProposalPlayerContainer::const_iterator it = proposal.players.begin(); it != proposal.players.end(); ++it)
|
||||
{
|
||||
LfgProposalPlayer const& player = it->second;
|
||||
lfg::LfgProposalPlayer const& player = it->second;
|
||||
data << uint32(player.role); // Role
|
||||
data << uint8(it->first == guid); // Self player
|
||||
if (!player.group) // Player not it a group
|
||||
@@ -611,8 +611,8 @@ void WorldSession::SendLfgUpdateProposal(LfgProposal const& proposal)
|
||||
data << uint8(player.group == proposal.group); // In dungeon (silent)
|
||||
data << uint8(player.group == gguid); // Same Group than player
|
||||
}
|
||||
data << uint8(player.accept != LFG_ANSWER_PENDING);// Answered
|
||||
data << uint8(player.accept == LFG_ANSWER_AGREE); // Accepted
|
||||
data << uint8(player.accept != lfg::LFG_ANSWER_PENDING);// Answered
|
||||
data << uint8(player.accept == lfg::LFG_ANSWER_AGREE); // Accepted
|
||||
}
|
||||
SendPacket(&data);
|
||||
}
|
||||
|
||||
@@ -2486,7 +2486,7 @@ bool InstanceMap::AddPlayerToMap(Player* player)
|
||||
}
|
||||
|
||||
if (group && group->isLFGGroup())
|
||||
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
|
||||
player->CastSpell(player, lfg::LFG_SPELL_LUCK_OF_THE_DRAW, true);
|
||||
}
|
||||
|
||||
// for normal instances cancel the reset schedule when the
|
||||
|
||||
@@ -48,15 +48,18 @@ struct AreaTableEntry;
|
||||
struct AuctionEntry;
|
||||
struct DeclinedName;
|
||||
struct ItemTemplate;
|
||||
struct MovementInfo;
|
||||
|
||||
namespace lfg
|
||||
{
|
||||
struct LfgJoinResultData;
|
||||
struct LfgLockStatus;
|
||||
struct LfgPlayerBoot;
|
||||
struct LfgProposal;
|
||||
struct LfgQueueStatusData;
|
||||
struct LfgPlayerRewardData;
|
||||
struct LfgRoleCheck;
|
||||
struct LfgUpdateData;
|
||||
struct MovementInfo;
|
||||
}
|
||||
|
||||
enum AccountDataType
|
||||
{
|
||||
@@ -782,16 +785,16 @@ class WorldSession
|
||||
void HandleLfrLeaveOpcode(WorldPacket& recvData);
|
||||
void HandleLfgGetStatus(WorldPacket& recvData);
|
||||
|
||||
void SendLfgUpdatePlayer(LfgUpdateData const& updateData);
|
||||
void SendLfgUpdateParty(LfgUpdateData const& updateData);
|
||||
void SendLfgUpdatePlayer(lfg::LfgUpdateData const& updateData);
|
||||
void SendLfgUpdateParty(lfg::LfgUpdateData const& updateData);
|
||||
void SendLfgRoleChosen(uint64 guid, uint8 roles);
|
||||
void SendLfgRoleCheckUpdate(LfgRoleCheck const& pRoleCheck);
|
||||
void SendLfgRoleCheckUpdate(lfg::LfgRoleCheck const& pRoleCheck);
|
||||
void SendLfgLfrList(bool update);
|
||||
void SendLfgJoinResult(LfgJoinResultData const& joinData);
|
||||
void SendLfgQueueStatus(LfgQueueStatusData const& queueData);
|
||||
void SendLfgPlayerReward(LfgPlayerRewardData const& lfgPlayerRewardData);
|
||||
void SendLfgBootProposalUpdate(LfgPlayerBoot const& boot);
|
||||
void SendLfgUpdateProposal(LfgProposal const& proposal);
|
||||
void SendLfgJoinResult(lfg::LfgJoinResultData const& joinData);
|
||||
void SendLfgQueueStatus(lfg::LfgQueueStatusData const& queueData);
|
||||
void SendLfgPlayerReward(lfg::LfgPlayerRewardData const& lfgPlayerRewardData);
|
||||
void SendLfgBootProposalUpdate(lfg::LfgPlayerBoot const& boot);
|
||||
void SendLfgUpdateProposal(lfg::LfgProposal const& proposal);
|
||||
void SendLfgDisabled();
|
||||
void SendLfgOfferContinue(uint32 dungeonEntry);
|
||||
void SendLfgTeleportError(uint8 err);
|
||||
|
||||
@@ -28,12 +28,12 @@ void GetPlayerInfo(ChatHandler* handler, Player* player)
|
||||
return;
|
||||
|
||||
uint64 guid = player->GetGUID();
|
||||
LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
|
||||
lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
|
||||
|
||||
std::string const& state = sLFGMgr->GetStateString(sLFGMgr->GetState(guid));
|
||||
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
|
||||
handler->PSendSysMessage(LANG_LFG_PLAYER_INFO, player->GetName().c_str(),
|
||||
state.c_str(), uint8(dungeons.size()), sLFGMgr->ConcatenateDungeons(dungeons).c_str(),
|
||||
sLFGMgr->GetRolesString(sLFGMgr->GetRoles(guid)).c_str(), sLFGMgr->GetComment(guid).c_str());
|
||||
state.c_str(), uint8(dungeons.size()), lfg::ConcatenateDungeons(dungeons).c_str(),
|
||||
lfg::GetRolesString(sLFGMgr->GetRoles(guid)).c_str(), sLFGMgr->GetComment(guid).c_str());
|
||||
}
|
||||
|
||||
class lfg_commandscript : public CommandScript
|
||||
@@ -87,7 +87,7 @@ public:
|
||||
}
|
||||
|
||||
uint64 guid = grp->GetGUID();
|
||||
std::string const& state = sLFGMgr->GetStateString(sLFGMgr->GetState(guid));
|
||||
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
|
||||
handler->PSendSysMessage(LANG_LFG_GROUP_INFO, grp->isLFGGroup(),
|
||||
state.c_str(), sLFGMgr->GetDungeon(guid));
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "ace/INET_Addr.h"
|
||||
#include "Player.h"
|
||||
#include "Pet.h"
|
||||
#include "LFGMgr.h"
|
||||
#include "LFG.h"
|
||||
#include "GroupMgr.h"
|
||||
|
||||
class misc_commandscript : public CommandScript
|
||||
@@ -2863,7 +2863,7 @@ public:
|
||||
const char* onlineState = (p && p->IsInWorld()) ? "online" : "offline";
|
||||
|
||||
handler->PSendSysMessage(LANG_GROUP_PLAYER_NAME_GUID, slot.name.c_str(), onlineState,
|
||||
GUID_LOPART(slot.guid), flags.c_str(), LFGMgr::GetRolesString(slot.roles).c_str());
|
||||
GUID_LOPART(slot.guid), flags.c_str(), lfg::GetRolesString(slot.roles).c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user