aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Server/Protocol
diff options
context:
space:
mode:
authorSubv2112 <s.v.h.21@hotmail.com>2012-01-14 17:37:28 +0100
committerMachiavelli <machiavelli.trinity@gmail.com>2012-01-14 17:37:28 +0100
commitf4075f0f945c842fe2b1a08ea4a7fa253e8e2e53 (patch)
treebe27baca490ad8088774a2f7e7c20c319a766b01 /src/server/game/Server/Protocol
parentdbbac0bdaae4b6d8a0125999962c4a686092bd80 (diff)
Core/LFG:
Fix priority of the player when its added to the lfg group Better implementation of the Dungeon Deserter debuff Rewrite the NeedBeforeGreed loot Fixed players being shown as Unknown Entity when entering the lfg group Some incremental optimizations after original patch Thanks to Retriman and Paecman for base implementation Signed-off-by: Machiavelli <machiavelli.trinity@gmail.com>
Diffstat (limited to 'src/server/game/Server/Protocol')
-rw-r--r--src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp14
-rwxr-xr-xsrc/server/game/Server/Protocol/Handlers/LFGHandler.cpp3
2 files changed, 15 insertions, 2 deletions
diff --git a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
index 35276bb1d0a..bd9668ce5b8 100644
--- a/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/CharacterHandler.cpp
@@ -43,6 +43,7 @@
#include "ScriptMgr.h"
#include "Battleground.h"
#include "AccountMgr.h"
+#include "LFGMgr.h"
class LoginQueryHolder : public SQLQueryHolder
{
@@ -196,7 +197,7 @@ bool LoginQueryHolder::Initialize()
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_ACCOUNT_INSTANCELOCKTIMES);
stmt->setUInt32(0, m_accountId);
res &= SetPreparedQuery(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES, stmt);
-
+
return res;
}
@@ -892,6 +893,17 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
}
}
+ if (Group* group = pCurrChar->GetGroup())
+ {
+ if (group->isLFGGroup())
+ {
+ LfgDungeonSet Dungeons;
+ Dungeons.insert(sLFGMgr->GetDungeon(group->GetGUID()));
+ sLFGMgr->SetSelectedDungeons(pCurrChar->GetGUID(), Dungeons);
+ sLFGMgr->SetState(pCurrChar->GetGUID(), sLFGMgr->GetState(group->GetGUID()));
+ }
+ }
+
if (!pCurrChar->GetMap()->AddPlayerToMap(pCurrChar) || !pCurrChar->CheckInstanceLoginValid())
{
AreaTrigger const* at = sObjectMgr->GetGoBackTrigger(pCurrChar->GetMapId());
diff --git a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
index 52b4d4abbed..3c6bd28b5cb 100755
--- a/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
+++ b/src/server/game/Server/Protocol/Handlers/LFGHandler.cpp
@@ -48,7 +48,8 @@ void BuildPartyLockDungeonBlock(WorldPacket& data, const LfgLockPartyMap& lockMa
void WorldSession::HandleLfgJoinOpcode(WorldPacket& recv_data)
{
if (!sWorld->getBoolConfig(CONFIG_DUNGEON_FINDER_ENABLE) ||
- (GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID()))
+ (GetPlayer()->GetGroup() && GetPlayer()->GetGroup()->GetLeaderGUID() != GetPlayer()->GetGUID() &&
+ (GetPlayer()->GetGroup()->GetMembersCount() == MAXGROUPSIZE || !GetPlayer()->GetGroup()->isLFGGroup())))
{
recv_data.rfinish();
return;