Core/Entities: Use ObjectGuid class in game project
This commit is contained in:
1 parent
ce67a097bf
commit
a0e50ea35f
256 files changed
+3334
-3833
No files matched your search
@@ -59,14 +59,14 @@ public:
|
||||
static bool HandleResetAchievementsCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid))
|
||||
return false;
|
||||
|
||||
if (target)
|
||||
target->ResetAchievements();
|
||||
else
|
||||
AchievementMgr::DeleteFromDB(GUID_LOPART(targetGuid));
|
||||
AchievementMgr::DeleteFromDB(targetGuid);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ public:
|
||||
static bool HandleResetSpellsCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->setUInt16(0, uint16(AT_LOGIN_RESET_SPELLS));
|
||||
stmt->setUInt32(1, GUID_LOPART(targetGuid));
|
||||
stmt->setUInt32(1, targetGuid.GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
handler->PSendSysMessage(LANG_RESET_SPELLS_OFFLINE, targetName.c_str());
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
static bool HandleResetTalentsCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
{
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->setUInt16(0, uint16(AT_LOGIN_NONE | AT_LOGIN_RESET_PET_TALENTS));
|
||||
stmt->setUInt32(1, GUID_LOPART(targetGuid));
|
||||
stmt->setUInt32(1, targetGuid.GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
std::string nameLink = handler->playerLink(targetName);
|
||||
|
||||
Reference in new issue
Block a user