aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/scripts/Commands')
-rw-r--r--src/server/scripts/Commands/cs_arena.cpp2
-rw-r--r--src/server/scripts/Commands/cs_character.cpp30
-rw-r--r--src/server/scripts/Commands/cs_cheat.cpp2
-rw-r--r--src/server/scripts/Commands/cs_debug.cpp4
-rw-r--r--src/server/scripts/Commands/cs_gm.cpp2
-rw-r--r--src/server/scripts/Commands/cs_group.cpp14
-rw-r--r--src/server/scripts/Commands/cs_guild.cpp6
-rw-r--r--src/server/scripts/Commands/cs_honor.cpp6
-rw-r--r--src/server/scripts/Commands/cs_lfg.cpp4
-rw-r--r--src/server/scripts/Commands/cs_modify.cpp42
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp4
-rw-r--r--src/server/scripts/Commands/cs_quest.cpp4
-rw-r--r--src/server/scripts/Commands/cs_tele.cpp8
-rw-r--r--src/server/scripts/Commands/cs_ticket.cpp6
-rw-r--r--src/server/scripts/Commands/cs_titles.cpp8
15 files changed, 71 insertions, 71 deletions
diff --git a/src/server/scripts/Commands/cs_arena.cpp b/src/server/scripts/Commands/cs_arena.cpp
index 24a332f6a30..c4bee7a1d19 100644
--- a/src/server/scripts/Commands/cs_arena.cpp
+++ b/src/server/scripts/Commands/cs_arena.cpp
@@ -232,7 +232,7 @@ public:
return false;
Player* target;
- uint64 targetGuid;
+ ObjectGuid targetGuid;
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid))
return false;
diff --git a/src/server/scripts/Commands/cs_character.cpp b/src/server/scripts/Commands/cs_character.cpp
index 46409d7c852..7cd29747606 100644
--- a/src/server/scripts/Commands/cs_character.cpp
+++ b/src/server/scripts/Commands/cs_character.cpp
@@ -79,7 +79,7 @@ public:
// Stores informations about a deleted character
struct DeletedInfo
{
- uint32 lowGuid; ///< the low GUID from the character
+ ObjectGuid guid; ///< the GUID from the character
std::string name; ///< the character name
uint32 accountId; ///< the account id
std::string accountName; ///< the account name
@@ -133,7 +133,7 @@ public:
DeletedInfo info;
- info.lowGuid = fields[0].GetUInt32();
+ info.guid = ObjectGuid(HIGHGUID_PLAYER, fields[0].GetUInt32());
info.name = fields[1].GetString();
info.accountId = fields[2].GetUInt32();
@@ -173,11 +173,11 @@ public:
if (!handler->GetSession())
handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CONSOLE,
- itr->lowGuid, itr->name.c_str(), itr->accountName.empty() ? "<Not existed>" : itr->accountName.c_str(),
+ itr->guid.GetCounter(), itr->name.c_str(), itr->accountName.empty() ? "<Not existed>" : itr->accountName.c_str(),
itr->accountId, dateStr.c_str());
else
handler->PSendSysMessage(LANG_CHARACTER_DELETED_LIST_LINE_CHAT,
- itr->lowGuid, itr->name.c_str(), itr->accountName.empty() ? "<Not existed>" : itr->accountName.c_str(),
+ itr->guid.GetCounter(), itr->name.c_str(), itr->accountName.empty() ? "<Not existed>" : itr->accountName.c_str(),
itr->accountId, dateStr.c_str());
}
@@ -199,7 +199,7 @@ public:
{
if (delInfo.accountName.empty()) // account not exist
{
- handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
+ handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_ACCOUNT, delInfo.name.c_str(), delInfo.guid, delInfo.accountId);
return;
}
@@ -207,26 +207,26 @@ public:
uint32 charcount = AccountMgr::GetCharactersCount(delInfo.accountId);
if (charcount >= 10)
{
- handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
+ handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_FULL, delInfo.name.c_str(), delInfo.guid, delInfo.accountId);
return;
}
if (sObjectMgr->GetPlayerGUIDByName(delInfo.name))
{
- handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.lowGuid, delInfo.accountId);
+ handler->PSendSysMessage(LANG_CHARACTER_DELETED_SKIP_NAME, delInfo.name.c_str(), delInfo.guid, delInfo.accountId);
return;
}
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_RESTORE_DELETE_INFO);
stmt->setString(0, delInfo.name);
stmt->setUInt32(1, delInfo.accountId);
- stmt->setUInt32(2, delInfo.lowGuid);
+ stmt->setUInt32(2, delInfo.guid.GetCounter());
CharacterDatabase.Execute(stmt);
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHARACTER_NAME_DATA);
- stmt->setUInt32(0, delInfo.lowGuid);
+ stmt->setUInt32(0, delInfo.guid.GetCounter());
if (PreparedQueryResult result = CharacterDatabase.Query(stmt))
- sWorld->AddCharacterNameData(ObjectGuid(HIGHGUID_PLAYER, delInfo.lowGuid), delInfo.name, (*result)[2].GetUInt8(), (*result)[0].GetUInt8(), (*result)[1].GetUInt8(), (*result)[3].GetUInt8());
+ sWorld->AddCharacterNameData(delInfo.guid, delInfo.name, (*result)[2].GetUInt8(), (*result)[0].GetUInt8(), (*result)[1].GetUInt8(), (*result)[3].GetUInt8());
}
static void HandleCharacterLevel(Player* player, ObjectGuid playerGuid, uint32 oldLevel, uint32 newLevel, ChatHandler* handler)
@@ -318,7 +318,7 @@ public:
if (target)
{
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
playerOldName = target->GetName();
@@ -368,7 +368,7 @@ public:
// Remove declined name from db
stmt = CharacterDatabase.GetPreparedStatement(CHAR_DEL_DECLINED_NAME);
- stmt->setUInt32(0, targetGuid);
+ stmt->setUInt32(0, targetGuid.GetCounter());
CharacterDatabase.Execute(stmt);
if (target)
@@ -403,7 +403,7 @@ public:
if (target)
{
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_RENAME_PLAYER, handler->GetNameLink(target).c_str());
@@ -721,7 +721,7 @@ public:
// Call the appropriate function to delete them (current account for deleted characters is 0)
for (DeletedInfoList::const_iterator itr = foundList.begin(); itr != foundList.end(); ++itr)
- Player::DeleteFromDB(itr->lowGuid, 0, false, true);
+ Player::DeleteFromDB(itr->guid, 0, false, true);
return true;
}
@@ -921,7 +921,7 @@ public:
return false;
}
- if (sObjectMgr->GetPlayerAccountIdByGUID(guid))
+ if (sObjectMgr->GetPlayerAccountIdByGUID(ObjectGuid(HIGHGUID_PLAYER, guid)))
{
handler->PSendSysMessage(LANG_CHARACTER_GUID_IN_USE, guid);
handler->SetSentErrorMessage(true);
diff --git a/src/server/scripts/Commands/cs_cheat.cpp b/src/server/scripts/Commands/cs_cheat.cpp
index b61cf2c54fe..7ab414b0d63 100644
--- a/src/server/scripts/Commands/cs_cheat.cpp
+++ b/src/server/scripts/Commands/cs_cheat.cpp
@@ -227,7 +227,7 @@ public:
if (!chr)
chr = handler->GetSession()->GetPlayer();
- else if (handler->HasLowerSecurity(chr, 0)) // check online security
+ else if (handler->HasLowerSecurity(chr, ObjectGuid::Empty)) // check online security
return false;
if (argstr == "on")
diff --git a/src/server/scripts/Commands/cs_debug.cpp b/src/server/scripts/Commands/cs_debug.cpp
index 4f28e8ecd94..a2c71607eaa 100644
--- a/src/server/scripts/Commands/cs_debug.cpp
+++ b/src/server/scripts/Commands/cs_debug.cpp
@@ -239,7 +239,7 @@ public:
return false;
SellResult msg = SellResult(atoi(args));
- handler->GetSession()->GetPlayer()->SendSellError(msg, 0, 0, 0);
+ handler->GetSession()->GetPlayer()->SendSellError(msg, nullptr, ObjectGuid::Empty, 0);
return true;
}
@@ -249,7 +249,7 @@ public:
return false;
BuyResult msg = BuyResult(atoi(args));
- handler->GetSession()->GetPlayer()->SendBuyError(msg, 0, 0, 0);
+ handler->GetSession()->GetPlayer()->SendBuyError(msg, nullptr, 0, 0);
return true;
}
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp
index 1420765bb0b..29f8c904f97 100644
--- a/src/server/scripts/Commands/cs_gm.cpp
+++ b/src/server/scripts/Commands/cs_gm.cpp
@@ -211,7 +211,7 @@ public:
if (param == "on")
{
- if (_player->HasAura(VISUAL_AURA, 0))
+ if (_player->HasAura(VISUAL_AURA))
_player->RemoveAurasDueToSpell(VISUAL_AURA);
_player->SetGMVisible(true);
diff --git a/src/server/scripts/Commands/cs_group.cpp b/src/server/scripts/Commands/cs_group.cpp
index 1c3559770cc..e39aca6f6a7 100644
--- a/src/server/scripts/Commands/cs_group.cpp
+++ b/src/server/scripts/Commands/cs_group.cpp
@@ -57,7 +57,7 @@ public:
return false;
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
Group* group = target->GetGroup();
@@ -95,7 +95,7 @@ public:
continue;
// check online security
- if (handler->HasLowerSecurity(player, 0))
+ if (handler->HasLowerSecurity(player, ObjectGuid::Empty))
return false;
std::string plNameLink = handler->GetNameLink(player);
@@ -147,7 +147,7 @@ public:
{
Player* player = NULL;
Group* group = NULL;
- uint64 guid = 0;
+ ObjectGuid guid;
char* nameStr = strtok((char*)args, " ");
if (!handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid))
@@ -173,7 +173,7 @@ public:
{
Player* player = NULL;
Group* group = NULL;
- uint64 guid = 0;
+ ObjectGuid guid;
char* nameStr = strtok((char*)args, " ");
if (!handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid))
@@ -194,7 +194,7 @@ public:
{
Player* player = NULL;
Group* group = NULL;
- uint64 guid = 0;
+ ObjectGuid guid;
char* nameStr = strtok((char*)args, " ");
if (!handler->GetPlayerGroupAndGUIDByName(nameStr, player, group, guid))
@@ -220,8 +220,8 @@ public:
Player* playerTarget = NULL;
Group* groupSource = NULL;
Group* groupTarget = NULL;
- uint64 guidSource = 0;
- uint64 guidTarget = 0;
+ ObjectGuid guidSource;
+ ObjectGuid guidTarget;
char* nameplgrStr = strtok((char*)args, " ");
char* nameplStr = strtok(NULL, " ");
diff --git a/src/server/scripts/Commands/cs_guild.cpp b/src/server/scripts/Commands/cs_guild.cpp
index 7b074087c0f..a2bf2e3d8a8 100644
--- a/src/server/scripts/Commands/cs_guild.cpp
+++ b/src/server/scripts/Commands/cs_guild.cpp
@@ -130,7 +130,7 @@ public:
return false;
// if not guild name only (in "") then player name
- uint64 targetGuid;
+ ObjectGuid targetGuid;
if (!handler->extractPlayerTarget(*args != '"' ? (char*)args : NULL, NULL, &targetGuid))
return false;
@@ -154,7 +154,7 @@ public:
static bool HandleGuildUninviteCommand(ChatHandler* handler, char const* args)
{
Player* target;
- uint64 targetGuid;
+ ObjectGuid targetGuid;
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid))
return false;
@@ -179,7 +179,7 @@ public:
return false;
Player* target;
- uint64 targetGuid;
+ ObjectGuid targetGuid;
std::string target_name;
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &target_name))
return false;
diff --git a/src/server/scripts/Commands/cs_honor.cpp b/src/server/scripts/Commands/cs_honor.cpp
index 6b76f753403..eeaee40fea9 100644
--- a/src/server/scripts/Commands/cs_honor.cpp
+++ b/src/server/scripts/Commands/cs_honor.cpp
@@ -71,7 +71,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
uint32 amount = (uint32)atoi(args);
@@ -91,7 +91,7 @@ public:
// check online security
if (Player* player = target->ToPlayer())
- if (handler->HasLowerSecurity(player, 0))
+ if (handler->HasLowerSecurity(player, ObjectGuid::Empty))
return false;
handler->GetSession()->GetPlayer()->RewardHonor(target, 1);
@@ -109,7 +109,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
target->UpdateHonorFields();
diff --git a/src/server/scripts/Commands/cs_lfg.cpp b/src/server/scripts/Commands/cs_lfg.cpp
index 2f6afd29e9f..1a4cce16d68 100644
--- a/src/server/scripts/Commands/cs_lfg.cpp
+++ b/src/server/scripts/Commands/cs_lfg.cpp
@@ -27,7 +27,7 @@ void GetPlayerInfo(ChatHandler* handler, Player* player)
if (!player)
return;
- uint64 guid = player->GetGUID();
+ ObjectGuid guid = player->GetGUID();
lfg::LfgDungeonSet dungeons = sLFGMgr->GetSelectedDungeons(guid);
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
@@ -86,7 +86,7 @@ public:
return true;
}
- uint64 guid = grp->GetGUID();
+ ObjectGuid guid = grp->GetGUID();
std::string const& state = lfg::GetStateString(sLFGMgr->GetState(guid));
handler->PSendSysMessage(LANG_LFG_GROUP_INFO, grp->isLFGGroup(),
state.c_str(), sLFGMgr->GetDungeon(guid));
diff --git a/src/server/scripts/Commands/cs_modify.cpp b/src/server/scripts/Commands/cs_modify.cpp
index 3bc0d4ea65f..3c2f122324d 100644
--- a/src/server/scripts/Commands/cs_modify.cpp
+++ b/src/server/scripts/Commands/cs_modify.cpp
@@ -106,7 +106,7 @@ public:
return false;
}
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target).c_str(), hp, hpm);
@@ -144,7 +144,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target).c_str(), mana, manam);
@@ -193,7 +193,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target).c_str(), energy/10, energym/10);
@@ -244,7 +244,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target).c_str(), rage/10, ragem/10);
@@ -398,7 +398,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellflatid, val, mark, handler->GetNameLink(target).c_str());
@@ -436,7 +436,7 @@ public:
if (target->GetTypeId() == TYPEID_PLAYER)
{
// check online security
- if (handler->HasLowerSecurity(target->ToPlayer(), 0))
+ if (handler->HasLowerSecurity(target->ToPlayer(), ObjectGuid::Empty))
return false;
target->ToPlayer()->SetFreeTalentPoints(tp);
target->ToPlayer()->SendTalentsInfoData(false);
@@ -448,7 +448,7 @@ public:
if (owner && owner->GetTypeId() == TYPEID_PLAYER && ((Pet*)target)->IsPermanentPetFor(owner->ToPlayer()))
{
// check online security
- if (handler->HasLowerSecurity(owner->ToPlayer(), 0))
+ if (handler->HasLowerSecurity(owner->ToPlayer(), ObjectGuid::Empty))
return false;
((Pet*)target)->SetFreeTalentPoints(tp);
owner->ToPlayer()->SendTalentsInfoData(true);
@@ -485,7 +485,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
std::string targetNameLink = handler->GetNameLink(target);
@@ -533,7 +533,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
std::string targetNameLink = handler->GetNameLink(target);
@@ -578,7 +578,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
std::string targetNameLink = handler->GetNameLink(target);
@@ -623,7 +623,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
std::string targetNameLink = handler->GetNameLink(target);
@@ -668,7 +668,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_FLY_SPEED, FSpeed, handler->GetNameLink(target).c_str());
@@ -705,7 +705,7 @@ public:
if (Player* player = target->ToPlayer())
{
// check online security
- if (handler->HasLowerSecurity(player, 0))
+ if (handler->HasLowerSecurity(player, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(player).c_str());
@@ -953,7 +953,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
handler->PSendSysMessage(LANG_YOU_GIVE_MOUNT, handler->GetNameLink(target).c_str());
@@ -994,7 +994,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
int32 moneyToAdd = 0;
@@ -1061,7 +1061,7 @@ public:
}
// check online security
- if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), 0))
+ if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), ObjectGuid::Empty))
return false;
char* pField = strtok((char*)args, " ");
@@ -1115,7 +1115,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
int32 amount = (uint32)atoi(args);
@@ -1156,7 +1156,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
char* factionTxt = handler->extractKeyFromLink((char*)args, "Hfaction");
@@ -1255,7 +1255,7 @@ public:
target = handler->GetSession()->GetPlayer();
// check online security
- else if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), 0))
+ else if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), ObjectGuid::Empty))
return false;
target->SetDisplayId(display_id);
@@ -1276,7 +1276,7 @@ public:
target = handler->GetSession()->GetPlayer();
// check online security
- else if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), 0))
+ else if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), ObjectGuid::Empty))
return false;
target->SetPhaseMask(phasemask, true);
@@ -1386,7 +1386,7 @@ public:
target = handler->GetSession()->GetPlayer();
// check online security
- else if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), 0))
+ else if (target->GetTypeId() == TYPEID_PLAYER && handler->HasLowerSecurity(target->ToPlayer(), ObjectGuid::Empty))
return false;
target->DeMorph();
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index f8845acc1ce..e4509189cf9 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -1306,11 +1306,11 @@ public:
if (!creature || !receiver_str || !text)
return false;
- uint64 receiver_guid = atol(receiver_str);
+ ObjectGuid receiver_guid(HIGHGUID_PLAYER, uint32(atol(receiver_str)));
// check online security
Player* receiver = ObjectAccessor::FindPlayer(receiver_guid);
- if (handler->HasLowerSecurity(receiver, 0))
+ if (handler->HasLowerSecurity(receiver, ObjectGuid::Empty))
return false;
creature->MonsterWhisper(text, receiver);
diff --git a/src/server/scripts/Commands/cs_quest.cpp b/src/server/scripts/Commands/cs_quest.cpp
index 08603279824..dc75e0aedab 100644
--- a/src/server/scripts/Commands/cs_quest.cpp
+++ b/src/server/scripts/Commands/cs_quest.cpp
@@ -206,11 +206,11 @@ public:
{
if (CreatureTemplate const* creatureInfo = sObjectMgr->GetCreatureTemplate(creature))
for (uint16 z = 0; z < creatureCount; ++z)
- player->KilledMonster(creatureInfo, 0);
+ player->KilledMonster(creatureInfo, ObjectGuid::Empty);
}
else if (creature < 0)
for (uint16 z = 0; z < creatureCount; ++z)
- player->KillCreditGO(creature, 0);
+ player->KillCreditGO(creature);
}
// If the quest requires reputation to complete
diff --git a/src/server/scripts/Commands/cs_tele.cpp b/src/server/scripts/Commands/cs_tele.cpp
index 5dbb61d890a..6b4fb7d104d 100644
--- a/src/server/scripts/Commands/cs_tele.cpp
+++ b/src/server/scripts/Commands/cs_tele.cpp
@@ -135,7 +135,7 @@ public:
else
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_HOMEBIND);
- stmt->setUInt32(0, target_guid);
+ stmt->setUInt32(0, target_guid.GetCounter());
PreparedQueryResult resultDB = CharacterDatabase.Query(stmt);
if (resultDB)
@@ -166,7 +166,7 @@ public:
if (target)
{
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
std::string chrNameLink = handler->playerLink(target_name);
@@ -225,7 +225,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
// id, or string, or [name] Shift-click form |color|Htele:id|h[name]|h|r
@@ -263,7 +263,7 @@ public:
continue;
// check online security
- if (handler->HasLowerSecurity(player, 0))
+ if (handler->HasLowerSecurity(player, ObjectGuid::Empty))
return false;
std::string plNameLink = handler->GetNameLink(player);
diff --git a/src/server/scripts/Commands/cs_ticket.cpp b/src/server/scripts/Commands/cs_ticket.cpp
index 8307f1ffdbe..674658f41ff 100644
--- a/src/server/scripts/Commands/cs_ticket.cpp
+++ b/src/server/scripts/Commands/cs_ticket.cpp
@@ -95,7 +95,7 @@ public:
return true;
}
- uint64 targetGuid = sObjectMgr->GetPlayerGUIDByName(target);
+ ObjectGuid targetGuid = sObjectMgr->GetPlayerGUIDByName(target);
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(targetGuid);
// Target must exist and have administrative rights
if (!AccountMgr::HasPermission(accountId, rbac::RBAC_PERM_COMMANDS_BE_ASSIGNED_TICKET, realmID))
@@ -376,7 +376,7 @@ public:
security = assignedPlayer->GetSession()->GetSecurity();
else
{
- uint64 guid = ticket->GetAssignedToGUID();
+ ObjectGuid guid = ticket->GetAssignedToGUID();
uint32 accountId = sObjectMgr->GetPlayerAccountIdByGUID(guid);
security = AccountMgr::GetSecurity(accountId, realmID);
}
@@ -434,7 +434,7 @@ public:
return false;
// Detect target's GUID
- ObjectGuid guid = 0;
+ ObjectGuid guid;
if (Player* player = sObjectAccessor->FindPlayerByName(name))
guid = player->GetGUID();
else
diff --git a/src/server/scripts/Commands/cs_titles.cpp b/src/server/scripts/Commands/cs_titles.cpp
index dee9c33ae99..e75a36cb913 100644
--- a/src/server/scripts/Commands/cs_titles.cpp
+++ b/src/server/scripts/Commands/cs_titles.cpp
@@ -80,7 +80,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
@@ -125,7 +125,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
@@ -171,7 +171,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
@@ -219,7 +219,7 @@ public:
}
// check online security
- if (handler->HasLowerSecurity(target, 0))
+ if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
return false;
uint64 titles2 = titles;