Core/Achievements: Fixed field type in *_achievement_progress tables
This commit is contained in:
1 parent
71386a5b2c
commit
de64f5d34f
4 files changed
+8
-6
No files matched your search
@@ -409,7 +409,7 @@ DROP TABLE IF EXISTS `character_achievement_progress`;
|
||||
CREATE TABLE `character_achievement_progress` (
|
||||
`guid` int(10) unsigned NOT NULL,
|
||||
`criteria` smallint(5) unsigned NOT NULL,
|
||||
`counter` int(10) unsigned NOT NULL,
|
||||
`counter` bigint(20) unsigned NOT NULL,
|
||||
`date` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`guid`,`criteria`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
@@ -1801,7 +1801,7 @@ DROP TABLE IF EXISTS `guild_achievement_progress`;
|
||||
CREATE TABLE `guild_achievement_progress` (
|
||||
`guildId` int(10) unsigned NOT NULL,
|
||||
`criteria` smallint(5) unsigned NOT NULL,
|
||||
`counter` int(10) unsigned NOT NULL,
|
||||
`counter` bigint(20) unsigned NOT NULL,
|
||||
`date` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
`completedGuid` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`guildId`,`criteria`)
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `character_achievement_progress` CHANGE `counter` `counter` bigint(20) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `guild_achievement_progress` CHANGE `counter` `counter` bigint(20) unsigned NOT NULL DEFAULT '0';
|
||||
@@ -686,7 +686,7 @@ void AchievementMgr<Guild>::SaveToDB(SQLTransaction& trans)
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_INS_GUILD_ACHIEVEMENT_CRITERIA);
|
||||
stmt->setUInt32(0, GetOwner()->GetId());
|
||||
stmt->setUInt16(1, itr->first);
|
||||
stmt->setUInt32(2, itr->second.counter);
|
||||
stmt->setUInt64(2, itr->second.counter);
|
||||
stmt->setUInt32(3, itr->second.date);
|
||||
stmt->setUInt32(4, GUID_LOPART(itr->second.CompletedGUID));
|
||||
trans->Append(stmt);
|
||||
@@ -1997,7 +1997,7 @@ void AchievementMgr<T>::SendAllAchievementData(Player* /*receiver*/) const
|
||||
data.WriteBits(numCriteria, 21);
|
||||
for (CriteriaProgressMap::const_iterator itr = m_criteriaProgress.begin(); itr != m_criteriaProgress.end(); ++itr)
|
||||
{
|
||||
counter = uint64(itr->second.counter);
|
||||
counter = itr->second.counter;
|
||||
|
||||
data.WriteBit(guid[4]);
|
||||
data.WriteBit(counter[3]);
|
||||
@@ -2082,7 +2082,7 @@ void AchievementMgr<Player>::SendAchievementInfo(Player* receiver, uint32 /*achi
|
||||
VisibleAchievementPred isVisible;
|
||||
size_t numCriteria = m_criteriaProgress.size();
|
||||
size_t numAchievements = std::count_if(m_completedAchievements.begin(), m_completedAchievements.end(), isVisible);
|
||||
ByteBuffer criteriaData(numCriteria * (0));
|
||||
ByteBuffer criteriaData(numCriteria * 16);
|
||||
|
||||
WorldPacket data(SMSG_RESPOND_INSPECT_ACHIEVEMENTS, 1 + 8 + 3 + 3 + numAchievements * (4 + 4) + numCriteria * (0));
|
||||
data.WriteBit(guid[7]);
|
||||
|
||||
@@ -40,7 +40,7 @@ typedef UNORDERED_MAP<uint32, AchievementEntryList> AchievementListByRef
|
||||
|
||||
struct CriteriaProgress
|
||||
{
|
||||
uint32 counter;
|
||||
uint64 counter;
|
||||
time_t date; // latest update time.
|
||||
uint64 CompletedGUID; // GUID of the player that completed this criteria (guild achievements)
|
||||
bool changed;
|
||||
|
||||
Reference in new issue
Block a user