[svn] -enabled instantiated battlegrounds

-enabled arena matches
-rewritten battleground queuing to support joining as group
-removed queue announcements

--HG--
branch : trunk
This commit is contained in:
w12x committed 2008-10-05 08:48:32 -05:00
1 parent 8b3fcc37c6
commit 6f0c3469a6
40 files changed
+3258 -744

No files matched your search

+11 -1
View File
@@ -141,7 +141,17 @@ Map* MapInstanced::GetInstance(const WorldObject* obj)
uint32 NewInstanceId = 0; // instanceId of the resulting map
Player* player = (Player*)obj;
// TODO: battlegrounds and arenas
if(IsBattleGroundOrArena())
{
// instantiate or find existing bg map for player
// the instance id is set in battlegroundid
NewInstanceId = player->GetBattleGroundId();
assert(NewInstanceId);
map = _FindMap(NewInstanceId);
if(!map)
map = CreateBattleGround(NewInstanceId);
return map;
}
InstancePlayerBind *pBind = player->GetBoundInstance(GetId(), player->GetDifficulty());
InstanceSave *pSave = pBind ? pBind->save : NULL;