Skip to content

Commit 81c6172

Browse files
committed
Core/Misc: fixed several unused variable warnings
1 parent 5882d5b commit 81c6172

8 files changed

Lines changed: 8 additions & 12 deletions

File tree

src/common/Logging/Log.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ void Log::CreateLoggerFromConfig(std::string const& appenderName)
112112
return;
113113

114114
LogLevel level = LOG_LEVEL_DISABLED;
115-
uint8 type = uint8(-1);
116115

117116
std::string options = sConfigMgr->GetStringDefault(appenderName, "");
118117
std::string name = appenderName.substr(7);

src/server/game/Server/WorldSession.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ bool WorldSessionFilter::Process(WorldPacket* packet)
108108
}
109109

110110
/// WorldSession constructor
111-
WorldSession::WorldSession(uint32 id, std::string&& name, uint32 battlenetAccountId, std::shared_ptr<WorldSocket> sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter) :
111+
WorldSession::WorldSession(uint32 id, std::string&& name, std::shared_ptr<WorldSocket> sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter) :
112112
m_muteTime(mute_time),
113113
m_timeOutTime(0),
114114
AntiDOS(this),

src/server/game/Server/WorldSession.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ struct PacketCounter
475475
class TC_GAME_API WorldSession
476476
{
477477
public:
478-
WorldSession(uint32 id, std::string&& name, uint32 battlenetAccountId, std::shared_ptr<WorldSocket> sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter);
478+
WorldSession(uint32 id, std::string&& name, std::shared_ptr<WorldSocket> sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale, uint32 recruiter, bool isARecruiter);
479479
~WorldSession();
480480

481481
bool PlayerLoading() const { return !m_playerLoading.IsEmpty(); }

src/server/game/Server/WorldSocket.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ void WorldSocket::HandleAuthSessionCallback(std::shared_ptr<WorldPackets::Auth::
729729
sScriptMgr->OnAccountLogin(account.Id);
730730

731731
_authed = true;
732-
_worldSession = new WorldSession(account.Id, std::move(authSession->Account), account.Id, shared_from_this(), account.Security,
732+
_worldSession = new WorldSession(account.Id, std::move(authSession->Account), shared_from_this(), account.Security,
733733
account.Expansion, mutetime, account.Locale, account.Recruiter, account.IsRecruiter);
734734
_worldSession->ReadAddonsInfo(authSession->AddonInfo);
735735

src/server/game/Skills/Archaeology/ArchaeologySites.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,12 @@ void Archaeology::LoadSitesFromDB()
4646
if (!result)
4747
return;
4848

49-
uint32 count = 0;
5049
do {
5150
Field *fields = result->Fetch();
5251
uint32 site = fields[0].GetUInt8();
5352
uint16 type = fields[1].GetUInt16();
5453
uint8 finds = fields[2].GetUInt8();
5554
SetSite(site, type, finds);
56-
count++;
5755
} while (result->NextRow());
5856
}
5957

@@ -249,4 +247,3 @@ void Archaeology::RegenerateAllSites()
249247
for (uint32 i = 0; i < COUNT_CONT; i++)
250248
RegenerateContinent(Continent(i));
251249
}
252-

src/server/scripts/Commands/cs_npc.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,10 @@ class npc_commandscript : public CommandScript
864864
if (target->GetUInt32Value(UNIT_FIELD_FLAGS) & unitFlags[i].Value)
865865
handler->PSendSysMessage("%s (0x%X)", unitFlags[i].Name, unitFlags[i].Value);
866866

867+
for (uint8 i = 0; i < MAX_UNIT_FLAGS2; ++i)
868+
if (target->GetUInt32Value(UNIT_FIELD_FLAGS_2) & unitFlags2[i].Value)
869+
handler->PSendSysMessage("%s (0x%X)", unitFlags2[i].Name, unitFlags2[i].Value);
870+
867871
handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->GetFaction());
868872
handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str());
869873
handler->PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid, cInfo->pickpocketLootId, cInfo->SkinLootId);

src/server/scripts/Kalimdor/zone_silithus.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,6 @@ class npc_anachronos_quest_trigger : public CreatureScript
868868
Player* groupMember = nullptr;
869869

870870
uint8 GroupMemberCount = 0;
871-
uint8 DeadMemberCount = 0;
872871
uint8 FailedMemberCount = 0;
873872

874873
Group::MemberSlotList const& members = EventGroup->GetMemberSlots();
@@ -884,9 +883,6 @@ class npc_anachronos_quest_trigger : public CreatureScript
884883
++FailedMemberCount;
885884
}
886885
++GroupMemberCount;
887-
888-
if (groupMember->isDead())
889-
++DeadMemberCount;
890886
}
891887

892888
if (GroupMemberCount == FailedMemberCount || !player->IsWithinDistInMap(me, EVENT_AREA_RADIUS))

src/server/scripts/Spells/spell_warrior.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ class spell_warr_charge : public SpellScript
178178
// 12809 - Concussion Blow
179179
class spell_warr_concussion_blow : public SpellScript
180180
{
181-
void CalculateDamage(Unit* victim, int32& damage, int32& flatMod, float& pctMod)
181+
void CalculateDamage(Unit* /*victim*/, int32& damage, int32& /*flatMod*/, float& /*pctMod*/)
182182
{
183183
damage = CalculatePct(GetCaster()->GetTotalAttackPowerValue(BASE_ATTACK), GetSpellInfo()->Effects[EFFECT_2].CalcValue());
184184
}

0 commit comments

Comments
 (0)