mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 10:26:28 +01:00
Merge commit '44959aeedddb552c50bf9ff06a2685d216844f24' into 4.3.4
Conflicts: .travis.yml README.md sql/updates/world/2015_04_18_00_world.sql sql/updates/world/2015_04_18_05_world_335.sql sql/updates/world/2015_04_26_03_world_335.sql sql/updates/world/2015_05_09_00_world_335.sql src/server/game/Conditions/ConditionMgr.h src/server/game/Entities/GameObject/GameObject.cpp src/server/game/Entities/GameObject/GameObject.h src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Spells/SpellInfo.cpp
This commit is contained in:
@@ -99,7 +99,17 @@ void LFGPlayerScript::OnMapChanged(Player* player)
|
||||
player->CastSpell(player, LFG_SPELL_LUCK_OF_THE_DRAW, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
Group* group = player->GetGroup();
|
||||
if (group && group->GetMembersCount() == 1)
|
||||
{
|
||||
sLFGMgr->LeaveLfg(group->GetGUID());
|
||||
group->Disband();
|
||||
TC_LOG_DEBUG("lfg", "LFGPlayerScript::OnMapChanged, Player %s(%s) is last in the lfggroup so we disband the group.",
|
||||
player->GetName().c_str(), player->GetGUID().ToString().c_str());
|
||||
}
|
||||
player->RemoveAurasDueToSpell(LFG_SPELL_LUCK_OF_THE_DRAW);
|
||||
}
|
||||
}
|
||||
|
||||
LFGGroupScript::LFGGroupScript() : GroupScript("LFGGroupScript") { }
|
||||
|
||||
Reference in New Issue
Block a user