mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-20 15:01:38 -04:00
Merge branch 'master' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/game/Achievements/AchievementMgr.cpp src/server/game/Battlefield/Battlefield.h src/server/game/Battlegrounds/ArenaScore.h src/server/game/Battlegrounds/ArenaTeam.cpp src/server/game/Battlegrounds/ArenaTeam.h src/server/game/Battlegrounds/ArenaTeamMgr.cpp src/server/game/Battlegrounds/BattlegroundMgr.cpp src/server/game/Battlegrounds/BattlegroundMgr.h src/server/game/Battlegrounds/BattlegroundQueue.h src/server/game/Battlegrounds/BattlegroundScore.h src/server/game/Battlegrounds/Zones/BattlegroundAB.h src/server/game/Battlegrounds/Zones/BattlegroundAV.h src/server/game/Battlegrounds/Zones/BattlegroundEY.h src/server/game/Battlegrounds/Zones/BattlegroundIC.h src/server/game/Battlegrounds/Zones/BattlegroundSA.h src/server/game/Battlegrounds/Zones/BattlegroundWS.h src/server/game/DungeonFinding/LFG.h src/server/game/DungeonFinding/LFGMgr.cpp src/server/game/DungeonFinding/LFGMgr.h src/server/game/DungeonFinding/LFGQueue.cpp src/server/game/DungeonFinding/LFGQueue.h src/server/game/Entities/Corpse/Corpse.cpp src/server/game/Entities/Creature/Creature.cpp src/server/game/Entities/Creature/GossipDef.cpp src/server/game/Entities/Creature/GossipDef.h src/server/game/Entities/Creature/TemporarySummon.cpp src/server/game/Entities/DynamicObject/DynamicObject.cpp src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Object/Object.h src/server/game/Entities/Object/ObjectDefines.h src/server/game/Entities/Object/Updates/UpdateData.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Player/Player.h src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Unit/Unit.h src/server/game/Globals/ObjectAccessor.cpp src/server/game/Globals/ObjectAccessor.h src/server/game/Globals/ObjectMgr.cpp src/server/game/Groups/Group.cpp src/server/game/Groups/Group.h src/server/game/Guilds/Guild.cpp src/server/game/Guilds/Guild.h src/server/game/Handlers/AuctionHouseHandler.cpp src/server/game/Handlers/BattleGroundHandler.cpp src/server/game/Handlers/CalendarHandler.cpp src/server/game/Handlers/CharacterHandler.cpp src/server/game/Handlers/ChatHandler.cpp src/server/game/Handlers/GroupHandler.cpp src/server/game/Handlers/GuildHandler.cpp src/server/game/Handlers/ItemHandler.cpp src/server/game/Handlers/LFGHandler.cpp src/server/game/Handlers/MailHandler.cpp src/server/game/Handlers/MiscHandler.cpp src/server/game/Handlers/MovementHandler.cpp src/server/game/Handlers/NPCHandler.cpp src/server/game/Handlers/PetHandler.cpp src/server/game/Handlers/QueryHandler.cpp src/server/game/Handlers/QuestHandler.cpp src/server/game/Handlers/TradeHandler.cpp src/server/game/Handlers/VehicleHandler.cpp src/server/game/Movement/Spline/MoveSplineInit.cpp src/server/game/Server/WorldSession.cpp src/server/game/Server/WorldSession.h src/server/game/Spells/Spell.cpp src/server/scripts/Commands/cs_debug.cpp src/server/scripts/Commands/cs_gm.cpp src/server/scripts/Commands/cs_misc.cpp src/server/scripts/Commands/cs_modify.cpp src/server/scripts/Commands/cs_reset.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_akilzon.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp src/server/scripts/EasternKingdoms/ZulAman/zulaman.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_arlokk.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jindo.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_mandokir.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_thekal.cpp src/server/scripts/EasternKingdoms/ZulGurub/instance_zulgurub.cpp src/server/scripts/EasternKingdoms/zone_silverpine_forest.cpp src/server/scripts/EasternKingdoms/zone_stormwind_city.cpp src/server/scripts/EasternKingdoms/zone_swamp_of_sorrows.cpp src/server/scripts/EasternKingdoms/zone_tirisfal_glades.cpp src/server/scripts/Kalimdor/zone_azshara.cpp src/server/scripts/Kalimdor/zone_durotar.cpp src/server/scripts/Kalimdor/zone_moonglade.cpp src/server/scripts/Kalimdor/zone_orgrimmar.cpp src/server/scripts/Kalimdor/zone_ungoro_crater.cpp src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp src/server/scripts/OutdoorPvP/OutdoorPvPEP.cpp src/server/scripts/Spells/spell_dk.cpp src/server/scripts/Spells/spell_generic.cpp src/server/shared/Packets/ByteBuffer.h
This commit is contained in:
@@ -774,7 +774,7 @@ public:
|
||||
if (handler->HasLowerSecurityAccount(NULL, targetAccountId, true))
|
||||
return false;
|
||||
|
||||
if (strcmp(password, passwordConfirmation))
|
||||
if (strcmp(password, passwordConfirmation) != 0)
|
||||
{
|
||||
handler->SendSysMessage(LANG_NEW_PASSWORDS_NOT_MATCH);
|
||||
handler->SetSentErrorMessage(true);
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
}
|
||||
|
||||
sArenaTeamMgr->AddArenaTeam(arena);
|
||||
handler->PSendSysMessage(LANG_ARENA_CREATE, arena->GetName().c_str(), arena->GetId(), arena->GetType(), arena->GetCaptain());
|
||||
handler->PSendSysMessage(LANG_ARENA_CREATE, arena->GetName().c_str(), arena->GetId(), arena->GetType(), arena->GetCaptain().GetCounter());
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
return false;
|
||||
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid))
|
||||
return false;
|
||||
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
|
||||
arena->SetCaptain(targetGuid);
|
||||
|
||||
CharacterNameData const* oldCaptainNameData = sWorld->GetCharacterNameData(GUID_LOPART(arena->GetCaptain()));
|
||||
CharacterNameData const* oldCaptainNameData = sWorld->GetCharacterNameData(arena->GetCaptain());
|
||||
if (!oldCaptainNameData)
|
||||
{
|
||||
handler->SetSentErrorMessage(true);
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_HEADER, arena->GetName().c_str(), arena->GetId(), arena->GetRating(), arena->GetType(), arena->GetType());
|
||||
for (ArenaTeam::MemberList::iterator itr = arena->m_membersBegin(); itr != arena->m_membersEnd(); ++itr)
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr->Name.c_str(), GUID_LOPART(itr->Guid), itr->PersonalRating, (arena->GetCaptain() == itr->Guid ? "- Captain" : ""));
|
||||
handler->PSendSysMessage(LANG_ARENA_INFO_MEMBERS, itr->Name.c_str(), itr->Guid.GetCounter(), itr->PersonalRating, (arena->GetCaptain() == itr->Guid ? "- Captain" : ""));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
bool permanent = (fields[1].GetUInt32() == uint32(0));
|
||||
std::string banTime = permanent ? handler->GetTrinityString(LANG_BANINFO_INFINITE) : secsToTimeString(fields[1].GetUInt32(), true);
|
||||
handler->PSendSysMessage(LANG_BANINFO_HISTORYENTRY,
|
||||
fields[0].GetCString(), banTime.c_str(), active ? handler->GetTrinityString(LANG_YES) : handler->GetTrinityString(LANG_NO), fields[4].GetCString(), fields[5].GetCString());
|
||||
TimeToTimestampStr(fields[0].GetUInt32()).c_str(), banTime.c_str(), active ? handler->GetTrinityString(LANG_YES) : handler->GetTrinityString(LANG_NO), fields[4].GetCString(), fields[5].GetCString());
|
||||
}
|
||||
while (result->NextRow());
|
||||
|
||||
|
||||
@@ -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.GetCounter(), delInfo.accountId);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -207,29 +207,29 @@ 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.GetCounter(), 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.GetCounter(), 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(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, uint64 playerGuid, uint32 oldLevel, uint32 newLevel, ChatHandler* handler)
|
||||
static void HandleCharacterLevel(Player* player, ObjectGuid playerGuid, uint32 oldLevel, uint32 newLevel, ChatHandler* handler)
|
||||
{
|
||||
if (player)
|
||||
{
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
// Update level and reset XP, everything else will be updated at login
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_LEVEL);
|
||||
stmt->setUInt8(0, uint8(newLevel));
|
||||
stmt->setUInt32(1, GUID_LOPART(playerGuid));
|
||||
stmt->setUInt32(1, playerGuid.GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
}
|
||||
@@ -303,7 +303,7 @@ public:
|
||||
static bool HandleCharacterRenameCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -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)
|
||||
@@ -382,7 +382,7 @@ public:
|
||||
{
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_NAME_BY_GUID);
|
||||
stmt->setString(0, newName);
|
||||
stmt->setUInt32(1, GUID_LOPART(targetGuid));
|
||||
stmt->setUInt32(1, targetGuid.GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
|
||||
@@ -396,14 +396,14 @@ public:
|
||||
sLog->outCommand(session->GetAccountId(), "GM %s (Account: %u) forced rename %s to player %s (Account: %u)", player->GetName().c_str(), session->GetAccountId(), newName.c_str(), playerOldName.c_str(), sObjectMgr->GetPlayerAccountIdByGUID(targetGuid));
|
||||
}
|
||||
else
|
||||
sLog->outCommand(0, "CONSOLE forced rename '%s' to '%s' (GUID: %u)", playerOldName.c_str(), newName.c_str(), GUID_LOPART(targetGuid));
|
||||
sLog->outCommand(0, "CONSOLE forced rename '%s' to '%s' (%s)", playerOldName.c_str(), newName.c_str(), targetGuid.ToString().c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
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());
|
||||
@@ -416,11 +416,11 @@ public:
|
||||
return false;
|
||||
|
||||
std::string oldNameLink = handler->playerLink(targetName);
|
||||
handler->PSendSysMessage(LANG_RENAME_PLAYER_GUID, oldNameLink.c_str(), GUID_LOPART(targetGuid));
|
||||
handler->PSendSysMessage(LANG_RENAME_PLAYER_GUID, oldNameLink.c_str(), targetGuid.GetCounter());
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_ADD_AT_LOGIN_FLAG);
|
||||
stmt->setUInt16(0, uint16(AT_LOGIN_RENAME));
|
||||
stmt->setUInt32(1, GUID_LOPART(targetGuid));
|
||||
stmt->setUInt32(1, targetGuid.GetCounter());
|
||||
CharacterDatabase.Execute(stmt);
|
||||
}
|
||||
}
|
||||
@@ -444,7 +444,7 @@ public:
|
||||
}
|
||||
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -472,7 +472,7 @@ public:
|
||||
static bool HandleCharacterCustomizeCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -488,8 +488,8 @@ public:
|
||||
else
|
||||
{
|
||||
std::string oldNameLink = handler->playerLink(targetName);
|
||||
stmt->setUInt32(1, GUID_LOPART(targetGuid));
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), GUID_LOPART(targetGuid));
|
||||
stmt->setUInt32(1, targetGuid.GetCounter());
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), targetGuid.GetCounter());
|
||||
}
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
@@ -499,7 +499,7 @@ public:
|
||||
static bool HandleCharacterChangeFactionCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
@@ -516,8 +516,8 @@ public:
|
||||
else
|
||||
{
|
||||
std::string oldNameLink = handler->playerLink(targetName);
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), GUID_LOPART(targetGuid));
|
||||
stmt->setUInt32(1, GUID_LOPART(targetGuid));
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), targetGuid.GetCounter());
|
||||
stmt->setUInt32(1, targetGuid.GetCounter());
|
||||
}
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
@@ -527,7 +527,7 @@ public:
|
||||
static bool HandleCharacterChangeRaceCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -545,8 +545,8 @@ public:
|
||||
{
|
||||
std::string oldNameLink = handler->playerLink(targetName);
|
||||
/// @todo add text into database
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), GUID_LOPART(targetGuid));
|
||||
stmt->setUInt32(1, GUID_LOPART(targetGuid));
|
||||
handler->PSendSysMessage(LANG_CUSTOMIZE_PLAYER_GUID, oldNameLink.c_str(), targetGuid.GetCounter());
|
||||
stmt->setUInt32(1, targetGuid.GetCounter());
|
||||
}
|
||||
CharacterDatabase.Execute(stmt);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -773,7 +773,7 @@ public:
|
||||
if (!normalizePlayerName(characterName))
|
||||
return false;
|
||||
|
||||
uint64 characterGuid;
|
||||
ObjectGuid characterGuid;
|
||||
uint32 accountId;
|
||||
|
||||
Player* player = sObjectAccessor->FindPlayerByName(characterName);
|
||||
@@ -799,7 +799,7 @@ public:
|
||||
AccountMgr::GetName(accountId, accountName);
|
||||
|
||||
Player::DeleteFromDB(characterGuid, accountId, true, true);
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED, characterName.c_str(), GUID_LOPART(characterGuid), accountName.c_str(), accountId);
|
||||
handler->PSendSysMessage(LANG_CHARACTER_DELETED, characterName.c_str(), characterGuid.GetCounter(), accountName.c_str(), accountId);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -818,7 +818,7 @@ public:
|
||||
}
|
||||
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -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);
|
||||
@@ -966,10 +966,10 @@ public:
|
||||
if (!fileStr || !playerStr)
|
||||
return false;
|
||||
|
||||
uint64 guid;
|
||||
ObjectGuid guid;
|
||||
// character name can't start from number
|
||||
if (isNumeric(playerStr))
|
||||
guid = MAKE_NEW_GUID(atoi(playerStr), 0, HIGHGUID_PLAYER);
|
||||
guid = ObjectGuid(HIGHGUID_PLAYER, uint32(atoi(playerStr)));
|
||||
else
|
||||
{
|
||||
std::string name = handler->extractPlayerNameFromLink(playerStr);
|
||||
|
||||
@@ -228,7 +228,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")
|
||||
|
||||
@@ -240,7 +240,7 @@ public:
|
||||
return false;
|
||||
|
||||
SellResult msg = SellResult(atoi(args));
|
||||
handler->GetSession()->GetPlayer()->SendSellError(msg, 0, 0);
|
||||
handler->GetSession()->GetPlayer()->SendSellError(msg, nullptr, ObjectGuid::Empty);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,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;
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ public:
|
||||
std::string type;
|
||||
parsedStream >> type;
|
||||
|
||||
if (type == "")
|
||||
if (type.empty())
|
||||
break;
|
||||
|
||||
if (type == "uint8")
|
||||
@@ -362,11 +362,11 @@ public:
|
||||
}
|
||||
else if (type == "appitsguid")
|
||||
{
|
||||
data.append(unit->GetPackGUID());
|
||||
data << unit->GetPackGUID();
|
||||
}
|
||||
else if (type == "appmyguid")
|
||||
{
|
||||
data.append(player->GetPackGUID());
|
||||
data << player->GetPackGUID();
|
||||
}
|
||||
else if (type == "appgoguid")
|
||||
{
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
ifs.close();
|
||||
return false;
|
||||
}
|
||||
data.append(obj->GetPackGUID());
|
||||
data << obj->GetPackGUID();
|
||||
}
|
||||
else if (type == "goguid")
|
||||
{
|
||||
@@ -559,10 +559,10 @@ public:
|
||||
for (uint8 j = 0; j < bag->GetBagSize(); ++j)
|
||||
if (Item* item2 = bag->GetItemByPos(j))
|
||||
if (item2->GetState() == state)
|
||||
handler->PSendSysMessage("bag: 255 slot: %d guid: %d owner: %d", item2->GetSlot(), item2->GetGUIDLow(), GUID_LOPART(item2->GetOwnerGUID()));
|
||||
handler->PSendSysMessage("bag: 255 slot: %d guid: %d owner: %d", item2->GetSlot(), item2->GetGUIDLow(), item2->GetOwnerGUID().GetCounter());
|
||||
}
|
||||
else if (item->GetState() == state)
|
||||
handler->PSendSysMessage("bag: 255 slot: %d guid: %d owner: %d", item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()));
|
||||
handler->PSendSysMessage("bag: 255 slot: %d guid: %d owner: %d", item->GetSlot(), item->GetGUIDLow(), item->GetOwnerGUID().GetCounter());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -624,7 +624,7 @@ public:
|
||||
|
||||
if (item->GetOwnerGUID() != player->GetGUID())
|
||||
{
|
||||
handler->PSendSysMessage("The item with slot %d and itemguid %d does have non-matching owner guid (%d) and player guid (%d) !", item->GetSlot(), item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
|
||||
handler->PSendSysMessage("The item with slot %d and itemguid %d does have non-matching owner guid (%d) and player guid (%d) !", item->GetSlot(), item->GetGUIDLow(), item->GetOwnerGUID().GetCounter(), player->GetGUIDLow());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -684,7 +684,7 @@ public:
|
||||
|
||||
if (item2->GetOwnerGUID() != player->GetGUID())
|
||||
{
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d and with itemguid %d, the owner's guid (%d) and the player's guid (%d) don't match!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), GUID_LOPART(item2->GetOwnerGUID()), player->GetGUIDLow());
|
||||
handler->PSendSysMessage("The item in bag %d at slot %d and with itemguid %d, the owner's guid (%d) and the player's guid (%d) don't match!", bag->GetSlot(), item2->GetSlot(), item2->GetGUIDLow(), item2->GetOwnerGUID().GetCounter(), player->GetGUIDLow());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -746,7 +746,7 @@ public:
|
||||
|
||||
if (item->GetOwnerGUID() != player->GetGUID())
|
||||
{
|
||||
handler->PSendSysMessage("queue(%zu): For the item with guid %d, the owner's guid (%d) and the player's guid (%d) don't match!", i, item->GetGUIDLow(), GUID_LOPART(item->GetOwnerGUID()), player->GetGUIDLow());
|
||||
handler->PSendSysMessage("queue(%zu): For the item with guid %d, the owner's guid (%d) and the player's guid (%d) don't match!", i, item->GetGUIDLow(), item->GetOwnerGUID().GetCounter(), player->GetGUIDLow());
|
||||
error = true;
|
||||
continue;
|
||||
}
|
||||
@@ -990,7 +990,7 @@ public:
|
||||
uint32 guid = (uint32)atoi(e);
|
||||
uint32 index = (uint32)atoi(f);
|
||||
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, 0, guid));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
@@ -1021,7 +1021,7 @@ public:
|
||||
uint32 index = (uint32)atoi(f);
|
||||
uint32 value = (uint32)atoi(g);
|
||||
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, 0, guid));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
@@ -1045,7 +1045,7 @@ public:
|
||||
|
||||
uint32 guid = (uint32)atoi(e);
|
||||
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(MAKE_NEW_GUID(guid, 0, HIGHGUID_ITEM));
|
||||
Item* i = handler->GetSession()->GetPlayer()->GetItemByGuid(ObjectGuid(HIGHGUID_ITEM, guid));
|
||||
|
||||
if (!i)
|
||||
return false;
|
||||
@@ -1124,12 +1124,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64 guid = target->GetGUID();
|
||||
ObjectGuid guid = target->GetGUID();
|
||||
|
||||
uint32 field = (uint32)atoi(x);
|
||||
if (field >= target->GetValuesCount())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, field, GUID_LOPART(guid), target->GetValuesCount());
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, field, guid.GetCounter(), target->GetValuesCount());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1141,13 +1141,13 @@ public:
|
||||
{
|
||||
uint32 value = (uint32)atoi(y);
|
||||
target->SetUInt32Value(field, value);
|
||||
handler->PSendSysMessage(LANG_SET_UINT_FIELD, GUID_LOPART(guid), field, value);
|
||||
handler->PSendSysMessage(LANG_SET_UINT_FIELD, guid.GetCounter(), field, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
float value = (float)atof(y);
|
||||
target->SetFloatValue(field, value);
|
||||
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, GUID_LOPART(guid), field, value);
|
||||
handler->PSendSysMessage(LANG_SET_FLOAT_FIELD, guid.GetCounter(), field, value);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -1172,12 +1172,12 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64 guid = target->GetGUID();
|
||||
ObjectGuid guid = target->GetGUID();
|
||||
|
||||
uint32 opcode = (uint32)atoi(x);
|
||||
if (opcode >= target->GetValuesCount())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, GUID_LOPART(guid), target->GetValuesCount());
|
||||
handler->PSendSysMessage(LANG_TOO_BIG_INDEX, opcode, guid.GetCounter(), target->GetValuesCount());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1188,12 +1188,12 @@ public:
|
||||
if (isInt32)
|
||||
{
|
||||
uint32 value = target->GetUInt32Value(opcode);
|
||||
handler->PSendSysMessage(LANG_GET_UINT_FIELD, GUID_LOPART(guid), opcode, value);
|
||||
handler->PSendSysMessage(LANG_GET_UINT_FIELD, guid.GetCounter(), opcode, value);
|
||||
}
|
||||
else
|
||||
{
|
||||
float value = target->GetFloatValue(opcode);
|
||||
handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, GUID_LOPART(guid), opcode, value);
|
||||
handler->PSendSysMessage(LANG_GET_FLOAT_FIELD, guid.GetCounter(), opcode, value);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
|
||||
if (param == "on")
|
||||
{
|
||||
if (_player->HasAura(VISUAL_AURA, 0))
|
||||
if (_player->HasAura(VISUAL_AURA))
|
||||
_player->RemoveAurasDueToSpell(VISUAL_AURA);
|
||||
|
||||
_player->SetGMVisible(true);
|
||||
|
||||
@@ -140,7 +140,7 @@ public:
|
||||
|
||||
Transport* transport = NULL;
|
||||
|
||||
if (Creature* creature = ObjectAccessor::GetObjectInWorld(MAKE_NEW_GUID(guid, id, HIGHGUID_UNIT), (Creature*)NULL))
|
||||
if (Creature* creature = ObjectAccessor::GetObjectInWorld(ObjectGuid(HIGHGUID_UNIT, id, guid), (Creature*)NULL))
|
||||
{
|
||||
x = creature->GetPositionX();
|
||||
y = creature->GetPositionY();
|
||||
|
||||
@@ -327,7 +327,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(MAKE_NEW_GUID(guidLow, id, HIGHGUID_GAMEOBJECT));
|
||||
GameObject* target = handler->GetSession()->GetPlayer()->GetMap()->GetGameObject(ObjectGuid(HIGHGUID_GAMEOBJECT, id, guidLow));
|
||||
|
||||
handler->PSendSysMessage(LANG_GAMEOBJECT_DETAIL, guidLow, objectInfo->name.c_str(), guidLow, id, x, y, z, mapId, o, phase);
|
||||
|
||||
@@ -370,13 +370,13 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64 ownerGuid = object->GetOwnerGUID();
|
||||
ObjectGuid ownerGuid = object->GetOwnerGUID();
|
||||
if (ownerGuid)
|
||||
{
|
||||
Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), ownerGuid);
|
||||
if (!owner || !IS_PLAYER_GUID(ownerGuid))
|
||||
if (!owner || !ownerGuid.IsPlayer())
|
||||
{
|
||||
handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, GUID_LOPART(ownerGuid), object->GetGUIDLow());
|
||||
handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.GetCounter(), object->GetGUIDLow());
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -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, " ");
|
||||
|
||||
@@ -263,18 +263,18 @@ public:
|
||||
// Get ALL the variables!
|
||||
Player* playerTarget;
|
||||
uint32 phase = 0;
|
||||
uint64 guidTarget;
|
||||
ObjectGuid guidTarget;
|
||||
std::string nameTarget;
|
||||
std::string zoneName;
|
||||
const char* onlineState = "";
|
||||
|
||||
// Parse the guid to uint32...
|
||||
uint32 parseGUID = MAKE_NEW_GUID(atol((char*)args), 0, HIGHGUID_PLAYER);
|
||||
ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args)));
|
||||
|
||||
// ... and try to extract a player out of it.
|
||||
if (sObjectMgr->GetPlayerNameByGUID(parseGUID, nameTarget))
|
||||
{
|
||||
playerTarget = sObjectMgr->GetPlayerByLowGUID(parseGUID);
|
||||
playerTarget = ObjectAccessor::FindPlayer(parseGUID);
|
||||
guidTarget = parseGUID;
|
||||
}
|
||||
// If not, we return false and end right away.
|
||||
@@ -292,7 +292,7 @@ public:
|
||||
if (!groupTarget)
|
||||
{
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GROUP_MEMBER);
|
||||
stmt->setUInt32(0, guidTarget);
|
||||
stmt->setUInt32(0, guidTarget.GetCounter());
|
||||
PreparedQueryResult resultGroup = CharacterDatabase.Query(stmt);
|
||||
if (resultGroup)
|
||||
groupTarget = sGroupMgr->GetGroupByDbStoreId((*resultGroup)[0].GetUInt32());
|
||||
@@ -368,7 +368,7 @@ public:
|
||||
|
||||
// Now we can print those informations for every single member of each group!
|
||||
handler->PSendSysMessage(LANG_GROUP_PLAYER_NAME_GUID, slot.name.c_str(), onlineState,
|
||||
zoneName.c_str(), phase, GUID_LOPART(slot.guid), flags.c_str(),
|
||||
zoneName.c_str(), phase, slot.guid.GetCounter(), flags.c_str(),
|
||||
lfg::GetRolesString(slot.roles).c_str());
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,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;
|
||||
|
||||
@@ -156,7 +156,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;
|
||||
|
||||
@@ -181,7 +181,7 @@ public:
|
||||
return false;
|
||||
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string target_name;
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &target_name))
|
||||
return false;
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
{
|
||||
Guild* guild = nullptr;
|
||||
|
||||
if (args && strlen(args) > 0)
|
||||
if (args && args[0] != '\0')
|
||||
{
|
||||
if (isNumeric(args))
|
||||
{
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
|
||||
std::string guildMasterName;
|
||||
if (sObjectMgr->GetPlayerNameByGUID(guild->GetLeaderGUID(), guildMasterName))
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID()); // Guild Master
|
||||
handler->PSendSysMessage(LANG_GUILD_INFO_GUILD_MASTER, guildMasterName.c_str(), guild->GetLeaderGUID().GetCounter()); // Guild Master
|
||||
|
||||
// Format creation date
|
||||
char createdDateStr[20];
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
uint16 counter = 0;
|
||||
uint16 MapId = 0;
|
||||
|
||||
if (strcmp(map, "all"))
|
||||
if (strcmp(map, "all") != 0)
|
||||
{
|
||||
MapId = uint16(atoi(map));
|
||||
if (!MapId)
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -447,8 +447,8 @@ public:
|
||||
handler->PSendSysMessage(LANG_COMMAND_TARGET_AURADETAIL, aura->GetId(), (handler->GetSession() ? ss_name.str().c_str() : name),
|
||||
aurApp->GetEffectMask(), aura->GetCharges(), aura->GetStackAmount(), aurApp->GetSlot(),
|
||||
aura->GetDuration(), aura->GetMaxDuration(), (aura->IsPassive() ? passiveStr : ""),
|
||||
(talent ? talentStr : ""), IS_PLAYER_GUID(aura->GetCasterGUID()) ? "player" : "creature",
|
||||
GUID_LOPART(aura->GetCasterGUID()));
|
||||
(talent ? talentStr : ""), aura->GetCasterGUID().IsPlayer() ? "player" : "creature",
|
||||
aura->GetCasterGUID().GetCounter());
|
||||
}
|
||||
|
||||
for (uint16 i = 0; i < TOTAL_AURAS; ++i)
|
||||
@@ -469,25 +469,25 @@ public:
|
||||
static bool HandleListMailCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
PreparedStatement* stmt = NULL;
|
||||
|
||||
if (!*args)
|
||||
return false;
|
||||
|
||||
uint32 parseGUID = MAKE_NEW_GUID(atol((char*)args), 0, HIGHGUID_PLAYER);
|
||||
ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args)));
|
||||
|
||||
if (sObjectMgr->GetPlayerNameByGUID(parseGUID, targetName))
|
||||
{
|
||||
target = sObjectMgr->GetPlayerByLowGUID(parseGUID);
|
||||
target = ObjectAccessor::FindPlayer(parseGUID);
|
||||
targetGuid = parseGUID;
|
||||
}
|
||||
else if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_COUNT);
|
||||
stmt->setUInt32(0, targetGuid);
|
||||
stmt->setUInt32(0, targetGuid.GetCounter());
|
||||
PreparedQueryResult queryResult = CharacterDatabase.Query(stmt);
|
||||
if (queryResult)
|
||||
{
|
||||
@@ -495,11 +495,11 @@ public:
|
||||
uint32 countMail = fields[0].GetUInt64();
|
||||
|
||||
std::string nameLink = handler->playerLink(targetName);
|
||||
handler->PSendSysMessage(LANG_LIST_MAIL_HEADER, countMail, nameLink.c_str(), targetGuid);
|
||||
handler->PSendSysMessage(LANG_LIST_MAIL_HEADER, countMail, nameLink.c_str(), targetGuid.GetCounter());
|
||||
handler->PSendSysMessage(LANG_ACCOUNT_LIST_BAR);
|
||||
|
||||
stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_MAIL_LIST_INFO);
|
||||
stmt->setUInt32(0, targetGuid);
|
||||
stmt->setUInt32(0, targetGuid.GetCounter());
|
||||
PreparedQueryResult queryResult = CharacterDatabase.Query(stmt);
|
||||
|
||||
if (queryResult)
|
||||
|
||||
@@ -135,7 +135,7 @@ public:
|
||||
WorldObject* object = NULL;
|
||||
if (*args)
|
||||
{
|
||||
uint64 guid = handler->extractGuidFromLink((char*)args);
|
||||
ObjectGuid guid = handler->extractGuidFromLink((char*)args);
|
||||
if (guid)
|
||||
object = (WorldObject*)ObjectAccessor::GetObjectByTypeMask(*handler->GetSession()->GetPlayer(), guid, TYPEMASK_UNIT | TYPEMASK_GAMEOBJECT);
|
||||
|
||||
@@ -180,9 +180,8 @@ public:
|
||||
|
||||
GridCoord gridCoord = Trinity::ComputeGridCoord(object->GetPositionX(), object->GetPositionY());
|
||||
|
||||
// 63? WHY?
|
||||
int gridX = 63 - gridCoord.x_coord;
|
||||
int gridY = 63 - gridCoord.y_coord;
|
||||
int gridX = (MAX_NUMBER_OF_GRIDS - 1) - gridCoord.x_coord;
|
||||
int gridY = (MAX_NUMBER_OF_GRIDS - 1) - gridCoord.y_coord;
|
||||
|
||||
uint32 haveMap = Map::ExistMap(mapId, gridX, gridY) ? 1 : 0;
|
||||
uint32 haveVMap = Map::ExistVMap(mapId, gridX, gridY) ? 1 : 0;
|
||||
@@ -198,10 +197,12 @@ public:
|
||||
else
|
||||
handler->PSendSysMessage(LANG_GPS_NO_VMAP);
|
||||
|
||||
char const* unknown = handler->GetTrinityString(LANG_UNKNOWN);
|
||||
|
||||
handler->PSendSysMessage(LANG_MAP_POSITION,
|
||||
mapId, (mapEntry ? mapEntry->name : handler->GetTrinityString(LANG_UNKNOWN)),
|
||||
zoneId, (zoneEntry ? zoneEntry->area_name : handler->GetTrinityString(LANG_UNKNOWN)),
|
||||
areaId, (areaEntry ? areaEntry->area_name : handler->GetTrinityString(LANG_UNKNOWN)),
|
||||
mapId, (mapEntry ? mapEntry->name : unknown),
|
||||
zoneId, (zoneEntry ? zoneEntry->area_name : unknown),
|
||||
areaId, (areaEntry ? areaEntry->area_name : unknown),
|
||||
object->GetPhaseMask(),
|
||||
object->GetPositionX(), object->GetPositionY(), object->GetPositionZ(), object->GetOrientation(),
|
||||
cell.GridX(), cell.GridY(), cell.CellX(), cell.CellY(), object->GetInstanceId(),
|
||||
@@ -265,7 +266,7 @@ public:
|
||||
static bool HandleAppearCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -281,7 +282,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(targetName);
|
||||
@@ -408,7 +409,7 @@ public:
|
||||
static bool HandleSummonCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -425,7 +426,7 @@ public:
|
||||
{
|
||||
std::string nameLink = handler->playerLink(targetName);
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
if (target->IsBeingTeleported())
|
||||
@@ -538,7 +539,7 @@ public:
|
||||
}
|
||||
|
||||
if (Player* player = target->ToPlayer())
|
||||
if (handler->HasLowerSecurity(player, 0, false))
|
||||
if (handler->HasLowerSecurity(player, ObjectGuid::Empty, false))
|
||||
return false;
|
||||
|
||||
if (target->IsAlive())
|
||||
@@ -555,7 +556,7 @@ public:
|
||||
static bool HandleReviveCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid))
|
||||
return false;
|
||||
|
||||
@@ -598,16 +599,16 @@ public:
|
||||
|
||||
static bool HandleGUIDCommand(ChatHandler* handler, char const* /*args*/)
|
||||
{
|
||||
uint64 guid = handler->GetSession()->GetPlayer()->GetTarget();
|
||||
ObjectGuid guid = handler->GetSession()->GetPlayer()->GetTarget();
|
||||
|
||||
if (guid == 0)
|
||||
if (guid.IsEmpty())
|
||||
{
|
||||
handler->SendSysMessage(LANG_NO_SELECTION);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
handler->PSendSysMessage(LANG_OBJECT_GUID, GUID_LOPART(guid), GUID_HIPART(guid));
|
||||
handler->PSendSysMessage(LANG_OBJECT_GUID, guid.GetCounter(), guid.GetHigh());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -704,7 +705,7 @@ public:
|
||||
|
||||
if (*args)
|
||||
{
|
||||
uint64 guid = handler->extractGuidFromLink((char*)args);
|
||||
ObjectGuid guid = handler->extractGuidFromLink((char*)args);
|
||||
if (guid)
|
||||
obj = (WorldObject*)ObjectAccessor::GetObjectByTypeMask(*handler->GetSession()->GetPlayer(), guid, TYPEMASK_UNIT|TYPEMASK_GAMEOBJECT);
|
||||
|
||||
@@ -738,7 +739,7 @@ public:
|
||||
return false;
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
if (target->IsBeingTeleported())
|
||||
@@ -806,7 +807,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
std::string kickReasonStr = handler->GetTrinityString(LANG_NO_REASON);
|
||||
@@ -1381,17 +1382,17 @@ public:
|
||||
{
|
||||
// Define ALL the player variables!
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
PreparedStatement* stmt = NULL;
|
||||
|
||||
// To make sure we get a target, we convert our guid to an omniversal...
|
||||
uint32 parseGUID = MAKE_NEW_GUID(atol((char*)args), 0, HIGHGUID_PLAYER);
|
||||
ObjectGuid parseGUID(HIGHGUID_PLAYER, uint32(atol((char*)args)));
|
||||
|
||||
// ... and make sure we get a target, somehow.
|
||||
if (sObjectMgr->GetPlayerNameByGUID(parseGUID, targetName))
|
||||
{
|
||||
target = sObjectMgr->GetPlayerByLowGUID(parseGUID);
|
||||
target = ObjectAccessor::FindPlayer(parseGUID);
|
||||
targetGuid = parseGUID;
|
||||
}
|
||||
// if not, then return false. Which shouldn't happen, now should it ?
|
||||
@@ -1433,7 +1434,7 @@ public:
|
||||
// Account data print variables
|
||||
std::string userName = handler->GetTrinityString(LANG_ERROR);
|
||||
uint32 accId = 0;
|
||||
uint32 lowguid = GUID_LOPART(targetGuid);
|
||||
uint32 lowguid = targetGuid.GetCounter();
|
||||
std::string eMail = handler->GetTrinityString(LANG_ERROR);
|
||||
std::string regMail = handler->GetTrinityString(LANG_ERROR);
|
||||
uint32 security = 0;
|
||||
@@ -1487,7 +1488,7 @@ public:
|
||||
if (target)
|
||||
{
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
accId = target->GetSession()->GetAccountId();
|
||||
@@ -1712,7 +1713,9 @@ public:
|
||||
}
|
||||
|
||||
if (target)
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->name, (!zoneName.empty() ? zoneName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)), (!areaName.empty() ? areaName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)));
|
||||
handler->PSendSysMessage(LANG_PINFO_CHR_MAP, map->name,
|
||||
(!zoneName.empty() ? zoneName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)),
|
||||
(!areaName.empty() ? areaName.c_str() : handler->GetTrinityString(LANG_UNKNOWN)));
|
||||
|
||||
// Output XVII. - XVIX. if they are not empty
|
||||
if (!guildName.empty())
|
||||
@@ -1797,7 +1800,7 @@ public:
|
||||
muteReasonStr = muteReason;
|
||||
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -1860,7 +1863,7 @@ public:
|
||||
static bool HandleUnmuteCommand(ChatHandler* handler, char const* args)
|
||||
{
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -2116,7 +2119,7 @@ public:
|
||||
}
|
||||
|
||||
if (Player* player = target->ToPlayer())
|
||||
if (handler->HasLowerSecurity(player, 0, false))
|
||||
if (handler->HasLowerSecurity(player, ObjectGuid::Empty, false))
|
||||
return false;
|
||||
|
||||
if (!target->IsAlive())
|
||||
@@ -2188,7 +2191,7 @@ public:
|
||||
{
|
||||
Player* target = NULL;
|
||||
|
||||
if (args && strlen(args) > 0)
|
||||
if (args && args[0] != '\0')
|
||||
{
|
||||
target = sObjectAccessor->FindPlayerByName(args);
|
||||
if (!target)
|
||||
@@ -2206,7 +2209,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
target->CombatStop();
|
||||
@@ -2221,7 +2224,7 @@ public:
|
||||
return false;
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
// Repair items
|
||||
|
||||
@@ -107,7 +107,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);
|
||||
@@ -145,7 +145,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);
|
||||
@@ -194,7 +194,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);
|
||||
@@ -245,7 +245,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);
|
||||
@@ -399,7 +399,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());
|
||||
@@ -437,7 +437,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);
|
||||
@@ -449,7 +449,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);
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
std::string targetNameLink = handler->GetNameLink(target);
|
||||
@@ -534,7 +534,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
std::string targetNameLink = handler->GetNameLink(target);
|
||||
@@ -579,7 +579,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
std::string targetNameLink = handler->GetNameLink(target);
|
||||
@@ -624,7 +624,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
std::string targetNameLink = handler->GetNameLink(target);
|
||||
@@ -669,7 +669,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());
|
||||
@@ -706,7 +706,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());
|
||||
@@ -954,7 +954,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());
|
||||
@@ -965,14 +965,14 @@ public:
|
||||
target->Mount(mId);
|
||||
|
||||
WorldPacket data(SMSG_MOVE_SET_RUN_SPEED, (8+4+1+4));
|
||||
data.append(target->GetPackGUID());
|
||||
data << target->GetPackGUID();
|
||||
data << (uint32)0;
|
||||
data << (uint8)0; //new 2.1.0
|
||||
data << float(speed);
|
||||
target->SendMessageToSet(&data, true);
|
||||
|
||||
data.Initialize(SMSG_MOVE_SET_SWIM_SPEED, (8+4+4));
|
||||
data.append(target->GetPackGUID());
|
||||
data << target->GetPackGUID();
|
||||
data << (uint32)0;
|
||||
data << float(speed);
|
||||
target->SendMessageToSet(&data, true);
|
||||
@@ -995,7 +995,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
int64 moneyToAdd = 0;
|
||||
@@ -1066,7 +1066,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, " ");
|
||||
@@ -1120,7 +1120,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
int32 amount = (uint32)atoi(args);
|
||||
@@ -1161,7 +1161,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");
|
||||
@@ -1260,7 +1260,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);
|
||||
@@ -1365,7 +1365,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();
|
||||
|
||||
@@ -527,7 +527,7 @@ public:
|
||||
return false;
|
||||
|
||||
if (CreatureData const* cr_data = sObjectMgr->GetCreatureData(lowguid))
|
||||
unit = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(lowguid, cr_data->id, HIGHGUID_UNIT));
|
||||
unit = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, cr_data->id, lowguid));
|
||||
}
|
||||
else
|
||||
unit = handler->getSelectedCreature();
|
||||
@@ -689,8 +689,8 @@ public:
|
||||
}
|
||||
|
||||
creature->AI()->SetData(data_1, data_2);
|
||||
std::string AIorScript = creature->GetAIName() != "" ? "AI type: " + creature->GetAIName() : (creature->GetScriptName() != "" ? "Script Name: " + creature->GetScriptName() : "No AI or Script Name Set");
|
||||
handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID(), creature->GetEntry(), creature->GetName().c_str(), data_1, data_2, AIorScript.c_str());
|
||||
std::string AIorScript = !creature->GetAIName().empty() ? "AI type: " + creature->GetAIName() : (!creature->GetScriptName().empty() ? "Script Name: " + creature->GetScriptName() : "No AI or Script Name Set");
|
||||
handler->PSendSysMessage(LANG_NPC_SETDATA, creature->GetGUID().GetCounter(), creature->GetEntry(), creature->GetName().c_str(), data_1, data_2, AIorScript.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1323,11 +1323,11 @@ public:
|
||||
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->Whisper(text, LANG_UNIVERSAL, receiver);
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
creatureTarget->RemoveCorpse();
|
||||
creatureTarget->SetHealth(0); // just for nice GM-mode view
|
||||
|
||||
pet->SetUInt64Value(UNIT_FIELD_CREATEDBY, player->GetGUID());
|
||||
pet->SetGuidValue(UNIT_FIELD_CREATEDBY, player->GetGUID());
|
||||
pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, player->getFaction());
|
||||
|
||||
if (!pet->InitStatsForLevel(creatureTarget->getLevel()))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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<Player>::DeleteFromDB(GUID_LOPART(targetGuid));
|
||||
AchievementMgr<Player>::DeleteFromDB(targetGuid);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -155,7 +155,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;
|
||||
@@ -172,7 +172,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());
|
||||
@@ -202,7 +202,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))
|
||||
{
|
||||
@@ -246,7 +246,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);
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
{
|
||||
// format: name "subject text" "mail text"
|
||||
Player* target;
|
||||
uint64 targetGuid;
|
||||
ObjectGuid targetGuid;
|
||||
std::string targetName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &target, &targetGuid, &targetName))
|
||||
return false;
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
/// @todo Fix poor design
|
||||
SQLTransaction trans = CharacterDatabase.BeginTransaction();
|
||||
MailDraft(subject, text)
|
||||
.SendMailTo(trans, MailReceiver(target, GUID_LOPART(targetGuid)), sender);
|
||||
.SendMailTo(trans, MailReceiver(target, targetGuid.GetCounter()), sender);
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
{
|
||||
// format: name "subject text" "mail text" item1[:count1] item2[:count2] ... item12[:count12]
|
||||
Player* receiver;
|
||||
uint64 receiverGuid;
|
||||
ObjectGuid receiverGuid;
|
||||
std::string receiverName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &receiver, &receiverGuid, &receiverName))
|
||||
return false;
|
||||
@@ -192,7 +192,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
draft.SendMailTo(trans, MailReceiver(receiver, GUID_LOPART(receiverGuid)), sender);
|
||||
draft.SendMailTo(trans, MailReceiver(receiver, receiverGuid.GetCounter()), sender);
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
std::string nameLink = handler->playerLink(receiverName);
|
||||
@@ -205,7 +205,7 @@ public:
|
||||
/// format: name "subject text" "mail text" money
|
||||
|
||||
Player* receiver;
|
||||
uint64 receiverGuid;
|
||||
ObjectGuid receiverGuid;
|
||||
std::string receiverName;
|
||||
if (!handler->extractPlayerTarget((char*)args, &receiver, &receiverGuid, &receiverName))
|
||||
return false;
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
|
||||
MailDraft(subject, text)
|
||||
.AddMoney(money)
|
||||
.SendMailTo(trans, MailReceiver(receiver, GUID_LOPART(receiverGuid)), sender);
|
||||
.SendMailTo(trans, MailReceiver(receiver, receiverGuid.GetCounter()), sender);
|
||||
|
||||
CharacterDatabase.CommitTransaction(trans);
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
return false;
|
||||
|
||||
Player* target;
|
||||
uint64 target_guid;
|
||||
ObjectGuid target_guid;
|
||||
std::string target_name;
|
||||
if (!handler->extractPlayerTarget(nameStr, &target, &target_guid, &target_name))
|
||||
return false;
|
||||
@@ -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))
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
sTicketMgr->CloseTicket(ticket->GetId(), player ? player->GetGUID() : -1);
|
||||
sTicketMgr->CloseTicket(ticket->GetId(), player ? player->GetGUID() : ObjectGuid(uint64(-1)));
|
||||
sTicketMgr->UpdateLastChange();
|
||||
|
||||
std::string msg = ticket->FormatMessageString(*handler, player ? player->GetName().c_str() : "Console", NULL, NULL, NULL, NULL);
|
||||
@@ -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
|
||||
uint64 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);
|
||||
@@ -124,7 +124,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
}
|
||||
|
||||
// check online security
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
if (handler->HasLowerSecurity(target, ObjectGuid::Empty))
|
||||
return false;
|
||||
|
||||
uint64 titles2 = titles;
|
||||
|
||||
@@ -631,7 +631,7 @@ public:
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp modify del, PathID: |r|cff00ffff%u|r", pathid);
|
||||
|
||||
if (wpGuid != 0)
|
||||
if (Creature* wpCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpGuid, VISUAL_WAYPOINT, HIGHGUID_UNIT)))
|
||||
if (Creature* wpCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, wpGuid)))
|
||||
{
|
||||
wpCreature->CombatStop();
|
||||
wpCreature->DeleteFromDB();
|
||||
@@ -664,7 +664,7 @@ public:
|
||||
// Respawn the owner of the waypoints
|
||||
if (wpGuid != 0)
|
||||
{
|
||||
if (Creature* wpCreature = map->GetCreature(MAKE_NEW_GUID(wpGuid, VISUAL_WAYPOINT, HIGHGUID_UNIT)))
|
||||
if (Creature* wpCreature = map->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, wpGuid)))
|
||||
{
|
||||
wpCreature->CombatStop();
|
||||
wpCreature->DeleteFromDB();
|
||||
@@ -848,7 +848,7 @@ public:
|
||||
{
|
||||
Field* fields = result2->Fetch();
|
||||
uint32 wpguid = fields[0].GetUInt32();
|
||||
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
|
||||
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, wpguid));
|
||||
|
||||
if (!creature)
|
||||
{
|
||||
@@ -1053,7 +1053,7 @@ public:
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
uint32 guid = fields[0].GetUInt32();
|
||||
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
|
||||
Creature* creature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(ObjectGuid(HIGHGUID_UNIT, VISUAL_WAYPOINT, guid));
|
||||
if (!creature)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTREMOVED, guid);
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
WaterElementalGUID = 0;
|
||||
WaterElementalGUID.Clear();
|
||||
HasCastIceblock = false;
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
private:
|
||||
EventMap events;
|
||||
SummonList summons;
|
||||
uint64 WaterElementalGUID;
|
||||
ObjectGuid WaterElementalGUID;
|
||||
bool HasCastIceblock;
|
||||
};
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class at_alizabal_intro : public AreaTriggerScript
|
||||
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/)
|
||||
{
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
if (Creature* alizabal = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_ALIZABAL)))
|
||||
if (Creature* alizabal = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_ALIZABAL)))
|
||||
alizabal->AI()->DoAction(ACTION_INTRO);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ class npc_eyestalk : public CreatureScript
|
||||
void IsSummonedBy(Unit* /*summoner*/) override
|
||||
{
|
||||
// player is the spellcaster so register summon manually
|
||||
if (Creature* occuthar = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_OCCUTHAR)))
|
||||
if (Creature* occuthar = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_OCCUTHAR)))
|
||||
occuthar->AI()->JustSummoned(me);
|
||||
}
|
||||
|
||||
@@ -324,7 +324,7 @@ class spell_occuthar_eyes_of_occuthar_vehicle : public SpellScriptLoader
|
||||
{
|
||||
Position pos = GetHitUnit()->GetPosition();
|
||||
|
||||
if (Creature* occuthar = ObjectAccessor::GetCreature(*GetCaster(), GetCaster()->GetInstanceScript()->GetData64(DATA_OCCUTHAR)))
|
||||
if (Creature* occuthar = ObjectAccessor::GetCreature(*GetCaster(), GetCaster()->GetInstanceScript()->GetGuidData(DATA_OCCUTHAR)))
|
||||
{
|
||||
if (Creature* creature = occuthar->SummonCreature(NPC_EYE_OF_OCCUTHAR, pos))
|
||||
creature->CastSpell(GetHitUnit(), SPELL_GAZE_OF_OCCUTHAR, false);
|
||||
|
||||
@@ -39,10 +39,6 @@ class instance_baradin_hold: public InstanceMapScript
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
ArgalothGUID = 0;
|
||||
OccutharGUID = 0;
|
||||
AlizabalGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -73,7 +69,7 @@ class instance_baradin_hold: public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const override
|
||||
ObjectGuid GetGuidData(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -87,7 +83,7 @@ class instance_baradin_hold: public InstanceMapScript
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void OnGameObjectRemove(GameObject* go) override
|
||||
@@ -103,9 +99,9 @@ class instance_baradin_hold: public InstanceMapScript
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 ArgalothGUID;
|
||||
uint64 OccutharGUID;
|
||||
uint64 AlizabalGUID;
|
||||
ObjectGuid ArgalothGUID;
|
||||
ObjectGuid OccutharGUID;
|
||||
ObjectGuid AlizabalGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
|
||||
+13
-13
@@ -38,10 +38,10 @@ public:
|
||||
else
|
||||
instance->SetData(TYPE_LYCEUM, IN_PROGRESS);
|
||||
// If used brazier open linked doors (North or South)
|
||||
if (go->GetGUID() == instance->GetData64(DATA_SF_BRAZIER_N))
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_N), true);
|
||||
else if (go->GetGUID() == instance->GetData64(DATA_SF_BRAZIER_S))
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GOLEM_DOOR_S), true);
|
||||
if (go->GetGUID() == instance->GetGuidData(DATA_SF_BRAZIER_N))
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_N), true);
|
||||
else if (go->GetGUID() == instance->GetGuidData(DATA_SF_BRAZIER_S))
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GOLEM_DOOR_S), true);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -138,9 +138,9 @@ public:
|
||||
MobDeath_Timer = 0;
|
||||
|
||||
for (uint8 i = 0; i < MAX_NPC_AMOUNT; ++i)
|
||||
RingMobGUID[i] = 0;
|
||||
RingMobGUID[i].Clear();
|
||||
|
||||
RingBossGUID = 0;
|
||||
RingBossGUID.Clear();
|
||||
|
||||
CanWalk = false;
|
||||
}
|
||||
@@ -154,8 +154,8 @@ public:
|
||||
uint8 MobCount;
|
||||
uint32 MobDeath_Timer;
|
||||
|
||||
uint64 RingMobGUID[4];
|
||||
uint64 RingBossGUID;
|
||||
ObjectGuid RingMobGUID[4];
|
||||
ObjectGuid RingBossGUID;
|
||||
|
||||
bool CanWalk;
|
||||
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
|
||||
void HandleGameObject(uint32 id, bool open)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(id), open);
|
||||
instance->HandleGameObject(instance->GetGuidData(id), open);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
Creature* boss = ObjectAccessor::GetCreature(*me, RingBossGUID);
|
||||
if (boss && !boss->IsAlive() && boss->isDead())
|
||||
{
|
||||
RingBossGUID = 0;
|
||||
RingBossGUID.Clear();
|
||||
Event_Timer = 5000;
|
||||
MobDeath_Timer = 0;
|
||||
return;
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
Creature* mob = ObjectAccessor::GetCreature(*me, RingMobGUID[i]);
|
||||
if (mob && !mob->IsAlive() && mob->isDead())
|
||||
{
|
||||
RingMobGUID[i] = 0;
|
||||
RingMobGUID[i].Clear();
|
||||
--MobCount;
|
||||
|
||||
//seems all are gone, so set timer to continue and discontinue this
|
||||
@@ -1277,7 +1277,7 @@ public:
|
||||
|
||||
void DoGo(uint32 id, uint32 state)
|
||||
{
|
||||
if (GameObject* go = instance->instance->GetGameObject(instance->GetData64(id)))
|
||||
if (GameObject* go = instance->instance->GetGameObject(instance->GetGuidData(id)))
|
||||
go->SetGoState((GOState)state);
|
||||
}
|
||||
|
||||
@@ -1324,7 +1324,7 @@ public:
|
||||
DoGo(DATA_GO_BAR_KEG_TRAP, 0); //doesn't work very well, leaving code here for future
|
||||
//spell by trap has effect61, this indicate the bar go hostile
|
||||
|
||||
if (Unit* tmp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PHALANX)))
|
||||
if (Unit* tmp = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_PHALANX)))
|
||||
tmp->setFaction(14);
|
||||
|
||||
//for later, this event(s) has alot more to it.
|
||||
|
||||
+1
-1
@@ -70,7 +70,7 @@ class boss_emperor_dagran_thaurissan : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Creature* moira = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_MOIRA)))
|
||||
if (Creature* moira = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_MOIRA)))
|
||||
{
|
||||
moira->AI()->EnterEvadeMode();
|
||||
moira->setFaction(35);
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ class boss_magmus : public CreatureScript
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
instance->HandleGameObject(instance->GetData64(DATA_THRONE_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_THRONE_DOOR), true);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
+3
-3
@@ -76,7 +76,7 @@ public:
|
||||
if (InstanceScript* instance = creature->GetInstanceScript())
|
||||
{
|
||||
//are 5 minutes expected? go template may have data to despawn when used at quest
|
||||
instance->DoRespawnGameObject(instance->GetData64(DATA_GO_CHALICE), MINUTE*5);
|
||||
instance->DoRespawnGameObject(instance->GetGuidData(DATA_GO_CHALICE), MINUTE*5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ class boss_doomrel : public CreatureScript
|
||||
creature->AI()->AttackStart(player);
|
||||
InstanceScript* instance = creature->GetInstanceScript();
|
||||
if (instance)
|
||||
instance->SetData64(DATA_EVENSTARTER, player->GetGUID());
|
||||
instance->SetGuidData(DATA_EVENSTARTER, player->GetGUID());
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
@@ -202,7 +202,7 @@ class boss_doomrel : public CreatureScript
|
||||
{
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
|
||||
_instance->SetData64(DATA_EVENSTARTER, 0);
|
||||
_instance->SetGuidData(DATA_EVENSTARTER, ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
|
||||
+36
-67
@@ -81,37 +81,37 @@ public:
|
||||
uint32 encounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
uint64 EmperorGUID;
|
||||
uint64 PhalanxGUID;
|
||||
uint64 MagmusGUID;
|
||||
uint64 MoiraGUID;
|
||||
ObjectGuid EmperorGUID;
|
||||
ObjectGuid PhalanxGUID;
|
||||
ObjectGuid MagmusGUID;
|
||||
ObjectGuid MoiraGUID;
|
||||
|
||||
uint64 GoArena1GUID;
|
||||
uint64 GoArena2GUID;
|
||||
uint64 GoArena3GUID;
|
||||
uint64 GoArena4GUID;
|
||||
uint64 GoShadowLockGUID;
|
||||
uint64 GoShadowMechGUID;
|
||||
uint64 GoShadowGiantGUID;
|
||||
uint64 GoShadowDummyGUID;
|
||||
uint64 GoBarKegGUID;
|
||||
uint64 GoBarKegTrapGUID;
|
||||
uint64 GoBarDoorGUID;
|
||||
uint64 GoTombEnterGUID;
|
||||
uint64 GoTombExitGUID;
|
||||
uint64 GoLyceumGUID;
|
||||
uint64 GoSFSGUID;
|
||||
uint64 GoSFNGUID;
|
||||
uint64 GoGolemNGUID;
|
||||
uint64 GoGolemSGUID;
|
||||
uint64 GoThroneGUID;
|
||||
uint64 GoChestGUID;
|
||||
uint64 GoSpectralChaliceGUID;
|
||||
ObjectGuid GoArena1GUID;
|
||||
ObjectGuid GoArena2GUID;
|
||||
ObjectGuid GoArena3GUID;
|
||||
ObjectGuid GoArena4GUID;
|
||||
ObjectGuid GoShadowLockGUID;
|
||||
ObjectGuid GoShadowMechGUID;
|
||||
ObjectGuid GoShadowGiantGUID;
|
||||
ObjectGuid GoShadowDummyGUID;
|
||||
ObjectGuid GoBarKegGUID;
|
||||
ObjectGuid GoBarKegTrapGUID;
|
||||
ObjectGuid GoBarDoorGUID;
|
||||
ObjectGuid GoTombEnterGUID;
|
||||
ObjectGuid GoTombExitGUID;
|
||||
ObjectGuid GoLyceumGUID;
|
||||
ObjectGuid GoSFSGUID;
|
||||
ObjectGuid GoSFNGUID;
|
||||
ObjectGuid GoGolemNGUID;
|
||||
ObjectGuid GoGolemSGUID;
|
||||
ObjectGuid GoThroneGUID;
|
||||
ObjectGuid GoChestGUID;
|
||||
ObjectGuid GoSpectralChaliceGUID;
|
||||
|
||||
uint32 BarAleCount;
|
||||
uint32 GhostKillCount;
|
||||
uint64 TombBossGUIDs[7];
|
||||
uint64 TombEventStarterGUID;
|
||||
ObjectGuid TombBossGUIDs[7];
|
||||
ObjectGuid TombEventStarterGUID;
|
||||
uint32 TombTimer;
|
||||
uint32 TombEventCounter;
|
||||
|
||||
@@ -120,41 +120,10 @@ public:
|
||||
SetHeaders(DataHeader);
|
||||
memset(&encounter, 0, sizeof(encounter));
|
||||
|
||||
EmperorGUID = 0;
|
||||
PhalanxGUID = 0;
|
||||
MagmusGUID = 0;
|
||||
MoiraGUID = 0;
|
||||
|
||||
GoArena1GUID = 0;
|
||||
GoArena2GUID = 0;
|
||||
GoArena3GUID = 0;
|
||||
GoArena4GUID = 0;
|
||||
GoShadowLockGUID = 0;
|
||||
GoShadowMechGUID = 0;
|
||||
GoShadowGiantGUID = 0;
|
||||
GoShadowDummyGUID = 0;
|
||||
GoBarKegGUID = 0;
|
||||
GoBarKegTrapGUID = 0;
|
||||
GoBarDoorGUID = 0;
|
||||
GoTombEnterGUID = 0;
|
||||
GoTombExitGUID = 0;
|
||||
GoLyceumGUID = 0;
|
||||
GoSFSGUID = 0;
|
||||
GoSFNGUID = 0;
|
||||
GoGolemNGUID = 0;
|
||||
GoGolemSGUID = 0;
|
||||
GoThroneGUID = 0;
|
||||
GoChestGUID = 0;
|
||||
GoSpectralChaliceGUID = 0;
|
||||
|
||||
BarAleCount = 0;
|
||||
GhostKillCount = 0;
|
||||
TombEventStarterGUID = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
TombEventCounter = 0;
|
||||
|
||||
for (uint8 i = 0; i < 7; ++i)
|
||||
TombBossGUIDs[i] = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -174,7 +143,7 @@ public:
|
||||
case NPC_MAGMUS:
|
||||
MagmusGUID = creature->GetGUID();
|
||||
if (!creature->IsAlive())
|
||||
HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
||||
HandleGameObject(GetGuidData(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -198,9 +167,9 @@ public:
|
||||
case GO_TOMB_EXIT:
|
||||
GoTombExitGUID = go->GetGUID();
|
||||
if (GhostKillCount >= 7)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
else
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_LYCEUM: GoLyceumGUID = go->GetGUID(); break;
|
||||
case GO_SF_S: GoSFSGUID = go->GetGUID(); break;
|
||||
@@ -213,9 +182,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data) override
|
||||
void SetGuidData(uint32 type, ObjectGuid data) override
|
||||
{
|
||||
TC_LOG_DEBUG("scripts", "Instance Blackrock Depths: SetData64 update (Type: %u Data " UI64FMTD ")", type, data);
|
||||
TC_LOG_DEBUG("scripts", "Instance Blackrock Depths: SetGuidData update (Type: %u Data %s)", type, data.ToString().c_str());
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@@ -301,7 +270,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const override
|
||||
ObjectGuid GetGuidData(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -340,7 +309,7 @@ public:
|
||||
case DATA_GO_CHALICE:
|
||||
return GoSpectralChaliceGUID;
|
||||
}
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
std::string GetSaveData() override
|
||||
@@ -409,7 +378,7 @@ public:
|
||||
}
|
||||
}
|
||||
GhostKillCount = 0;
|
||||
TombEventStarterGUID = 0;
|
||||
TombEventStarterGUID.Clear();
|
||||
TombEventCounter = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
SetData(TYPE_TOMB_OF_SEVEN, NOT_STARTED);
|
||||
@@ -427,7 +396,7 @@ public:
|
||||
DoRespawnGameObject(GoChestGUID, DAY);
|
||||
HandleGameObject(GoTombExitGUID, true);//event done, open exit door
|
||||
HandleGameObject(GoTombEnterGUID, true);//event done, open entrance door
|
||||
TombEventStarterGUID = 0;
|
||||
TombEventStarterGUID.Clear();
|
||||
SetData(TYPE_TOMB_OF_SEVEN, DONE);
|
||||
}
|
||||
void Update(uint32 diff) override
|
||||
|
||||
+12
-12
@@ -104,10 +104,10 @@ public:
|
||||
break;
|
||||
case 2:
|
||||
// Close these two doors on Blackhand Incarcerators aggro
|
||||
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN)))
|
||||
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_IN)))
|
||||
if (door1->GetGoState() == GO_STATE_ACTIVE)
|
||||
door1->SetGoState(GO_STATE_READY);
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS)))
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_DOORS)))
|
||||
if (door2->GetGoState() == GO_STATE_ACTIVE)
|
||||
door2->SetGoState(GO_STATE_READY);
|
||||
break;
|
||||
@@ -166,33 +166,33 @@ public:
|
||||
void OpenDoors(bool Boss_Killed)
|
||||
{
|
||||
// These two doors reopen on reset or boss kill
|
||||
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_IN)))
|
||||
if (GameObject* door1 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_IN)))
|
||||
door1->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetData64(GO_DOORS)))
|
||||
if (GameObject* door2 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_DOORS)))
|
||||
door2->SetGoState(GO_STATE_ACTIVE);
|
||||
|
||||
// This door opens on boss kill
|
||||
if (Boss_Killed)
|
||||
if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_OUT)))
|
||||
if (GameObject* door3 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_OUT)))
|
||||
door3->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
void UpdateRunes(GOState state)
|
||||
{
|
||||
// update all runes
|
||||
if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_1)))
|
||||
if (GameObject* rune1 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_1)))
|
||||
rune1->SetGoState(state);
|
||||
if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_2)))
|
||||
if (GameObject* rune2 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_2)))
|
||||
rune2->SetGoState(state);
|
||||
if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_3)))
|
||||
if (GameObject* rune3 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_3)))
|
||||
rune3->SetGoState(state);
|
||||
if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_4)))
|
||||
if (GameObject* rune4 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_4)))
|
||||
rune4->SetGoState(state);
|
||||
if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_5)))
|
||||
if (GameObject* rune5 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_5)))
|
||||
rune5->SetGoState(state);
|
||||
if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_6)))
|
||||
if (GameObject* rune6 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_6)))
|
||||
rune6->SetGoState(state);
|
||||
if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetData64(GO_EMBERSEER_RUNE_7)))
|
||||
if (GameObject* rune7 = me->GetMap()->GetGameObject(instance->GetGuidData(GO_EMBERSEER_RUNE_7)))
|
||||
rune7->SetGoState(state);
|
||||
}
|
||||
|
||||
|
||||
+6
-6
@@ -167,16 +167,16 @@ public:
|
||||
boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND)
|
||||
{
|
||||
gythEvent = false;
|
||||
victorGUID = 0;
|
||||
portcullisGUID = 0;
|
||||
victorGUID.Clear();
|
||||
portcullisGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
gythEvent = false;
|
||||
victorGUID = 0;
|
||||
portcullisGUID = 0;
|
||||
victorGUID.Clear();
|
||||
portcullisGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -437,8 +437,8 @@ public:
|
||||
|
||||
private:
|
||||
bool gythEvent;
|
||||
uint64 victorGUID;
|
||||
uint64 portcullisGUID;
|
||||
ObjectGuid victorGUID;
|
||||
ObjectGuid portcullisGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
+48
-71
@@ -52,29 +52,6 @@ public:
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
HighlordOmokk = 0;
|
||||
ShadowHunterVoshgajin = 0;
|
||||
WarMasterVoone = 0;
|
||||
MotherSmolderweb = 0;
|
||||
UrokDoomhowl = 0;
|
||||
QuartermasterZigris = 0;
|
||||
GizrultheSlavener = 0;
|
||||
Halycon = 0;
|
||||
OverlordWyrmthalak = 0;
|
||||
PyroguardEmberseer = 0;
|
||||
WarchiefRendBlackhand = 0;
|
||||
Gyth = 0;
|
||||
LordVictorNefarius = 0;
|
||||
TheBeast = 0;
|
||||
GeneralDrakkisath = 0;
|
||||
go_emberseerin = 0;
|
||||
go_doors = 0;
|
||||
go_emberseerout = 0;
|
||||
go_blackrockaltar = 0;
|
||||
go_portcullis_active = 0;
|
||||
go_portcullis_tobossrooms = 0;
|
||||
memset(go_roomrunes, 0, sizeof(go_roomrunes));
|
||||
memset(go_emberseerrunes, 0, sizeof(go_emberseerrunes));
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -145,97 +122,97 @@ public:
|
||||
case GO_EMBERSEER_IN:
|
||||
go_emberseerin = go->GetGUID();
|
||||
if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_DOORS:
|
||||
go_doors = go->GetGUID();
|
||||
if (GetBossState(DATA_DRAGONSPIRE_ROOM) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_EMBERSEER_OUT:
|
||||
go_emberseerout = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_1:
|
||||
go_roomrunes[0] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_1) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_2:
|
||||
go_roomrunes[1] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_2) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_3:
|
||||
go_roomrunes[2] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_3) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_4:
|
||||
go_roomrunes[3] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_4) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_5:
|
||||
go_roomrunes[4] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_5) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_6:
|
||||
go_roomrunes[5] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_6) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_HALL_RUNE_7:
|
||||
go_roomrunes[6] = go->GetGUID();
|
||||
if (GetBossState(DATA_HALL_RUNE_7) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_1:
|
||||
go_emberseerrunes[0] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_2:
|
||||
go_emberseerrunes[1] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_3:
|
||||
go_emberseerrunes[2] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_4:
|
||||
go_emberseerrunes[3] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_5:
|
||||
go_emberseerrunes[4] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_6:
|
||||
go_emberseerrunes[5] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_EMBERSEER_RUNE_7:
|
||||
go_emberseerrunes[6] = go->GetGUID();
|
||||
if (GetBossState(DATA_PYROGAURD_EMBERSEER) == DONE)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_PORTCULLIS_ACTIVE:
|
||||
go_portcullis_active = go->GetGUID();
|
||||
if (GetBossState(DATA_GYTH) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_PORTCULLIS_TOBOSSROOMS:
|
||||
go_portcullis_tobossrooms = go->GetGUID();
|
||||
if (GetBossState(DATA_GYTH) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -309,7 +286,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -382,7 +359,7 @@ public:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void Update(uint32 diff) override
|
||||
@@ -459,7 +436,7 @@ public:
|
||||
|
||||
if (!_mobAlive && rune->GetGoState() == GO_STATE_ACTIVE)
|
||||
{
|
||||
HandleGameObject(0, false, rune);
|
||||
HandleGameObject(ObjectGuid::Empty, false, rune);
|
||||
|
||||
switch (rune->GetEntry())
|
||||
{
|
||||
@@ -496,38 +473,38 @@ public:
|
||||
{
|
||||
SetBossState(DATA_DRAGONSPIRE_ROOM, DONE);
|
||||
if (GameObject* door1 = instance->GetGameObject(go_emberseerin))
|
||||
HandleGameObject(0, true, door1);
|
||||
HandleGameObject(ObjectGuid::Empty, true, door1);
|
||||
if (GameObject* door2 = instance->GetGameObject(go_doors))
|
||||
HandleGameObject(0, true, door2);
|
||||
HandleGameObject(ObjectGuid::Empty, true, door2);
|
||||
}
|
||||
}
|
||||
|
||||
protected:
|
||||
EventMap Events;
|
||||
uint64 HighlordOmokk;
|
||||
uint64 ShadowHunterVoshgajin;
|
||||
uint64 WarMasterVoone;
|
||||
uint64 MotherSmolderweb;
|
||||
uint64 UrokDoomhowl;
|
||||
uint64 QuartermasterZigris;
|
||||
uint64 GizrultheSlavener;
|
||||
uint64 Halycon;
|
||||
uint64 OverlordWyrmthalak;
|
||||
uint64 PyroguardEmberseer;
|
||||
uint64 WarchiefRendBlackhand;
|
||||
uint64 Gyth;
|
||||
uint64 LordVictorNefarius;
|
||||
uint64 TheBeast;
|
||||
uint64 GeneralDrakkisath;
|
||||
uint64 go_emberseerin;
|
||||
uint64 go_doors;
|
||||
uint64 go_emberseerout;
|
||||
uint64 go_blackrockaltar;
|
||||
uint64 go_roomrunes[7];
|
||||
uint64 go_emberseerrunes[7];
|
||||
uint64 runecreaturelist[7][5];
|
||||
uint64 go_portcullis_active;
|
||||
uint64 go_portcullis_tobossrooms;
|
||||
ObjectGuid HighlordOmokk;
|
||||
ObjectGuid ShadowHunterVoshgajin;
|
||||
ObjectGuid WarMasterVoone;
|
||||
ObjectGuid MotherSmolderweb;
|
||||
ObjectGuid UrokDoomhowl;
|
||||
ObjectGuid QuartermasterZigris;
|
||||
ObjectGuid GizrultheSlavener;
|
||||
ObjectGuid Halycon;
|
||||
ObjectGuid OverlordWyrmthalak;
|
||||
ObjectGuid PyroguardEmberseer;
|
||||
ObjectGuid WarchiefRendBlackhand;
|
||||
ObjectGuid Gyth;
|
||||
ObjectGuid LordVictorNefarius;
|
||||
ObjectGuid TheBeast;
|
||||
ObjectGuid GeneralDrakkisath;
|
||||
ObjectGuid go_emberseerin;
|
||||
ObjectGuid go_doors;
|
||||
ObjectGuid go_emberseerout;
|
||||
ObjectGuid go_blackrockaltar;
|
||||
ObjectGuid go_roomrunes[7];
|
||||
ObjectGuid go_emberseerrunes[7];
|
||||
ObjectGuid runecreaturelist[7][5];
|
||||
ObjectGuid go_portcullis_active;
|
||||
ObjectGuid go_portcullis_tobossrooms;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ public:
|
||||
{
|
||||
if (InstanceScript* instance = go->GetInstanceScript())
|
||||
if (instance->GetData(DATA_EGG_EVENT) != DONE)
|
||||
if (Creature* razor = ObjectAccessor::GetCreature(*go, instance->GetData64(DATA_RAZORGORE_THE_UNTAMED)))
|
||||
if (Creature* razor = ObjectAccessor::GetCreature(*go, instance->GetGuidData(DATA_RAZORGORE_THE_UNTAMED)))
|
||||
{
|
||||
razor->Attack(player, true);
|
||||
player->CastSpell(razor, SPELL_MINDCONTROL);
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
HasYelled = false;
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
bool HasYelled;
|
||||
};
|
||||
|
||||
|
||||
+23
-62
@@ -60,25 +60,6 @@ public:
|
||||
// Razorgore
|
||||
EggCount = 0;
|
||||
EggEvent = 0;
|
||||
RazorgoreTheUntamedGUID = 0;
|
||||
RazorgoreDoorGUID = 0;
|
||||
// Vaelastrasz the Corrupt
|
||||
VaelastraszTheCorruptGUID = 0;
|
||||
VaelastraszDoorGUID = 0;
|
||||
// Broodlord Lashlayer
|
||||
BroodlordLashlayerGUID = 0;
|
||||
BroodlordDoorGUID = 0;
|
||||
// 3 Dragons
|
||||
FiremawGUID = 0;
|
||||
EbonrocGUID = 0;
|
||||
FlamegorGUID = 0;
|
||||
ChrommagusDoorGUID = 0;
|
||||
// Chormaggus
|
||||
ChromaggusGUID = 0;
|
||||
NefarianDoorGUID = 0;
|
||||
// Nefarian
|
||||
LordVictorNefariusGUID = 0;
|
||||
NefarianGUID = 0;
|
||||
SetBossNumber(EncounterCount);
|
||||
}
|
||||
|
||||
@@ -87,26 +68,6 @@ public:
|
||||
// Razorgore
|
||||
EggCount = 0;
|
||||
EggEvent = 0;
|
||||
RazorgoreTheUntamedGUID = 0;
|
||||
RazorgoreDoorGUID = 0;
|
||||
EggList.clear();
|
||||
// Vaelastrasz the Corrupt
|
||||
VaelastraszTheCorruptGUID = 0;
|
||||
VaelastraszDoorGUID = 0;
|
||||
// Broodlord Lashlayer
|
||||
BroodlordLashlayerGUID = 0;
|
||||
BroodlordDoorGUID = 0;
|
||||
// 3 Dragons
|
||||
FiremawGUID = 0;
|
||||
EbonrocGUID = 0;
|
||||
FlamegorGUID = 0;
|
||||
ChrommagusDoorGUID = 0;
|
||||
// Chormaggus
|
||||
ChromaggusGUID = 0;
|
||||
NefarianDoorGUID = 0;
|
||||
// Nefarian
|
||||
LordVictorNefariusGUID = 0;
|
||||
NefarianGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -162,23 +123,23 @@ public:
|
||||
break;
|
||||
case 175946: // Door
|
||||
RazorgoreDoorGUID = go->GetGUID();
|
||||
HandleGameObject(0, GetBossState(BOSS_RAZORGORE) == DONE, go);
|
||||
HandleGameObject(ObjectGuid::Empty, GetBossState(BOSS_RAZORGORE) == DONE, go);
|
||||
break;
|
||||
case 175185: // Door
|
||||
VaelastraszDoorGUID = go->GetGUID();
|
||||
HandleGameObject(0, GetBossState(BOSS_VAELASTRAZ) == DONE, go);
|
||||
HandleGameObject(ObjectGuid::Empty, GetBossState(BOSS_VAELASTRAZ) == DONE, go);
|
||||
break;
|
||||
case 180424: // Door
|
||||
BroodlordDoorGUID = go->GetGUID();
|
||||
HandleGameObject(0, GetBossState(BOSS_BROODLORD) == DONE, go);
|
||||
HandleGameObject(ObjectGuid::Empty, GetBossState(BOSS_BROODLORD) == DONE, go);
|
||||
break;
|
||||
case 185483: // Door
|
||||
ChrommagusDoorGUID = go->GetGUID();
|
||||
HandleGameObject(0, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE, go);
|
||||
HandleGameObject(ObjectGuid::Empty, GetBossState(BOSS_FIREMAW) == DONE && GetBossState(BOSS_EBONROC) == DONE && GetBossState(BOSS_FLAMEGOR) == DONE, go);
|
||||
break;
|
||||
case 181125: // Door
|
||||
NefarianDoorGUID = go->GetGUID();
|
||||
HandleGameObject(0, GetBossState(BOSS_CHROMAGGUS) == DONE, go);
|
||||
HandleGameObject(ObjectGuid::Empty, GetBossState(BOSS_CHROMAGGUS) == DONE, go);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -200,7 +161,7 @@ public:
|
||||
HandleGameObject(RazorgoreDoorGUID, state == DONE);
|
||||
if (state == DONE)
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = EggList.begin(); itr != EggList.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = EggList.begin(); itr != EggList.end(); ++itr)
|
||||
if (GameObject* egg = instance->GetGameObject((*itr)))
|
||||
egg->SetLootState(GO_JUST_DEACTIVATED);
|
||||
}
|
||||
@@ -239,7 +200,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 id) const override
|
||||
ObjectGuid GetGuidData(uint32 id) const override
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
@@ -254,7 +215,7 @@ public:
|
||||
case DATA_NEFARIAN: return NefarianGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
@@ -340,31 +301,31 @@ public:
|
||||
// Razorgore
|
||||
uint8 EggCount;
|
||||
uint32 EggEvent;
|
||||
uint64 RazorgoreTheUntamedGUID;
|
||||
uint64 RazorgoreDoorGUID;
|
||||
std::list<uint64> EggList;
|
||||
ObjectGuid RazorgoreTheUntamedGUID;
|
||||
ObjectGuid RazorgoreDoorGUID;
|
||||
GuidList EggList;
|
||||
|
||||
// Vaelastrasz the Corrupt
|
||||
uint64 VaelastraszTheCorruptGUID;
|
||||
uint64 VaelastraszDoorGUID;
|
||||
ObjectGuid VaelastraszTheCorruptGUID;
|
||||
ObjectGuid VaelastraszDoorGUID;
|
||||
|
||||
// Broodlord Lashlayer
|
||||
uint64 BroodlordLashlayerGUID;
|
||||
uint64 BroodlordDoorGUID;
|
||||
ObjectGuid BroodlordLashlayerGUID;
|
||||
ObjectGuid BroodlordDoorGUID;
|
||||
|
||||
// 3 Dragons
|
||||
uint64 FiremawGUID;
|
||||
uint64 EbonrocGUID;
|
||||
uint64 FlamegorGUID;
|
||||
uint64 ChrommagusDoorGUID;
|
||||
ObjectGuid FiremawGUID;
|
||||
ObjectGuid EbonrocGUID;
|
||||
ObjectGuid FlamegorGUID;
|
||||
ObjectGuid ChrommagusDoorGUID;
|
||||
|
||||
// Chormaggus
|
||||
uint64 ChromaggusGUID;
|
||||
uint64 NefarianDoorGUID;
|
||||
ObjectGuid ChromaggusGUID;
|
||||
ObjectGuid NefarianDoorGUID;
|
||||
|
||||
// Nefarian
|
||||
uint64 LordVictorNefariusGUID;
|
||||
uint64 NefarianGUID;
|
||||
ObjectGuid LordVictorNefariusGUID;
|
||||
ObjectGuid NefarianGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -150,7 +150,7 @@ class npc_core_rager : public CreatureScript
|
||||
if (HealthAbovePct(50) || !instance)
|
||||
return;
|
||||
|
||||
if (Creature* pGolemagg = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_GOLEMAGG_THE_INCINERATOR)))
|
||||
if (Creature* pGolemagg = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_GOLEMAGG_THE_INCINERATOR)))
|
||||
{
|
||||
if (pGolemagg->IsAlive())
|
||||
{
|
||||
|
||||
@@ -153,7 +153,7 @@ class boss_ragnaros : public CreatureScript
|
||||
break;
|
||||
case EVENT_INTRO_4:
|
||||
Talk(SAY_ARRIVAL5_RAG);
|
||||
if (Creature* executus = ObjectAccessor::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS)))
|
||||
if (Creature* executus = ObjectAccessor::GetCreature(*me, instance->GetGuidData(BOSS_MAJORDOMO_EXECUTUS)))
|
||||
me->Kill(executus);
|
||||
break;
|
||||
case EVENT_INTRO_5:
|
||||
|
||||
+5
-8
@@ -45,9 +45,6 @@ class instance_molten_core : public InstanceMapScript
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
_golemaggTheIncineratorGUID = 0;
|
||||
_majordomoExecutusGUID = 0;
|
||||
_cacheOfTheFirelordGUID = 0;
|
||||
_executusSchedule = false;
|
||||
_ragnarosAddDeaths = 0;
|
||||
}
|
||||
@@ -107,7 +104,7 @@ class instance_molten_core : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -117,7 +114,7 @@ class instance_molten_core : public InstanceMapScript
|
||||
return _majordomoExecutusGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 bossId, EncounterState state) override
|
||||
@@ -176,9 +173,9 @@ class instance_molten_core : public InstanceMapScript
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _golemaggTheIncineratorGUID;
|
||||
uint64 _majordomoExecutusGUID;
|
||||
uint64 _cacheOfTheFirelordGUID;
|
||||
ObjectGuid _golemaggTheIncineratorGUID;
|
||||
ObjectGuid _majordomoExecutusGUID;
|
||||
ObjectGuid _cacheOfTheFirelordGUID;
|
||||
bool _executusSchedule;
|
||||
uint8 _ragnarosAddDeaths;
|
||||
};
|
||||
|
||||
@@ -133,7 +133,7 @@ public:
|
||||
++uiHealth;
|
||||
DoCastAOE(SPELL_SMITE_STOMP, false);
|
||||
SetCombatMovement(false);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_SMITE_CHEST)))
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_SMITE_CHEST)))
|
||||
{
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MovePoint(1, go->GetPositionX() - 3.0f, go->GetPositionY(), go->GetPositionZ());
|
||||
|
||||
@@ -58,32 +58,24 @@ class instance_deadmines : public InstanceMapScript
|
||||
{
|
||||
instance_deadmines_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
uint64 FactoryDoorGUID;
|
||||
uint64 IronCladDoorGUID;
|
||||
uint64 DefiasCannonGUID;
|
||||
uint64 DoorLeverGUID;
|
||||
uint64 DefiasPirate1GUID;
|
||||
uint64 DefiasPirate2GUID;
|
||||
uint64 DefiasCompanionGUID;
|
||||
ObjectGuid FactoryDoorGUID;
|
||||
ObjectGuid IronCladDoorGUID;
|
||||
ObjectGuid DefiasCannonGUID;
|
||||
ObjectGuid DoorLeverGUID;
|
||||
ObjectGuid DefiasPirate1GUID;
|
||||
ObjectGuid DefiasPirate2GUID;
|
||||
ObjectGuid DefiasCompanionGUID;
|
||||
|
||||
uint32 State;
|
||||
uint32 CannonBlast_Timer;
|
||||
uint32 PiratesDelay_Timer;
|
||||
uint64 uiSmiteChestGUID;
|
||||
ObjectGuid uiSmiteChestGUID;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
FactoryDoorGUID = 0;
|
||||
IronCladDoorGUID = 0;
|
||||
DefiasCannonGUID = 0;
|
||||
DoorLeverGUID = 0;
|
||||
DefiasPirate1GUID = 0;
|
||||
DefiasPirate2GUID = 0;
|
||||
DefiasCompanionGUID = 0;
|
||||
|
||||
State = CANNON_NOT_USED;
|
||||
uiSmiteChestGUID = 0;
|
||||
}
|
||||
|
||||
virtual void Update(uint32 diff) override
|
||||
@@ -227,7 +219,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const override
|
||||
ObjectGuid GetGuidData(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -235,7 +227,7 @@ class instance_deadmines : public InstanceMapScript
|
||||
return uiSmiteChestGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -103,8 +103,8 @@ public:
|
||||
uint8 uiPhase;
|
||||
uint32 uiTimer;
|
||||
|
||||
std::list<uint64> SummonList;
|
||||
std::list<uint64> GoSummonList;
|
||||
GuidList SummonList;
|
||||
GuidList GoSummonList;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
if (GoSummonList.empty())
|
||||
return;
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = GoSummonList.begin(); itr != GoSummonList.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = GoSummonList.begin(); itr != GoSummonList.end(); ++itr)
|
||||
{
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, *itr))
|
||||
{
|
||||
@@ -162,33 +162,33 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(isRight ? DATA_GO_CAVE_IN_RIGHT : DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(0, false, go);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(isRight ? DATA_GO_CAVE_IN_RIGHT : DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
}
|
||||
|
||||
void SetInFace(bool isRight)
|
||||
{
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(isRight ? DATA_GO_CAVE_IN_RIGHT : DATA_GO_CAVE_IN_LEFT)))
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(isRight ? DATA_GO_CAVE_IN_RIGHT : DATA_GO_CAVE_IN_LEFT)))
|
||||
me->SetFacingToObject(go);
|
||||
}
|
||||
|
||||
void RestoreAll()
|
||||
{
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(0, false, go);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(0, false, go);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
|
||||
if (!GoSummonList.empty())
|
||||
for (std::list<uint64>::const_iterator itr = GoSummonList.begin(); itr != GoSummonList.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = GoSummonList.begin(); itr != GoSummonList.end(); ++itr)
|
||||
{
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, *itr))
|
||||
go->RemoveFromWorld();
|
||||
}
|
||||
|
||||
if (!SummonList.empty())
|
||||
for (std::list<uint64>::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
|
||||
for (GuidList::const_iterator itr = SummonList.begin(); itr != SummonList.end(); ++itr)
|
||||
{
|
||||
if (Creature* summon = ObjectAccessor::GetCreature(*me, *itr))
|
||||
{
|
||||
@@ -398,8 +398,8 @@ public:
|
||||
SetInFace(true);
|
||||
Talk(SAY_BLASTMASTER_5);
|
||||
Summon(1);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(0, true, go);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_GO_CAVE_IN_RIGHT)))
|
||||
instance->HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
NextStep(3000, true);
|
||||
break;
|
||||
case 7:
|
||||
@@ -444,8 +444,8 @@ public:
|
||||
case 16:
|
||||
Talk(SAY_BLASTMASTER_14);
|
||||
SetInFace(false);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(0, true, go);
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_GO_CAVE_IN_LEFT)))
|
||||
instance->HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
NextStep(2000, true);
|
||||
break;
|
||||
case 17:
|
||||
|
||||
@@ -41,19 +41,14 @@ public:
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
uint64 uiCaveInLeftGUID;
|
||||
uint64 uiCaveInRightGUID;
|
||||
ObjectGuid uiCaveInLeftGUID;
|
||||
ObjectGuid uiCaveInRightGUID;
|
||||
|
||||
uint64 uiBastmasterEmiShortfuseGUID;
|
||||
ObjectGuid uiBastmasterEmiShortfuseGUID;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
uiCaveInLeftGUID = 0;
|
||||
uiCaveInRightGUID = 0;
|
||||
|
||||
uiBastmasterEmiShortfuseGUID = 0;
|
||||
}
|
||||
|
||||
void Load(const char* in) override
|
||||
@@ -93,12 +88,12 @@ public:
|
||||
case GO_CAVE_IN_LEFT:
|
||||
uiCaveInLeftGUID = go->GetGUID();
|
||||
if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == NOT_STARTED)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
case GO_CAVE_IN_RIGHT:
|
||||
uiCaveInRightGUID = go->GetGUID();
|
||||
if (m_auiEncounter[0] == DONE || m_auiEncounter[0] == NOT_STARTED)
|
||||
HandleGameObject(0, false, go);
|
||||
HandleGameObject(ObjectGuid::Empty, false, go);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -124,7 +119,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiType) const override
|
||||
ObjectGuid GetGuidData(uint32 uiType) const override
|
||||
{
|
||||
switch (uiType)
|
||||
{
|
||||
@@ -133,7 +128,7 @@ public:
|
||||
case DATA_NPC_BASTMASTER_EMI_SHORTFUSE: return uiBastmasterEmiShortfuseGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -75,10 +75,10 @@ public:
|
||||
void Initialize()
|
||||
{
|
||||
ResetTimer = 0;
|
||||
Midnight = 0;
|
||||
Midnight.Clear();
|
||||
}
|
||||
|
||||
uint64 Midnight;
|
||||
ObjectGuid Midnight;
|
||||
uint8 Phase;
|
||||
uint32 CleaveTimer;
|
||||
uint32 CurseTimer;
|
||||
@@ -141,11 +141,11 @@ public:
|
||||
void Initialize()
|
||||
{
|
||||
Phase = 1;
|
||||
Attumen = 0;
|
||||
Attumen.Clear();
|
||||
Mount_Timer = 0;
|
||||
}
|
||||
|
||||
uint64 Attumen;
|
||||
ObjectGuid Attumen;
|
||||
uint8 Phase;
|
||||
uint32 Mount_Timer;
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
Mount_Timer = 1000;
|
||||
}
|
||||
|
||||
void SetMidnight(Creature* pAttumen, uint64 value)
|
||||
void SetMidnight(Creature* pAttumen, ObjectGuid value)
|
||||
{
|
||||
ENSURE_AI(boss_attumen::boss_attumenAI, pAttumen->AI())->Midnight = value;
|
||||
}
|
||||
@@ -262,7 +262,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(uint32 diff)
|
||||
pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pMidnight->SetVisible(true);
|
||||
}
|
||||
Midnight = 0;
|
||||
Midnight.Clear();
|
||||
me->SetVisible(false);
|
||||
me->Kill(me);
|
||||
} else ResetTimer -= diff;
|
||||
|
||||
@@ -107,7 +107,6 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
memset(AddId, 0, sizeof(AddId));
|
||||
memset(AddGUID, 0, sizeof(AddGUID));
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
@@ -126,7 +125,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 AddGUID[4];
|
||||
ObjectGuid AddGUID[4];
|
||||
|
||||
uint32 Vanish_Timer;
|
||||
uint32 Blind_Timer;
|
||||
@@ -339,13 +338,10 @@ struct boss_moroes_guestAI : public ScriptedAI
|
||||
{
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 GuestGUID[4];
|
||||
ObjectGuid GuestGUID[4];
|
||||
|
||||
boss_moroes_guestAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
GuestGUID[i] = 0;
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
@@ -356,15 +352,15 @@ struct boss_moroes_guestAI : public ScriptedAI
|
||||
|
||||
void AcquireGUID()
|
||||
{
|
||||
if (Creature* Moroes = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOROES)))
|
||||
if (Creature* Moroes = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOROES)))
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (uint64 GUID = ENSURE_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i])
|
||||
if (ObjectGuid GUID = ENSURE_AI(boss_moroes::boss_moroesAI, Moroes->AI())->AddGUID[i])
|
||||
GuestGUID[i] = GUID;
|
||||
}
|
||||
|
||||
Unit* SelectGuestTarget()
|
||||
{
|
||||
uint64 TempGUID = GuestGUID[rand32() % 4];
|
||||
ObjectGuid TempGUID = GuestGUID[rand32() % 4];
|
||||
if (TempGUID)
|
||||
{
|
||||
Unit* unit = ObjectAccessor::GetUnit(*me, TempGUID);
|
||||
|
||||
@@ -81,13 +81,6 @@ public:
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
|
||||
for (int i=0; i<3; ++i)
|
||||
{
|
||||
PortalGUID[i] = 0;
|
||||
BeamTarget[i] = 0;
|
||||
BeamerGUID[i] = 0;
|
||||
}
|
||||
|
||||
PortalPhase = false;
|
||||
PhaseTimer = 0;
|
||||
EmpowermentTimer = 0;
|
||||
@@ -112,9 +105,9 @@ public:
|
||||
uint32 NetherbreathTimer;
|
||||
uint32 EmpowermentTimer;
|
||||
uint32 PortalTimer; // timer for beam checking
|
||||
uint64 PortalGUID[3]; // guid's of portals
|
||||
uint64 BeamerGUID[3]; // guid's of auxiliary beaming portals
|
||||
uint64 BeamTarget[3]; // guid's of portals' current targets
|
||||
ObjectGuid PortalGUID[3]; // guid's of portals
|
||||
ObjectGuid BeamerGUID[3]; // guid's of auxiliary beaming portals
|
||||
ObjectGuid BeamTarget[3]; // guid's of portals' current targets
|
||||
|
||||
bool IsBetween(WorldObject* u1, WorldObject* target, WorldObject* u2) // the in-line checker
|
||||
{
|
||||
@@ -157,7 +150,7 @@ public:
|
||||
pos[GREEN_PORTAL] = ((r % 2) ? 0 : (r > 1 ? 2 : 1));
|
||||
pos[BLUE_PORTAL] = (r > 1 ? 1 : 2); // Blue Portal not on the left side (0)
|
||||
|
||||
for (int i=0; i<3; ++i)
|
||||
for (int i = 0; i < 3; ++i)
|
||||
if (Creature* portal = me->SummonCreature(PortalID[i], PortalCoord[pos[i]][0], PortalCoord[pos[i]][1], PortalCoord[pos[i]][2], 0, TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
{
|
||||
PortalGUID[i] = portal->GetGUID();
|
||||
@@ -173,14 +166,14 @@ public:
|
||||
portal->DisappearAndDie();
|
||||
if (Creature* portal = ObjectAccessor::GetCreature(*me, BeamerGUID[i]))
|
||||
portal->DisappearAndDie();
|
||||
PortalGUID[i] = 0;
|
||||
BeamTarget[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
BeamTarget[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdatePortals() // Here we handle the beams' behavior
|
||||
{
|
||||
for (int j=0; j<3; ++j) // j = color
|
||||
for (int j = 0; j < 3; ++j) // j = color
|
||||
if (Creature* portal = ObjectAccessor::GetCreature(*me, PortalGUID[j]))
|
||||
{
|
||||
// the one who's been cast upon before
|
||||
@@ -198,9 +191,9 @@ public:
|
||||
Player* p = i->GetSource();
|
||||
if (p && p->IsAlive() // alive
|
||||
&& (!target || target->GetDistance2d(portal)>p->GetDistance2d(portal)) // closer than current best
|
||||
&& !p->HasAura(PlayerDebuff[j], 0) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j+1)%3], 0) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j+2)%3], 0)
|
||||
&& !p->HasAura(PlayerDebuff[j]) // not exhausted
|
||||
&& !p->HasAura(PlayerBuff[(j + 1) % 3]) // not on another beam
|
||||
&& !p->HasAura(PlayerBuff[(j + 2) % 3])
|
||||
&& IsBetween(me, p, portal)) // on the beam
|
||||
target = p;
|
||||
}
|
||||
@@ -220,7 +213,7 @@ public:
|
||||
{
|
||||
beamer->CastSpell(target, PortalBeam[j], false);
|
||||
beamer->DisappearAndDie();
|
||||
BeamerGUID[j] = 0;
|
||||
BeamerGUID[j].Clear();
|
||||
}
|
||||
// create new one and start beaming on the target
|
||||
if (Creature* beamer = portal->SummonCreature(PortalID[j], portal->GetPositionX(), portal->GetPositionY(), portal->GetPositionZ(), portal->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 60000))
|
||||
@@ -264,7 +257,7 @@ public:
|
||||
|
||||
void HandleDoors(bool open) // Massive Door switcher
|
||||
{
|
||||
if (GameObject* Door = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_GO_MASSIVE_DOOR) ))
|
||||
if (GameObject* Door = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_GO_MASSIVE_DOOR) ))
|
||||
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
|
||||
}
|
||||
|
||||
|
||||
@@ -159,8 +159,8 @@ public:
|
||||
|
||||
void HandleTerraceDoors(bool open)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_MASTERS_TERRACE_DOOR_1), open);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_MASTERS_TERRACE_DOOR_2), open);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -110,11 +110,11 @@ public:
|
||||
struct netherspite_infernalAI : public ScriptedAI
|
||||
{
|
||||
netherspite_infernalAI(Creature* creature) : ScriptedAI(creature),
|
||||
HellfireTimer(0), CleanupTimer(0), malchezaar(0), point(NULL) { }
|
||||
HellfireTimer(0), CleanupTimer(0), point(NULL) { }
|
||||
|
||||
uint32 HellfireTimer;
|
||||
uint32 CleanupTimer;
|
||||
uint64 malchezaar;
|
||||
ObjectGuid malchezaar;
|
||||
InfernalPoint *point;
|
||||
|
||||
void Reset() override { }
|
||||
@@ -189,7 +189,6 @@ public:
|
||||
Initialize();
|
||||
|
||||
instance = creature->GetInstanceScript();
|
||||
memset(axes, 0, sizeof(axes));
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -208,7 +207,7 @@ public:
|
||||
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
{
|
||||
enfeeble_targets[i] = 0;
|
||||
enfeeble_targets[i].Clear();
|
||||
enfeeble_health[i] = 0;
|
||||
}
|
||||
}
|
||||
@@ -225,12 +224,12 @@ public:
|
||||
uint32 AxesTargetSwitchTimer;
|
||||
uint32 InfernalCleanupTimer;
|
||||
|
||||
std::vector<uint64> infernals;
|
||||
GuidVector infernals;
|
||||
std::vector<InfernalPoint*> positions;
|
||||
|
||||
uint64 axes[2];
|
||||
uint64 enfeeble_targets[5];
|
||||
uint32 enfeeble_health[5];
|
||||
ObjectGuid axes[2];
|
||||
ObjectGuid enfeeble_targets[5];
|
||||
uint64 enfeeble_health[5];
|
||||
|
||||
uint32 phase;
|
||||
|
||||
@@ -246,7 +245,7 @@ public:
|
||||
for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
|
||||
positions.push_back(&InfernalPoints[i]);
|
||||
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_NETHER_DOOR), true);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
@@ -266,20 +265,20 @@ public:
|
||||
for (uint8 i = 0; i < TOTAL_INFERNAL_POINTS; ++i)
|
||||
positions.push_back(&InfernalPoints[i]);
|
||||
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_NETHER_DOOR), true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), false); // Open the door leading further in
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_NETHER_DOOR), false); // Open the door leading further in
|
||||
}
|
||||
|
||||
void InfernalCleanup()
|
||||
{
|
||||
//Infernal Cleanup
|
||||
for (std::vector<uint64>::const_iterator itr = infernals.begin(); itr != infernals.end(); ++itr)
|
||||
for (GuidVector::const_iterator itr = infernals.begin(); itr != infernals.end(); ++itr)
|
||||
if (Unit* pInfernal = ObjectAccessor::GetUnit(*me, *itr))
|
||||
if (pInfernal->IsAlive())
|
||||
{
|
||||
@@ -297,7 +296,7 @@ public:
|
||||
Unit* axe = ObjectAccessor::GetUnit(*me, axes[i]);
|
||||
if (axe && axe->IsAlive())
|
||||
axe->Kill(axe);
|
||||
axes[i] = 0;
|
||||
axes[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +349,7 @@ public:
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, enfeeble_targets[i]);
|
||||
if (target && target->IsAlive())
|
||||
target->SetHealth(enfeeble_health[i]);
|
||||
enfeeble_targets[i] = 0;
|
||||
enfeeble_targets[i].Clear();
|
||||
enfeeble_health[i] = 0;
|
||||
}
|
||||
}
|
||||
@@ -398,7 +397,7 @@ public:
|
||||
if (me->HasUnitState(UNIT_STATE_STUNNED)) // While shifting to phase 2 malchezaar stuns himself
|
||||
return;
|
||||
|
||||
if (me->GetVictim() && me->GetUInt64Value(UNIT_FIELD_TARGET) != me->EnsureVictim()->GetGUID())
|
||||
if (me->GetVictim() && me->GetTarget() != me->EnsureVictim()->GetGUID())
|
||||
me->SetTarget(me->EnsureVictim()->GetGUID());
|
||||
|
||||
if (phase == 1)
|
||||
@@ -576,11 +575,13 @@ public:
|
||||
|
||||
void Cleanup(Creature* infernal, InfernalPoint *point)
|
||||
{
|
||||
for (std::vector<uint64>::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
|
||||
if (*itr == infernal->GetGUID())
|
||||
for (GuidVector::iterator itr = infernals.begin(); itr!= infernals.end(); ++itr)
|
||||
{
|
||||
infernals.erase(itr);
|
||||
break;
|
||||
if (*itr == infernal->GetGUID())
|
||||
{
|
||||
infernals.erase(itr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
positions.push_back(point);
|
||||
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
|
||||
uint32 FlameWreathTimer;
|
||||
uint32 FlameWreathCheckTime;
|
||||
uint64 FlameWreathTarget[3];
|
||||
ObjectGuid FlameWreathTarget[3];
|
||||
float FWTargPosX[3];
|
||||
float FWTargPosY[3];
|
||||
|
||||
@@ -155,7 +155,7 @@ public:
|
||||
|
||||
// Not in progress
|
||||
instance->SetData(TYPE_ARAN, NOT_STARTED);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), true);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SetData(TYPE_ARAN, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), true);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
instance->SetData(TYPE_ARAN, IN_PROGRESS);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), false);
|
||||
}
|
||||
|
||||
void FlameWreathEffect()
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
{
|
||||
if (CloseDoorTimer <= diff)
|
||||
{
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_LIBRARY_DOOR), false);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_LIBRARY_DOOR), false);
|
||||
CloseDoorTimer = 0;
|
||||
} else CloseDoorTimer -= diff;
|
||||
}
|
||||
@@ -393,9 +393,9 @@ public:
|
||||
FlameWreathTimer = 20000;
|
||||
FlameWreathCheckTime = 500;
|
||||
|
||||
FlameWreathTarget[0] = 0;
|
||||
FlameWreathTarget[1] = 0;
|
||||
FlameWreathTarget[2] = 0;
|
||||
FlameWreathTarget[0].Clear();
|
||||
FlameWreathTarget[1].Clear();
|
||||
FlameWreathTarget[2].Clear();
|
||||
|
||||
FlameWreathEffect();
|
||||
break;
|
||||
@@ -465,7 +465,7 @@ public:
|
||||
{
|
||||
unit->CastSpell(unit, 20476, true, 0, 0, me->GetGUID());
|
||||
unit->CastSpell(unit, 11027, true);
|
||||
FlameWreathTarget[i] = 0;
|
||||
FlameWreathTarget[i].Clear();
|
||||
}
|
||||
}
|
||||
FlameWreathCheckTime = 500;
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Creature* Terestian = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_TERESTIAN));
|
||||
Creature* Terestian = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_TERESTIAN));
|
||||
if (Terestian && Terestian->IsAlive())
|
||||
DoCast(Terestian, SPELL_BROKEN_PACT, true);
|
||||
}
|
||||
@@ -143,10 +143,10 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
SacrificeGUID = 0;
|
||||
SacrificeGUID.Clear();
|
||||
}
|
||||
|
||||
uint64 SacrificeGUID;
|
||||
ObjectGuid SacrificeGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -268,10 +268,8 @@ public:
|
||||
{
|
||||
boss_terestianAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
PortalGUID[i] = 0;
|
||||
instance = creature->GetInstanceScript();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -288,7 +286,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 PortalGUID[2];
|
||||
ObjectGuid PortalGUID[2];
|
||||
uint8 PortalsCount;
|
||||
|
||||
uint32 SacrificeTimer;
|
||||
@@ -311,7 +309,7 @@ public:
|
||||
pPortal->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
PortalGUID[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -366,7 +364,7 @@ public:
|
||||
if (Creature* pPortal = ObjectAccessor::GetCreature((*me), PortalGUID[i]))
|
||||
pPortal->DespawnOrUnsummon();
|
||||
|
||||
PortalGUID[i] = 0;
|
||||
PortalGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -250,11 +250,11 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
DorotheeGUID = 0;
|
||||
DorotheeGUID.Clear();
|
||||
YipTimer = 10000;
|
||||
}
|
||||
|
||||
uint64 DorotheeGUID;
|
||||
ObjectGuid DorotheeGUID;
|
||||
uint32 YipTimer;
|
||||
|
||||
void Reset() override
|
||||
@@ -710,10 +710,10 @@ public:
|
||||
Talk(SAY_CRONE_DEATH);
|
||||
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORRIGHT), true);
|
||||
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
@@ -868,7 +868,7 @@ public:
|
||||
FearTimer = urand(25000, 35000);
|
||||
SwipeTimer = 5000;
|
||||
|
||||
HoodGUID = 0;
|
||||
HoodGUID.Clear();
|
||||
TempThreat = 0;
|
||||
|
||||
IsChasing = false;
|
||||
@@ -880,7 +880,7 @@ public:
|
||||
uint32 FearTimer;
|
||||
uint32 SwipeTimer;
|
||||
|
||||
uint64 HoodGUID;
|
||||
ObjectGuid HoodGUID;
|
||||
float TempThreat;
|
||||
|
||||
bool IsChasing;
|
||||
@@ -910,10 +910,10 @@ public:
|
||||
DoPlaySoundToSet(me, SOUND_WOLF_DEATH);
|
||||
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORRIGHT), true);
|
||||
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
@@ -947,7 +947,7 @@ public:
|
||||
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, HoodGUID))
|
||||
{
|
||||
HoodGUID = 0;
|
||||
HoodGUID.Clear();
|
||||
if (DoGetThreat(target))
|
||||
DoModifyThreatPercent(target, -100);
|
||||
me->AddThreat(target, TempThreat);
|
||||
@@ -1073,7 +1073,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
RomuloGUID = 0;
|
||||
RomuloGUID.Clear();
|
||||
Phase = PHASE_JULIANNE;
|
||||
|
||||
BlindingPassionTimer = 30000;
|
||||
@@ -1093,7 +1093,7 @@ public:
|
||||
uint32 EntryYellTimer;
|
||||
uint32 AggroYellTimer;
|
||||
|
||||
uint64 RomuloGUID;
|
||||
ObjectGuid RomuloGUID;
|
||||
|
||||
uint32 Phase;
|
||||
|
||||
@@ -1160,9 +1160,9 @@ public:
|
||||
Talk(SAY_JULIANNE_DEATH02);
|
||||
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORRIGHT), true);
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
@@ -1197,7 +1197,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
JulianneGUID = 0;
|
||||
JulianneGUID.Clear();
|
||||
Phase = PHASE_ROMULO;
|
||||
|
||||
BackwardLungeTimer = 15000;
|
||||
@@ -1212,7 +1212,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 JulianneGUID;
|
||||
ObjectGuid JulianneGUID;
|
||||
uint32 Phase;
|
||||
|
||||
uint32 EntryYellTimer;
|
||||
@@ -1318,10 +1318,10 @@ public:
|
||||
Talk(SAY_ROMULO_DEATH);
|
||||
|
||||
instance->SetData(TYPE_OPERA, DONE);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetData64(DATA_GO_STAGEDOORRIGHT), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORLEFT), true);
|
||||
instance->HandleGameObject(instance->GetGuidData(DATA_GO_STAGEDOORRIGHT), true);
|
||||
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetData64(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
if (GameObject* pSideEntrance = instance->instance->GetGameObject(instance->GetGuidData(DATA_GO_SIDE_ENTRANCE_DOOR)))
|
||||
pSideEntrance->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,21 +64,21 @@ public:
|
||||
uint32 m_uiOperaEvent;
|
||||
uint32 m_uiOzDeathCount;
|
||||
|
||||
uint64 m_uiCurtainGUID;
|
||||
uint64 m_uiStageDoorLeftGUID;
|
||||
uint64 m_uiStageDoorRightGUID;
|
||||
uint64 m_uiKilrekGUID;
|
||||
uint64 m_uiTerestianGUID;
|
||||
uint64 m_uiMoroesGUID;
|
||||
uint64 m_uiLibraryDoor; // Door at Shade of Aran
|
||||
uint64 m_uiMassiveDoor; // Door at Netherspite
|
||||
uint64 m_uiSideEntranceDoor; // Side Entrance
|
||||
uint64 m_uiGamesmansDoor; // Door before Chess
|
||||
uint64 m_uiGamesmansExitDoor; // Door after Chess
|
||||
uint64 m_uiNetherspaceDoor; // Door at Malchezaar
|
||||
uint64 MastersTerraceDoor[2];
|
||||
uint64 ImageGUID;
|
||||
uint64 DustCoveredChest;
|
||||
ObjectGuid m_uiCurtainGUID;
|
||||
ObjectGuid m_uiStageDoorLeftGUID;
|
||||
ObjectGuid m_uiStageDoorRightGUID;
|
||||
ObjectGuid m_uiKilrekGUID;
|
||||
ObjectGuid m_uiTerestianGUID;
|
||||
ObjectGuid m_uiMoroesGUID;
|
||||
ObjectGuid m_uiLibraryDoor; // Door at Shade of Aran
|
||||
ObjectGuid m_uiMassiveDoor; // Door at Netherspite
|
||||
ObjectGuid m_uiSideEntranceDoor; // Side Entrance
|
||||
ObjectGuid m_uiGamesmansDoor; // Door before Chess
|
||||
ObjectGuid m_uiGamesmansExitDoor; // Door after Chess
|
||||
ObjectGuid m_uiNetherspaceDoor; // Door at Malchezaar
|
||||
ObjectGuid MastersTerraceDoor[2];
|
||||
ObjectGuid ImageGUID;
|
||||
ObjectGuid DustCoveredChest;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
@@ -88,25 +88,6 @@ public:
|
||||
// 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered.
|
||||
m_uiOperaEvent = urand(1, 3);
|
||||
m_uiOzDeathCount = 0;
|
||||
|
||||
m_uiCurtainGUID = 0;
|
||||
m_uiStageDoorLeftGUID = 0;
|
||||
m_uiStageDoorRightGUID = 0;
|
||||
|
||||
m_uiKilrekGUID = 0;
|
||||
m_uiTerestianGUID = 0;
|
||||
m_uiMoroesGUID = 0;
|
||||
|
||||
m_uiLibraryDoor = 0;
|
||||
m_uiMassiveDoor = 0;
|
||||
m_uiSideEntranceDoor = 0;
|
||||
m_uiGamesmansDoor = 0;
|
||||
m_uiGamesmansExitDoor = 0;
|
||||
m_uiNetherspaceDoor = 0;
|
||||
MastersTerraceDoor[0]= 0;
|
||||
MastersTerraceDoor[1]= 0;
|
||||
ImageGUID = 0;
|
||||
DustCoveredChest = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
@@ -183,7 +164,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64(uint32 identifier, uint64 data) override
|
||||
void SetGuidData(uint32 identifier, ObjectGuid data) override
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -265,7 +246,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 uiData) const override
|
||||
ObjectGuid GetGuidData(uint32 uiData) const override
|
||||
{
|
||||
switch (uiData)
|
||||
{
|
||||
@@ -286,7 +267,7 @@ public:
|
||||
case DATA_IMAGE_OF_MEDIVH: return ImageGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void Load(char const* chrIn)
|
||||
|
||||
@@ -139,7 +139,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
m_uiSpotlightGUID = 0;
|
||||
m_uiSpotlightGUID.Clear();
|
||||
|
||||
TalkCount = 0;
|
||||
TalkTimer = 2000;
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 m_uiSpotlightGUID;
|
||||
ObjectGuid m_uiSpotlightGUID;
|
||||
|
||||
uint32 TalkCount;
|
||||
uint32 TalkTimer;
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
{
|
||||
case 0:
|
||||
DoCast(me, SPELL_TUXEDO, false);
|
||||
instance->DoUseDoorOrButton(instance->GetData64(DATA_GO_STAGEDOORLEFT));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_STAGEDOORLEFT));
|
||||
break;
|
||||
case 4:
|
||||
TalkCount = 0;
|
||||
@@ -202,12 +202,12 @@ public:
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
instance->DoUseDoorOrButton(instance->GetData64(DATA_GO_STAGEDOORLEFT));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_STAGEDOORLEFT));
|
||||
PerformanceReady = true;
|
||||
break;
|
||||
case 9:
|
||||
PrepareEncounter();
|
||||
instance->DoUseDoorOrButton(instance->GetData64(DATA_GO_CURTAINS));
|
||||
instance->DoUseDoorOrButton(instance->GetGuidData(DATA_GO_CURTAINS));
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -360,17 +360,17 @@ public:
|
||||
case GOSSIP_ACTION_INFO_DEF+3:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_OZ;
|
||||
TC_LOG_INFO("scripts", "player (GUID " UI64FMTD ") manually set Opera event to EVENT_OZ", player->GetGUID());
|
||||
TC_LOG_INFO("scripts", "player (%s) manually set Opera event to EVENT_OZ", player->GetGUID().ToString().c_str());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+4:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_HOOD;
|
||||
TC_LOG_INFO("scripts", "player (GUID " UI64FMTD ") manually set Opera event to EVENT_HOOD", player->GetGUID());
|
||||
TC_LOG_INFO("scripts", "player (%s) manually set Opera event to EVENT_HOOD", player->GetGUID().ToString().c_str());
|
||||
break;
|
||||
case GOSSIP_ACTION_INFO_DEF+5:
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
pBarnesAI->m_uiEventId = EVENT_RAJ;
|
||||
TC_LOG_INFO("scripts", "player (GUID " UI64FMTD ") manually set Opera event to EVENT_RAJ", player->GetGUID());
|
||||
TC_LOG_INFO("scripts", "player (%s) manually set Opera event to EVENT_RAJ", player->GetGUID().ToString().c_str());
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -491,14 +491,14 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
ArcanagosGUID = 0;
|
||||
ArcanagosGUID.Clear();
|
||||
EventStarted = false;
|
||||
YellTimer = 0;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 ArcanagosGUID;
|
||||
ObjectGuid ArcanagosGUID;
|
||||
|
||||
uint32 YellTimer;
|
||||
uint32 Step;
|
||||
@@ -511,9 +511,9 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (instance->GetData64(DATA_IMAGE_OF_MEDIVH) == 0)
|
||||
if (instance->GetGuidData(DATA_IMAGE_OF_MEDIVH).IsEmpty())
|
||||
{
|
||||
instance->SetData64(DATA_IMAGE_OF_MEDIVH, me->GetGUID());
|
||||
instance->SetGuidData(DATA_IMAGE_OF_MEDIVH, me->GetGUID());
|
||||
(*me).GetMotionMaster()->MovePoint(1, MedivPos[0], MedivPos[1], MedivPos[2]);
|
||||
Step = 0;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
instance->SetBossState(DATA_KAELTHAS, DONE);
|
||||
|
||||
// Enable the Translocation Orb Exit
|
||||
if (GameObject* escapeOrb = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ESCAPE_ORB)))
|
||||
if (GameObject* escapeOrb = ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ESCAPE_ORB)))
|
||||
escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ public:
|
||||
unit->CastSpell(unit, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, me->GetGUID());
|
||||
// Use packet hack
|
||||
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
|
||||
data.append(unit->GetPackGUID());
|
||||
data << unit->GetPackGUID();
|
||||
data << uint32(0);
|
||||
unit->SendMessageToSet(&data, true);
|
||||
}
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
unit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT);
|
||||
|
||||
WorldPacket data(SMSG_MOVE_UNSET_CAN_FLY, 12);
|
||||
data.append(unit->GetPackGUID());
|
||||
data << unit->GetPackGUID();
|
||||
data << uint32(0);
|
||||
unit->SendMessageToSet(&data, true);
|
||||
}
|
||||
@@ -548,7 +548,7 @@ public:
|
||||
me->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->ClearAllReactives();
|
||||
me->SetTarget(0);
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveIdle();
|
||||
me->SetStandState(UNIT_STAND_STATE_DEAD);
|
||||
|
||||
@@ -119,7 +119,6 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
memset(&m_auiLackeyGUID, 0, sizeof(m_auiLackeyGUID));
|
||||
LackeyEntryList.clear();
|
||||
}
|
||||
|
||||
@@ -138,7 +137,7 @@ public:
|
||||
InstanceScript* instance;
|
||||
|
||||
std::vector<uint32> LackeyEntryList;
|
||||
uint64 m_auiLackeyGUID[MAX_ACTIVE_LACKEY];
|
||||
ObjectGuid m_auiLackeyGUID[MAX_ACTIVE_LACKEY];
|
||||
|
||||
uint8 PlayersKilled;
|
||||
|
||||
@@ -361,7 +360,6 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
memset(&m_auiLackeyGUIDs, 0, sizeof(m_auiLackeyGUIDs));
|
||||
AcquireGUIDs();
|
||||
}
|
||||
|
||||
@@ -378,7 +376,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 m_auiLackeyGUIDs[MAX_ACTIVE_LACKEY];
|
||||
ObjectGuid m_auiLackeyGUIDs[MAX_ACTIVE_LACKEY];
|
||||
uint32 ResetThreatTimer;
|
||||
|
||||
bool UsedPotion;
|
||||
@@ -388,7 +386,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
Initialize();
|
||||
|
||||
// in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her)
|
||||
if (Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
|
||||
if (Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DELRISSA)))
|
||||
{
|
||||
if (!pDelrissa->IsAlive())
|
||||
pDelrissa->Respawn();
|
||||
@@ -412,7 +410,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
if (Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
|
||||
if (Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DELRISSA)))
|
||||
{
|
||||
if (pDelrissa->IsAlive() && !pDelrissa->GetVictim())
|
||||
{
|
||||
@@ -424,7 +422,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA));
|
||||
Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DELRISSA));
|
||||
uint32 uiLackeyDeathCount = instance->GetData(DATA_DELRISSA_DEATH_COUNT);
|
||||
|
||||
if (!pDelrissa)
|
||||
@@ -453,13 +451,13 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (Creature* Delrissa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA)))
|
||||
if (Creature* Delrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DELRISSA)))
|
||||
Delrissa->AI()->KilledUnit(victim);
|
||||
}
|
||||
|
||||
void AcquireGUIDs()
|
||||
{
|
||||
if (Creature* Delrissa = (ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_DELRISSA))))
|
||||
if (Creature* Delrissa = (ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DELRISSA))))
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
|
||||
m_auiLackeyGUIDs[i] = ENSURE_AI(boss_priestess_delrissa::boss_priestess_delrissaAI, Delrissa->AI())->m_auiLackeyGUID[i];
|
||||
@@ -1054,7 +1052,6 @@ public:
|
||||
boss_garaxxasAI(Creature* creature) : boss_priestess_lackey_commonAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
m_uiPetGUID = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -1067,7 +1064,7 @@ public:
|
||||
Freezing_Trap_Timer = 15000;
|
||||
}
|
||||
|
||||
uint64 m_uiPetGUID;
|
||||
ObjectGuid m_uiPetGUID;
|
||||
|
||||
uint32 Aimed_Shot_Timer;
|
||||
uint32 Shoot_Timer;
|
||||
|
||||
@@ -71,7 +71,6 @@ class boss_selin_fireheart : public CreatureScript
|
||||
{
|
||||
boss_selin_fireheartAI(Creature* creature) : BossAI(creature, DATA_SELIN)
|
||||
{
|
||||
CrystalGUID = 0;
|
||||
_scheduledEvents = false;
|
||||
}
|
||||
|
||||
@@ -89,7 +88,7 @@ class boss_selin_fireheart : public CreatureScript
|
||||
}
|
||||
|
||||
_Reset();
|
||||
CrystalGUID = 0;
|
||||
CrystalGUID.Clear();
|
||||
_scheduledEvents = false;
|
||||
}
|
||||
|
||||
@@ -221,7 +220,7 @@ class boss_selin_fireheart : public CreatureScript
|
||||
if (CrystalChosen && CrystalChosen->IsAlive())
|
||||
CrystalChosen->Kill(CrystalChosen);
|
||||
|
||||
CrystalGUID = 0;
|
||||
CrystalGUID.Clear();
|
||||
|
||||
me->GetMotionMaster()->Clear();
|
||||
me->GetMotionMaster()->MoveChase(me->GetVictim());
|
||||
@@ -255,7 +254,7 @@ class boss_selin_fireheart : public CreatureScript
|
||||
|
||||
private:
|
||||
std::list<Creature*> Crystals;
|
||||
uint64 CrystalGUID;
|
||||
ObjectGuid CrystalGUID;
|
||||
bool _scheduledEvents;
|
||||
};
|
||||
|
||||
@@ -278,7 +277,7 @@ class npc_fel_crystal : public CreatureScript
|
||||
{
|
||||
if (InstanceScript* instance = me->GetInstanceScript())
|
||||
{
|
||||
Creature* Selin = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SELIN));
|
||||
Creature* Selin = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SELIN));
|
||||
if (Selin && Selin->IsAlive())
|
||||
Selin->AI()->DoAction(ACTION_SWITCH_PHASE);
|
||||
}
|
||||
|
||||
@@ -50,12 +50,6 @@ class instance_magisters_terrace : public InstanceMapScript
|
||||
LoadDoorData(doorData);
|
||||
|
||||
DelrissaDeathCount = 0;
|
||||
|
||||
SelinGUID = 0;
|
||||
DelrissaGUID = 0;
|
||||
EscapeOrbGUID = 0;
|
||||
|
||||
memset(KaelStatue, 0, 2 * sizeof(uint64));
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
@@ -162,7 +156,7 @@ class instance_magisters_terrace : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -179,14 +173,14 @@ class instance_magisters_terrace : public InstanceMapScript
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 SelinGUID;
|
||||
uint64 DelrissaGUID;
|
||||
uint64 KaelStatue[2];
|
||||
uint64 EscapeOrbGUID;
|
||||
ObjectGuid SelinGUID;
|
||||
ObjectGuid DelrissaGUID;
|
||||
ObjectGuid KaelStatue[2];
|
||||
ObjectGuid EscapeOrbGUID;
|
||||
uint32 DelrissaDeathCount;
|
||||
};
|
||||
|
||||
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
if (Player* player = i->GetSource())
|
||||
{
|
||||
if (spell && spell->Effects[0].MiscValue)
|
||||
player->KilledMonsterCredit(spell->Effects[0].MiscValue, 0);
|
||||
player->KilledMonsterCredit(spell->Effects[0].MiscValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,7 +107,6 @@ public:
|
||||
if (!me->GetCurrentEquipmentId())
|
||||
me->SetCurrentEquipmentId(me->GetOriginalEquipmentId());
|
||||
|
||||
playerGUID = 0;
|
||||
wait_timer = 0;
|
||||
anchorX = 0.f;
|
||||
anchorY = 0.f;
|
||||
@@ -115,15 +114,15 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
anchorGUID = 0;
|
||||
anchorGUID.Clear();
|
||||
phase = PHASE_CHAINED;
|
||||
}
|
||||
|
||||
uint64 playerGUID;
|
||||
ObjectGuid playerGUID;
|
||||
UnworthyInitiatePhase phase;
|
||||
uint32 wait_timer;
|
||||
float anchorX, anchorY;
|
||||
uint64 anchorGUID;
|
||||
ObjectGuid anchorGUID;
|
||||
|
||||
EventMap events;
|
||||
|
||||
@@ -300,17 +299,17 @@ public:
|
||||
|
||||
struct npc_unworthy_initiate_anchorAI : public PassiveAI
|
||||
{
|
||||
npc_unworthy_initiate_anchorAI(Creature* creature) : PassiveAI(creature), prisonerGUID(0) { }
|
||||
npc_unworthy_initiate_anchorAI(Creature* creature) : PassiveAI(creature) { }
|
||||
|
||||
uint64 prisonerGUID;
|
||||
ObjectGuid prisonerGUID;
|
||||
|
||||
void SetGUID(uint64 guid, int32 /*id*/) override
|
||||
void SetGUID(ObjectGuid guid, int32 /*id*/) override
|
||||
{
|
||||
if (!prisonerGUID)
|
||||
prisonerGUID = guid;
|
||||
}
|
||||
|
||||
uint64 GetGUID(int32 /*id*/) const override
|
||||
ObjectGuid GetGUID(int32 /*id*/) const override
|
||||
{
|
||||
return prisonerGUID;
|
||||
}
|
||||
@@ -325,7 +324,7 @@ public:
|
||||
bool OnGossipHello(Player* player, GameObject* go) override
|
||||
{
|
||||
if (Creature* anchor = go->FindNearestCreature(29521, 15))
|
||||
if (uint64 prisonerGUID = anchor->AI()->GetGUID())
|
||||
if (ObjectGuid prisonerGUID = anchor->AI()->GetGUID())
|
||||
if (Creature* prisoner = ObjectAccessor::GetCreature(*player, prisonerGUID))
|
||||
ENSURE_AI(npc_unworthy_initiate::npc_unworthy_initiateAI, prisoner->AI())->EventStart(anchor, player);
|
||||
|
||||
@@ -421,7 +420,7 @@ class npc_eye_of_acherus : public CreatureScript
|
||||
for (uint8 i = 0; i < MAX_MOVE_TYPE; ++i)
|
||||
me->SetSpeed(UnitMoveType(i), owner->GetSpeedRate(UnitMoveType(i)), true);
|
||||
|
||||
TalkToMap(TALK_CONTROL, owner);
|
||||
Talk(TALK_CONTROL, owner);
|
||||
}
|
||||
me->SetDisableGravity(false);
|
||||
DoCast(me, SPELL_EYE_FLIGHT);
|
||||
@@ -532,14 +531,14 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
m_uiDuelerGUID = 0;
|
||||
m_uiDuelerGUID.Clear();
|
||||
m_uiDuelTimer = 5000;
|
||||
m_bIsDuelInProgress = false;
|
||||
lose = false;
|
||||
}
|
||||
|
||||
bool lose;
|
||||
uint64 m_uiDuelerGUID;
|
||||
ObjectGuid m_uiDuelerGUID;
|
||||
uint32 m_uiDuelTimer;
|
||||
bool m_bIsDuelInProgress;
|
||||
|
||||
@@ -655,7 +654,7 @@ class npc_dark_rider_of_acherus : public CreatureScript
|
||||
PhaseTimer = 4000;
|
||||
Phase = 0;
|
||||
Intro = false;
|
||||
TargetGUID = 0;
|
||||
TargetGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -716,7 +715,7 @@ class npc_dark_rider_of_acherus : public CreatureScript
|
||||
uint32 PhaseTimer;
|
||||
uint32 Phase;
|
||||
bool Intro;
|
||||
uint64 TargetGUID;
|
||||
ObjectGuid TargetGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -1010,7 +1009,7 @@ class npc_scarlet_miner_cart : public CreatureScript
|
||||
|
||||
struct npc_scarlet_miner_cartAI : public PassiveAI
|
||||
{
|
||||
npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature), _minerGUID(0), _playerGUID(0)
|
||||
npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature)
|
||||
{
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1); // Modelid2 is a horse.
|
||||
@@ -1028,7 +1027,7 @@ class npc_scarlet_miner_cart : public CreatureScript
|
||||
void SummonedCreatureDespawn(Creature* summon) override
|
||||
{
|
||||
if (summon->GetEntry() == NPC_MINER)
|
||||
_minerGUID = 0;
|
||||
_minerGUID.Clear();
|
||||
}
|
||||
|
||||
void DoAction(int32 /*param*/) override
|
||||
@@ -1054,15 +1053,15 @@ class npc_scarlet_miner_cart : public CreatureScript
|
||||
}
|
||||
else
|
||||
{
|
||||
_playerGUID = 0;
|
||||
_playerGUID.Clear();
|
||||
if (Creature* miner = ObjectAccessor::GetCreature(*me, _minerGUID))
|
||||
miner->DespawnOrUnsummon();
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
uint64 _minerGUID;
|
||||
uint64 _playerGUID;
|
||||
ObjectGuid _minerGUID;
|
||||
ObjectGuid _playerGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -1096,14 +1095,14 @@ class npc_scarlet_miner : public CreatureScript
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
carGUID = 0;
|
||||
carGUID.Clear();
|
||||
IntroTimer = 0;
|
||||
IntroPhase = 0;
|
||||
}
|
||||
|
||||
uint32 IntroTimer;
|
||||
uint32 IntroPhase;
|
||||
uint64 carGUID;
|
||||
ObjectGuid carGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -1148,7 +1147,7 @@ class npc_scarlet_miner : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void SetGUID(uint64 guid, int32 /*id = 0*/) override
|
||||
void SetGUID(ObjectGuid guid, int32 /*id = 0*/) override
|
||||
{
|
||||
InitWaypoint();
|
||||
Start(false, false, guid);
|
||||
|
||||
@@ -60,12 +60,12 @@ public:
|
||||
{
|
||||
speechTimer = 0;
|
||||
speechCounter = 0;
|
||||
playerGUID = 0;
|
||||
playerGUID.Clear();
|
||||
}
|
||||
|
||||
uint32 speechTimer;
|
||||
uint32 speechCounter;
|
||||
uint64 playerGUID;
|
||||
ObjectGuid playerGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -223,7 +223,7 @@ public:
|
||||
{
|
||||
wave = 0;
|
||||
waveTimer = 3000;
|
||||
valrothGUID = 0;
|
||||
valrothGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -357,7 +357,7 @@ public:
|
||||
private:
|
||||
uint8 wave;
|
||||
uint32 waveTimer;
|
||||
uint64 valrothGUID;
|
||||
ObjectGuid valrothGUID;
|
||||
|
||||
};
|
||||
|
||||
@@ -642,12 +642,12 @@ public:
|
||||
{
|
||||
ExecuteSpeech_Timer = 0;
|
||||
ExecuteSpeech_Counter = 0;
|
||||
PlayerGUID = 0;
|
||||
PlayerGUID.Clear();
|
||||
}
|
||||
|
||||
uint32 ExecuteSpeech_Timer;
|
||||
uint32 ExecuteSpeech_Counter;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
|
||||
@@ -311,25 +311,6 @@ public:
|
||||
{
|
||||
npc_highlord_darion_mograineAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
uiTirionGUID = 0;
|
||||
uiAlexandrosGUID = 0;
|
||||
uiDarionGUID = 0;
|
||||
uiKorfaxGUID = 0;
|
||||
uiMaxwellGUID = 0;
|
||||
uiEligorGUID = 0;
|
||||
uiRayneGUID = 0;
|
||||
uiKoltiraGUID = 0;
|
||||
uiOrbazGUID = 0;
|
||||
uiThassarianGUID = 0;
|
||||
uiLichKingGUID = 0;
|
||||
|
||||
memset(uiDefenderGUID, 0, sizeof(uiDefenderGUID));
|
||||
memset(uiEarthshatterGUID, 0, sizeof(uiEarthshatterGUID));
|
||||
memset(uiAbominationGUID, 0, sizeof(uiAbominationGUID));
|
||||
memset(uiBehemothGUID, 0, sizeof(uiBehemothGUID));
|
||||
memset(uiGhoulGUID, 0, sizeof(uiGhoulGUID));
|
||||
memset(uiWarriorGUID, 0, sizeof(uiWarriorGUID));
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -352,25 +333,25 @@ public:
|
||||
uint32 uiTargetcheck;
|
||||
|
||||
// Dawn
|
||||
uint64 uiTirionGUID;
|
||||
uint64 uiAlexandrosGUID;
|
||||
uint64 uiDarionGUID;
|
||||
uint64 uiKorfaxGUID;
|
||||
uint64 uiMaxwellGUID;
|
||||
uint64 uiEligorGUID;
|
||||
uint64 uiRayneGUID;
|
||||
uint64 uiDefenderGUID[ENCOUNTER_DEFENDER_NUMBER];
|
||||
uint64 uiEarthshatterGUID[ENCOUNTER_EARTHSHATTER_NUMBER];
|
||||
ObjectGuid uiTirionGUID;
|
||||
ObjectGuid uiAlexandrosGUID;
|
||||
ObjectGuid uiDarionGUID;
|
||||
ObjectGuid uiKorfaxGUID;
|
||||
ObjectGuid uiMaxwellGUID;
|
||||
ObjectGuid uiEligorGUID;
|
||||
ObjectGuid uiRayneGUID;
|
||||
ObjectGuid uiDefenderGUID[ENCOUNTER_DEFENDER_NUMBER];
|
||||
ObjectGuid uiEarthshatterGUID[ENCOUNTER_EARTHSHATTER_NUMBER];
|
||||
|
||||
// Death
|
||||
uint64 uiKoltiraGUID;
|
||||
uint64 uiOrbazGUID;
|
||||
uint64 uiThassarianGUID;
|
||||
uint64 uiLichKingGUID;
|
||||
uint64 uiAbominationGUID[ENCOUNTER_ABOMINATION_NUMBER];
|
||||
uint64 uiBehemothGUID[ENCOUNTER_BEHEMOTH_NUMBER];
|
||||
uint64 uiGhoulGUID[ENCOUNTER_GHOUL_NUMBER];
|
||||
uint64 uiWarriorGUID[ENCOUNTER_WARRIOR_NUMBER];
|
||||
ObjectGuid uiKoltiraGUID;
|
||||
ObjectGuid uiOrbazGUID;
|
||||
ObjectGuid uiThassarianGUID;
|
||||
ObjectGuid uiLichKingGUID;
|
||||
ObjectGuid uiAbominationGUID[ENCOUNTER_ABOMINATION_NUMBER];
|
||||
ObjectGuid uiBehemothGUID[ENCOUNTER_BEHEMOTH_NUMBER];
|
||||
ObjectGuid uiGhoulGUID[ENCOUNTER_GHOUL_NUMBER];
|
||||
ObjectGuid uiWarriorGUID[ENCOUNTER_WARRIOR_NUMBER];
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
@@ -413,23 +394,23 @@ public:
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiRayneGUID))
|
||||
temp->setDeathState(JUST_DIED);
|
||||
|
||||
uiTirionGUID = 0;
|
||||
uiKorfaxGUID = 0;
|
||||
uiMaxwellGUID = 0;
|
||||
uiEligorGUID = 0;
|
||||
uiRayneGUID = 0;
|
||||
uiTirionGUID.Clear();
|
||||
uiKorfaxGUID.Clear();
|
||||
uiMaxwellGUID.Clear();
|
||||
uiEligorGUID.Clear();
|
||||
uiRayneGUID.Clear();
|
||||
|
||||
for (uint8 i = 0; i < ENCOUNTER_DEFENDER_NUMBER; ++i)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiDefenderGUID[i]))
|
||||
temp->setDeathState(JUST_DIED);
|
||||
uiDefenderGUID[i] = 0;
|
||||
uiDefenderGUID[i].Clear();
|
||||
}
|
||||
for (uint8 i = 0; i < ENCOUNTER_EARTHSHATTER_NUMBER; ++i)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiEarthshatterGUID[i]))
|
||||
temp->setDeathState(JUST_DIED);
|
||||
uiEarthshatterGUID[i] = 0;
|
||||
uiEarthshatterGUID[i].Clear();
|
||||
}
|
||||
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
|
||||
@@ -441,33 +422,33 @@ public:
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiLichKingGUID))
|
||||
temp->Respawn();
|
||||
|
||||
uiKoltiraGUID = 0;
|
||||
uiOrbazGUID = 0;
|
||||
uiThassarianGUID = 0;
|
||||
uiLichKingGUID = 0;
|
||||
uiKoltiraGUID.Clear();
|
||||
uiOrbazGUID.Clear();
|
||||
uiThassarianGUID.Clear();
|
||||
uiLichKingGUID.Clear();
|
||||
for (uint8 i = 0; i < ENCOUNTER_ABOMINATION_NUMBER; ++i)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiAbominationGUID[i]))
|
||||
temp->setDeathState(JUST_DIED);
|
||||
uiAbominationGUID[i] = 0;
|
||||
uiAbominationGUID[i].Clear();
|
||||
}
|
||||
for (uint8 i = 0; i < ENCOUNTER_BEHEMOTH_NUMBER; ++i)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiBehemothGUID[i]))
|
||||
temp->setDeathState(JUST_DIED);
|
||||
uiBehemothGUID[i] = 0;
|
||||
uiBehemothGUID[i].Clear();
|
||||
}
|
||||
for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiGhoulGUID[i]))
|
||||
temp->setDeathState(JUST_DIED);
|
||||
uiGhoulGUID[i] = 0;
|
||||
uiGhoulGUID[i].Clear();
|
||||
}
|
||||
for (uint8 i = 0; i < ENCOUNTER_WARRIOR_NUMBER; ++i)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiWarriorGUID[i]))
|
||||
temp->setDeathState(JUST_DIED);
|
||||
uiWarriorGUID[i] = 0;
|
||||
uiWarriorGUID[i].Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -552,18 +533,18 @@ public:
|
||||
//Unit* pTirion = ObjectAccessor::GetCreature(*me, uiTirionGUID);
|
||||
|
||||
Talk(EMOTE_LIGHT_OF_DAWN05);
|
||||
if (me->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
|
||||
if (me->HasAura(SPELL_THE_LIGHT_OF_DAWN))
|
||||
me->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiKoltiraGUID))
|
||||
{
|
||||
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
|
||||
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN))
|
||||
temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
|
||||
temp->SetWalk(true);
|
||||
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[19].x, LightofDawnLoc[19].y, LightofDawnLoc[19].z);
|
||||
}
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiThassarianGUID))
|
||||
{
|
||||
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
|
||||
if (temp->HasAura(SPELL_THE_LIGHT_OF_DAWN))
|
||||
temp->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
|
||||
temp->SetWalk(true);
|
||||
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[21].x, LightofDawnLoc[21].y, LightofDawnLoc[21].z);
|
||||
@@ -1143,7 +1124,7 @@ public:
|
||||
me->SummonGameObject(GO_LIGHT_OF_DAWN, 2283.896f, -5287.914f, 83.066f, 0, 0, 0, 0, 0, 30);
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, uiTirionGUID))
|
||||
{
|
||||
if (temp->HasAura(SPELL_REBIRTH_OF_THE_ASHBRINGER, 0))
|
||||
if (temp->HasAura(SPELL_REBIRTH_OF_THE_ASHBRINGER))
|
||||
temp->RemoveAurasDueToSpell(SPELL_REBIRTH_OF_THE_ASHBRINGER);
|
||||
temp->CastSpell(temp, 41542, false); // workarounds, light expoded, makes it cool
|
||||
temp->HandleEmoteCommand(EMOTE_ONESHOT_ROAR);
|
||||
@@ -1433,7 +1414,7 @@ public:
|
||||
bIsBattle = false;
|
||||
uiFight_duration = 300000;
|
||||
|
||||
if (me->HasAura(SPELL_THE_MIGHT_OF_MOGRAINE, 0))
|
||||
if (me->HasAura(SPELL_THE_MIGHT_OF_MOGRAINE))
|
||||
me->RemoveAurasDueToSpell(SPELL_THE_MIGHT_OF_MOGRAINE);
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
@@ -1532,7 +1513,7 @@ public:
|
||||
++uiStep;
|
||||
}
|
||||
|
||||
void NPCChangeTarget(uint64 ui_GUID)
|
||||
void NPCChangeTarget(ObjectGuid ui_GUID)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, ui_GUID))
|
||||
if (temp->IsAlive())
|
||||
@@ -1651,7 +1632,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void DespawnNPC(uint64 pGUID)
|
||||
void DespawnNPC(ObjectGuid pGUID)
|
||||
{
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, pGUID))
|
||||
if (temp->IsAlive())
|
||||
|
||||
@@ -240,14 +240,14 @@ public:
|
||||
void Initialize()
|
||||
{
|
||||
Phase = 0;
|
||||
bodyGUID = 0;
|
||||
bodyGUID.Clear();
|
||||
die = false;
|
||||
withbody = true;
|
||||
wait = 1000;
|
||||
laugh = urand(15000, 30000);
|
||||
}
|
||||
|
||||
uint64 bodyGUID;
|
||||
ObjectGuid bodyGUID;
|
||||
|
||||
uint32 Phase;
|
||||
uint32 laugh;
|
||||
@@ -390,8 +390,6 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
headGUID = 0;
|
||||
PlayerGUID = 0;
|
||||
id = 0;
|
||||
whirlwind = 0;
|
||||
wp_reached = false;
|
||||
@@ -417,8 +415,8 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 headGUID;
|
||||
uint64 PlayerGUID;
|
||||
ObjectGuid headGUID;
|
||||
ObjectGuid PlayerGUID;
|
||||
|
||||
uint32 Phase;
|
||||
uint32 id;
|
||||
@@ -446,9 +444,9 @@ public:
|
||||
if (headGUID)
|
||||
{
|
||||
if (Creature* Head = ObjectAccessor::GetCreature((*me), headGUID))
|
||||
Head->DisappearAndDie();
|
||||
Head->DespawnOrUnsummon();
|
||||
|
||||
headGUID = 0;
|
||||
headGUID.Clear();
|
||||
}
|
||||
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
@@ -806,18 +804,17 @@ public:
|
||||
npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
sprouted = false;
|
||||
debuffGUID = 0;
|
||||
}
|
||||
|
||||
bool sprouted;
|
||||
uint64 debuffGUID;
|
||||
ObjectGuid debuffGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
float x, y, z;
|
||||
me->GetPosition(x, y, z); //this visual aura some under ground
|
||||
me->SetPosition(x, y, z + 0.35f, 0.0f);
|
||||
debuffGUID = 0;
|
||||
debuffGUID.Clear();
|
||||
Despawn();
|
||||
Creature* debuff = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500);
|
||||
if (debuff)
|
||||
@@ -857,7 +854,7 @@ public:
|
||||
if (debuff)
|
||||
{
|
||||
debuff->SetVisible(false);
|
||||
debuffGUID = 0;
|
||||
debuffGUID.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ class boss_interrogator_vishas : public CreatureScript
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
if (Creature* vorrel = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_VORREL)))
|
||||
if (Creature* vorrel = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_VORREL)))
|
||||
vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
return;
|
||||
|
||||
//On first death, fake death and open door, as well as initiate whitemane if exist
|
||||
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
|
||||
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_WHITEMANE)))
|
||||
{
|
||||
instance->SetBossState(DATA_MOGRAINE_AND_WHITE_EVENT, IN_PROGRESS);
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
if (_bHasDied && !_bHeal && instance->GetBossState(DATA_MOGRAINE_AND_WHITE_EVENT) == SPECIAL)
|
||||
{
|
||||
//On resurrection, stop fake death and heal whitemane and resume fight
|
||||
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_WHITEMANE)))
|
||||
if (Unit* Whitemane = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_WHITEMANE)))
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
@@ -302,7 +302,7 @@ public:
|
||||
//When casting resuruction make sure to delay so on rez when reinstate battle deepsleep runs out
|
||||
if (Wait_Timer <= diff)
|
||||
{
|
||||
if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOGRAINE)))
|
||||
if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOGRAINE)))
|
||||
{
|
||||
DoCast(mograine, SPELL_SCARLETRESURRECTION);
|
||||
Talk(SAY_WH_RESURRECT);
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
if (!HealthAbovePct(75))
|
||||
target = me;
|
||||
|
||||
if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MOGRAINE)))
|
||||
if (Creature* mograine = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MOGRAINE)))
|
||||
{
|
||||
// checking _bCanResurrectCheck prevents her healing Mograine while he is "faking death"
|
||||
if (_bCanResurrectCheck && mograine->IsAlive() && !mograine->HealthAbovePct(75))
|
||||
|
||||
+10
-17
@@ -38,13 +38,6 @@ class instance_scarlet_monastery : public InstanceMapScript
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
PumpkinShrineGUID = 0;
|
||||
HorsemanGUID = 0;
|
||||
HeadGUID = 0;
|
||||
MograineGUID = 0;
|
||||
WhitemaneGUID = 0;
|
||||
VorrelGUID = 0;
|
||||
|
||||
HorsemanAdds.clear();
|
||||
}
|
||||
|
||||
@@ -124,7 +117,7 @@ class instance_scarlet_monastery : public InstanceMapScript
|
||||
case DATA_HORSEMAN_EVENT:
|
||||
if (state == DONE)
|
||||
{
|
||||
for (uint64 guid : HorsemanAdds)
|
||||
for (ObjectGuid guid : HorsemanAdds)
|
||||
{
|
||||
Creature* add = instance->GetCreature(guid);
|
||||
if (add && add->IsAlive())
|
||||
@@ -140,7 +133,7 @@ class instance_scarlet_monastery : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -153,18 +146,18 @@ class instance_scarlet_monastery : public InstanceMapScript
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 PumpkinShrineGUID;
|
||||
uint64 HorsemanGUID;
|
||||
uint64 HeadGUID;
|
||||
uint64 MograineGUID;
|
||||
uint64 WhitemaneGUID;
|
||||
uint64 VorrelGUID;
|
||||
ObjectGuid PumpkinShrineGUID;
|
||||
ObjectGuid HorsemanGUID;
|
||||
ObjectGuid HeadGUID;
|
||||
ObjectGuid MograineGUID;
|
||||
ObjectGuid WhitemaneGUID;
|
||||
ObjectGuid VorrelGUID;
|
||||
|
||||
std::set<uint64> HorsemanAdds;
|
||||
GuidSet HorsemanAdds;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -59,14 +59,14 @@ class boss_darkmaster_gandling : public CreatureScript
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_GANDLING)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_GANDLING)))
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_GANDLING)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_GANDLING)))
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ class boss_darkmaster_gandling : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_CURSE, 2000);
|
||||
events.ScheduleEvent(EVENT_SHADOW_PORTAL, 16000);
|
||||
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_GANDLING)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_GANDLING)))
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
@@ -181,32 +181,32 @@ class spell_shadow_portal : public SpellScriptLoader
|
||||
switch (urand(0, 5))
|
||||
{
|
||||
case ROOM_HALL_OF_SECRETS:
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetData64(GO_GATE_RAVENIAN)))
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetGuidData(GO_GATE_RAVENIAN)))
|
||||
if (go->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_HALLOFSECRETS;
|
||||
break;
|
||||
case ROOM_HALL_OF_THE_DAMNED:
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetData64(GO_GATE_THEOLEN)))
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetGuidData(GO_GATE_THEOLEN)))
|
||||
if (go->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_HALLOFTHEDAMNED;
|
||||
break;
|
||||
case ROOM_THE_COVEN:
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetData64(GO_GATE_MALICIA)))
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetGuidData(GO_GATE_MALICIA)))
|
||||
if (go->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_THECOVEN;
|
||||
break;
|
||||
case ROOM_THE_SHADOW_VAULT:
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetData64(GO_GATE_ILLUCIA)))
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetGuidData(GO_GATE_ILLUCIA)))
|
||||
if (go->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_THESHADOWVAULT;
|
||||
break;
|
||||
case ROOM_BAROV_FAMILY_VAULT:
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetData64(GO_GATE_BAROV)))
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetGuidData(GO_GATE_BAROV)))
|
||||
if (go->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_BAROVFAMILYVAULT;
|
||||
break;
|
||||
case ROOM_VAULT_OF_THE_RAVENIAN:
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetData64(GO_GATE_POLKELT)))
|
||||
if (GameObject* go = ObjectAccessor::GetGameObject(*caster, _instance->GetGuidData(GO_GATE_POLKELT)))
|
||||
if (go->GetGoState() == GO_STATE_ACTIVE)
|
||||
spellId = SPELL_SHADOW_PORTAL_VAULTOFTHERAVENIAN;
|
||||
break;
|
||||
@@ -348,7 +348,7 @@ class spell_shadow_portal_rooms : public SpellScriptLoader
|
||||
}
|
||||
}
|
||||
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, _instance->GetData64(gate_to_close)))
|
||||
if (GameObject* gate = ObjectAccessor::GetGameObject(*caster, _instance->GetGuidData(gate_to_close)))
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,9 +98,9 @@ class boss_kirtonos_the_herald : public CreatureScript
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_KIRTONOS)))
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetData64(GO_BRAZIER_OF_THE_HERALD)))
|
||||
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetGuidData(GO_BRAZIER_OF_THE_HERALD)))
|
||||
{
|
||||
brazier->ResetDoorOrButton();
|
||||
brazier->SetGoState(GO_STATE_READY);
|
||||
@@ -110,9 +110,9 @@ class boss_kirtonos_the_herald : public CreatureScript
|
||||
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_KIRTONOS)))
|
||||
gate->SetGoState(GO_STATE_ACTIVE);
|
||||
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetData64(GO_BRAZIER_OF_THE_HERALD)))
|
||||
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetGuidData(GO_BRAZIER_OF_THE_HERALD)))
|
||||
{
|
||||
brazier->ResetDoorOrButton();
|
||||
brazier->SetGoState(GO_STATE_READY);
|
||||
@@ -160,13 +160,13 @@ class boss_kirtonos_the_herald : public CreatureScript
|
||||
events.ScheduleEvent(INTRO_3, 1000);
|
||||
break;
|
||||
case INTRO_3:
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetData64(GO_GATE_KIRTONOS)))
|
||||
if (GameObject* gate = me->GetMap()->GetGameObject(instance->GetGuidData(GO_GATE_KIRTONOS)))
|
||||
gate->SetGoState(GO_STATE_READY);
|
||||
me->SetFacingTo(0.01745329f);
|
||||
events.ScheduleEvent(INTRO_4, 3000);
|
||||
break;
|
||||
case INTRO_4:
|
||||
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetData64(GO_BRAZIER_OF_THE_HERALD)))
|
||||
if (GameObject* brazier = me->GetMap()->GetGameObject(instance->GetGuidData(GO_BRAZIER_OF_THE_HERALD)))
|
||||
brazier->SetGoState(GO_STATE_READY);
|
||||
me->SetWalk(true);
|
||||
me->SetDisableGravity(false);
|
||||
|
||||
@@ -38,15 +38,6 @@ class instance_scholomance : public InstanceMapScript
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
GateKirtonosGUID = 0;
|
||||
GateGandlingGUID = 0;
|
||||
GateMiliciaGUID = 0;
|
||||
GateTheolenGUID = 0;
|
||||
GatePolkeltGUID = 0;
|
||||
GateRavenianGUID = 0;
|
||||
GateBarovGUID = 0;
|
||||
GateIlluciaGUID = 0;
|
||||
BrazierOfTheHeraldGUID = 0;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
@@ -107,7 +98,7 @@ class instance_scholomance : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -133,7 +124,7 @@ class instance_scholomance : public InstanceMapScript
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
bool CheckPreBosses(uint32 bossId) const
|
||||
@@ -175,15 +166,15 @@ class instance_scholomance : public InstanceMapScript
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 GateKirtonosGUID;
|
||||
uint64 GateGandlingGUID;
|
||||
uint64 GateMiliciaGUID;
|
||||
uint64 GateTheolenGUID;
|
||||
uint64 GatePolkeltGUID;
|
||||
uint64 GateRavenianGUID;
|
||||
uint64 GateBarovGUID;
|
||||
uint64 GateIlluciaGUID;
|
||||
uint64 BrazierOfTheHeraldGUID;
|
||||
ObjectGuid GateKirtonosGUID;
|
||||
ObjectGuid GateGandlingGUID;
|
||||
ObjectGuid GateMiliciaGUID;
|
||||
ObjectGuid GateTheolenGUID;
|
||||
ObjectGuid GatePolkeltGUID;
|
||||
ObjectGuid GateRavenianGUID;
|
||||
ObjectGuid GateBarovGUID;
|
||||
ObjectGuid GateIlluciaGUID;
|
||||
ObjectGuid BrazierOfTheHeraldGUID;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -83,13 +83,13 @@ public:
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
|
||||
uint64 uiAshGUID;
|
||||
uint64 uiAdaGUID;
|
||||
uint64 uiArchmageArugalGUID;
|
||||
ObjectGuid uiAshGUID;
|
||||
ObjectGuid uiAdaGUID;
|
||||
ObjectGuid uiArchmageArugalGUID;
|
||||
|
||||
uint64 DoorCourtyardGUID;
|
||||
uint64 DoorSorcererGUID;
|
||||
uint64 DoorArugalGUID;
|
||||
ObjectGuid DoorCourtyardGUID;
|
||||
ObjectGuid DoorSorcererGUID;
|
||||
ObjectGuid DoorArugalGUID;
|
||||
|
||||
uint8 uiPhase;
|
||||
uint16 uiTimer;
|
||||
@@ -99,14 +99,6 @@ public:
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
uiAshGUID = 0;
|
||||
uiAdaGUID = 0;
|
||||
uiArchmageArugalGUID = 0;
|
||||
|
||||
DoorCourtyardGUID = 0;
|
||||
DoorSorcererGUID = 0;
|
||||
DoorArugalGUID = 0;
|
||||
|
||||
uiPhase = 0;
|
||||
uiTimer = 0;
|
||||
}
|
||||
@@ -128,17 +120,17 @@ public:
|
||||
case GO_COURTYARD_DOOR:
|
||||
DoorCourtyardGUID = go->GetGUID();
|
||||
if (m_auiEncounter[0] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_SORCERER_DOOR:
|
||||
DoorSorcererGUID = go->GetGUID();
|
||||
if (m_auiEncounter[2] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_ARUGAL_DOOR:
|
||||
DoorArugalGUID = go->GetGUID();
|
||||
if (m_auiEncounter[3] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
if (instance->GetData(TYPE_SH_QUEST))
|
||||
{
|
||||
if (Player* player = killer->ToPlayer())
|
||||
player->KilledMonsterCredit(SH_QUEST_CREDIT, 0);
|
||||
player->KilledMonsterCredit(SH_QUEST_CREDIT);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,21 +56,21 @@ class instance_stratholme : public InstanceMapScript
|
||||
|
||||
bool IsSilverHandDead[5];
|
||||
|
||||
uint64 serviceEntranceGUID;
|
||||
uint64 gauntletGate1GUID;
|
||||
uint64 ziggurat1GUID;
|
||||
uint64 ziggurat2GUID;
|
||||
uint64 ziggurat3GUID;
|
||||
uint64 ziggurat4GUID;
|
||||
uint64 ziggurat5GUID;
|
||||
uint64 portGauntletGUID;
|
||||
uint64 portSlaugtherGUID;
|
||||
uint64 portElderGUID;
|
||||
ObjectGuid serviceEntranceGUID;
|
||||
ObjectGuid gauntletGate1GUID;
|
||||
ObjectGuid ziggurat1GUID;
|
||||
ObjectGuid ziggurat2GUID;
|
||||
ObjectGuid ziggurat3GUID;
|
||||
ObjectGuid ziggurat4GUID;
|
||||
ObjectGuid ziggurat5GUID;
|
||||
ObjectGuid portGauntletGUID;
|
||||
ObjectGuid portSlaugtherGUID;
|
||||
ObjectGuid portElderGUID;
|
||||
|
||||
uint64 baronGUID;
|
||||
uint64 ysidaTriggerGUID;
|
||||
std::set<uint64> crystalsGUID;
|
||||
std::set<uint64> abomnationGUID;
|
||||
ObjectGuid baronGUID;
|
||||
ObjectGuid ysidaTriggerGUID;
|
||||
GuidSet crystalsGUID;
|
||||
GuidSet abomnationGUID;
|
||||
EventMap events;
|
||||
|
||||
void Initialize() override
|
||||
@@ -81,19 +81,6 @@ class instance_stratholme : public InstanceMapScript
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
IsSilverHandDead[i] = false;
|
||||
|
||||
serviceEntranceGUID = 0;
|
||||
gauntletGate1GUID = 0;
|
||||
ziggurat1GUID = 0;
|
||||
ziggurat2GUID = 0;
|
||||
ziggurat3GUID = 0;
|
||||
ziggurat4GUID = 0;
|
||||
ziggurat5GUID = 0;
|
||||
portGauntletGUID = 0;
|
||||
portSlaugtherGUID = 0;
|
||||
portElderGUID = 0;
|
||||
|
||||
baronGUID = 0;
|
||||
ysidaTriggerGUID = 0;
|
||||
crystalsGUID.clear();
|
||||
abomnationGUID.clear();
|
||||
}
|
||||
@@ -113,7 +100,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
}
|
||||
|
||||
//if withRestoreTime true, then newState will be ignored and GO should be restored to original state after 10 seconds
|
||||
void UpdateGoState(uint64 goGuid, uint32 newState, bool withRestoreTime)
|
||||
void UpdateGoState(ObjectGuid goGuid, uint32 newState, bool withRestoreTime)
|
||||
{
|
||||
if (!goGuid)
|
||||
return;
|
||||
@@ -176,37 +163,37 @@ class instance_stratholme : public InstanceMapScript
|
||||
case GO_ZIGGURAT1:
|
||||
ziggurat1GUID = go->GetGUID();
|
||||
if (GetData(TYPE_BARONESS) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_ZIGGURAT2:
|
||||
ziggurat2GUID = go->GetGUID();
|
||||
if (GetData(TYPE_NERUB) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_ZIGGURAT3:
|
||||
ziggurat3GUID = go->GetGUID();
|
||||
if (GetData(TYPE_PALLID) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_ZIGGURAT4:
|
||||
ziggurat4GUID = go->GetGUID();
|
||||
if (GetData(TYPE_BARON) == DONE || GetData(TYPE_RAMSTEIN) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_ZIGGURAT5:
|
||||
ziggurat5GUID = go->GetGUID();
|
||||
if (GetData(TYPE_BARON) == DONE || GetData(TYPE_RAMSTEIN) == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_PORT_GAUNTLET:
|
||||
portGauntletGUID = go->GetGUID();
|
||||
if (GetData(TYPE_BARONESS) == IN_PROGRESS && GetData(TYPE_NERUB) == IN_PROGRESS && GetData(TYPE_PALLID) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_PORT_SLAUGTHER:
|
||||
portSlaugtherGUID = go->GetGUID();
|
||||
if (GetData(TYPE_BARONESS) == IN_PROGRESS && GetData(TYPE_NERUB) == IN_PROGRESS && GetData(TYPE_PALLID) == IN_PROGRESS)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
case GO_PORT_ELDERS:
|
||||
portElderGUID = go->GetGUID();
|
||||
@@ -276,7 +263,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
HandleGameObject(portGauntletGUID, false);
|
||||
|
||||
uint32 count = abomnationGUID.size();
|
||||
for (std::set<uint64>::const_iterator i = abomnationGUID.begin(); i != abomnationGUID.end(); ++i)
|
||||
for (GuidSet::const_iterator i = abomnationGUID.begin(); i != abomnationGUID.end(); ++i)
|
||||
{
|
||||
if (Creature* pAbom = instance->GetCreature(*i))
|
||||
if (!pAbom->IsAlive())
|
||||
@@ -418,7 +405,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const override
|
||||
ObjectGuid GetGuidData(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -427,7 +414,7 @@ class instance_stratholme : public InstanceMapScript
|
||||
case DATA_YSIDA_TRIGGER:
|
||||
return ysidaTriggerGUID;
|
||||
}
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void Update(uint32 diff) override
|
||||
|
||||
@@ -117,12 +117,12 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Tagger = 0;
|
||||
Tagger.Clear();
|
||||
Die_Timer = 5000;
|
||||
Tagged = false;
|
||||
}
|
||||
|
||||
uint64 Tagger;
|
||||
ObjectGuid Tagger;
|
||||
uint32 Die_Timer;
|
||||
bool Tagged;
|
||||
|
||||
|
||||
@@ -63,13 +63,13 @@ public:
|
||||
SetHeaders(DataHeader);
|
||||
}
|
||||
|
||||
uint64 GOAtalaiStatue1;
|
||||
uint64 GOAtalaiStatue2;
|
||||
uint64 GOAtalaiStatue3;
|
||||
uint64 GOAtalaiStatue4;
|
||||
uint64 GOAtalaiStatue5;
|
||||
uint64 GOAtalaiStatue6;
|
||||
uint64 GOAtalaiIdol;
|
||||
ObjectGuid GOAtalaiStatue1;
|
||||
ObjectGuid GOAtalaiStatue2;
|
||||
ObjectGuid GOAtalaiStatue3;
|
||||
ObjectGuid GOAtalaiStatue4;
|
||||
ObjectGuid GOAtalaiStatue5;
|
||||
ObjectGuid GOAtalaiStatue6;
|
||||
ObjectGuid GOAtalaiIdol;
|
||||
|
||||
uint32 State;
|
||||
|
||||
@@ -82,13 +82,6 @@ public:
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
GOAtalaiStatue1 = 0;
|
||||
GOAtalaiStatue2 = 0;
|
||||
GOAtalaiStatue3 = 0;
|
||||
GOAtalaiStatue4 = 0;
|
||||
GOAtalaiStatue5 = 0;
|
||||
GOAtalaiStatue6 = 0;
|
||||
GOAtalaiIdol = 0;
|
||||
|
||||
State = 0;
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
if (!Intro || IsIntro)
|
||||
return;
|
||||
|
||||
if (Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MADRIGOSA)))
|
||||
if (Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MADRIGOSA)))
|
||||
{
|
||||
Madrigosa->Respawn();
|
||||
Madrigosa->setActive(true);
|
||||
@@ -182,7 +182,7 @@ public:
|
||||
|
||||
void DoIntro()
|
||||
{
|
||||
Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MADRIGOSA));
|
||||
Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MADRIGOSA));
|
||||
if (!Madrigosa)
|
||||
return;
|
||||
|
||||
@@ -285,7 +285,7 @@ public:
|
||||
{
|
||||
if (IntroFrostBoltTimer <= diff)
|
||||
{
|
||||
if (Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MADRIGOSA)))
|
||||
if (Creature* Madrigosa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MADRIGOSA)))
|
||||
{
|
||||
Madrigosa->CastSpell(me, SPELL_INTRO_FROSTBOLT, true);
|
||||
IntroFrostBoltTimer = 2000;
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
{
|
||||
Enraged = false;
|
||||
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ALYTHESS)))
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_ALYTHESS)))
|
||||
{
|
||||
if (temp->isDead())
|
||||
temp->Respawn();
|
||||
@@ -134,7 +134,7 @@ public:
|
||||
{
|
||||
DoZoneInCombat();
|
||||
|
||||
Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ALYTHESS));
|
||||
Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_ALYTHESS));
|
||||
if (temp && temp->IsAlive() && !temp->GetVictim())
|
||||
temp->AI()->AttackStart(who);
|
||||
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
{
|
||||
if (!SisterDeath)
|
||||
{
|
||||
Unit* Temp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_ALYTHESS));
|
||||
Unit* Temp = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_ALYTHESS));
|
||||
if (Temp && Temp->isDead())
|
||||
{
|
||||
Talk(YELL_SISTER_ALYTHESS_DEAD);
|
||||
@@ -366,7 +366,7 @@ public:
|
||||
{
|
||||
Enraged = false;
|
||||
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH)))
|
||||
if (Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SACROLASH)))
|
||||
{
|
||||
if (temp->isDead())
|
||||
temp->Respawn();
|
||||
@@ -386,7 +386,7 @@ public:
|
||||
{
|
||||
DoZoneInCombat();
|
||||
|
||||
Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
|
||||
Creature* temp = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SACROLASH));
|
||||
if (temp && temp->IsAlive() && !temp->GetVictim())
|
||||
temp->AI()->AttackStart(who);
|
||||
|
||||
@@ -486,7 +486,7 @@ public:
|
||||
|
||||
uint32 IntroStep(uint32 step)
|
||||
{
|
||||
Creature* Sacrolash = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
|
||||
Creature* Sacrolash = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SACROLASH));
|
||||
switch (step)
|
||||
{
|
||||
case 0:
|
||||
@@ -535,7 +535,7 @@ public:
|
||||
|
||||
if (!SisterDeath)
|
||||
{
|
||||
Unit* Temp = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_SACROLASH));
|
||||
Unit* Temp = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_SACROLASH));
|
||||
if (Temp && Temp->isDead())
|
||||
{
|
||||
Talk(YELL_SISTER_SACROLASH_DEAD);
|
||||
@@ -546,7 +546,7 @@ public:
|
||||
}
|
||||
if (!me->GetVictim())
|
||||
{
|
||||
Creature* sisiter = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_SACROLASH));
|
||||
Creature* sisiter = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_SACROLASH));
|
||||
if (sisiter && !sisiter->isDead() && sisiter->GetVictim())
|
||||
{
|
||||
me->AddThreat(sisiter->GetVictim(), 0.0f);
|
||||
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
|
||||
target = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_PLAYER_GUID));
|
||||
|
||||
if (!target)
|
||||
{
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
|
||||
target = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_PLAYER_GUID));
|
||||
|
||||
if (!target)
|
||||
{
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
{
|
||||
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 150, true);
|
||||
if (!target)
|
||||
target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
|
||||
target = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_PLAYER_GUID));
|
||||
|
||||
if (!target)
|
||||
{
|
||||
|
||||
@@ -115,7 +115,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
SathGUID = 0;
|
||||
SathGUID.Clear();
|
||||
ArcaneBuffetTimer = 8000;
|
||||
FrostBreathTimer = 15000;
|
||||
WildMagicTimer = 10000;
|
||||
@@ -148,11 +148,11 @@ public:
|
||||
bool isBanished;
|
||||
bool bJustReset;
|
||||
|
||||
uint64 SathGUID;
|
||||
ObjectGuid SathGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
SathGUID = instance->GetData64(DATA_SATHROVARR);
|
||||
SathGUID = instance->GetGuidData(DATA_SATHROVARR);
|
||||
instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
|
||||
|
||||
if (Creature* Sath = ObjectAccessor::GetCreature(*me, SathGUID))
|
||||
@@ -456,7 +456,7 @@ public:
|
||||
uint32 YellTimer;
|
||||
uint32 YellSequence;
|
||||
|
||||
uint64 SathGUID;
|
||||
ObjectGuid SathGUID;
|
||||
|
||||
bool isEnraged; // if demon is enraged
|
||||
|
||||
@@ -464,7 +464,6 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
SathGUID = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -479,7 +478,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
SathGUID = instance->GetData64(DATA_SATHROVARR);
|
||||
SathGUID = instance->GetGuidData(DATA_SATHROVARR);
|
||||
|
||||
Initialize();
|
||||
}
|
||||
@@ -593,8 +592,6 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
KalecGUID = 0;
|
||||
KalecgosGUID = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -616,8 +613,8 @@ public:
|
||||
uint32 CheckTimer;
|
||||
uint32 ResetThreat;
|
||||
|
||||
uint64 KalecGUID;
|
||||
uint64 KalecgosGUID;
|
||||
ObjectGuid KalecGUID;
|
||||
ObjectGuid KalecgosGUID;
|
||||
|
||||
bool isEnraged;
|
||||
bool isBanished;
|
||||
@@ -626,13 +623,13 @@ public:
|
||||
{
|
||||
me->SetFullHealth();//dunno why it does not resets health at evade..
|
||||
me->setActive(true);
|
||||
KalecgosGUID = instance->GetData64(DATA_KALECGOS_DRAGON);
|
||||
KalecgosGUID = instance->GetGuidData(DATA_KALECGOS_DRAGON);
|
||||
instance->SetBossState(DATA_KALECGOS, NOT_STARTED);
|
||||
if (KalecGUID)
|
||||
{
|
||||
if (Creature* Kalec = ObjectAccessor::GetCreature(*me, KalecGUID))
|
||||
Kalec->setDeathState(JUST_DIED);
|
||||
KalecGUID = 0;
|
||||
KalecGUID.Clear();
|
||||
}
|
||||
|
||||
Initialize();
|
||||
|
||||
@@ -274,13 +274,13 @@ public:
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1));
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_1));
|
||||
case 1:
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2));
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_2));
|
||||
case 2:
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3));
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_3));
|
||||
case 3:
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4));
|
||||
return ObjectAccessor::GetGameObject(*me, instance->GetGuidData(DATA_ORB_OF_THE_BLUE_DRAGONFLIGHT_4));
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
player->CastSpell(player, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, false);
|
||||
go->SetUInt32Value(GAMEOBJECT_FACTION, 0);
|
||||
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*player, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*player, instance->GetGuidData(DATA_KALECGOS_KJ)))
|
||||
ENSURE_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->SetRingOfBlueFlames();
|
||||
|
||||
go->Refresh();
|
||||
@@ -437,7 +437,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
if (Creature* pKalecKJ = ObjectAccessor::GetCreature((*me), instance->GetGuidData(DATA_KALECGOS_KJ)))
|
||||
ENSURE_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalecKJ->AI())->ResetOrbs();
|
||||
summons.DespawnAll();
|
||||
}
|
||||
@@ -571,7 +571,7 @@ public:
|
||||
{
|
||||
Initialize();
|
||||
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_KALECGOS_KJ)))
|
||||
pKalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
|
||||
|
||||
me->SetFloatValue(UNIT_FIELD_COMBATREACH, 12);
|
||||
@@ -631,7 +631,7 @@ public:
|
||||
summons.DespawnAll();
|
||||
|
||||
// Reset the controller
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_KILJAEDEN_CONTROLLER)))
|
||||
ENSURE_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->Reset();
|
||||
}
|
||||
|
||||
@@ -713,10 +713,10 @@ public:
|
||||
if (Speeches[speechCount].timer < SpeechTimer)
|
||||
{
|
||||
SpeechTimer = 0;
|
||||
if (Creature* speechCreature = ObjectAccessor::GetCreature(*me, instance->GetData64(Speeches[speechCount].creature)))
|
||||
if (Creature* speechCreature = ObjectAccessor::GetCreature(*me, instance->GetGuidData(Speeches[speechCount].creature)))
|
||||
speechCreature->AI()->Talk(Speeches[speechCount].textid);
|
||||
if (speechCount == 12)
|
||||
if (Creature* pAnveena = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ANVEENA)))
|
||||
if (Creature* pAnveena = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_ANVEENA)))
|
||||
pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false);
|
||||
// ChangeTimers(true, 10000); // Kil should do an emote while screaming without attacking for 10 seconds
|
||||
if (speechCount == speechPhaseEnd)
|
||||
@@ -742,7 +742,7 @@ public:
|
||||
for (uint8 z = 0; z < 6; ++z)
|
||||
{
|
||||
pRandomPlayer = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!pRandomPlayer || !pRandomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0))
|
||||
if (!pRandomPlayer || !pRandomPlayer->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -815,7 +815,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case TIMER_ORBS_EMPOWER: //Phase 3
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KALECGOS_KJ)))
|
||||
if (Creature* pKalec = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_KALECGOS_KJ)))
|
||||
{
|
||||
switch (Phase)
|
||||
{
|
||||
@@ -835,7 +835,7 @@ public:
|
||||
for (uint8 z = 0; z < 6; ++z)
|
||||
{
|
||||
target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
|
||||
if (!target || !target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, 0)) break;
|
||||
if (!target || !target->HasAura(SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT)) break;
|
||||
}
|
||||
if (target)
|
||||
{
|
||||
@@ -941,7 +941,7 @@ public:
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
instance->SetBossState(DATA_KILJAEDEN, IN_PROGRESS);
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_KILJAEDEN_CONTROLLER)))
|
||||
pControl->AddThreat(who, 1.0f);
|
||||
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
@@ -949,7 +949,7 @@ public:
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_KILJAEDEN_CONTROLLER)))
|
||||
if (Creature* pControl = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_KILJAEDEN_CONTROLLER)))
|
||||
++(ENSURE_AI(npc_kiljaeden_controller::npc_kiljaeden_controllerAI, pControl->AI())->deceiverDeathCount);
|
||||
}
|
||||
|
||||
@@ -962,7 +962,7 @@ public:
|
||||
return;
|
||||
|
||||
// Gain Shadow Infusion at 20% health
|
||||
if (HealthBelowPct(20) && !me->HasAura(SPELL_SHADOW_INFUSION, 0))
|
||||
if (HealthBelowPct(20) && !me->HasAura(SPELL_SHADOW_INFUSION))
|
||||
DoCast(me, SPELL_SHADOW_INFUSION, true);
|
||||
|
||||
// Shadow Bolt Volley - Shoots Shadow Bolts at all enemies within 30 yards, for ~2k Shadow damage.
|
||||
@@ -1260,7 +1260,7 @@ public:
|
||||
|
||||
if (uiTimer <= diff)
|
||||
{
|
||||
if (Unit* random = ObjectAccessor::GetPlayer(*me, instance->GetData64(DATA_PLAYER_GUID)))
|
||||
if (Unit* random = ObjectAccessor::GetPlayer(*me, instance->GetGuidData(DATA_PLAYER_GUID)))
|
||||
DoCast(random, SPELL_SHADOW_BOLT, false);
|
||||
uiTimer = urand(500, 1000);
|
||||
} else uiTimer -= diff;
|
||||
|
||||
@@ -153,7 +153,7 @@ public:
|
||||
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
if (Creature* muru = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_MURU)))
|
||||
if (Creature* muru = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_MURU)))
|
||||
muru->AI()->Reset(); // Reset encounter.
|
||||
me->DisappearAndDie();
|
||||
summons.DespawnAll();
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
{
|
||||
DarkFiend = false;
|
||||
HasEnraged = false;
|
||||
EntropiusGUID = 0;
|
||||
EntropiusGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -278,7 +278,7 @@ public:
|
||||
private:
|
||||
bool DarkFiend;
|
||||
bool HasEnraged;
|
||||
uint64 EntropiusGUID;
|
||||
ObjectGuid EntropiusGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -334,7 +334,7 @@ public:
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*me, instance->GetData64(DATA_PLAYER_GUID)))
|
||||
if (Player* target = ObjectAccessor::GetPlayer(*me, instance->GetGuidData(DATA_PLAYER_GUID)))
|
||||
summoned->AI()->AttackStart(target);
|
||||
|
||||
Summons.Summon(summoned);
|
||||
@@ -555,7 +555,7 @@ public:
|
||||
{
|
||||
if (SpellTimer <= diff)
|
||||
{
|
||||
Unit* Victim = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_PLAYER_GUID));
|
||||
Unit* Victim = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_PLAYER_GUID));
|
||||
switch (NeedForAHack)
|
||||
{
|
||||
case 0:
|
||||
@@ -574,7 +574,7 @@ public:
|
||||
case 2:
|
||||
SpellTimer = 400;
|
||||
NeedForAHack = 3;
|
||||
me->RemoveAura(SPELL_BLACKHOLE_GROW, 1);
|
||||
me->RemoveAura(SPELL_BLACKHOLE_GROW);
|
||||
break;
|
||||
case 3:
|
||||
SpellTimer = urand(400, 900);
|
||||
|
||||
@@ -53,21 +53,7 @@ class instance_sunwell_plateau : public InstanceMapScript
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
|
||||
KalecgosDragonGUID = 0;
|
||||
KalecgosHumanGUID = 0;
|
||||
SathrovarrGUID = 0;
|
||||
BrutallusGUID = 0;
|
||||
MadrigosaGUID = 0;
|
||||
FelmystGUID = 0;
|
||||
AlythessGUID = 0;
|
||||
SacrolashGUID = 0;
|
||||
MuruGUID = 0;
|
||||
KilJaedenGUID = 0;
|
||||
KilJaedenControllerGUID = 0;
|
||||
AnveenaGUID = 0;
|
||||
KalecgosKjGUID = 0;
|
||||
SpectralPlayers = 0;
|
||||
|
||||
SpectralRealmTimer = 5000;
|
||||
}
|
||||
|
||||
@@ -80,7 +66,7 @@ class instance_sunwell_plateau : public InstanceMapScript
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
{
|
||||
Player* player = itr->GetSource();
|
||||
if (player && !player->HasAura(45839, 0))
|
||||
if (player && !player->HasAura(45839))
|
||||
return player;
|
||||
}
|
||||
}
|
||||
@@ -172,7 +158,7 @@ class instance_sunwell_plateau : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 id) const override
|
||||
ObjectGuid GetGuidData(uint32 id) const override
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
@@ -205,32 +191,32 @@ class instance_sunwell_plateau : public InstanceMapScript
|
||||
case DATA_PLAYER_GUID:
|
||||
{
|
||||
Player const* target = GetPlayerInMap();
|
||||
return target ? target->GetGUID() : 0;
|
||||
return target ? target->GetGUID() : ObjectGuid::Empty;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 KalecgosDragonGUID;
|
||||
uint64 KalecgosHumanGUID;
|
||||
uint64 SathrovarrGUID;
|
||||
uint64 BrutallusGUID;
|
||||
uint64 MadrigosaGUID;
|
||||
uint64 FelmystGUID;
|
||||
uint64 AlythessGUID;
|
||||
uint64 SacrolashGUID;
|
||||
uint64 MuruGUID;
|
||||
uint64 KilJaedenGUID;
|
||||
uint64 KilJaedenControllerGUID;
|
||||
uint64 AnveenaGUID;
|
||||
uint64 KalecgosKjGUID;
|
||||
ObjectGuid KalecgosDragonGUID;
|
||||
ObjectGuid KalecgosHumanGUID;
|
||||
ObjectGuid SathrovarrGUID;
|
||||
ObjectGuid BrutallusGUID;
|
||||
ObjectGuid MadrigosaGUID;
|
||||
ObjectGuid FelmystGUID;
|
||||
ObjectGuid AlythessGUID;
|
||||
ObjectGuid SacrolashGUID;
|
||||
ObjectGuid MuruGUID;
|
||||
ObjectGuid KilJaedenGUID;
|
||||
ObjectGuid KilJaedenControllerGUID;
|
||||
ObjectGuid AnveenaGUID;
|
||||
ObjectGuid KalecgosKjGUID;
|
||||
uint32 SpectralPlayers;
|
||||
|
||||
uint32 SpectralRealmTimer;
|
||||
std::vector<uint64> SpectralRealmList;
|
||||
GuidVector SpectralRealmList;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -98,7 +98,7 @@ class boss_archaedas : public CreatureScript
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
}
|
||||
|
||||
void ActivateMinion(uint64 uiGuid, bool flag)
|
||||
void ActivateMinion(ObjectGuid uiGuid, bool flag)
|
||||
{
|
||||
Unit* minion = ObjectAccessor::GetUnit(*me, uiGuid);
|
||||
|
||||
@@ -145,7 +145,7 @@ class boss_archaedas : public CreatureScript
|
||||
} else if (bWakingUp && iAwakenTimer <= 0)
|
||||
{
|
||||
bWakingUp = false;
|
||||
AttackStart(ObjectAccessor::GetUnit(*me, instance->GetData64(0)));
|
||||
AttackStart(ObjectAccessor::GetUnit(*me, instance->GetGuidData(0)));
|
||||
return; // dont want to continue until we finish the AttackStart method
|
||||
}
|
||||
|
||||
@@ -164,12 +164,12 @@ class boss_archaedas : public CreatureScript
|
||||
//If we are <66 summon the guardians
|
||||
if (!bGuardiansAwake && !HealthAbovePct(66))
|
||||
{
|
||||
ActivateMinion(instance->GetData64(5), true); // EarthenGuardian1
|
||||
ActivateMinion(instance->GetData64(6), true); // EarthenGuardian2
|
||||
ActivateMinion(instance->GetData64(7), true); // EarthenGuardian3
|
||||
ActivateMinion(instance->GetData64(8), true); // EarthenGuardian4
|
||||
ActivateMinion(instance->GetData64(9), true); // EarthenGuardian5
|
||||
ActivateMinion(instance->GetData64(10), false); // EarthenGuardian6
|
||||
ActivateMinion(instance->GetGuidData(5), true); // EarthenGuardian1
|
||||
ActivateMinion(instance->GetGuidData(6), true); // EarthenGuardian2
|
||||
ActivateMinion(instance->GetGuidData(7), true); // EarthenGuardian3
|
||||
ActivateMinion(instance->GetGuidData(8), true); // EarthenGuardian4
|
||||
ActivateMinion(instance->GetGuidData(9), true); // EarthenGuardian5
|
||||
ActivateMinion(instance->GetGuidData(10), false); // EarthenGuardian6
|
||||
Talk(SAY_SUMMON_GUARDIANS);
|
||||
bGuardiansAwake = true;
|
||||
}
|
||||
@@ -177,10 +177,10 @@ class boss_archaedas : public CreatureScript
|
||||
//If we are <33 summon the vault walkers
|
||||
if (!bVaultWalkersAwake && !HealthAbovePct(33))
|
||||
{
|
||||
ActivateMinion(instance->GetData64(1), true); // VaultWalker1
|
||||
ActivateMinion(instance->GetData64(2), true); // VaultWalker2
|
||||
ActivateMinion(instance->GetData64(3), true); // VaultWalker3
|
||||
ActivateMinion(instance->GetData64(4), false); // VaultWalker4
|
||||
ActivateMinion(instance->GetGuidData(1), true); // VaultWalker1
|
||||
ActivateMinion(instance->GetGuidData(2), true); // VaultWalker2
|
||||
ActivateMinion(instance->GetGuidData(3), true); // VaultWalker3
|
||||
ActivateMinion(instance->GetGuidData(4), false); // VaultWalker4
|
||||
Talk(SAY_SUMMON_VAULT_WALKERS);
|
||||
bVaultWalkersAwake = true;
|
||||
}
|
||||
@@ -297,7 +297,7 @@ class npc_archaedas_minions : public CreatureScript
|
||||
{
|
||||
bWakingUp = false;
|
||||
bAmIAwake = true;
|
||||
// AttackStart(ObjectAccessor::GetUnit(*me, instance->GetData64(0))); // whoWokeArchaedasGUID
|
||||
// AttackStart(ObjectAccessor::GetUnit(*me, instance->GetGuidData(0))); // whoWokeArchaedasGUID
|
||||
return; // dont want to continue until we finish the AttackStart method
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@ class go_altar_of_archaedas : public GameObjectScript
|
||||
|
||||
player->CastSpell (player, SPELL_BOSS_OBJECT_VISUAL, false);
|
||||
|
||||
instance->SetData64(0, player->GetGUID()); // activate archaedas
|
||||
instance->SetGuidData(0, player->GetGUID()); // activate archaedas
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -52,18 +52,6 @@ class instance_uldaman : public InstanceMapScript
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
archaedasGUID = 0;
|
||||
ironayaGUID = 0;
|
||||
whoWokeuiArchaedasGUID = 0;
|
||||
|
||||
altarOfTheKeeperTempleDoor = 0;
|
||||
archaedasTempleDoor = 0;
|
||||
ancientVaultDoor = 0;
|
||||
|
||||
ironayaSealDoor = 0;
|
||||
|
||||
keystoneGUID = 0;
|
||||
|
||||
ironayaSealDoorTimer = 27000; //animation time
|
||||
keystoneCheck = false;
|
||||
}
|
||||
@@ -77,25 +65,25 @@ class instance_uldaman : public InstanceMapScript
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64 archaedasGUID;
|
||||
uint64 ironayaGUID;
|
||||
uint64 whoWokeuiArchaedasGUID;
|
||||
ObjectGuid archaedasGUID;
|
||||
ObjectGuid ironayaGUID;
|
||||
ObjectGuid whoWokeuiArchaedasGUID;
|
||||
|
||||
uint64 altarOfTheKeeperTempleDoor;
|
||||
uint64 archaedasTempleDoor;
|
||||
uint64 ancientVaultDoor;
|
||||
uint64 ironayaSealDoor;
|
||||
ObjectGuid altarOfTheKeeperTempleDoor;
|
||||
ObjectGuid archaedasTempleDoor;
|
||||
ObjectGuid ancientVaultDoor;
|
||||
ObjectGuid ironayaSealDoor;
|
||||
|
||||
uint64 keystoneGUID;
|
||||
ObjectGuid keystoneGUID;
|
||||
|
||||
uint32 ironayaSealDoorTimer;
|
||||
bool keystoneCheck;
|
||||
|
||||
std::vector<uint64> stoneKeepers;
|
||||
std::vector<uint64> altarOfTheKeeperCounts;
|
||||
std::vector<uint64> vaultWalkers;
|
||||
std::vector<uint64> earthenGuardians;
|
||||
std::vector<uint64> archaedasWallMinions; // minions lined up around the wall
|
||||
GuidVector stoneKeepers;
|
||||
GuidVector altarOfTheKeeperCounts;
|
||||
GuidVector vaultWalkers;
|
||||
GuidVector earthenGuardians;
|
||||
GuidVector archaedasWallMinions; // minions lined up around the wall
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
@@ -108,14 +96,14 @@ class instance_uldaman : public InstanceMapScript
|
||||
altarOfTheKeeperTempleDoor = go->GetGUID();
|
||||
|
||||
if (m_auiEncounter[0] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
|
||||
case GO_ARCHAEDAS_TEMPLE_DOOR:
|
||||
archaedasTempleDoor = go->GetGUID();
|
||||
|
||||
if (m_auiEncounter[0] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
|
||||
case GO_ANCIENT_VAULT_DOOR:
|
||||
@@ -124,14 +112,14 @@ class instance_uldaman : public InstanceMapScript
|
||||
ancientVaultDoor = go->GetGUID();
|
||||
|
||||
if (m_auiEncounter[1] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
|
||||
case GO_IRONAYA_SEAL_DOOR:
|
||||
ironayaSealDoor = go->GetGUID();
|
||||
|
||||
if (m_auiEncounter[2] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
break;
|
||||
|
||||
case GO_KEYSTONE:
|
||||
@@ -139,7 +127,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
|
||||
if (m_auiEncounter[2] == DONE)
|
||||
{
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
go->SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND);
|
||||
}
|
||||
break;
|
||||
@@ -155,7 +143,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);
|
||||
}
|
||||
|
||||
void SetDoor(uint64 guid, bool open)
|
||||
void SetDoor(ObjectGuid guid, bool open)
|
||||
{
|
||||
GameObject* go = instance->GetGameObject(guid);
|
||||
if (!go)
|
||||
@@ -164,7 +152,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
HandleGameObject(guid, open);
|
||||
}
|
||||
|
||||
void BlockGO(uint64 guid)
|
||||
void BlockGO(ObjectGuid guid)
|
||||
{
|
||||
GameObject* go = instance->GetGameObject(guid);
|
||||
if (!go)
|
||||
@@ -177,7 +165,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
{
|
||||
if (GetData(DATA_ALTAR_DOORS) != DONE)
|
||||
{
|
||||
for (std::vector<uint64>::const_iterator i = stoneKeepers.begin(); i != stoneKeepers.end(); ++i)
|
||||
for (GuidVector::const_iterator i = stoneKeepers.begin(); i != stoneKeepers.end(); ++i)
|
||||
{
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || !target->IsAlive())
|
||||
@@ -199,7 +187,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
if (!archaedas)
|
||||
return;
|
||||
|
||||
for (std::vector<uint64>::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
|
||||
for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
|
||||
{
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || !target->IsAlive() || target->getFaction() == 14)
|
||||
@@ -217,7 +205,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
void DeActivateMinions()
|
||||
{
|
||||
// first despawn any aggroed wall minions
|
||||
for (std::vector<uint64>::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
|
||||
for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
|
||||
{
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || target->isDead() || target->getFaction() != 14)
|
||||
@@ -227,7 +215,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
|
||||
// Vault Walkers
|
||||
for (std::vector<uint64>::const_iterator i = vaultWalkers.begin(); i != vaultWalkers.end(); ++i)
|
||||
for (GuidVector::const_iterator i = vaultWalkers.begin(); i != vaultWalkers.end(); ++i)
|
||||
{
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || target->isDead() || target->getFaction() != 14)
|
||||
@@ -237,7 +225,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
|
||||
// Earthen Guardians
|
||||
for (std::vector<uint64>::const_iterator i = earthenGuardians.begin(); i != earthenGuardians.end(); ++i)
|
||||
for (GuidVector::const_iterator i = earthenGuardians.begin(); i != earthenGuardians.end(); ++i)
|
||||
{
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (!target || target->isDead() || target->getFaction() != 14)
|
||||
@@ -247,7 +235,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void ActivateArchaedas(uint64 target)
|
||||
void ActivateArchaedas(ObjectGuid target)
|
||||
{
|
||||
Creature* archaedas = instance->GetCreature(archaedasGUID);
|
||||
if (!archaedas)
|
||||
@@ -274,7 +262,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
void RespawnMinions()
|
||||
{
|
||||
// first respawn any aggroed wall minions
|
||||
for (std::vector<uint64>::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
|
||||
for (GuidVector::const_iterator i = archaedasWallMinions.begin(); i != archaedasWallMinions.end(); ++i)
|
||||
{
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (target && target->isDead())
|
||||
@@ -286,7 +274,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
|
||||
// Vault Walkers
|
||||
for (std::vector<uint64>::const_iterator i = vaultWalkers.begin(); i != vaultWalkers.end(); ++i)
|
||||
for (GuidVector::const_iterator i = vaultWalkers.begin(); i != vaultWalkers.end(); ++i)
|
||||
{
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (target && target->isDead())
|
||||
@@ -298,7 +286,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
|
||||
// Earthen Guardians
|
||||
for (std::vector<uint64>::const_iterator i = earthenGuardians.begin(); i != earthenGuardians.end(); ++i)
|
||||
for (GuidVector::const_iterator i = earthenGuardians.begin(); i != earthenGuardians.end(); ++i)
|
||||
{
|
||||
Creature* target = instance->GetCreature(*i);
|
||||
if (target && target->isDead())
|
||||
@@ -394,7 +382,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
void SetData64(uint32 type, uint64 data) override
|
||||
void SetGuidData(uint32 type, ObjectGuid data) override
|
||||
{
|
||||
// Archaedas
|
||||
if (type == 0)
|
||||
@@ -470,7 +458,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 identifier) const override
|
||||
ObjectGuid GetGuidData(uint32 identifier) const override
|
||||
{
|
||||
switch (identifier)
|
||||
{
|
||||
@@ -492,8 +480,8 @@ class instance_uldaman : public InstanceMapScript
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
} // end GetData64
|
||||
return ObjectGuid::Empty;
|
||||
} // end GetGuidData
|
||||
|
||||
void ProcessEvent(WorldObject* /*gameObject*/, uint32 eventId) override
|
||||
{
|
||||
|
||||
@@ -32,14 +32,6 @@ class instance_zulaman : public InstanceMapScript
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
|
||||
AkilzonGUID = 0;
|
||||
NalorakkGUID = 0;
|
||||
JanalaiGUID = 0;
|
||||
HalazziGUID = 0;
|
||||
HexLordMalacrassGUID = 0;
|
||||
DaakaraGUID = 0;
|
||||
VoljinGUID = 0;
|
||||
HexLordTriggerGUID = 0;
|
||||
SpeedRunTimer = 16;
|
||||
ZulAmanState = NOT_STARTED;
|
||||
ZulAmanBossCount = 0;
|
||||
@@ -114,7 +106,7 @@ class instance_zulaman : public InstanceMapScript
|
||||
}
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -140,7 +132,7 @@ class instance_zulaman : public InstanceMapScript
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) override
|
||||
@@ -290,16 +282,16 @@ class instance_zulaman : public InstanceMapScript
|
||||
|
||||
protected:
|
||||
EventMap events;
|
||||
uint64 AkilzonGUID;
|
||||
uint64 NalorakkGUID;
|
||||
uint64 JanalaiGUID;
|
||||
uint64 HalazziGUID;
|
||||
uint64 HexLordMalacrassGUID;
|
||||
uint64 DaakaraGUID;
|
||||
uint64 VoljinGUID;
|
||||
uint64 HexLordTriggerGUID;
|
||||
uint64 StrangeGongGUID;
|
||||
uint64 MasiveGateGUID;
|
||||
ObjectGuid AkilzonGUID;
|
||||
ObjectGuid NalorakkGUID;
|
||||
ObjectGuid JanalaiGUID;
|
||||
ObjectGuid HalazziGUID;
|
||||
ObjectGuid HexLordMalacrassGUID;
|
||||
ObjectGuid DaakaraGUID;
|
||||
ObjectGuid VoljinGUID;
|
||||
ObjectGuid HexLordTriggerGUID;
|
||||
ObjectGuid StrangeGongGUID;
|
||||
ObjectGuid MasiveGateGUID;
|
||||
uint32 SpeedRunTimer;
|
||||
uint32 ZulAmanState;
|
||||
uint32 ZulAmanBossCount;
|
||||
|
||||
@@ -143,7 +143,7 @@ class npc_voljin_zulaman : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_BANGING_THE_GONG, 3000);
|
||||
case EVENT_BANGING_THE_GONG:
|
||||
DoCast(me, SPELL_BANGING_THE_GONG);
|
||||
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_STRANGE_GONG)))
|
||||
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(DATA_STRANGE_GONG)))
|
||||
strangeGong->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, uint32(ITEM_VIRTUAL_ITEM));
|
||||
break;
|
||||
@@ -153,7 +153,7 @@ class npc_voljin_zulaman : public CreatureScript
|
||||
break;
|
||||
case EVENT_START_DOOR_OPENING_2:
|
||||
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID, uint32(0));
|
||||
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_STRANGE_GONG)))
|
||||
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(DATA_STRANGE_GONG)))
|
||||
strangeGong->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
|
||||
_events.ScheduleEvent(EVENT_START_DOOR_OPENING_3, 500);
|
||||
break;
|
||||
@@ -162,7 +162,7 @@ class npc_voljin_zulaman : public CreatureScript
|
||||
break;
|
||||
case EVENT_START_DOOR_OPENING_4:
|
||||
_instance->SetData(DATA_ZULAMAN_STATE, IN_PROGRESS);
|
||||
if (GameObject* masiveGate = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_MASSIVE_GATE)))
|
||||
if (GameObject* masiveGate = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(DATA_MASSIVE_GATE)))
|
||||
masiveGate->SetGoState(GO_STATE_ACTIVE);
|
||||
_events.ScheduleEvent(EVENT_START_DOOR_OPENING_5, 3000);
|
||||
break;
|
||||
@@ -174,7 +174,7 @@ class npc_voljin_zulaman : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_START_DOOR_OPENING_7, 6000);
|
||||
break;
|
||||
case EVENT_START_DOOR_OPENING_7:
|
||||
if (Creature* hexLordTrigger = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_HEXLORD_TRIGGER)))
|
||||
if (Creature* hexLordTrigger = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_HEXLORD_TRIGGER)))
|
||||
sCreatureTextMgr->SendChat(hexLordTrigger, SAY_HEXLOR_INTRO, 0, CHAT_MSG_ADDON, LANG_ADDON, TEXT_RANGE_MAP);
|
||||
break;
|
||||
default:
|
||||
@@ -191,7 +191,7 @@ class npc_voljin_zulaman : public CreatureScript
|
||||
switch (pointId)
|
||||
{
|
||||
case POINT_STRANGE_GONG:
|
||||
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetData64(DATA_STRANGE_GONG)))
|
||||
if (GameObject* strangeGong = ObjectAccessor::GetGameObject(*me, _instance->GetGuidData(DATA_STRANGE_GONG)))
|
||||
me->SetFacingToObject(strangeGong); // setInFront
|
||||
break;
|
||||
case POINT_START_DOOR_OPENING_1:
|
||||
|
||||
@@ -118,7 +118,7 @@ class boss_mandokir : public CreatureScript
|
||||
me->SummonCreatureGroup(SUMMON_GROUP_CHAINED_SPIRIT);
|
||||
_ohganotSoFast = true;
|
||||
_reanimateOhganCooldown = false;
|
||||
_reviveGUID = 0;
|
||||
_reviveGUID.Clear();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
@@ -130,7 +130,7 @@ class boss_mandokir : public CreatureScript
|
||||
|
||||
if (!summons.empty())
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
for (SummonList::const_iterator itr = summons.begin(); itr != summons.end(); ++itr)
|
||||
{
|
||||
if (Creature* chainedSpirit = ObjectAccessor::GetCreature(*me, *itr))
|
||||
if (chainedSpirit->GetEntry() == NPC_CHAINED_SPIRIT && chainedSpirit->AI())
|
||||
@@ -196,7 +196,7 @@ class boss_mandokir : public CreatureScript
|
||||
{
|
||||
chainedSpirit->AI()->SetGUID(_reviveGUID);
|
||||
chainedSpirit->AI()->DoAction(ACTION_REVIVE);
|
||||
_reviveGUID = 0;
|
||||
_reviveGUID.Clear();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -215,7 +215,7 @@ class boss_mandokir : public CreatureScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SetGUID(uint64 guid, int32 /*type = 0 */) override
|
||||
void SetGUID(ObjectGuid guid, int32 /*type = 0 */) override
|
||||
{
|
||||
_reviveGUID = guid;
|
||||
}
|
||||
@@ -280,7 +280,7 @@ class boss_mandokir : public CreatureScript
|
||||
private:
|
||||
bool _ohganotSoFast;
|
||||
bool _reanimateOhganCooldown;
|
||||
uint64 _reviveGUID;
|
||||
ObjectGuid _reviveGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
@@ -309,15 +309,15 @@ class npc_ohgan : public CreatureScript
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
{
|
||||
damage = 0;
|
||||
me->AttackStop();
|
||||
me->SetHealth(0);
|
||||
me->SetTarget(0);
|
||||
me->SetTarget(ObjectGuid::Empty);
|
||||
DoCast(me, SPELL_CLEAR_ALL, true);
|
||||
DoCast(me, SPELL_PERMANENT_FEIGN_DEATH);
|
||||
|
||||
if (Creature* mandokir = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_MANDOKIR)))
|
||||
if (Creature* mandokir = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_MANDOKIR)))
|
||||
mandokir->AI()->DoAction(ACTION_OHGAN_IS_DEATH);
|
||||
}
|
||||
}
|
||||
@@ -365,10 +365,10 @@ class npc_chained_spirit : public CreatureScript
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_revivePlayerGUID = 0;
|
||||
_revivePlayerGUID.Clear();
|
||||
}
|
||||
|
||||
void SetGUID(uint64 guid, int32 /*type = 0 */) override
|
||||
void SetGUID(ObjectGuid guid, int32 /*type = 0 */) override
|
||||
{
|
||||
_revivePlayerGUID = guid;
|
||||
}
|
||||
@@ -406,7 +406,7 @@ class npc_chained_spirit : public CreatureScript
|
||||
if (!target || target->IsAlive())
|
||||
return;
|
||||
|
||||
if (Creature* mandokir = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_MANDOKIR)))
|
||||
if (Creature* mandokir = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_MANDOKIR)))
|
||||
{
|
||||
mandokir->GetAI()->SetGUID(target->GetGUID());
|
||||
mandokir->GetAI()->DoAction(ACTION_START_REVIVE);
|
||||
@@ -419,7 +419,7 @@ class npc_chained_spirit : public CreatureScript
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
uint64 _revivePlayerGUID;
|
||||
ObjectGuid _revivePlayerGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
@@ -42,16 +42,6 @@ class instance_zulgurub : public InstanceMapScript
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
venoxisGUID = 0;
|
||||
mandokirGUID = 0;
|
||||
kilnaraGUID = 0;
|
||||
zanzilGUID = 0;
|
||||
jindoGUID = 0;
|
||||
hazzarahGUID = 0;
|
||||
renatakiGUID = 0;
|
||||
wushoolayGUID = 0;
|
||||
grilekGUID = 0;
|
||||
jindoTiggerGUID = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
@@ -167,7 +157,7 @@ class instance_zulgurub : public InstanceMapScript
|
||||
}
|
||||
*/
|
||||
|
||||
uint64 GetData64(uint32 type) const override
|
||||
ObjectGuid GetGuidData(uint32 type) const override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
@@ -195,20 +185,20 @@ class instance_zulgurub : public InstanceMapScript
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
protected:
|
||||
uint64 venoxisGUID;
|
||||
uint64 mandokirGUID;
|
||||
uint64 kilnaraGUID;
|
||||
uint64 zanzilGUID;
|
||||
uint64 jindoGUID;
|
||||
uint64 hazzarahGUID;
|
||||
uint64 renatakiGUID;
|
||||
uint64 wushoolayGUID;
|
||||
uint64 grilekGUID;
|
||||
uint64 jindoTiggerGUID;
|
||||
ObjectGuid venoxisGUID;
|
||||
ObjectGuid mandokirGUID;
|
||||
ObjectGuid kilnaraGUID;
|
||||
ObjectGuid zanzilGUID;
|
||||
ObjectGuid jindoGUID;
|
||||
ObjectGuid hazzarahGUID;
|
||||
ObjectGuid renatakiGUID;
|
||||
ObjectGuid wushoolayGUID;
|
||||
ObjectGuid grilekGUID;
|
||||
ObjectGuid jindoTiggerGUID;
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
@@ -108,7 +108,7 @@ public:
|
||||
{
|
||||
LamentEventTimer = 5000;
|
||||
LamentEvent = false;
|
||||
targetGUID = 0;
|
||||
targetGUID.Clear();
|
||||
|
||||
FadeTimer = 30000;
|
||||
SummonSkeletonTimer = 20000;
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
|
||||
uint32 LamentEventTimer;
|
||||
bool LamentEvent;
|
||||
uint64 targetGUID;
|
||||
ObjectGuid targetGUID;
|
||||
|
||||
uint32 FadeTimer;
|
||||
uint32 SummonSkeletonTimer;
|
||||
|
||||
@@ -322,7 +322,6 @@ public:
|
||||
npc_anchorite_truuenAI(Creature* creature) : npc_escortAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
UghostGUID = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -332,7 +331,7 @@ public:
|
||||
|
||||
uint32 m_uiChatTimer;
|
||||
|
||||
uint64 UghostGUID;
|
||||
ObjectGuid UghostGUID;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
|
||||
@@ -131,13 +131,13 @@ enum Misc
|
||||
DISPLAY_INVISIBLE = 11686
|
||||
};
|
||||
|
||||
uint64 getOrphanGUID(Player* player, uint32 orphan)
|
||||
ObjectGuid getOrphanGUID(Player* player, uint32 orphan)
|
||||
{
|
||||
if (Aura* orphanOut = player->GetAura(SPELL_ORPHAN_OUT))
|
||||
if (orphanOut->GetCaster() && orphanOut->GetCaster()->GetEntry() == orphan)
|
||||
return orphanOut->GetCaster()->GetGUID();
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
|
||||
/*######
|
||||
@@ -159,8 +159,8 @@ class npc_winterfin_playmate : public CreatureScript
|
||||
{
|
||||
timer = 0;
|
||||
phase = 0;
|
||||
playerGUID = 0;
|
||||
orphanGUID = 0;
|
||||
playerGUID.Clear();
|
||||
orphanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -235,8 +235,8 @@ class npc_winterfin_playmate : public CreatureScript
|
||||
private:
|
||||
uint32 timer;
|
||||
int8 phase;
|
||||
uint64 playerGUID;
|
||||
uint64 orphanGUID;
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid orphanGUID;
|
||||
|
||||
};
|
||||
|
||||
@@ -265,8 +265,8 @@ class npc_snowfall_glade_playmate : public CreatureScript
|
||||
{
|
||||
timer = 0;
|
||||
phase = 0;
|
||||
playerGUID = 0;
|
||||
orphanGUID = 0;
|
||||
playerGUID.Clear();
|
||||
orphanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -342,8 +342,8 @@ class npc_snowfall_glade_playmate : public CreatureScript
|
||||
private:
|
||||
uint32 timer;
|
||||
int8 phase;
|
||||
uint64 playerGUID;
|
||||
uint64 orphanGUID;
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid orphanGUID;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* pCreature) const override
|
||||
@@ -372,8 +372,8 @@ class npc_the_biggest_tree : public CreatureScript
|
||||
{
|
||||
timer = 1000;
|
||||
phase = 0;
|
||||
playerGUID = 0;
|
||||
orphanGUID = 0;
|
||||
playerGUID.Clear();
|
||||
orphanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -436,8 +436,8 @@ class npc_the_biggest_tree : public CreatureScript
|
||||
private:
|
||||
uint32 timer;
|
||||
uint8 phase;
|
||||
uint64 playerGUID;
|
||||
uint64 orphanGUID;
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid orphanGUID;
|
||||
|
||||
};
|
||||
|
||||
@@ -466,8 +466,8 @@ class npc_high_oracle_soo_roo : public CreatureScript
|
||||
{
|
||||
timer = 0;
|
||||
phase = 0;
|
||||
playerGUID = 0;
|
||||
orphanGUID = 0;
|
||||
playerGUID.Clear();
|
||||
orphanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -533,8 +533,8 @@ class npc_high_oracle_soo_roo : public CreatureScript
|
||||
private:
|
||||
uint32 timer;
|
||||
int8 phase;
|
||||
uint64 playerGUID;
|
||||
uint64 orphanGUID;
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid orphanGUID;
|
||||
|
||||
};
|
||||
|
||||
@@ -563,8 +563,8 @@ class npc_elder_kekek : public CreatureScript
|
||||
{
|
||||
timer = 0;
|
||||
phase = 0;
|
||||
playerGUID = 0;
|
||||
orphanGUID = 0;
|
||||
playerGUID.Clear();
|
||||
orphanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -628,8 +628,8 @@ class npc_elder_kekek : public CreatureScript
|
||||
private:
|
||||
uint32 timer;
|
||||
int8 phase;
|
||||
uint64 playerGUID;
|
||||
uint64 orphanGUID;
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid orphanGUID;
|
||||
|
||||
};
|
||||
|
||||
@@ -659,8 +659,8 @@ class npc_the_etymidian : public CreatureScript
|
||||
{
|
||||
timer = 0;
|
||||
phase = 0;
|
||||
playerGUID = 0;
|
||||
orphanGUID = 0;
|
||||
playerGUID.Clear();
|
||||
orphanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -732,8 +732,8 @@ class npc_the_etymidian : public CreatureScript
|
||||
private:
|
||||
uint32 timer;
|
||||
int8 phase;
|
||||
uint64 playerGUID;
|
||||
uint64 orphanGUID;
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid orphanGUID;
|
||||
|
||||
};
|
||||
|
||||
@@ -762,8 +762,8 @@ class npc_alexstraza_the_lifebinder : public CreatureScript
|
||||
{
|
||||
timer = 0;
|
||||
phase = 0;
|
||||
playerGUID = 0;
|
||||
orphanGUID = 0;
|
||||
playerGUID.Clear();
|
||||
orphanGUID.Clear();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -900,8 +900,8 @@ class npc_alexstraza_the_lifebinder : public CreatureScript
|
||||
private:
|
||||
int8 phase;
|
||||
uint32 timer;
|
||||
uint64 playerGUID;
|
||||
uint64 orphanGUID;
|
||||
ObjectGuid playerGUID;
|
||||
ObjectGuid orphanGUID;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -117,11 +117,11 @@ class spell_ex_5581 : public SpellScriptLoader
|
||||
|
||||
void HandleDummyLaunchTarget(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
uint64 targetGUID = 0;
|
||||
ObjectGuid targetGUID;
|
||||
if (Unit* unitTarget = GetHitUnit())
|
||||
targetGUID = unitTarget->GetGUID();
|
||||
// we're handling SPELL_EFFECT_DUMMY in effIndex 0 here
|
||||
TC_LOG_INFO("misc", "Spell %u with SPELL_EFFECT_DUMMY is just launched at it's target: " UI64FMTD "!", GetSpellInfo()->Id, targetGUID);
|
||||
TC_LOG_INFO("misc", "Spell %u with SPELL_EFFECT_DUMMY is just launched at it's target: " UI64FMTD "!", GetSpellInfo()->Id, targetGUID.GetRawValue());
|
||||
}
|
||||
|
||||
void HandleDummyHit(SpellEffIndex /*effIndex*/)
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
{
|
||||
Talk(SAY_MORRIDUNE_1);
|
||||
me->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
Start(false, false, 0);
|
||||
Start(false);
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
|
||||
@@ -66,14 +66,14 @@ public:
|
||||
{
|
||||
instance_blackfathom_deeps_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
uint64 twilightLordKelrisGUID;
|
||||
uint64 shrine1GUID;
|
||||
uint64 shrine2GUID;
|
||||
uint64 shrine3GUID;
|
||||
uint64 shrine4GUID;
|
||||
uint64 shrineOfGelihastGUID;
|
||||
uint64 altarOfTheDeepsGUID;
|
||||
uint64 mainDoorGUID;
|
||||
ObjectGuid twilightLordKelrisGUID;
|
||||
ObjectGuid shrine1GUID;
|
||||
ObjectGuid shrine2GUID;
|
||||
ObjectGuid shrine3GUID;
|
||||
ObjectGuid shrine4GUID;
|
||||
ObjectGuid shrineOfGelihastGUID;
|
||||
ObjectGuid altarOfTheDeepsGUID;
|
||||
ObjectGuid mainDoorGUID;
|
||||
|
||||
uint8 encounter[MAX_ENCOUNTER];
|
||||
uint8 countFires;
|
||||
@@ -84,14 +84,6 @@ public:
|
||||
SetHeaders(DataHeader);
|
||||
memset(&encounter, 0, sizeof(encounter));
|
||||
|
||||
twilightLordKelrisGUID = 0;
|
||||
shrine1GUID = 0;
|
||||
shrine2GUID = 0;
|
||||
shrine3GUID = 0;
|
||||
shrine4GUID = 0;
|
||||
shrineOfGelihastGUID = 0;
|
||||
altarOfTheDeepsGUID = 0;
|
||||
mainDoorGUID = 0;
|
||||
countFires = 0;
|
||||
deathTimes = 0;
|
||||
}
|
||||
@@ -137,7 +129,7 @@ public:
|
||||
break;
|
||||
case GO_AKU_MAI_DOOR:
|
||||
if (encounter[2] == DONE)
|
||||
HandleGameObject(0, true, go);
|
||||
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||
mainDoorGUID = go->GetGUID();
|
||||
break;
|
||||
}
|
||||
@@ -234,7 +226,7 @@ public:
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint64 GetData64(uint32 data) const override
|
||||
ObjectGuid GetGuidData(uint32 data) const override
|
||||
{
|
||||
switch (data)
|
||||
{
|
||||
@@ -254,7 +246,7 @@ public:
|
||||
return mainDoorGUID;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return ObjectGuid::Empty;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
@@ -100,7 +100,7 @@ public:
|
||||
{
|
||||
if (waypointId == 7)
|
||||
{
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, instance->GetData64(DATA_JAINAPROUDMOORE));
|
||||
Unit* target = ObjectAccessor::GetUnit(*me, instance->GetGuidData(DATA_JAINAPROUDMOORE));
|
||||
if (target && target->IsAlive())
|
||||
me->AddThreat(target, 0.0f);
|
||||
}
|
||||
@@ -194,12 +194,12 @@ public:
|
||||
ImmolationTimer = 5000;
|
||||
CheckTimer = 5000;
|
||||
instance = creature->GetInstanceScript();
|
||||
AnetheronGUID = instance->GetData64(DATA_ANETHERON);
|
||||
AnetheronGUID = instance->GetGuidData(DATA_ANETHERON);
|
||||
}
|
||||
|
||||
uint32 ImmolationTimer;
|
||||
uint32 CheckTimer;
|
||||
uint64 AnetheronGUID;
|
||||
ObjectGuid AnetheronGUID;
|
||||
InstanceScript* instance;
|
||||
|
||||
void Reset() override
|
||||
|
||||
@@ -97,18 +97,18 @@ public:
|
||||
void Initialize()
|
||||
{
|
||||
CheckTimer = 1000;
|
||||
ArchimondeGUID = 0;
|
||||
ArchimondeGUID.Clear();
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
uint64 ArchimondeGUID;
|
||||
ObjectGuid ArchimondeGUID;
|
||||
uint32 CheckTimer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
ArchimondeGUID = instance->GetData64(DATA_ARCHIMONDE);
|
||||
ArchimondeGUID = instance->GetGuidData(DATA_ARCHIMONDE);
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
}
|
||||
@@ -187,11 +187,11 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
TargetGUID = 0;
|
||||
TargetGUID.Clear();
|
||||
ChangeTargetTimer = 5000;
|
||||
}
|
||||
|
||||
uint64 TargetGUID;
|
||||
ObjectGuid TargetGUID;
|
||||
uint32 ChangeTargetTimer;
|
||||
|
||||
void Reset() override
|
||||
@@ -222,7 +222,7 @@ public:
|
||||
if (Unit* temp = ObjectAccessor::GetUnit(*me, TargetGUID))
|
||||
{
|
||||
me->GetMotionMaster()->MoveFollow(temp, 0.0f, 0.0f);
|
||||
TargetGUID = 0;
|
||||
TargetGUID.Clear();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -264,9 +264,9 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
DoomfireSpiritGUID = 0;
|
||||
DoomfireSpiritGUID.Clear();
|
||||
damageTaken = 0;
|
||||
WorldTreeGUID = 0;
|
||||
WorldTreeGUID.Clear();
|
||||
|
||||
DrainNordrassilTimer = 0;
|
||||
FearTimer = 42000;
|
||||
@@ -290,8 +290,8 @@ public:
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint64 DoomfireSpiritGUID;
|
||||
uint64 WorldTreeGUID;
|
||||
ObjectGuid DoomfireSpiritGUID;
|
||||
ObjectGuid WorldTreeGUID;
|
||||
|
||||
uint32 DrainNordrassilTimer;
|
||||
uint32 FearTimer;
|
||||
@@ -429,7 +429,7 @@ public:
|
||||
if (Unit* DoomfireSpirit = ObjectAccessor::GetUnit(*me, DoomfireSpiritGUID))
|
||||
{
|
||||
summoned->GetMotionMaster()->MoveFollow(DoomfireSpirit, 0.0f, 0.0f);
|
||||
DoomfireSpiritGUID = 0;
|
||||
DoomfireSpiritGUID.Clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user