mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
refactor(Core): fix few static analysis (#20566)
* refactor(Core): fix few static analysis * fix builds * revert FacingInfo change and fix GraveYard ID use in a log
This commit is contained in:
@@ -217,7 +217,7 @@ void HostileReference::setOnlineOfflineState(bool isOnline)
|
||||
{
|
||||
iOnline = isOnline;
|
||||
|
||||
ThreatRefStatusChangeEvent event(UEV_THREAT_REF_ONLINE_STATUS, this);
|
||||
ThreatRefStatusChangeEvent event(UEV_THREAT_REF_ONLINE_STATUS, this, isOnline);
|
||||
fireStatusChanged(event);
|
||||
}
|
||||
}
|
||||
@@ -230,7 +230,7 @@ void HostileReference::removeReference()
|
||||
{
|
||||
invalidate();
|
||||
|
||||
ThreatRefStatusChangeEvent event(UEV_THREAT_REF_REMOVE_FROM_LIST, this);
|
||||
ThreatRefStatusChangeEvent event(UEV_THREAT_REF_REMOVE_FROM_LIST, this, false);
|
||||
fireStatusChanged(event);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,11 +46,11 @@ void Graveyard::LoadGraveyardFromDB()
|
||||
|
||||
do
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
uint32 ID = fields[0].Get<uint32>();
|
||||
|
||||
GraveyardStruct Graveyard;
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
Graveyard.ID = fields[0].Get<uint32>();
|
||||
Graveyard.Map = fields[1].Get<uint32>();
|
||||
Graveyard.x = fields[2].Get<float>();
|
||||
Graveyard.y = fields[3].Get<float>();
|
||||
@@ -59,13 +59,13 @@ void Graveyard::LoadGraveyardFromDB()
|
||||
|
||||
if (!Utf8toWStr(Graveyard.name, Graveyard.wnameLow))
|
||||
{
|
||||
LOG_ERROR("sql.sql", "Wrong UTF8 name for id {} in `game_graveyard` table, ignoring.", ID);
|
||||
LOG_ERROR("sql.sql", "Wrong UTF8 name for id {} in `game_graveyard` table, ignoring.", Graveyard.ID);
|
||||
continue;
|
||||
}
|
||||
|
||||
wstrToLower(Graveyard.wnameLow);
|
||||
|
||||
_graveyardStore[ID] = Graveyard;
|
||||
_graveyardStore[Graveyard.ID] = std::move(Graveyard);
|
||||
|
||||
++Count;
|
||||
} while (result->NextRow());
|
||||
|
||||
@@ -476,7 +476,7 @@ WorldSocket::ReadDataHandlerResult WorldSocket::ReadDataHandler()
|
||||
OpcodeHandler const* handler = opcodeTable[opcode];
|
||||
if (!handler)
|
||||
{
|
||||
LOG_ERROR("network.opcode", "No defined handler for opcode {} sent by {}", GetOpcodeNameForLogging(static_cast<OpcodeClient>(packet.GetOpcode())), _worldSession->GetPlayerInfo());
|
||||
LOG_ERROR("network.opcode", "No defined handler for opcode {} sent by {}", GetOpcodeNameForLogging(static_cast<OpcodeClient>(packetToQueue->GetOpcode())), _worldSession->GetPlayerInfo());
|
||||
delete packetToQueue;
|
||||
return ReadDataHandlerResult::Error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user