PATCH: http://paste2.org/p/442584
PATCH v2: http://paste2.org/p/443389
PATCH v3: http://paste2.org/p/443624
What this does: It makes BattleGround objects use the same method of map lookups as Ambal made WorldObject objects do. This way, we can avoid MapManager and HashMapHolder lookups, which is both safer and faster for map multi-threading. Note that I chose to let BattleGround objects still have a map ID, because it's needed in some special cases (this is mostly because we use BattleGround objects as templates, which is bad, but I don't want to rewrite it all ).
When you test this, look for:
* Do BGs start and end correctly? * Do BG creatures/gameobjects spawn/despawn correctly? * Do BG flag pickup/drop events work correctly? * Do BGs crash (if so, include backtrace!)? Who has been writing this: Me, with help from balrok and kolomati.
Thanks to everyone who tests this, also.