[10811] Use ObjectGuids in chat commands.

Still exist 15 GUID_LOPART uses in code.
This commit is contained in:
VladimirMangos 2010-12-02 07:07:47 +03:00
parent c6d3c5e0d6
commit b305f203b9
15 changed files with 151 additions and 146 deletions

View file

@ -398,7 +398,7 @@ void AchievementMgr::Reset()
m_completedAchievements.clear();
m_criteriaProgress.clear();
DeleteFromDB(m_player->GetGUIDLow());
DeleteFromDB(m_player->GetObjectGuid());
// re-fill data
CheckAllAchievementCriteria();
@ -443,11 +443,12 @@ void AchievementMgr::ResetAchievementCriteria(AchievementCriteriaTypes type, uin
}
}
void AchievementMgr::DeleteFromDB(uint32 lowguid)
void AchievementMgr::DeleteFromDB(ObjectGuid guid)
{
uint32 lowguid = guid.GetCounter();
CharacterDatabase.BeginTransaction ();
CharacterDatabase.PExecute("DELETE FROM character_achievement WHERE guid = %u",lowguid);
CharacterDatabase.PExecute("DELETE FROM character_achievement_progress WHERE guid = %u",lowguid);
CharacterDatabase.PExecute("DELETE FROM character_achievement WHERE guid = %u", lowguid);
CharacterDatabase.PExecute("DELETE FROM character_achievement_progress WHERE guid = %u", lowguid);
CharacterDatabase.CommitTransaction ();
}