mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT * correct CheckCompactArrayMaskOverflow * 1 * Update src/server/game/Spells/Spell.cpp * rework logging * add fmt replace logs * logging * FMT_LOG_ * settings * fix startup * 1 * 2 * 3 * 4 * 5 * fmt::print * to fmt
This commit is contained in:
@@ -120,7 +120,7 @@ bool ArenaTeam::AddMember(ObjectGuid playerGuid)
|
||||
// Check if player is already in a similar arena team
|
||||
if ((player && player->GetArenaTeamId(GetSlot())) || sCharacterCache->GetCharacterArenaTeamIdByGuid(playerGuid, GetSlot()) != 0)
|
||||
{
|
||||
LOG_ERROR("bg.arena", "Arena: Player %s (%s) already has an arena team of type %u", playerName.c_str(), playerGuid.ToString().c_str(), GetType());
|
||||
LOG_ERROR("bg.arena", "Arena: Player {} ({}) already has an arena team of type {}", playerName, playerGuid.ToString(), GetType());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -255,7 +255,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
// Delete member if character information is missing
|
||||
if (fields[6].GetString().empty())
|
||||
{
|
||||
LOG_ERROR("sql.sql", "ArenaTeam %u has member with empty name - probably player %s doesn't exist, deleting him from memberlist!", arenaTeamId, newMember.Guid.ToString().c_str());
|
||||
LOG_ERROR("sql.sql", "ArenaTeam {} has member with empty name - probably player {} doesn't exist, deleting him from memberlist!", arenaTeamId, newMember.Guid.ToString());
|
||||
this->DelMember(newMember.Guid, true);
|
||||
continue;
|
||||
}
|
||||
@@ -272,7 +272,7 @@ bool ArenaTeam::LoadMembersFromDB(QueryResult result)
|
||||
if (Empty() || !captainPresentInTeam)
|
||||
{
|
||||
// Arena team is empty or captain is not in team, delete from db
|
||||
LOG_DEBUG("bg.battleground", "ArenaTeam %u does not have any members or its captain is not in team, disbanding it...", TeamId);
|
||||
LOG_DEBUG("bg.battleground", "ArenaTeam {} does not have any members or its captain is not in team, disbanding it...", TeamId);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -314,9 +314,9 @@ void ArenaTeam::SetCaptain(ObjectGuid guid)
|
||||
newCaptain->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 0);
|
||||
/*if (oldCaptain)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "Player: %s [%s] promoted player: %s [%s] to leader of arena team [Id: %u] [Type: %u].",
|
||||
oldCaptain->GetName().c_str(), oldCaptain->GetGUID().ToString().c_str(), newCaptain->GetName().c_str(),
|
||||
newCaptain->GetGUID().ToString().c_str(), GetId(), GetType());
|
||||
LOG_DEBUG("bg.battleground", "Player: {} [{}] promoted player: {} [{}] to leader of arena team [Id: {}] [Type: {}].",
|
||||
oldCaptain->GetName(), oldCaptain->GetGUID().ToString(), newCaptain->GetName(),
|
||||
newCaptain->GetGUID().ToString(), GetId(), GetType());
|
||||
}*/
|
||||
}
|
||||
}
|
||||
@@ -586,7 +586,7 @@ void ArenaTeam::BroadcastEvent(ArenaTeamEvents event, ObjectGuid guid, uint8 str
|
||||
data << str1 << str2 << str3;
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("bg.arena", "Unhandled strCount %u in ArenaTeam::BroadcastEvent", strCount);
|
||||
LOG_ERROR("bg.arena", "Unhandled strCount {} in ArenaTeam::BroadcastEvent", strCount);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -622,7 +622,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
|
||||
auto const& itr = ArenaSlotByType.find(type);
|
||||
if (itr == ArenaSlotByType.end())
|
||||
{
|
||||
sLog->outError("FATAL: Unknown arena team type %u for some arena team", type);
|
||||
LOG_ERROR("bg.arena", "Unknown arena team type {} for some arena team", type);
|
||||
return slot;
|
||||
}
|
||||
|
||||
@@ -636,7 +636,7 @@ uint8 ArenaTeam::GetSlotByType(uint32 type)
|
||||
return slot;
|
||||
}
|
||||
|
||||
LOG_ERROR("bg.arena", "FATAL: Unknown arena team type %u for some arena team", type);
|
||||
LOG_ERROR("bg.arena", "Unknown arena team type {} for some arena team", type);
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
@@ -1013,7 +1013,7 @@ uint8 ArenaTeam::GetReqPlayersForType(uint32 type)
|
||||
auto const& itr = ArenaReqPlayersForType.find(type);
|
||||
if (itr == ArenaReqPlayersForType.end())
|
||||
{
|
||||
sLog->outError("FATAL: Unknown arena type %u!", type);
|
||||
LOG_ERROR("bg.arena", "FATAL: Unknown arena type {}!", type);
|
||||
return 0xFF;
|
||||
}
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ void ArenaTeamMgr::LoadArenaTeams()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded %u arena teams in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", ">> Loaded {} arena teams in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
|
||||
@@ -315,7 +315,7 @@ inline void Battleground::_CheckSafePositions(uint32 diff)
|
||||
GetTeamStartLoc(itr->second->GetBgTeamId(), x, y, z, o);
|
||||
if (pos.GetExactDistSq(x, y, z) > maxDist)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "BATTLEGROUND: Sending %s back to start location (map: %u) (possible exploit)", itr->second->GetName().c_str(), GetMapId());
|
||||
LOG_DEBUG("bg.battleground", "BATTLEGROUND: Sending {} back to start location (map: {}) (possible exploit)", itr->second->GetName(), GetMapId());
|
||||
itr->second->TeleportTo(GetMapId(), x, y, z, o);
|
||||
}
|
||||
}
|
||||
@@ -451,7 +451,7 @@ inline void Battleground::_ProcessJoin(uint32 diff)
|
||||
|
||||
if (!FindBgMap())
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Battleground::_ProcessJoin: map (map id: %u, instance id: %u) is not created!", m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::_ProcessJoin: map (map id: {}, instance id: {}) is not created!", m_MapId, m_InstanceID);
|
||||
EndNow();
|
||||
return;
|
||||
}
|
||||
@@ -1167,7 +1167,7 @@ void Battleground::Init()
|
||||
|
||||
if (m_BgInvitedPlayers[TEAM_ALLIANCE] > 0 || m_BgInvitedPlayers[TEAM_HORDE] > 0)
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Battleground::Reset: one of the counters is not 0 (alliance: %u, horde: %u) for BG (map: %u, instance id: %u)!", m_BgInvitedPlayers[TEAM_ALLIANCE], m_BgInvitedPlayers[TEAM_HORDE], m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::Reset: one of the counters is not 0 (alliance: {}, horde: {}) for BG (map: {}, instance id: {})!", m_BgInvitedPlayers[TEAM_ALLIANCE], m_BgInvitedPlayers[TEAM_HORDE], m_MapId, m_InstanceID);
|
||||
ABORT();
|
||||
}
|
||||
|
||||
@@ -1266,7 +1266,7 @@ void Battleground::AddPlayer(Player* player)
|
||||
sScriptMgr->OnBattlegroundAddPlayer(this, player);
|
||||
|
||||
// Log
|
||||
LOG_DEBUG("bg.battleground", "BATTLEGROUND: Player %s joined the battle.", player->GetName().c_str());
|
||||
LOG_DEBUG("bg.battleground", "BATTLEGROUND: Player {} joined the battle.", player->GetName());
|
||||
}
|
||||
|
||||
// this method adds player to his team's bg group, or sets his correct group if player is already in bg group
|
||||
@@ -1274,7 +1274,7 @@ void Battleground::AddOrSetPlayerToCorrectBgGroup(Player* player, TeamId teamId)
|
||||
{
|
||||
if (player->GetGroup() && (player->GetGroup()->isBGGroup() || player->GetGroup()->isBFGroup()))
|
||||
{
|
||||
LOG_INFO("misc", "Battleground::AddOrSetPlayerToCorrectBgGroup - player is already in %s group!", (player->GetGroup()->isBGGroup() ? "BG" : "BF"));
|
||||
LOG_INFO("misc", "Battleground::AddOrSetPlayerToCorrectBgGroup - player is already in {} group!", (player->GetGroup()->isBGGroup() ? "BG" : "BF"));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1443,7 +1443,7 @@ void Battleground::UpdatePlayerScore(Player* player, uint32 type, uint32 value,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("bg.battleground", "Battleground::UpdatePlayerScore: unknown score type (%u) for BG (map: %u, instance id: %u)!",
|
||||
LOG_ERROR("bg.battleground", "Battleground::UpdatePlayerScore: unknown score type ({}) for BG (map: {}, instance id: {})!",
|
||||
type, m_MapId, m_InstanceID);
|
||||
break;
|
||||
}
|
||||
@@ -1511,9 +1511,9 @@ bool Battleground::AddObject(uint32 type, uint32 entry, float x, float y, float
|
||||
if (!go->Create(map->GenerateLowGuid<HighGuid::GameObject>(), entry, GetBgMap(),
|
||||
PHASEMASK_NORMAL, x, y, z, o, G3D::Quat(rotation0, rotation1, rotation2, rotation3), 100, goState))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
LOG_ERROR("sql.sql", "Battleground::AddObject: cannot create gameobject (entry: {}) for BG (map: {}, instance id: {})!",
|
||||
entry, m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::AddObject: cannot create gameobject (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
LOG_ERROR("bg.battleground", "Battleground::AddObject: cannot create gameobject (entry: {}) for BG (map: {}, instance id: {})!",
|
||||
entry, m_MapId, m_InstanceID);
|
||||
delete go;
|
||||
return false;
|
||||
@@ -1564,8 +1564,8 @@ void Battleground::DoorClose(uint32 type)
|
||||
}
|
||||
}
|
||||
else
|
||||
LOG_ERROR("bg.battleground", "Battleground::DoorClose: door gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
|
||||
type, BgObjects[type].ToString().c_str(), m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::DoorClose: door gameobject (type: {}, {}) not found for BG (map: {}, instance id: {})!",
|
||||
type, BgObjects[type].ToString(), m_MapId, m_InstanceID);
|
||||
}
|
||||
|
||||
void Battleground::DoorOpen(uint32 type)
|
||||
@@ -1576,16 +1576,16 @@ void Battleground::DoorOpen(uint32 type)
|
||||
obj->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
else
|
||||
LOG_ERROR("bg.battleground", "Battleground::DoorOpen: door gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
|
||||
type, BgObjects[type].ToString().c_str(), m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::DoorOpen: door gameobject (type: {}, {}) not found for BG (map: {}, instance id: {})!",
|
||||
type, BgObjects[type].ToString(), m_MapId, m_InstanceID);
|
||||
}
|
||||
|
||||
GameObject* Battleground::GetBGObject(uint32 type)
|
||||
{
|
||||
GameObject* obj = GetBgMap()->GetGameObject(BgObjects[type]);
|
||||
if (!obj)
|
||||
LOG_ERROR("bg.battleground", "Battleground::GetBGObject: gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
|
||||
type, BgObjects[type].ToString().c_str(), m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::GetBGObject: gameobject (type: {}, {}) not found for BG (map: {}, instance id: {})!",
|
||||
type, BgObjects[type].ToString(), m_MapId, m_InstanceID);
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -1593,8 +1593,8 @@ Creature* Battleground::GetBGCreature(uint32 type)
|
||||
{
|
||||
Creature* creature = GetBgMap()->GetCreature(BgCreatures[type]);
|
||||
if (!creature)
|
||||
LOG_ERROR("bg.battleground", "Battleground::GetBGCreature: creature (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
|
||||
type, BgCreatures[type].ToString().c_str(), m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::GetBGCreature: creature (type: {}, {}) not found for BG (map: {}, instance id: {})!",
|
||||
type, BgCreatures[type].ToString(), m_MapId, m_InstanceID);
|
||||
return creature;
|
||||
}
|
||||
|
||||
@@ -1643,7 +1643,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, float x, float y,
|
||||
Creature* creature = new Creature();
|
||||
if (!creature->Create(map->GenerateLowGuid<HighGuid::Unit>(), map, PHASEMASK_NORMAL, entry, 0, x, y, z, o))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Battleground::AddCreature: cannot create creature (entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
LOG_ERROR("bg.battleground", "Battleground::AddCreature: cannot create creature (entry: {}) for BG (map: {}, instance id: {})!",
|
||||
entry, m_MapId, m_InstanceID);
|
||||
delete creature;
|
||||
return nullptr;
|
||||
@@ -1654,7 +1654,7 @@ Creature* Battleground::AddCreature(uint32 entry, uint32 type, float x, float y,
|
||||
CreatureTemplate const* cinfo = sObjectMgr->GetCreatureTemplate(entry);
|
||||
if (!cinfo)
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Battleground::AddCreature: creature template (entry: %u) does not exist for BG (map: %u, instance id: %u)!",
|
||||
LOG_ERROR("bg.battleground", "Battleground::AddCreature: creature template (entry: {}) does not exist for BG (map: {}, instance id: {})!",
|
||||
entry, m_MapId, m_InstanceID);
|
||||
delete creature;
|
||||
return nullptr;
|
||||
@@ -1693,8 +1693,8 @@ bool Battleground::DelCreature(uint32 type)
|
||||
return true;
|
||||
}
|
||||
|
||||
LOG_ERROR("bg.battleground", "Battleground::DelCreature: creature (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
|
||||
type, BgCreatures[type].ToString().c_str(), m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::DelCreature: creature (type: {}, {}) not found for BG (map: {}, instance id: {})!",
|
||||
type, BgCreatures[type].ToString(), m_MapId, m_InstanceID);
|
||||
|
||||
BgCreatures[type].Clear();
|
||||
return false;
|
||||
@@ -1713,8 +1713,8 @@ bool Battleground::DelObject(uint32 type)
|
||||
return true;
|
||||
}
|
||||
|
||||
LOG_ERROR("bg.battleground", "Battleground::DelObject: gameobject (type: %u, %s) not found for BG (map: %u, instance id: %u)!",
|
||||
type, BgObjects[type].ToString().c_str(), m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::DelObject: gameobject (type: {}, {}) not found for BG (map: {}, instance id: {})!",
|
||||
type, BgObjects[type].ToString(), m_MapId, m_InstanceID);
|
||||
|
||||
BgObjects[type].Clear();
|
||||
return false;
|
||||
@@ -1738,7 +1738,7 @@ bool Battleground::AddSpiritGuide(uint32 type, float x, float y, float z, float
|
||||
//creature->CastSpell(creature, SPELL_SPIRIT_HEAL_CHANNEL, true);
|
||||
return true;
|
||||
}
|
||||
LOG_ERROR("bg.battleground", "Battleground::AddSpiritGuide: cannot create spirit guide (type: %u, entry: %u) for BG (map: %u, instance id: %u)!",
|
||||
LOG_ERROR("bg.battleground", "Battleground::AddSpiritGuide: cannot create spirit guide (type: {}, entry: {}) for BG (map: {}, instance id: {})!",
|
||||
type, entry, m_MapId, m_InstanceID);
|
||||
EndNow();
|
||||
return false;
|
||||
@@ -1948,8 +1948,8 @@ int32 Battleground::GetObjectType(ObjectGuid guid)
|
||||
if (BgObjects[i] == guid)
|
||||
return i;
|
||||
|
||||
LOG_ERROR("bg.battleground", "Battleground::GetObjectType: player used gameobject (%s) which is not in internal data for BG (map: %u, instance id: %u), cheating?",
|
||||
guid.ToString().c_str(), m_MapId, m_InstanceID);
|
||||
LOG_ERROR("bg.battleground", "Battleground::GetObjectType: player used gameobject ({}) which is not in internal data for BG (map: {}, instance id: {}), cheating?",
|
||||
guid.ToString(), m_MapId, m_InstanceID);
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -2005,7 +2005,7 @@ uint32 Battleground::GetTeamScore(TeamId teamId) const
|
||||
if (teamId == TEAM_ALLIANCE || teamId == TEAM_HORDE)
|
||||
return m_TeamScores[teamId];
|
||||
|
||||
LOG_ERROR("bg.battleground", "GetTeamScore with wrong Team %u for BG %u", teamId, GetBgTypeID());
|
||||
LOG_ERROR("bg.battleground", "GetTeamScore with wrong Team {} for BG {}", teamId, GetBgTypeID());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,7 +254,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
|
||||
itr2 = itr++;
|
||||
if (!bg->IsPlayerInBattleground(itr2->first))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Player %s has scoreboard entry for battleground %u but is not in battleground!", itr->first.ToString().c_str(), bg->GetBgTypeID());
|
||||
LOG_ERROR("bg.battleground", "Player {} has scoreboard entry for battleground {} but is not in battleground!", itr->first.ToString(), bg->GetBgTypeID());
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -369,7 +369,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
|
||||
// should never happen
|
||||
if (++scoreCount >= bg->GetMaxPlayersPerTeam() * 2 && itr != bg->GetPlayerScoresEnd())
|
||||
{
|
||||
LOG_INFO("misc", "Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bgTypeId, bg->GetPlayerScoresSize(), bg->GetMaxPlayersPerTeam() * 2);
|
||||
LOG_INFO("misc", "Battleground {} scoreboard has more entries ({}) than allowed players in this bg ({})", bgTypeId, bg->GetPlayerScoresSize(), bg->GetMaxPlayersPerTeam() * 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -537,7 +537,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
|
||||
if (!bl)
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeId);
|
||||
LOG_ERROR("bg.battleground", "Battleground ID {} not found in BattlemasterList.dbc. Battleground not created.", bgTypeId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -558,14 +558,14 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
|
||||
if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam)
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
|
||||
LOG_ERROR("bg.battleground", "Table `battleground_template` for id {} has bad values for MinPlayersPerTeam ({}) and MaxPlayersPerTeam({})",
|
||||
data.bgTypeId, data.MinPlayersPerTeam, data.MaxPlayersPerTeam);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (data.LevelMin == 0 || data.LevelMax == 0 || data.LevelMin > data.LevelMax)
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
|
||||
LOG_ERROR("bg.battleground", "Table `battleground_template` for id {} has bad values for LevelMin ({}) and LevelMax({})",
|
||||
data.bgTypeId, data.LevelMin, data.LevelMax);
|
||||
continue;
|
||||
}
|
||||
@@ -593,7 +593,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Table `battleground_template` for id %u have non-existed `game_graveyard` table id %u in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
|
||||
LOG_ERROR("bg.battleground", "Table `battleground_template` for id {} have non-existed `game_graveyard` table id {} in field `AllianceStartLoc`. BG not created.", data.bgTypeId, startId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -607,7 +607,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Table `battleground_template` for id %u have non-existed `game_graveyard` table id %u in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
|
||||
LOG_ERROR("bg.battleground", "Table `battleground_template` for id {} have non-existed `game_graveyard` table id {} in field `HordeStartLoc`. BG not created.", data.bgTypeId, startId);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@@ -623,7 +623,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
++count;
|
||||
} while (result->NextRow());
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", ">> Loaded {} battlegrounds in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
@@ -869,18 +869,18 @@ void BattlegroundMgr::LoadBattleMastersEntry()
|
||||
if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(entry))
|
||||
{
|
||||
if ((cInfo->npcflag & UNIT_NPC_FLAG_BATTLEMASTER) == 0)
|
||||
LOG_ERROR("sql.sql", "Creature (Entry: %u) listed in `battlemaster_entry` is not a battlemaster.", entry);
|
||||
LOG_ERROR("sql.sql", "Creature (Entry: {}) listed in `battlemaster_entry` is not a battlemaster.", entry);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Creature (Entry: %u) listed in `battlemaster_entry` does not exist.", entry);
|
||||
LOG_ERROR("sql.sql", "Creature (Entry: {}) listed in `battlemaster_entry` does not exist.", entry);
|
||||
continue;
|
||||
}
|
||||
|
||||
uint32 bgTypeId = fields[1].GetUInt32();
|
||||
if (!sBattlemasterListStore.LookupEntry(bgTypeId))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Table `battlemaster_entry` contain entry %u for not existed battleground type %u, ignored.", entry, bgTypeId);
|
||||
LOG_ERROR("sql.sql", "Table `battlemaster_entry` contain entry {} for not existed battleground type {}, ignored.", entry, bgTypeId);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -889,7 +889,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
|
||||
|
||||
CheckBattleMasters();
|
||||
|
||||
LOG_INFO("server.loading", ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", ">> Loaded {} battlemaster entries in {} ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
LOG_INFO("server.loading", " ");
|
||||
}
|
||||
|
||||
@@ -900,7 +900,7 @@ void BattlegroundMgr::CheckBattleMasters()
|
||||
{
|
||||
if ((itr->second.npcflag & UNIT_NPC_FLAG_BATTLEMASTER) && mBattleMastersMap.find(itr->second.Entry) == mBattleMastersMap.end())
|
||||
{
|
||||
LOG_ERROR("sql.sql", "CreatureTemplate (Entry: %u) has UNIT_NPC_FLAG_BATTLEMASTER but no data in `battlemaster_entry` table. Removing flag!", itr->second.Entry);
|
||||
LOG_ERROR("sql.sql", "CreatureTemplate (Entry: {}) has UNIT_NPC_FLAG_BATTLEMASTER but no data in `battlemaster_entry` table. Removing flag!", itr->second.Entry);
|
||||
const_cast<CreatureTemplate*>(&itr->second)->npcflag &= ~UNIT_NPC_FLAG_BATTLEMASTER;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, PvPDiffi
|
||||
|
||||
sScriptMgr->OnAddGroup(this, ginfo, index, leader, grp, bracketEntry, isPremade);
|
||||
|
||||
LOG_DEBUG("bg.battleground", "Adding Group to BattlegroundQueue bgTypeId: %u, bracket_id: %u, index: %u", m_bgTypeId, bracketId, index);
|
||||
LOG_DEBUG("bg.battleground", "Adding Group to BattlegroundQueue bgTypeId: {}, bracket_id: {}, index: {}", m_bgTypeId, bracketId, index);
|
||||
|
||||
// pussywizard: store indices at which GroupQueueInfo is in m_QueuedGroups
|
||||
ginfo->_bracketId = bracketId;
|
||||
@@ -1040,7 +1040,7 @@ void BattlegroundQueue::SendMessageBGQueue(Player* leader, Battleground* bg, PvP
|
||||
uint32 qAlliance = GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_ALLIANCE);
|
||||
auto qTotal = qHorde + qAlliance;
|
||||
|
||||
LOG_DEBUG("bg.battleground", "> Queue status for %s (Lvl: %u to %u) Queued: %u (Need at least %u more)",
|
||||
LOG_DEBUG("bg.battleground", "> Queue status for {} (Lvl: {} to {}) Queued: {} (Need at least {} more)",
|
||||
bgName, q_min_level, q_max_level, qAlliance + qHorde, MaxPlayers - qTotal);
|
||||
|
||||
// Show queue status to player only (when joining battleground queue or Arena and arena world announcer is disabled)
|
||||
@@ -1087,7 +1087,7 @@ void BattlegroundQueue::SendJoinMessageArenaQueue(Player* leader, GroupQueueInfo
|
||||
Battleground* bg = sBattlegroundMgr->GetBattlegroundTemplate(ginfo->BgTypeId);
|
||||
if (!bg)
|
||||
{
|
||||
LOG_ERROR("bg.arena", "> Not found bg template for bgtype id %u", uint32(ginfo->BgTypeId));
|
||||
LOG_ERROR("bg.arena", "> Not found bg template for bgtype id {}", uint32(ginfo->BgTypeId));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1105,8 +1105,8 @@ void BattlegroundQueue::SendJoinMessageArenaQueue(Player* leader, GroupQueueInfo
|
||||
uint32 q_max_level = std::min(bracketEntry->maxLevel, (uint32)80);
|
||||
uint32 qPlayers = GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_HORDE) + GetPlayersCountInGroupsQueue(bracketId, BG_QUEUE_NORMAL_ALLIANCE);
|
||||
|
||||
LOG_DEBUG("bg.arena", "> Queue status for %s (skirmish %s) (Lvl: %u to %u) Queued: %u (Need at least %u more)",
|
||||
bgName, arenatype.c_str(), q_min_level, q_max_level, qPlayers, playersNeed - qPlayers);
|
||||
LOG_DEBUG("bg.arena", "> Queue status for {} (skirmish {}) (Lvl: {} to {}) Queued: {} (Need at least {} more)",
|
||||
bgName, arenatype, q_min_level, q_max_level, qPlayers, playersNeed - qPlayers);
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_ARENA_QUEUE_ANNOUNCER_PLAYERONLY))
|
||||
{
|
||||
|
||||
@@ -70,7 +70,7 @@ void BattlegroundAV::HandleKillPlayer(Player* player, Player* killer)
|
||||
|
||||
void BattlegroundAV::HandleKillUnit(Creature* unit, Player* killer)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "bg_av HandleKillUnit %i", unit->GetEntry());
|
||||
LOG_DEBUG("bg.battleground", "bg_av HandleKillUnit {}", unit->GetEntry());
|
||||
if (GetStatus() != STATUS_IN_PROGRESS)
|
||||
return;
|
||||
uint32 entry = unit->GetEntry();
|
||||
@@ -151,7 +151,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
||||
return;//maybe we should log this, cause this must be a cheater or a big bug
|
||||
TeamId teamId = player->GetTeamId();
|
||||
//TODO add reputation, events (including quest not available anymore, next quest availabe, go/npc de/spawning)and maybe honor
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed", questid);
|
||||
switch (questid)
|
||||
{
|
||||
case AV_QUEST_A_SCRAPS1:
|
||||
@@ -161,7 +161,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
||||
m_Team_QuestStatus[teamId][0] += 20;
|
||||
if (m_Team_QuestStatus[teamId][0] == 500 || m_Team_QuestStatus[teamId][0] == 1000 || m_Team_QuestStatus[teamId][0] == 1500) //25, 50, 75 turn ins
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed starting with unit upgrading..", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed starting with unit upgrading..", questid);
|
||||
for (BG_AV_Nodes i = BG_AV_NODES_FIRSTAID_STATION; i <= BG_AV_NODES_FROSTWOLF_HUT; ++i)
|
||||
if (m_Nodes[i].OwnerId == player->GetTeamId() && m_Nodes[i].State == POINT_CONTROLED)
|
||||
{
|
||||
@@ -176,21 +176,21 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
||||
m_Team_QuestStatus[teamId][1]++;
|
||||
RewardReputationToTeam(teamId, 1, teamId);
|
||||
if (m_Team_QuestStatus[teamId][1] == 30)
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||
break;
|
||||
case AV_QUEST_A_COMMANDER2:
|
||||
case AV_QUEST_H_COMMANDER2:
|
||||
m_Team_QuestStatus[teamId][2]++;
|
||||
RewardReputationToTeam(teamId, 1, teamId);
|
||||
if (m_Team_QuestStatus[teamId][2] == 60)
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||
break;
|
||||
case AV_QUEST_A_COMMANDER3:
|
||||
case AV_QUEST_H_COMMANDER3:
|
||||
m_Team_QuestStatus[teamId][3]++;
|
||||
RewardReputationToTeam(teamId, 1, teamId);
|
||||
if (m_Team_QuestStatus[teamId][3] == 120)
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||
break;
|
||||
case AV_QUEST_A_BOSS1:
|
||||
case AV_QUEST_H_BOSS1:
|
||||
@@ -200,17 +200,17 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
||||
case AV_QUEST_H_BOSS2:
|
||||
m_Team_QuestStatus[teamId][4]++;
|
||||
if (m_Team_QuestStatus[teamId][4] >= 200)
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||
break;
|
||||
case AV_QUEST_A_NEAR_MINE:
|
||||
case AV_QUEST_H_NEAR_MINE:
|
||||
m_Team_QuestStatus[teamId][5]++;
|
||||
if (m_Team_QuestStatus[teamId][5] == 28)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||
|
||||
if (m_Team_QuestStatus[teamId][6] == 7)
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - ground assault ready", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here - ground assault ready", questid);
|
||||
}
|
||||
break;
|
||||
case AV_QUEST_A_OTHER_MINE:
|
||||
@@ -218,10 +218,10 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
||||
m_Team_QuestStatus[teamId][6]++;
|
||||
if (m_Team_QuestStatus[teamId][6] == 7)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||
|
||||
if (m_Team_QuestStatus[teamId][5] == 20)
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - ground assault ready", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here - ground assault ready", questid);
|
||||
}
|
||||
break;
|
||||
case AV_QUEST_A_RIDER_HIDE:
|
||||
@@ -229,10 +229,10 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
||||
m_Team_QuestStatus[teamId][7]++;
|
||||
if (m_Team_QuestStatus[teamId][7] == 25)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||
|
||||
if (m_Team_QuestStatus[teamId][8] == 25)
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - rider assault ready", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here - rider assault ready", questid);
|
||||
}
|
||||
break;
|
||||
case AV_QUEST_A_RIDER_TAME:
|
||||
@@ -240,14 +240,14 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
||||
m_Team_QuestStatus[teamId][8]++;
|
||||
if (m_Team_QuestStatus[teamId][8] == 25)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here", questid);
|
||||
|
||||
if (m_Team_QuestStatus[teamId][7] == 25)
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed (need to implement some events here - rider assault ready", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed (need to implement some events here - rider assault ready", questid);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest %i completed but is not interesting at all", questid);
|
||||
LOG_DEBUG("bg.battleground", "BG_AV Quest {} completed but is not interesting at all", questid);
|
||||
return; //was no interesting quest at all
|
||||
break;
|
||||
}
|
||||
@@ -584,7 +584,7 @@ void BattlegroundAV::UpdatePlayerScore(Player* player, uint32 type, uint32 value
|
||||
void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
|
||||
{
|
||||
uint32 object = GetObjectThroughNode(node);
|
||||
LOG_DEBUG("bg.battleground", "bg_av: player destroyed point node %i object %i", node, object);
|
||||
LOG_DEBUG("bg.battleground", "bg_av: player destroyed point node {} object {}", node, object);
|
||||
|
||||
//despawn banner
|
||||
SpawnBGObject(object, RESPAWN_ONE_DAY);
|
||||
@@ -599,7 +599,7 @@ void BattlegroundAV::EventPlayerDestroyedPoint(BG_AV_Nodes node)
|
||||
if (BgCreatures[AV_CPLACE_A_MARSHAL_SOUTH + tmp])
|
||||
DelCreature(AV_CPLACE_A_MARSHAL_SOUTH + tmp);
|
||||
else
|
||||
LOG_ERROR("bg.battleground", "BG_AV: playerdestroyedpoint: marshal %i doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp);
|
||||
LOG_ERROR("bg.battleground", "BG_AV: playerdestroyedpoint: marshal {} doesn't exist", AV_CPLACE_A_MARSHAL_SOUTH + tmp);
|
||||
//spawn destroyed aura
|
||||
for (uint8 i = 0; i <= 9; i++)
|
||||
SpawnBGObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + i + (tmp * 10), RESPAWN_IMMEDIATELY);
|
||||
@@ -657,7 +657,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, TeamId teamId, bool initial)
|
||||
|
||||
if (!initial)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "bg_av depopulating mine %i (0=north, 1=south)", mine);
|
||||
LOG_DEBUG("bg.battleground", "bg_av depopulating mine {} (0=north, 1=south)", mine);
|
||||
if (mine == AV_SOUTH_MINE)
|
||||
for (uint16 i = AV_CPLACE_MINE_S_S_MIN; i <= AV_CPLACE_MINE_S_S_MAX; i++)
|
||||
if (BgCreatures[i])
|
||||
@@ -668,7 +668,7 @@ void BattlegroundAV::ChangeMineOwner(uint8 mine, TeamId teamId, bool initial)
|
||||
}
|
||||
SendMineWorldStates(mine);
|
||||
|
||||
LOG_DEBUG("bg.battleground", "bg_av populating mine %i (0=north, 1=south)", mine);
|
||||
LOG_DEBUG("bg.battleground", "bg_av populating mine {} (0=north, 1=south)", mine);
|
||||
uint16 miner;
|
||||
//also neutral team exists.. after a big time, the neutral team tries to conquer the mine
|
||||
if (mine == AV_NORTH_MINE)
|
||||
@@ -758,7 +758,7 @@ void BattlegroundAV::PopulateNode(BG_AV_Nodes node)
|
||||
if (BgCreatures[node])
|
||||
DelCreature(node);
|
||||
if (!AddSpiritGuide(node, BG_AV_CreaturePos[node][0], BG_AV_CreaturePos[node][1], BG_AV_CreaturePos[node][2], BG_AV_CreaturePos[node][3], ownerId))
|
||||
LOG_ERROR("bg.battleground", "AV: couldn't spawn spiritguide at node %i", node);
|
||||
LOG_ERROR("bg.battleground", "AV: couldn't spawn spiritguide at node {}", node);
|
||||
}
|
||||
for (uint8 i = 0; i < 4; i++)
|
||||
AddAVCreature(creatureid, c_place + i);
|
||||
@@ -814,7 +814,7 @@ void BattlegroundAV::DePopulateNode(BG_AV_Nodes node, bool ignoreSpiritGuide)
|
||||
|
||||
BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
|
||||
{
|
||||
LOG_DEBUG("bg.battleground", "bg_AV getnodethroughobject %i", object);
|
||||
LOG_DEBUG("bg.battleground", "bg_AV getnodethroughobject {}", object);
|
||||
if (object <= BG_AV_OBJECT_FLAG_A_STONEHEART_BUNKER)
|
||||
return BG_AV_Nodes(object);
|
||||
if (object <= BG_AV_OBJECT_FLAG_C_A_FROSTWOLF_HUT)
|
||||
@@ -837,7 +837,7 @@ BG_AV_Nodes BattlegroundAV::GetNodeThroughObject(uint32 object)
|
||||
uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
|
||||
{
|
||||
//this function is the counterpart to GetNodeThroughObject()
|
||||
LOG_DEBUG("bg.battleground", "bg_AV GetObjectThroughNode %i", node);
|
||||
LOG_DEBUG("bg.battleground", "bg_AV GetObjectThroughNode {}", node);
|
||||
if (m_Nodes[node].OwnerId == TEAM_ALLIANCE)
|
||||
{
|
||||
if (m_Nodes[node].State == POINT_ASSAULTED)
|
||||
@@ -868,7 +868,7 @@ uint32 BattlegroundAV::GetObjectThroughNode(BG_AV_Nodes node)
|
||||
}
|
||||
else if (m_Nodes[node].OwnerId == TEAM_NEUTRAL)
|
||||
return BG_AV_OBJECT_FLAG_N_SNOWFALL_GRAVE;
|
||||
LOG_ERROR("bg.battleground", "BattlegroundAV: Error! GetPlaceNode couldn't resolve node %i", node);
|
||||
LOG_ERROR("bg.battleground", "BattlegroundAV: Error! GetPlaceNode couldn't resolve node {}", node);
|
||||
ABORT();
|
||||
return 0;
|
||||
}
|
||||
@@ -919,10 +919,10 @@ void BattlegroundAV::EventPlayerDefendsPoint(Player* player, uint32 object)
|
||||
EventPlayerAssaultsPoint(player, object);
|
||||
return;
|
||||
}
|
||||
LOG_DEBUG("bg.battleground", "player defends point object: %i node: %i", object, node);
|
||||
LOG_DEBUG("bg.battleground", "player defends point object: {} node: {}", object, node);
|
||||
if (m_Nodes[node].PrevOwnerId != teamId)
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BG_AV: player defends point which doesn't belong to his team %i", node);
|
||||
LOG_ERROR("bg.battleground", "BG_AV: player defends point which doesn't belong to his team {}", node);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -981,7 +981,7 @@ void BattlegroundAV::EventPlayerAssaultsPoint(Player* player, uint32 object)
|
||||
BG_AV_Nodes node = GetNodeThroughObject(object);
|
||||
TeamId prevOwnerId = m_Nodes[node].OwnerId;
|
||||
TeamId teamId = player->GetTeamId();
|
||||
LOG_DEBUG("bg.battleground", "bg_av: player assaults point object %i node %i", object, node);
|
||||
LOG_DEBUG("bg.battleground", "bg_av: player assaults point object {} node {}", object, node);
|
||||
if (prevOwnerId == teamId || teamId == m_Nodes[node].TotalOwnerId)
|
||||
return; //surely a gm used this object
|
||||
|
||||
@@ -1144,7 +1144,7 @@ uint8 BattlegroundAV::GetWorldStateType(uint8 state, TeamId teamId) //this is us
|
||||
if (state == POINT_ASSAULTED)
|
||||
return 3;
|
||||
}
|
||||
LOG_ERROR("bg.battleground", "BG_AV: should update a strange worldstate state:%i team:%i", state, teamId);
|
||||
LOG_ERROR("bg.battleground", "BG_AV: should update a strange worldstate state:{} team:{}", state, teamId);
|
||||
return 5; //this will crash the game, but i want to know if something is wrong here
|
||||
}
|
||||
|
||||
@@ -1257,7 +1257,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j, BG_AV_OBJECTID_FIRE, BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][3], 0, 0, std::sin(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_DUNBALDAR_SOUTH + ((i - BG_AV_NODES_DUNBALDAR_SOUTH) * 10) + j][3] / 2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!5.%i", i);
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!5.{}", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1271,7 +1271,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE + (i * 10) + j, BG_AV_OBJECTID_SMOKE, BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3], 0, 0, std::sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3] / 2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!6.%i", i);
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!6.{}", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1279,7 +1279,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_BURN_BUILDING_ALLIANCE + (i * 10) + j, BG_AV_OBJECTID_FIRE, BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][0], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][1], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][2], BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3], 0, 0, std::sin(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_BURN_BUILDING_A + (i * 10) + j][3] / 2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!7.%i", i);
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!7.{}", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1289,7 +1289,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_N_MIN + i, BG_AV_OBJECTID_MINE_N, BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][0], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][1], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][2], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][3], 0, 0, std::sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_N_MIN + i][3] / 2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.%i", i);
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.5.{}", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1297,7 +1297,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_AV_OBJECT_MINE_SUPPLY_S_MIN + i, BG_AV_OBJECTID_MINE_S, BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][0], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][1], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][2], BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][3], 0, 0, std::sin(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_MINE_SUPPLY_S_MIN + i][3] / 2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.%i", i);
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some mine supplies Battleground not created!7.6.{}", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1314,7 +1314,7 @@ bool BattlegroundAV::SetupBattleground()
|
||||
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_H + i, BG_AV_OBJECTID_SNOWFALL_CANDY_H, BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3], 0, 0, std::sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3] / 2), RESPAWN_ONE_DAY)
|
||||
|| !AddObject(BG_AV_OBJECT_SNOW_EYECANDY_PH + i, BG_AV_OBJECTID_SNOWFALL_CANDY_PH, BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][0], BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][1], BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][2], BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3], 0, 0, std::sin(BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3] / 2), cos(BG_AV_ObjectPos[AV_OPLACE_SNOW_1 + i][3] / 2), RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!9.%i", i);
|
||||
LOG_ERROR("bg.battleground", "BatteGroundAV: Failed to spawn some object Battleground not created!9.{}", i);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1455,7 +1455,7 @@ char const* BattlegroundAV::GetNodeName(BG_AV_Nodes node)
|
||||
case BG_AV_NODES_FROSTWOLF_HUT:
|
||||
return GetAcoreString(LANG_BG_AV_NODE_GRAVE_FROST_HUT);
|
||||
default:
|
||||
LOG_ERROR("bg.battleground", "tried to get name for node %u", node);
|
||||
LOG_ERROR("bg.battleground", "tried to get name for node {}", node);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -409,7 +409,7 @@ bool BattlegroundIC::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_IC_ObjSpawnlocs[i].type, BG_IC_ObjSpawnlocs[i].entry, BG_IC_ObjSpawnlocs[i].x, BG_IC_ObjSpawnlocs[i].y, BG_IC_ObjSpawnlocs[i].z, BG_IC_ObjSpawnlocs[i].o, 0, 0, 0, 0, RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning gameobject %u", BG_IC_ObjSpawnlocs[i].entry);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning gameobject {}", BG_IC_ObjSpawnlocs[i].entry);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -422,7 +422,7 @@ bool BattlegroundIC::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_IC_Teleporters[i].type, BG_IC_Teleporters[i].entry, BG_IC_Teleporters[i].x, BG_IC_Teleporters[i].y, BG_IC_Teleporters[i].z, BG_IC_Teleporters[i].o, 0, 0, 0, 0, RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject {}", BG_IC_Teleporters[i].entry);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -431,7 +431,7 @@ bool BattlegroundIC::SetupBattleground()
|
||||
{
|
||||
if (!AddObject(BG_IC_TeleporterEffects[i].type, BG_IC_TeleporterEffects[i].entry, BG_IC_TeleporterEffects[i].x, BG_IC_TeleporterEffects[i].y, BG_IC_TeleporterEffects[i].z, BG_IC_TeleporterEffects[i].o, 0, 0, 0, 0, RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject %u", BG_IC_Teleporters[i].entry);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest | Starting Event Open Doors: There was an error spawning gameobject {}", BG_IC_Teleporters[i].entry);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -440,7 +440,7 @@ bool BattlegroundIC::SetupBattleground()
|
||||
{
|
||||
if (!AddCreature(BG_IC_NpcSpawnlocs[i].entry, BG_IC_NpcSpawnlocs[i].type, BG_IC_NpcSpawnlocs[i].x, BG_IC_NpcSpawnlocs[i].y, BG_IC_NpcSpawnlocs[i].z, BG_IC_NpcSpawnlocs[i].o, RESPAWN_ONE_DAY))
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature %u", BG_IC_NpcSpawnlocs[i].entry);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning creature {}", BG_IC_NpcSpawnlocs[i].entry);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -751,7 +751,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
BG_IC_SpiritGuidePos[nodePoint->nodeType][0], BG_IC_SpiritGuidePos[nodePoint->nodeType][1],
|
||||
BG_IC_SpiritGuidePos[nodePoint->nodeType][2], BG_IC_SpiritGuidePos[nodePoint->nodeType][3],
|
||||
nodePoint->faction))
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: Failed to spawn spirit guide! point: %u, team: %u, ", nodePoint->nodeType, nodePoint->faction);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: Failed to spawn spirit guide! point: {}, team: {}, ", nodePoint->nodeType, nodePoint->faction);
|
||||
}
|
||||
|
||||
switch (nodePoint->gameobject_type)
|
||||
@@ -774,20 +774,20 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
{
|
||||
uint8 type = BG_IC_GO_HANGAR_TELEPORTER_1 + u;
|
||||
if (!AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL : GO_HORDE_GUNSHIP_PORTAL), BG_IC_HangarTeleporters[u].GetPositionX(), BG_IC_HangarTeleporters[u].GetPositionY(), BG_IC_HangarTeleporters[u].GetPositionZ(), BG_IC_HangarTeleporters[u].GetOrientation(), 0, 0, 0, 0, RESPAWN_ONE_DAY))
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a gunship portal. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1 + u);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a gunship portal. Type: {}", BG_IC_GO_HANGAR_TELEPORTER_1 + u);
|
||||
}
|
||||
|
||||
for (uint8 u = 0; u < MAX_HANGAR_TELEPORTER_EFFECTS_SPAWNS; ++u)
|
||||
{
|
||||
uint8 type = BG_IC_GO_HANGAR_TELEPORTER_EFFECT_1 + u;
|
||||
if (!AddObject(type, (nodePoint->faction == TEAM_ALLIANCE ? GO_ALLIANCE_GUNSHIP_PORTAL_EFFECTS : GO_HORDE_GUNSHIP_PORTAL_EFFECTS), BG_IC_HangarTeleporterEffects[u].GetPositionX(), BG_IC_HangarTeleporterEffects[u].GetPositionY(), BG_IC_HangarTeleporterEffects[u].GetPositionZ(), BG_IC_HangarTeleporterEffects[u].GetOrientation(), 0, 0, 0, 0, RESPAWN_ONE_DAY, GO_STATE_ACTIVE))
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a gunship portal effects. Type: %u", BG_IC_GO_HANGAR_TELEPORTER_1 + u);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a gunship portal effects. Type: {}", BG_IC_GO_HANGAR_TELEPORTER_1 + u);
|
||||
}
|
||||
|
||||
for (uint8 u = 0; u < MAX_TRIGGER_SPAWNS_PER_FACTION; ++u)
|
||||
{
|
||||
if (!AddCreature(NPC_WORLD_TRIGGER_NOT_FLOATING, BG_IC_NPC_WORLD_TRIGGER_NOT_FLOATING, BG_IC_HangarTrigger[nodePoint->faction].GetPositionX(), BG_IC_HangarTrigger[nodePoint->faction].GetPositionY(), BG_IC_HangarTrigger[nodePoint->faction].GetPositionZ(), BG_IC_HangarTrigger[nodePoint->faction].GetOrientation(), RESPAWN_ONE_DAY, nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde))
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a world trigger. Type: %u", BG_IC_NPC_WORLD_TRIGGER_NOT_FLOATING);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a world trigger. Type: {}", BG_IC_NPC_WORLD_TRIGGER_NOT_FLOATING);
|
||||
}
|
||||
|
||||
for (uint8 u = 0; u < MAX_CAPTAIN_SPAWNS_PER_FACTION; ++u)
|
||||
@@ -800,7 +800,7 @@ void BattlegroundIC::HandleCapturedNodes(ICNodePoint* nodePoint, bool recapture)
|
||||
|
||||
if (type == BG_IC_NPC_GUNSHIP_CAPTAIN_2)
|
||||
if (!AddCreature(nodePoint->faction == TEAM_ALLIANCE ? NPC_ALLIANCE_GUNSHIP_CAPTAIN : NPC_HORDE_GUNSHIP_CAPTAIN, type, BG_IC_HangarCaptains[nodePoint->faction == TEAM_ALLIANCE ? 3 : 1].GetPositionX(), BG_IC_HangarCaptains[nodePoint->faction == TEAM_ALLIANCE ? 3 : 1].GetPositionY(), BG_IC_HangarCaptains[nodePoint->faction == TEAM_ALLIANCE ? 3 : 1].GetPositionZ(), BG_IC_HangarCaptains[nodePoint->faction == TEAM_ALLIANCE ? 3 : 1].GetOrientation(), RESPAWN_ONE_DAY, nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde))
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a world trigger. Type: %u", BG_IC_NPC_GUNSHIP_CAPTAIN_2);
|
||||
LOG_ERROR("bg.battleground", "Isle of Conquest: There was an error spawning a world trigger. Type: {}", BG_IC_NPC_GUNSHIP_CAPTAIN_2);
|
||||
}
|
||||
|
||||
(nodePoint->faction == TEAM_ALLIANCE ? gunshipAlliance : gunshipHorde)->EnableMovement(true);
|
||||
|
||||
@@ -185,7 +185,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
|
||||
if (!sg)
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "SOTA: Can't find GY entry %u", BG_SA_GYEntries[i]);
|
||||
LOG_ERROR("bg.battleground", "SOTA: Can't find GY entry {}", BG_SA_GYEntries[i]);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ bool BattlegroundSA::ResetObjs()
|
||||
{
|
||||
GraveyardStatus[i] = GetOtherTeamId(Attackers);
|
||||
if (!AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], GetOtherTeamId(Attackers)))
|
||||
LOG_ERROR("bg.battleground", "SOTA: couldn't spawn GY: %u", i);
|
||||
LOG_ERROR("bg.battleground", "SOTA: couldn't spawn GY: {}", i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
|
||||
GraveyardStruct const* sg = sGraveyard->GetGraveyard(BG_SA_GYEntries[i]);
|
||||
if (!sg)
|
||||
{
|
||||
LOG_ERROR("bg.battleground", "BattlegroundSA::CaptureGraveyard: non-existant GY entry: %u", BG_SA_GYEntries[i]);
|
||||
LOG_ERROR("bg.battleground", "BattlegroundSA::CaptureGraveyard: non-existant GY entry: {}", BG_SA_GYEntries[i]);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user