Scripts/Commands: Fixed build with -DSCRIPTS=0
This commit is contained in:
1 parent
a0e50ea35f
commit
2a1a294383
21 files changed
+85
-85
No files matched your search
@@ -156,7 +156,7 @@ class ObjectGuid
|
||||
|
||||
TypeID GetTypeId() const { return GetTypeId(GetHigh()); }
|
||||
|
||||
//bool operator!() const { return IsEmpty(); }
|
||||
bool operator!() const { return IsEmpty(); }
|
||||
bool operator== (ObjectGuid const& guid) const { return GetRawValue() == guid.GetRawValue(); }
|
||||
bool operator!= (ObjectGuid const& guid) const { return GetRawValue() != guid.GetRawValue(); }
|
||||
bool operator< (ObjectGuid const& guid) const { return GetRawValue() < guid.GetRawValue(); }
|
||||
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
return false;
|
||||
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid))
|
||||
return false;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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, " ");
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -166,7 +166,7 @@ class example_escort : public CreatureScript
|
||||
{
|
||||
if (m_uiChatTimer <= uiDiff)
|
||||
{
|
||||
if (me->HasAura(SPELL_ELIXIR_OF_FORTITUDE, 0))
|
||||
if (me->HasAura(SPELL_ELIXIR_OF_FORTITUDE))
|
||||
{
|
||||
Talk(SAY_RAND_1);
|
||||
DoCast(me, SPELL_BLUE_FIREWORK, false);
|
||||
|
||||
@@ -353,7 +353,7 @@ class spell_dk_bloodworms : public SpellScriptLoader
|
||||
class CorpseExplosionCheck
|
||||
{
|
||||
public:
|
||||
explicit CorpseExplosionCheck(uint64 casterGUID, bool allowGhoul) : _casterGUID(casterGUID),
|
||||
explicit CorpseExplosionCheck(ObjectGuid casterGUID, bool allowGhoul) : _casterGUID(casterGUID),
|
||||
_allowGhoul(allowGhoul) { }
|
||||
|
||||
bool operator()(WorldObject* obj) const
|
||||
@@ -370,7 +370,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _casterGUID;
|
||||
ObjectGuid _casterGUID;
|
||||
bool _allowGhoul;
|
||||
};
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ class spell_gen_animal_blood : public SpellScriptLoader
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
// Remove all auras with spell id 46221, except the one currently being applied
|
||||
while (Aura* aur = GetUnitOwner()->GetOwnedAura(SPELL_ANIMAL_BLOOD, 0, 0, 0, GetAura()))
|
||||
while (Aura* aur = GetUnitOwner()->GetOwnedAura(SPELL_ANIMAL_BLOOD, ObjectGuid::Empty, ObjectGuid::Empty, 0, GetAura()))
|
||||
GetUnitOwner()->RemoveOwnedAura(aur);
|
||||
}
|
||||
|
||||
@@ -1866,7 +1866,7 @@ class spell_gen_mount : public SpellScriptLoader
|
||||
if (Player* target = GetHitPlayer())
|
||||
{
|
||||
// Prevent stacking of mounts and client crashes upon dismounting
|
||||
target->RemoveAurasByType(SPELL_AURA_MOUNTED, 0, GetHitAura());
|
||||
target->RemoveAurasByType(SPELL_AURA_MOUNTED, ObjectGuid::Empty, GetHitAura());
|
||||
|
||||
// Triggered spell id dependent on riding skill and zone
|
||||
bool canFly = false;
|
||||
|
||||
@@ -754,7 +754,7 @@ class spell_q12937_relief_for_the_fallen : public SpellScriptLoader
|
||||
if (Creature* target = GetHitCreature())
|
||||
{
|
||||
caster->CastSpell(caster, SPELL_TRIGGER_AID_OF_THE_EARTHEN, true, NULL);
|
||||
caster->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER, 0);
|
||||
caster->KilledMonsterCredit(NPC_FALLEN_EARTHEN_DEFENDER);
|
||||
target->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
@@ -885,7 +885,7 @@ class spell_q12659_ahunaes_knife : public SpellScriptLoader
|
||||
if (Creature* target = GetHitCreature())
|
||||
{
|
||||
target->DespawnOrUnsummon();
|
||||
caster->KilledMonsterCredit(NPC_SCALPS_KC_BUNNY, 0);
|
||||
caster->KilledMonsterCredit(NPC_SCALPS_KC_BUNNY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -929,7 +929,7 @@ class spell_q9874_liquid_fire : public SpellScriptLoader
|
||||
if (Creature* target = GetHitCreature())
|
||||
if (target && !target->HasAura(SPELL_FLAMES))
|
||||
{
|
||||
caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT, 0);
|
||||
caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT);
|
||||
target->CastSpell(target, SPELL_FLAMES, true);
|
||||
target->DespawnOrUnsummon(60000);
|
||||
}
|
||||
@@ -973,7 +973,7 @@ class spell_q12805_lifeblood_dummy : public SpellScriptLoader
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
if (Creature* target = GetHitCreature())
|
||||
{
|
||||
caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT, 0);
|
||||
caster->KilledMonsterCredit(NPC_SHARD_KILL_CREDIT);
|
||||
target->CastSpell(target, uint32(GetEffectValue()), true);
|
||||
target->DespawnOrUnsummon(2000);
|
||||
}
|
||||
@@ -1016,7 +1016,7 @@ class spell_q13280_13283_plant_battle_standard: public SpellScriptLoader
|
||||
Unit* caster = GetCaster();
|
||||
if (caster->IsVehicle())
|
||||
if (Unit* player = caster->GetVehicleKit()->GetPassenger(0))
|
||||
player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC, 0);
|
||||
player->ToPlayer()->KilledMonsterCredit(NPC_KING_OF_THE_MOUNTAINT_KC);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
@@ -1356,7 +1356,7 @@ class spell_q12372_destabilize_azure_dragonshrine_dummy : public SpellScriptLoad
|
||||
if (Vehicle* vehicle = caster->GetVehicleKit())
|
||||
if (Unit* passenger = vehicle->GetPassenger(0))
|
||||
if (Player* player = passenger->ToPlayer())
|
||||
player->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT, 0);
|
||||
player->KilledMonsterCredit(NPC_WYRMREST_TEMPLE_CREDIT);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
|
||||
@@ -314,7 +314,7 @@ class spell_rog_killing_spree : public SpellScriptLoader
|
||||
{
|
||||
while (!_targets.empty())
|
||||
{
|
||||
uint64 guid = Trinity::Containers::SelectRandomContainerElement(_targets);
|
||||
ObjectGuid guid = Trinity::Containers::SelectRandomContainerElement(_targets);
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*GetTarget(), guid))
|
||||
{
|
||||
GetTarget()->CastSpell(target, SPELL_ROGUE_KILLING_SPREE_TELEPORT, true);
|
||||
@@ -345,7 +345,7 @@ class spell_rog_killing_spree : public SpellScriptLoader
|
||||
}
|
||||
|
||||
private:
|
||||
std::list<uint64> _targets;
|
||||
GuidList _targets;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
|
||||
Reference in new issue
Block a user