[Question][Script] Starting a Battleground Instance menu

User Tag List

Results 1 to 2 of 2
  1. #1
    DrakeFish's Avatar Lazy Leecher

    Reputation
    634
    Join Date
    Nov 2008
    Posts
    569
    Thanks G/R
    0/14
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question][Script] Starting a Battleground Instance

    I'm currently working on a LAN server project and I need to start a battleground instance by myself. I can do the joining myself, I won't need help for that. My problem is that my current code causes assertion fails and other such problems like server process freeze.

    Most of this code is temporary, what I'm trying to do there is initialize a new BG instance and start it (I've been doing this from the Battleground functions from the trinity source, but I probably forgot something).

    Code:
    BattlegroundTypeId bgTypeId = BattlegroundTypeId::BATTLEGROUND_AB;
    
    Battleground * bg_template = sBattlegroundMgr->GetBattlegroundTemplate(bgTypeId);
    PvPDifficultyEntry const* bracketEntry = GetBattlegroundBracketById(bg_template->GetMapId(), BattlegroundBracketId::BG_BRACKET_ID_FIRST);
    
    Battleground * bg2 = sBattlegroundMgr->CreateNewBattleground(bgTypeId, bracketEntry, 0, false);
    
    bg2->StartBattleground();
    The assertion failure error I get is about MapID not existing when I try to make my player join. I'll take a guess and say that it's because I'm doing the initialization wrong =).


    EDIT:
    I decided to use the actual queue system. I already got everything working using it as most of it is handled by the server.
    Last edited by DrakeFish; 04-24-2011 at 10:24 PM.

    [Question][Script] Starting a Battleground Instance
  2. #2
    keeevin92's Avatar Member
    Reputation
    8
    Join Date
    Jul 2007
    Posts
    203
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use .debug bg and your able to join as only 1 player.

Similar Threads

  1. [Leet Guide] How to Make and script your own custom instance
    By mager1794 in forum WoW EMU Guides & Tutorials
    Replies: 33
    Last Post: 07-05-2008, 06:43 PM
  2. [Question] Scripting
    By Autumnbearbravehunter in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 03-28-2008, 08:29 PM
  3. [Question] Area edits (BLP), battlegrounds?
    By ThatOneGuyFromBefore in forum WoW ME Questions and Requests
    Replies: 1
    Last Post: 03-09-2008, 08:04 PM
  4. [QUESTION] - Cant start my server in public (hamachi)
    By cyber_geek in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 01-26-2008, 12:12 PM
  5. Server questions and starting points
    By dissidence in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 10-27-2007, 11:01 PM
All times are GMT -5. The time now is 08:26 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search