mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-10 03:59:05 +01:00
Core/Archaeology: fixed loading current branches and initialize some fields to fix restoring artifacts
This commit is contained in:
@@ -78,6 +78,8 @@ void WorldSession::HandleClientCastFlags(WorldPacket& recvPacket, uint8 castFlag
|
||||
recvPacket >> archData.FragId; // Currency id
|
||||
recvPacket >> archData.FragCount; // Currency count
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -27,10 +27,10 @@ class Player;
|
||||
|
||||
struct ArchData
|
||||
{
|
||||
uint32 FragId;
|
||||
uint32 FragCount;
|
||||
uint32 KeyId;
|
||||
uint32 KeyCount;
|
||||
uint32 FragId = 0;
|
||||
uint32 FragCount = 0;
|
||||
uint32 KeyId = 0;
|
||||
uint32 KeyCount = 0;
|
||||
};
|
||||
|
||||
enum ContinentState
|
||||
|
||||
@@ -65,10 +65,9 @@ void Archaeology::LoadCurrentProjectsFromDB()
|
||||
uint8 branch = fields[0].GetUInt8();
|
||||
uint16 project = fields[1].GetUInt16();
|
||||
|
||||
auto itr = _branches.find(branch);
|
||||
if (itr != _branches.end())
|
||||
if (uint16 old_project = _branches[branch].Project)
|
||||
{
|
||||
TC_LOG_ERROR("player.skills", "ERROR - Archaeology: Tried to assign project %u to branch %u, which already holds project %u!", project, branch, itr->second.Project);
|
||||
TC_LOG_ERROR("player.skills", "ERROR - Archaeology: Tried to assign project %u to branch %u, which already holds project %u!", project, branch, old_project);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user