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 <[email protected]>
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user