diff --git a/src/server/game/Combat/ThreatMgr.cpp b/src/server/game/Combat/ThreatMgr.cpp index 620556c5f8605a..30fb7a146d29fc 100644 --- a/src/server/game/Combat/ThreatMgr.cpp +++ b/src/server/game/Combat/ThreatMgr.cpp @@ -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); } diff --git a/src/server/game/Misc/GameGraveyard.cpp b/src/server/game/Misc/GameGraveyard.cpp index 08d9232bc88072..38269a3fc4249a 100644 --- a/src/server/game/Misc/GameGraveyard.cpp +++ b/src/server/game/Misc/GameGraveyard.cpp @@ -46,11 +46,11 @@ void Graveyard::LoadGraveyardFromDB() do { - Field* fields = result->Fetch(); - uint32 ID = fields[0].Get(); - GraveyardStruct Graveyard; + Field* fields = result->Fetch(); + + Graveyard.ID = fields[0].Get(); Graveyard.Map = fields[1].Get(); Graveyard.x = fields[2].Get(); Graveyard.y = fields[3].Get(); @@ -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()); diff --git a/src/server/game/Server/WorldSocket.cpp b/src/server/game/Server/WorldSocket.cpp index 4bba0868c263a4..fefe24949bd6d7 100644 --- a/src/server/game/Server/WorldSocket.cpp +++ b/src/server/game/Server/WorldSocket.cpp @@ -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(packet.GetOpcode())), _worldSession->GetPlayerInfo()); + LOG_ERROR("network.opcode", "No defined handler for opcode {} sent by {}", GetOpcodeNameForLogging(static_cast(packetToQueue->GetOpcode())), _worldSession->GetPlayerInfo()); delete packetToQueue; return ReadDataHandlerResult::Error; }