mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
refactor(Core/Game): restyle game lib with astyle (#3466)
This commit is contained in:
@@ -42,7 +42,8 @@ void InstanceScript::HandleGameObject(uint64 GUID, bool open, GameObject* go)
|
||||
go = instance->GetGameObject(GUID);
|
||||
if (go)
|
||||
go->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
else {
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: InstanceScript: HandleGameObject failed");
|
||||
#endif
|
||||
@@ -230,7 +231,7 @@ bool InstanceScript::SetBossState(uint32 id, EncounterState state)
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string InstanceScript::LoadBossState(const char * data)
|
||||
std::string InstanceScript::LoadBossState(const char* data)
|
||||
{
|
||||
if (!data)
|
||||
return nullptr;
|
||||
@@ -281,7 +282,7 @@ void InstanceScript::DoRespawnGameObject(uint64 uiGuid, uint32 uiTimeToDespawn)
|
||||
{
|
||||
//not expect any of these should ever be handled
|
||||
if (go->GetGoType() == GAMEOBJECT_TYPE_FISHINGNODE || go->GetGoType() == GAMEOBJECT_TYPE_DOOR ||
|
||||
go->GetGoType() == GAMEOBJECT_TYPE_BUTTON || go->GetGoType() == GAMEOBJECT_TYPE_TRAP)
|
||||
go->GetGoType() == GAMEOBJECT_TYPE_BUTTON || go->GetGoType() == GAMEOBJECT_TYPE_TRAP)
|
||||
return;
|
||||
|
||||
if (go->isSpawned())
|
||||
@@ -301,7 +302,8 @@ void InstanceScript::DoUpdateWorldState(uint32 uiStateId, uint32 uiStateData)
|
||||
if (Player* player = itr->GetSource())
|
||||
player->SendUpdateWorldState(uiStateId, uiStateData);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
#if defined(ENABLE_EXTRAS) && defined(ENABLE_EXTRA_LOGS)
|
||||
sLog->outDebug(LOG_FILTER_TSCR, "TSCR: DoUpdateWorldState attempt send data but no players in map.");
|
||||
#endif
|
||||
@@ -329,7 +331,7 @@ void InstanceScript::DoSendNotifyToInstance(char const* format, ...)
|
||||
// Update Achievement Criteria for all players in instance
|
||||
void InstanceScript::DoUpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1 /*= 0*/, uint32 miscValue2 /*= 0*/, Unit* unit /*= NULL*/)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||
Map::PlayerList const& PlayerList = instance->GetPlayers();
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
@@ -340,7 +342,7 @@ void InstanceScript::DoUpdateAchievementCriteria(AchievementCriteriaTypes type,
|
||||
// Start timed achievement for all players in instance
|
||||
void InstanceScript::DoStartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||
Map::PlayerList const& PlayerList = instance->GetPlayers();
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
@@ -351,7 +353,7 @@ void InstanceScript::DoStartTimedAchievement(AchievementCriteriaTimedTypes type,
|
||||
// Stop timed achievement for all players in instance
|
||||
void InstanceScript::DoStopTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||
Map::PlayerList const& PlayerList = instance->GetPlayers();
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
@@ -380,7 +382,7 @@ void InstanceScript::DoRemoveAurasDueToSpellOnPlayers(uint32 spell)
|
||||
// Cast spell on all players in instance
|
||||
void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
|
||||
{
|
||||
Map::PlayerList const &PlayerList = instance->GetPlayers();
|
||||
Map::PlayerList const& PlayerList = instance->GetPlayers();
|
||||
|
||||
if (!PlayerList.isEmpty())
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
@@ -391,7 +393,7 @@ void InstanceScript::DoCastSpellOnPlayers(uint32 spell)
|
||||
bool InstanceScript::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/ /*= NULL*/, uint32 /*miscvalue1*/ /*= 0*/)
|
||||
{
|
||||
sLog->outError("Achievement system call InstanceScript::CheckAchievementCriteriaMeet but instance script for map %u not have implementation for achievement criteria %u",
|
||||
instance->GetId(), criteria_id);
|
||||
instance->GetId(), criteria_id);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user