Fix Player UnbindAllInstances for AC

This commit is contained in:
newrage
2021-03-19 22:23:47 +02:00
committed by Rochet2
parent e807d0172b
commit dc05a4b4aa

View File

@@ -2463,12 +2463,16 @@ namespace LuaPlayer
for (BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end();) for (BoundInstancesMap::const_iterator itr = binds.begin(); itr != binds.end();)
{ {
if (itr->first != player->GetMapId()) if (itr->first != player->GetMapId())
//player->UnbindInstance(itr, Difficulty(i)); {
sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUIDLow(), itr->first, Difficulty(i), true, player); sInstanceSaveMgr->PlayerUnbindInstance(player->GetGUIDLow(), itr->first, Difficulty(i), true, player);
itr = binds.begin();
}
else else
{
++itr; ++itr;
} }
} }
}
#else #else
for (uint8 i = 0; i < MAX_DIFFICULTY; ++i) for (uint8 i = 0; i < MAX_DIFFICULTY; ++i)
{ {