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:
Carbenium
2015-07-22 01:33:48 +02:00
61 changed files with 1019 additions and 626 deletions

View File

@@ -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") { }