Skip to content
This repository has been archived by the owner on Jul 27, 2020. It is now read-only.

Commit

Permalink
Core/Battlefields: Fixed tol barad's display output
Browse files Browse the repository at this point in the history
- now will output if it was successfully loaded or not.

Signed-off-by: Bootz <bootz@projectskyfire.org>
  • Loading branch information
Bootz committed Apr 9, 2012
1 parent 0a28589 commit ead2e74
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
38 changes: 20 additions & 18 deletions src/server/game/Battlefields/BattlefieldMgr.cpp
Expand Up @@ -38,33 +38,35 @@ BattlefieldMgr::~BattlefieldMgr()

void BattlefieldMgr::InitBattlefield()
{
Battlefield* pBf = new BattlefieldWG;
Battlefield* pBf_wg = new BattlefieldWG;
// respawn, init variables
if (!pBf->SetupBattlefield())
if (!pBf_wg->SetupBattlefield())
{
sLog->outString();
sLog->outString("Battlefield : Wintergrasp init failed.");
delete pBf;
sLog->outString("Battlefield: Wintergrasp initialization failed.");
delete pBf_wg;
}
else
{
m_BattlefieldSet.push_back(pBf);
m_BattlefieldSet.push_back(pBf_wg);
sLog->outString();
sLog->outString("Battlefield : Wintergrasp successfully initiated.");
sLog->outString("Battlefield: Wintergrasp was successfully initiated.");
}

//pBf = new BattlefieldTB;
//// respawn, init variables
//if (!pBf->SetupBattlefield())
//{
// sLog->outDebug(LOG_FILTER_BATTLEFIELD, "Battlefield : Tol Barad init failed.");
// delete pBf;
//}
//else
//{
// m_BattlefieldSet.push_back(pBf);
// sLog->outDebug(LOG_FILTER_BATTLEFIELD, "Battlefield : Tol Barad successfully initiated.");
//}
Battlefield* pBf_tb = new BattlefieldTB;
// respawn, init variables
if (!pBf_tb->SetupBattlefield())
{
sLog->outString();
sLog->outString("Battlefield: Tol Barad initialization failed.");
delete pBf_tb;
}
else
{
m_BattlefieldSet.push_back(pBf_tb);
sLog->outString();
sLog->outString("Battlefield: Tol Barad was successfully initiated.");
}
}

void BattlefieldMgr::AddZone(uint32 zoneid, Battlefield* handle)
Expand Down
2 changes: 1 addition & 1 deletion src/server/game/Battlefields/Zones/BattlefieldTB.cpp
Expand Up @@ -24,7 +24,7 @@ bool BattlefieldTB::SetupBattlefield()
m_TypeId = BATTLEFIELD_TB; //View enum BattlefieldTypes
m_BattleId = BATTLEFIELD_BATTLEID_TB;
m_ZoneId = 5095; // Tol Barad
_MapId = 732; // Map X
_MapId = 732; // Map X
m_MaxPlayer = sWorld->getIntConfig(CONFIG_TOL_BARAD_PLR_MAX);
m_enable = sWorld->getBoolConfig(CONFIG_TOL_BARAD_ENABLE);
m_MinPlayer = sWorld->getIntConfig(CONFIG_TOL_BARAD_PLR_MIN);
Expand Down

0 comments on commit ead2e74

Please sign in to comment.