mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Restore save tutorials only at character save and implement this for EquipmentSets
This commit is contained in:
parent
5afdde9f9e
commit
49322fa20a
7 changed files with 124 additions and 50 deletions
|
|
@ -121,6 +121,7 @@ ObjectMgr::ObjectMgr()
|
|||
m_hiPetNumber = 1;
|
||||
m_ItemTextId = 1;
|
||||
m_mailid = 1;
|
||||
m_equipmentSetGuid = 1;
|
||||
m_guildId = 1;
|
||||
m_arenaTeamId = 1;
|
||||
m_auctionid = 1;
|
||||
|
|
@ -5124,6 +5125,13 @@ void ObjectMgr::SetHighestGuids()
|
|||
delete result;
|
||||
}
|
||||
|
||||
result = CharacterDatabase.Query("SELECT MAX(setguid) FROM character_equipmentsets");
|
||||
if (result)
|
||||
{
|
||||
m_equipmentSetGuid = (*result)[0].GetUInt64()+1;
|
||||
delete result;
|
||||
}
|
||||
|
||||
result = CharacterDatabase.Query( "SELECT MAX(guildid) FROM guild" );
|
||||
if (result)
|
||||
{
|
||||
|
|
@ -5152,6 +5160,16 @@ uint32 ObjectMgr::GenerateAuctionID()
|
|||
return m_auctionid++;
|
||||
}
|
||||
|
||||
uint64 ObjectMgr::GenerateEquipmentSetGuid()
|
||||
{
|
||||
if(m_equipmentSetGuid>=0xFFFFFFFFFFFFFFFE)
|
||||
{
|
||||
sLog.outError("EquipmentSet guid overflow!! Can't continue, shutting down server. ");
|
||||
World::StopNow(ERROR_EXIT_CODE);
|
||||
}
|
||||
return m_equipmentSetGuid++;
|
||||
}
|
||||
|
||||
uint32 ObjectMgr::GenerateGuildId()
|
||||
{
|
||||
if(m_guildId>=0xFFFFFFFE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue