Map/Instances: Greatly simplify PermBindAllPlayers logic. (#17940)

This commit is contained in:
Treeston
2016-09-16 13:09:16 +02:00
committed by GitHub
parent cd6866c155
commit cf628880d5
4 changed files with 21 additions and 33 deletions

View File

@@ -365,17 +365,7 @@ public:
if (isFriendly)
{
me->setDeathState(JUST_DIED);
Map::PlayerList const& players = me->GetMap()->GetPlayers();
if (!players.isEmpty())
{
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
{
Player* player = itr->GetSource();
if (player)
me->GetMap()->ToInstanceMap()->PermBindAllPlayers(player);
}
}
me->GetMap()->ToInstanceMap()->PermBindAllPlayers();
}
else
{