Core/Misc: Fix gcc warnings

This commit is contained in:
Shauren
2021-08-28 16:08:33 +02:00
parent 962f6d7988
commit 8cc418460f
7 changed files with 16 additions and 8 deletions

View File

@@ -1653,6 +1653,8 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
TC_LOG_ERROR("sql.sql", "Entry " SI64FMTD " SourceType %u Event %u Action %u does not specify duration", e.entryOrGuid, e.GetScriptType(), e.event_id, e.GetActionType());
return false;
}
break;
}
case SMART_ACTION_SET_MOVEMENT_SPEED:
{

View File

@@ -3749,6 +3749,7 @@ bool CriteriaHandler::ModifierSatisfied(ModifierTreeEntry const* modifier, uint6
});
if (bagScanReachedEnd)
return false;
break;
}
default:
return false;

View File

@@ -27,6 +27,12 @@
#include "World.h"
#include "WorldSession.h"
uint32 const ReputationRankStrIndex[MAX_REPUTATION_RANK] =
{
LANG_REP_HATED, LANG_REP_HOSTILE, LANG_REP_UNFRIENDLY, LANG_REP_NEUTRAL,
LANG_REP_FRIENDLY, LANG_REP_HONORED, LANG_REP_REVERED, LANG_REP_EXALTED
};
std::set<int32> const ReputationMgr::ReputationRankThresholds =
{
-42000,

View File

@@ -29,11 +29,7 @@
struct FactionEntry;
struct FactionTemplateEntry;
static uint32 ReputationRankStrIndex[MAX_REPUTATION_RANK] =
{
LANG_REP_HATED, LANG_REP_HOSTILE, LANG_REP_UNFRIENDLY, LANG_REP_NEUTRAL,
LANG_REP_FRIENDLY, LANG_REP_HONORED, LANG_REP_REVERED, LANG_REP_EXALTED
};
TC_GAME_API extern uint32 const ReputationRankStrIndex[MAX_REPUTATION_RANK];
enum class ReputationFlags : uint16
{

View File

@@ -968,7 +968,9 @@ public:
}
else if (GetDifficulty() == DIFFICULTY_25_N)
{
memset(_surgeTargetGUID, 0, sizeof(_surgeTargetGUID));
for (ObjectGuid& guid : _surgeTargetGUID)
guid.Clear();
DoCastAOE(SPELL_SURGE_OF_POWER_WARNING_SELECTOR_25, true);
}

View File

@@ -190,7 +190,7 @@ class instance_black_temple : public InstanceMapScript
for (ObjectGuid ashtongueGuid : AshtongueGUIDs)
if (Creature* ashtongue = instance->GetCreature(ashtongueGuid))
ashtongue->SetFaction(FACTION_ASHTONGUE_DEATHSWORN);
// no break
/* fallthrough */
case DATA_TERON_GOREFIEND:
case DATA_GURTOGG_BLOODBOIL:
case DATA_RELIQUARY_OF_SOULS:

View File

@@ -217,7 +217,8 @@ public:
IsFinalForm = false;
NeedThreatReset = false;
EnrageUsed = false;
memset(InnderDemon, 0, sizeof(InnderDemon));
for (ObjectGuid& guid : InnderDemon)
guid.Clear();
InnerDemon_Count = 0;
}