Merge remote-tracking branch 'origin/master' into mmaps

Conflicts:
	src/server/game/Maps/Map.cpp
	src/server/game/Movement/MovementGenerator.h
	src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.cpp
	src/server/game/Movement/MovementGenerators/ConfusedMovementGenerator.h
	src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.cpp
	src/server/game/Movement/MovementGenerators/FleeingMovementGenerator.h
	src/server/game/Movement/MovementGenerators/HomeMovementGenerator.cpp
	src/server/game/Movement/MovementGenerators/HomeMovementGenerator.h
	src/server/game/Movement/MovementGenerators/PointMovementGenerator.cpp
	src/server/game/Movement/MovementGenerators/PointMovementGenerator.h
	src/server/game/Movement/MovementGenerators/RandomMovementGenerator.cpp
	src/server/game/Movement/MovementGenerators/RandomMovementGenerator.h
	src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.cpp
	src/server/game/Movement/MovementGenerators/TargetedMovementGenerator.h
	src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.cpp
	src/server/game/Movement/MovementGenerators/WaypointMovementGenerator.h
	src/server/game/Spells/SpellEffects.cpp
This commit is contained in:
Nay
2012-11-23 23:39:03 +00:00
1062 changed files with 23070 additions and 12592 deletions
+10 -18
View File
@@ -9,18 +9,11 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# Enable precompiled headers when using the GCC compiler.
if( USE_SCRIPTPCH )
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
)
endif()
if( USE_SCRIPTPCH AND MSVC )
set(scripts_STAT_SRCS
PrecompiledHeaders/ScriptPCH.cpp
PrecompiledHeaders/ScriptPCH.h
)
endif()
if (USE_SCRIPTPCH)
set(scripts_STAT_PCH_HDR PrecompiledHeaders/ScriptPCH.h)
set(scripts_STAT_PCH_SRC PrecompiledHeaders/ScriptPCH.cpp)
endif ()
message(STATUS "SCRIPT PREPARATIONS")
include(Spells/CMakeLists.txt)
@@ -150,15 +143,14 @@ include_directories(
${MYSQL_INCLUDE_DIR}
)
add_library(scripts STATIC ${scripts_STAT_SRCS})
add_library(scripts STATIC
${scripts_STAT_SRCS}
${scripts_STAT_PCH_SRC}
)
add_dependencies(scripts revision.h)
# Generate precompiled header
if( USE_SCRIPTPCH )
if(CMAKE_COMPILER_IS_GNUCXX)
add_precompiled_header(scripts ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/ScriptPCH.h)
elseif(MSVC)
add_native_precompiled_header(scripts ${CMAKE_CURRENT_SOURCE_DIR}/PrecompiledHeaders/ScriptPCH)
endif()
if (USE_SCRIPTPCH)
add_cxx_pch(scripts ${scripts_STAT_PCH_HDR} ${scripts_STAT_PCH_SRC})
endif()
+3 -1
View File
@@ -22,9 +22,11 @@ Comment: All account related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "AccountMgr.h"
#include "Chat.h"
#include "Language.h"
#include "Player.h"
#include "ScriptMgr.h"
class account_commandscript : public CommandScript
{
@@ -22,8 +22,10 @@ Comment: All achievement related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "Language.h"
#include "Player.h"
#include "ScriptMgr.h"
class achievement_commandscript : public CommandScript
{
+4 -2
View File
@@ -22,11 +22,13 @@ Comment: All ban related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "AccountMgr.h"
#include "Chat.h"
#include "Language.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
class ban_commandscript : public CommandScript
{
+3
View File
@@ -24,6 +24,9 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "Creature.h"
#include "Language.h"
#include "Player.h"
class cast_commandscript : public CommandScript
{
+7 -5
View File
@@ -22,11 +22,13 @@ Comment: All character related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "AccountMgr.h"
#include "Chat.h"
#include "ObjectMgr.h"
#include "PlayerDump.h"
#include "Player.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
class character_commandscript : public CommandScript
{
@@ -238,11 +240,11 @@ public:
if (handler->needReportToTarget(player))
{
if (oldLevel == newLevel)
ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str());
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_PROGRESS_RESET, handler->GetNameLink().c_str());
else if (oldLevel < newLevel)
ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel);
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_UP, handler->GetNameLink().c_str(), newLevel);
else // if (oldlevel > newlevel)
ChatHandler(player).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel);
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_LEVEL_DOWN, handler->GetNameLink().c_str(), newLevel);
}
}
else
+8 -6
View File
@@ -22,9 +22,11 @@ Comment: All cheat related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
class cheat_commandscript : public CommandScript
{
@@ -233,7 +235,7 @@ public:
chr->SetTaxiCheater(true);
handler->PSendSysMessage(LANG_YOU_GIVE_TAXIS, handler->GetNameLink(chr).c_str());
if (handler->needReportToTarget(chr))
ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_ADDED, handler->GetNameLink().c_str());
return true;
}
@@ -242,7 +244,7 @@ public:
chr->SetTaxiCheater(false);
handler->PSendSysMessage(LANG_YOU_REMOVE_TAXIS, handler->GetNameLink(chr).c_str());
if (handler->needReportToTarget(chr))
ChatHandler(chr).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str());
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_TAXIS_REMOVED, handler->GetNameLink().c_str());
return true;
}
@@ -271,13 +273,13 @@ public:
{
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_ALL, handler->GetNameLink(chr).c_str());
if (handler->needReportToTarget(chr))
ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_ALL, handler->GetNameLink().c_str());
}
else
{
handler->PSendSysMessage(LANG_YOU_SET_EXPLORE_NOTHING, handler->GetNameLink(chr).c_str());
if (handler->needReportToTarget(chr))
ChatHandler(chr).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
ChatHandler(chr->GetSession()).PSendSysMessage(LANG_YOURS_EXPLORE_SET_NOTHING, handler->GetNameLink().c_str());
}
for (uint8 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
+1
View File
@@ -31,6 +31,7 @@ EndScriptData */
#include "GridNotifiers.h"
#include "GridNotifiersImpl.h"
#include "GossipDef.h"
#include "Language.h"
#include <fstream>
+5 -2
View File
@@ -22,11 +22,14 @@ Comment: All disable related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
#include "DisableMgr.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "OutdoorPvP.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "SpellMgr.h"
class disable_commandscript : public CommandScript
{
+4 -2
View File
@@ -22,9 +22,11 @@ Comment: All event related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "GameEventMgr.h"
#include "Chat.h"
#include "GameEventMgr.h"
#include "Language.h"
#include "Player.h"
#include "ScriptMgr.h"
class event_commandscript : public CommandScript
{
+3
View File
@@ -26,7 +26,10 @@ EndScriptData */
#include "ObjectMgr.h"
#include "Chat.h"
#include "AccountMgr.h"
#include "Language.h"
#include "World.h"
#include "Player.h"
#include "Opcodes.h"
class gm_commandscript : public CommandScript
{
+2
View File
@@ -27,6 +27,8 @@ EndScriptData */
#include "MapManager.h"
#include "TicketMgr.h"
#include "Chat.h"
#include "Language.h"
#include "Player.h"
class go_commandscript : public CommandScript
{
@@ -28,6 +28,9 @@ EndScriptData */
#include "PoolMgr.h"
#include "MapManager.h"
#include "Chat.h"
#include "Language.h"
#include "Player.h"
#include "Opcodes.h"
class gobject_commandscript : public CommandScript
{
+2 -1
View File
@@ -22,11 +22,12 @@ Comment: All guild related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "Language.h"
#include "Guild.h"
#include "GuildMgr.h"
#include "ObjectAccessor.h"
#include "ScriptMgr.h"
class guild_commandscript : public CommandScript
{
+4 -2
View File
@@ -22,9 +22,11 @@ Comment: All honor related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
class honor_commandscript : public CommandScript
{
@@ -28,6 +28,7 @@ EndScriptData */
#include "InstanceSaveMgr.h"
#include "InstanceScript.h"
#include "MapManager.h"
#include "Player.h"
class instance_commandscript : public CommandScript
{
+3
View File
@@ -25,8 +25,11 @@ EndScriptData */
#include "Chat.h"
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Language.h"
#include "SpellMgr.h"
#include "SpellInfo.h"
#include "Player.h"
#include "Pet.h"
class learn_commandscript : public CommandScript
{
+2
View File
@@ -17,8 +17,10 @@
#include "ScriptMgr.h"
#include "Chat.h"
#include "Language.h"
#include "LFGMgr.h"
#include "Group.h"
#include "Player.h"
void GetPlayerInfo(ChatHandler* handler, Player* player)
{
+2
View File
@@ -25,8 +25,10 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "SpellAuraEffects.h"
#include "Language.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Player.h"
class list_commandscript : public CommandScript
{
+35 -69
View File
@@ -22,12 +22,15 @@ Comment: All lookup related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "AccountMgr.h"
#include "Chat.h"
#include "GameEventMgr.h"
#include "ObjectAccessor.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
#include "SpellInfo.h"
class lookup_commandscript : public CommandScript
{
@@ -1156,109 +1159,72 @@ public:
return true;
}
static bool HandleLookupMapCommand(ChatHandler* /*handler*/, char const* args)
static bool HandleLookupMapCommand(ChatHandler* handler, char const* args)
{
if (!*args)
return false;
/*
std::string namePart = args;
std::wstring wNamePart;
// converting string that we try to find to lower case
if (!Utf8toWStr(namePart, wNamePart))
return false;
wstrToLower(wNamePart);
bool found = false;
uint32 counter = 0;
uint32 maxResults = sWorld->getIntConfig(CONFIG_MAX_RESULTS_LOOKUP_COMMANDS);
uint8 locale = handler->GetSession() ? handler->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale();
// search in Map.dbc
for (uint32 id = 0; id < sMapStore.GetNumRows(); id++)
{
MapEntry const* MapInfo = sMapStore.LookupEntry(id);
if (MapInfo)
if (MapEntry const* mapInfo = sMapStore.LookupEntry(id))
{
uint8 locale = handler->GetSession() ? handler->GetSession()->GetSessionDbcLocale() : sWorld->GetDefaultDbcLocale();
std::string name = MapInfo->name[locale];
std::string name = mapInfo->name[locale];
if (name.empty())
continue;
if (!Utf8FitTo(name, wNamePart))
if (Utf8FitTo(name, wNamePart) && locale < TOTAL_LOCALES)
{
locale = LOCALE_enUS;
for (; locale < TOTAL_LOCALES; locale++)
if (maxResults && counter == maxResults)
{
if (handler->GetSession() && locale == handler->GetSession()->GetSessionDbcLocale())
continue;
name = MapInfo->name[locale];
if (name.empty())
continue;
if (Utf8FitTo(name, wNamePart))
break;
handler->PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
return true;
}
}
if (locale < TOTAL_LOCALES)
{
// send map in "id - [name][Continent][Instance/Battleground/Arena][Raid reset time:][Heroic reset time:][Mountable]" format
std::ostringstream ss;
ss << id << " - [" << name << ']';
if (handler->GetSession())
ss << id << " - |cffffffff|Hmap:" << id << "|h[" << name << ']';
else // console
ss << id << " - [" << name << ']';
if (MapInfo->IsContinent())
if (mapInfo->IsContinent())
ss << handler->GetTrinityString(LANG_CONTINENT);
switch (MapInfo->map_type)
switch (mapInfo->map_type)
{
case MAP_INSTANCE: ss << handler->GetTrinityString(LANG_INSTANCE); break;
case MAP_BATTLEGROUND: ss << handler->GetTrinityString(LANG_BATTLEGROUND); break;
case MAP_ARENA: ss << handler->GetTrinityString(LANG_ARENA); break;
case MAP_INSTANCE:
ss << handler->GetTrinityString(LANG_INSTANCE);
break;
case MAP_RAID:
ss << handler->GetTrinityString(LANG_RAID);
break;
case MAP_BATTLEGROUND:
ss << handler->GetTrinityString(LANG_BATTLEGROUND);
break;
case MAP_ARENA:
ss << handler->GetTrinityString(LANG_ARENA);
break;
}
if (MapInfo->IsRaid())
ss << handler->GetTrinityString(LANG_RAID);
handler->SendSysMessage(ss.str().c_str());
if (MapInfo->SupportsHeroicMode())
ss << handler->GetTrinityString(LANG_HEROIC);
uint32 ResetTimeRaid = MapInfo->resetTimeRaid;
std::string ResetTimeRaidStr;
if (ResetTimeRaid)
ResetTimeRaidStr = secsToTimeString(ResetTimeRaid, true, false);
uint32 ResetTimeHeroic = MapInfo->resetTimeHeroic;
std::string ResetTimeHeroicStr;
if (ResetTimeHeroic)
ResetTimeHeroicStr = secsToTimeString(ResetTimeHeroic, true, false);
if (MapInfo->IsMountAllowed())
ss << handler->GetTrinityString(LANG_MOUNTABLE);
if (ResetTimeRaid && !ResetTimeHeroic)
handler->PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str());
else if (!ResetTimeRaid && ResetTimeHeroic)
handler->PSendSysMessage(ss.str().c_str(), ResetTimeHeroicStr.c_str());
else if (ResetTimeRaid && ResetTimeHeroic)
handler->PSendSysMessage(ss.str().c_str(), ResetTimeRaidStr.c_str(), ResetTimeHeroicStr.c_str());
else
handler->SendSysMessage(ss.str().c_str());
if (!found)
found = true;
++counter;
}
}
}
if (!found)
if (!counter)
handler->SendSysMessage(LANG_COMMAND_NOMAPFOUND);
*/
return true;
}
@@ -25,6 +25,8 @@ EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "ChannelMgr.h"
#include "Language.h"
#include "Player.h"
class message_commandscript : public CommandScript
{
+9 -5
View File
@@ -23,12 +23,16 @@
#include "GridNotifiers.h"
#include "Group.h"
#include "InstanceSaveMgr.h"
#include "Language.h"
#include "MovementGenerator.h"
#include "ObjectAccessor.h"
#include "Opcodes.h"
#include "SpellAuras.h"
#include "TargetedMovementGenerator.h"
#include "WeatherMgr.h"
#include "ace/INET_Addr.h"
#include "Player.h"
#include "Pet.h"
class misc_commandscript : public CommandScript
{
@@ -495,7 +499,7 @@ public:
handler->PSendSysMessage(LANG_SUMMONING, nameLink.c_str(), "");
if (handler->needReportToTarget(target))
ChatHandler(target).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->playerLink(_player->GetName()).c_str());
// stop flight if need
if (target->isInFlight())
@@ -606,7 +610,7 @@ public:
handler->PSendSysMessage(LANG_SUMMONING, plNameLink.c_str(), "");
if (handler->needReportToTarget(player))
ChatHandler(player).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
ChatHandler(player->GetSession()).PSendSysMessage(LANG_SUMMONED_BY, handler->GetNameLink().c_str());
// stop flight if need
if (player->isInFlight())
@@ -1804,7 +1808,7 @@ public:
int64 muteTime = time(NULL) + notSpeakTime * MINUTE;
target->GetSession()->m_muteTime = muteTime;
stmt->setInt64(0, muteTime);
ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteReasonStr.c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_DISABLED, notSpeakTime, muteReasonStr.c_str());
}
else
{
@@ -1860,7 +1864,7 @@ public:
LoginDatabase.Execute(stmt);
if (target)
ChatHandler(target).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_CHAT_ENABLED);
std::string nameLink = handler->playerLink(targetName);
@@ -2137,7 +2141,7 @@ public:
handler->PSendSysMessage(LANG_YOU_REPAIR_ITEMS, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
ChatHandler(target).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink().c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_ITEMS_REPAIRED, handler->GetNameLink().c_str());
return true;
}
+24 -19
View File
@@ -22,9 +22,14 @@ Comment: All modify related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "Pet.h"
#include "Player.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
class modify_commandscript : public CommandScript
{
@@ -106,7 +111,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_HP, handler->GetNameLink(target).c_str(), hp, hpm);
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), hp, hpm);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_HP_CHANGED, handler->GetNameLink().c_str(), hp, hpm);
target->SetMaxHealth(hpm);
target->SetHealth(hp);
@@ -144,7 +149,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_MANA, handler->GetNameLink(target).c_str(), mana, manam);
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MANA_CHANGED, handler->GetNameLink().c_str(), mana, manam);
target->SetMaxPower(POWER_MANA, manam);
target->SetPower(POWER_MANA, mana);
@@ -193,7 +198,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_ENERGY, handler->GetNameLink(target).c_str(), energy/10, energym/10);
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ENERGY_CHANGED, handler->GetNameLink().c_str(), energy/10, energym/10);
target->SetMaxPower(POWER_ENERGY, energym);
target->SetPower(POWER_ENERGY, energy);
@@ -244,7 +249,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_RAGE, handler->GetNameLink(target).c_str(), rage/10, ragem/10);
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RAGE_CHANGED, handler->GetNameLink().c_str(), rage/10, ragem/10);
target->SetMaxPower(POWER_RAGE, ragem);
target->SetPower(POWER_RAGE, rage);
@@ -278,7 +283,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_RUNIC_POWER, handler->GetNameLink(target).c_str(), rune/10, runem/10);
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_RUNIC_POWER_CHANGED, handler->GetNameLink().c_str(), rune/10, runem/10);
target->SetMaxPower(POWER_RUNIC_POWER, runem);
target->SetPower(POWER_RUNIC_POWER, rune);
@@ -408,7 +413,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_SPELLFLATID, spellflatid, val, mark, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellflatid, val, mark);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPELLFLATID_CHANGED, handler->GetNameLink().c_str(), spellflatid, val, mark);
WorldPacket data(SMSG_SET_FLAT_SPELL_MODIFIER, (1+1+2+2));
data << uint8(spellflatid);
@@ -504,7 +509,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_ASPEED, ASpeed, targetNameLink.c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ASPEED_CHANGED, handler->GetNameLink().c_str(), ASpeed);
target->SetSpeed(MOVE_WALK, ASpeed, true);
target->SetSpeed(MOVE_RUN, ASpeed, true);
@@ -552,7 +557,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_SPEED, Speed, targetNameLink.c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SPEED_CHANGED, handler->GetNameLink().c_str(), Speed);
target->SetSpeed(MOVE_RUN, Speed, true);
@@ -597,7 +602,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_SWIM_SPEED, Swim, targetNameLink.c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_SWIM_SPEED_CHANGED, handler->GetNameLink().c_str(), Swim);
target->SetSpeed(MOVE_SWIM, Swim, true);
@@ -642,7 +647,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_BACK_SPEED, BSpeed, targetNameLink.c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, handler->GetNameLink().c_str(), BSpeed);
target->SetSpeed(MOVE_RUN_BACK, BSpeed, true);
@@ -678,7 +683,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_FLY_SPEED, FSpeed, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, handler->GetNameLink().c_str(), FSpeed);
target->SetSpeed(MOVE_FLIGHT, FSpeed, true);
@@ -715,7 +720,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_SIZE, Scale, handler->GetNameLink(player).c_str());
if (handler->needReportToTarget(player))
(ChatHandler(player)).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
ChatHandler(player->GetSession()).PSendSysMessage(LANG_YOURS_SIZE_CHANGED, handler->GetNameLink().c_str(), Scale);
}
target->SetObjectScale(Scale);
@@ -963,7 +968,7 @@ public:
handler->PSendSysMessage(LANG_YOU_GIVE_MOUNT, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_MOUNT_GIVED, handler->GetNameLink().c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_MOUNT_GIVED, handler->GetNameLink().c_str());
target->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP);
target->Mount(mId);
@@ -1019,7 +1024,7 @@ public:
{
handler->PSendSysMessage(LANG_YOU_TAKE_ALL_MONEY, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_ALL_MONEY_GONE, handler->GetNameLink().c_str());
target->SetMoney(0);
}
@@ -1030,7 +1035,7 @@ public:
handler->PSendSysMessage(LANG_YOU_TAKE_MONEY, abs(moneyToAdd), handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), abs(moneyToAdd));
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_TAKEN, handler->GetNameLink().c_str(), abs(moneyToAdd));
target->SetMoney(newmoney);
}
}
@@ -1038,7 +1043,7 @@ public:
{
handler->PSendSysMessage(LANG_YOU_GIVE_MONEY, moneyToAdd, handler->GetNameLink(target).c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd);
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOURS_MONEY_GIVEN, handler->GetNameLink().c_str(), moneyToAdd);
if (moneyToAdd >= MAX_MONEY_AMOUNT)
target->SetMoney(MAX_MONEY_AMOUNT);
@@ -1378,7 +1383,7 @@ public:
handler->PSendSysMessage(LANG_YOU_CHANGE_GENDER, handler->GetNameLink(target).c_str(), gender_full);
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_YOUR_GENDER_CHANGED, gender_full, handler->GetNameLink().c_str());
return true;
}
+3
View File
@@ -27,8 +27,11 @@ EndScriptData */
#include "Chat.h"
#include "Transport.h"
#include "CreatureGroups.h"
#include "Language.h"
#include "TargetedMovementGenerator.h" // for HandleNpcUnFollowCommand
#include "CreatureAI.h"
#include "Player.h"
#include "Pet.h"
class npc_commandscript : public CommandScript
{
+4 -2
View File
@@ -22,9 +22,11 @@ Comment: All quest related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ReputationMgr.h"
#include "ScriptMgr.h"
class quest_commandscript : public CommandScript
{
+13 -21
View File
@@ -22,22 +22,24 @@ Comment: All reload related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "SpellMgr.h"
#include "TicketMgr.h"
#include "MapManager.h"
#include "CreatureEventAIMgr.h"
#include "DisableMgr.h"
#include "LFGMgr.h"
#include "AchievementMgr.h"
#include "AuctionHouseMgr.h"
#include "Chat.h"
#include "CreatureEventAIMgr.h"
#include "CreatureTextMgr.h"
#include "SmartAI.h"
#include "DisableMgr.h"
#include "Language.h"
#include "LFGMgr.h"
#include "MapManager.h"
#include "ObjectMgr.h"
#include "ScriptMgr.h"
#include "SkillDiscovery.h"
#include "SkillExtraItems.h"
#include "Chat.h"
#include "WaypointManager.h"
#include "SmartAI.h"
#include "SpellMgr.h"
#include "TicketMgr.h"
#include "WardenCheckMgr.h"
#include "WaypointManager.h"
class reload_commandscript : public CommandScript
{
@@ -78,7 +80,6 @@ public:
{ "config", SEC_ADMINISTRATOR, true, &HandleReloadConfigCommand, "", NULL },
{ "creature_text", SEC_ADMINISTRATOR, true, &HandleReloadCreatureText, "", NULL },
{ "creature_ai_scripts", SEC_ADMINISTRATOR, true, &HandleReloadEventAIScriptsCommand, "", NULL },
{ "creature_ai_summons", SEC_ADMINISTRATOR, true, &HandleReloadEventAISummonsCommand, "", NULL },
{ "creature_ai_texts", SEC_ADMINISTRATOR, true, &HandleReloadEventAITextsCommand, "", NULL },
{ "creature_involvedrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestInvRelationsCommand, "", NULL },
{ "creature_linked_respawn", SEC_GAMEMASTER, true, &HandleReloadLinkedRespawnCommand, "", NULL },
@@ -276,7 +277,6 @@ public:
static bool HandleReloadAllEventAICommand(ChatHandler* handler, const char* /*args*/)
{
HandleReloadEventAITextsCommand(handler, "a");
HandleReloadEventAISummonsCommand(handler, "a");
HandleReloadEventAIScriptsCommand(handler, "a");
return true;
}
@@ -1037,14 +1037,6 @@ public:
return true;
}
static bool HandleReloadEventAISummonsCommand(ChatHandler* handler, const char* /*args*/)
{
sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Summons from `creature_ai_summons`...");
sEventAIMgr->LoadCreatureEventAI_Summons();
handler->SendGlobalGMSysMessage("DB table `creature_ai_summons` reloaded.");
return true;
}
static bool HandleReloadEventAIScriptsCommand(ChatHandler* handler, const char* /*args*/)
{
sLog->outInfo(LOG_FILTER_GENERAL, "Re-Loading Scripts from `creature_ai_scripts`...");
+8 -4
View File
@@ -22,9 +22,13 @@ Comment: All reset related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "AchievementMgr.h"
#include "Chat.h"
#include "Language.h"
#include "ObjectAccessor.h"
#include "Player.h"
#include "Pet.h"
#include "ScriptMgr.h"
class reset_commandscript : public CommandScript
{
@@ -168,7 +172,7 @@ public:
{
target->resetSpells(/* bool myClassOnly */);
ChatHandler(target).SendSysMessage(LANG_RESET_SPELLS);
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_SPELLS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
handler->PSendSysMessage(LANG_RESET_SPELLS_ONLINE, handler->GetNameLink(target).c_str());
}
@@ -220,7 +224,7 @@ public:
creature->ToPet()->resetTalents();
owner->ToPlayer()->SendTalentsInfoData(true);
ChatHandler(owner->ToPlayer()).SendSysMessage(LANG_RESET_PET_TALENTS);
ChatHandler(owner->ToPlayer()->GetSession()).SendSysMessage(LANG_RESET_PET_TALENTS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != owner->ToPlayer())
handler->PSendSysMessage(LANG_RESET_PET_TALENTS_ONLINE, handler->GetNameLink(owner->ToPlayer()).c_str());
}
@@ -236,7 +240,7 @@ public:
{
target->resetTalents(true);
target->SendTalentsInfoData(false);
ChatHandler(target).SendSysMessage(LANG_RESET_TALENTS);
ChatHandler(target->GetSession()).SendSysMessage(LANG_RESET_TALENTS);
if (!handler->GetSession() || handler->GetSession()->GetPlayer() != target)
handler->PSendSysMessage(LANG_RESET_TALENTS_ONLINE, handler->GetNameLink(target).c_str());
+4 -2
View File
@@ -22,11 +22,13 @@ Comment: All server related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "SystemConfig.h"
#include "Config.h"
#include "Language.h"
#include "ObjectAccessor.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "SystemConfig.h"
class server_commandscript : public CommandScript
{
+7 -5
View File
@@ -22,11 +22,13 @@ Comment: All tele related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "MapManager.h"
#include "Chat.h"
#include "Group.h"
#include "Language.h"
#include "MapManager.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
class tele_commandscript : public CommandScript
{
@@ -178,7 +180,7 @@ public:
handler->PSendSysMessage(LANG_TELEPORTING_TO, chrNameLink.c_str(), "", tele->name.c_str());
if (handler->needReportToTarget(target))
(ChatHandler(target)).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
ChatHandler(target->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, handler->GetNameLink().c_str());
// stop flight if need
if (target->isInFlight())
@@ -274,7 +276,7 @@ public:
handler->PSendSysMessage(LANG_TELEPORTING_TO, plNameLink.c_str(), "", tele->name.c_str());
if (handler->needReportToTarget(player))
(ChatHandler(player)).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
ChatHandler(player->GetSession()).PSendSysMessage(LANG_TELEPORTED_TO_BY, nameLink.c_str());
// stop flight if need
if (player->isInFlight())
+5 -2
View File
@@ -22,11 +22,14 @@ Comment: All ticket related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "Chat.h"
#include "AccountMgr.h"
#include "Chat.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "Opcodes.h"
#include "Player.h"
#include "TicketMgr.h"
#include "ScriptMgr.h"
class ticket_commandscript : public CommandScript
{
+4 -2
View File
@@ -22,9 +22,11 @@ Comment: All titles related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "Chat.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
class titles_commandscript : public CommandScript
{
+6 -4
View File
@@ -22,10 +22,12 @@ Comment: All wp related commands
Category: commandscripts
EndScriptData */
#include "ScriptMgr.h"
#include "ObjectMgr.h"
#include "WaypointManager.h"
#include "Chat.h"
#include "Language.h"
#include "ObjectMgr.h"
#include "Player.h"
#include "ScriptMgr.h"
#include "WaypointManager.h"
class wp_commandscript : public CommandScript
{
@@ -941,7 +943,7 @@ public:
{
wpCreature->SetDisplayId(target->GetDisplayId());
wpCreature->SetObjectScale(0.5f);
wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point);
wpCreature->SetLevel(std::min<uint32>(point, STRONG_MAX_LEVEL));
}
}
while (result->NextRow());
@@ -24,8 +24,8 @@ enum Spells
SPELL_CLEAVE = 40504,
SPELL_DEMORALIZING_SHOUT = 23511,
SPELL_ENRAGE = 8599,
SPELL_WHIRLWIND1 = 15589,
SPELL_WHIRLWIND2 = 13736,
SPELL_WHIRLWIND = 13736,
SPELL_NORTH_MARSHAL = 45828,
SPELL_SOUTH_MARSHAL = 45829,
SPELL_STONEHEARTH_MARSHAL = 45830,
@@ -48,38 +48,55 @@ enum Creatures
NPC_WEST_FROSTWOLF_WARMASTER = 14777
};
enum Events
{
EVENT_CHARGE_TARGET = 1,
EVENT_CLEAVE = 2,
EVENT_DEMORALIZING_SHOUT = 3,
EVENT_WHIRLWIND = 4,
EVENT_ENRAGE = 5,
EVENT_CHECK_RESET = 6
};
struct SpellPair
{
uint32 npcEntry;
uint32 spellId;
};
uint8 const MAX_SPELL_PAIRS = 8;
SpellPair const _auraPairs[MAX_SPELL_PAIRS] =
{
{ NPC_NORTH_MARSHAL, SPELL_NORTH_MARSHAL },
{ NPC_SOUTH_MARSHAL, SPELL_SOUTH_MARSHAL },
{ NPC_STONEHEARTH_MARSHAL, SPELL_STONEHEARTH_MARSHAL },
{ NPC_ICEWING_MARSHAL, SPELL_ICEWING_MARSHAL },
{ NPC_EAST_FROSTWOLF_WARMASTER, SPELL_EAST_FROSTWOLF_WARMASTER },
{ NPC_WEST_FROSTWOLF_WARMASTER, SPELL_WEST_FROSTWOLF_WARMASTER },
{ NPC_TOWER_POINT_WARMASTER, SPELL_TOWER_POINT_WARMASTER },
{ NPC_ICEBLOOD_WARMASTER, SPELL_ICEBLOOD_WARMASTER }
};
class mob_av_marshal_or_warmaster : public CreatureScript
{
public:
mob_av_marshal_or_warmaster()
: CreatureScript("mob_av_marshal_or_warmaster") {}
mob_av_marshal_or_warmaster() : CreatureScript("mob_av_marshal_or_warmaster") { }
struct mob_av_marshal_or_warmasterAI : public ScriptedAI
{
mob_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) {}
uint32 ChargeTimer;
uint32 CleaveTimer;
uint32 DemoralizingShoutTimer;
uint32 Whirlwind1Timer;
uint32 Whirlwind2Timer;
uint32 EnrageTimer;
uint32 ResetTimer;
bool bHasAura;
mob_av_marshal_or_warmasterAI(Creature* creature) : ScriptedAI(creature) { }
void Reset()
{
ChargeTimer = urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
CleaveTimer = urand(1 * IN_MILLISECONDS, 11 * IN_MILLISECONDS);
DemoralizingShoutTimer = urand(2 * IN_MILLISECONDS, 2 * IN_MILLISECONDS);
Whirlwind1Timer = urand(1 * IN_MILLISECONDS, 12 * IN_MILLISECONDS);
Whirlwind2Timer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
EnrageTimer = urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
ResetTimer = 5 * IN_MILLISECONDS;
events.Reset();
events.ScheduleEvent(EVENT_CHARGE_TARGET, urand(2 * IN_MILLISECONDS, 12 * IN_MILLISECONDS));
events.ScheduleEvent(EVENT_CLEAVE, urand(1 * IN_MILLISECONDS, 11 * IN_MILLISECONDS));
events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, 2000);
events.ScheduleEvent(EVENT_WHIRLWIND, urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS));
events.ScheduleEvent(EVENT_ENRAGE, urand(5 * IN_MILLISECONDS, 20 * IN_MILLISECONDS));
events.ScheduleEvent(EVENT_CHECK_RESET, 5000);
bHasAura = false;
_hasAura = false;
}
void JustRespawned()
@@ -87,90 +104,70 @@ class mob_av_marshal_or_warmaster : public CreatureScript
Reset();
}
void UpdateAI(const uint32 diff)
void UpdateAI(uint32 const diff)
{
if (!bHasAura)
// I have a feeling this isn't blizzlike, but owell, I'm only passing by and cleaning up.
if (!_hasAura)
{
switch (me->GetEntry())
{
case NPC_NORTH_MARSHAL:
DoCast(me, SPELL_NORTH_MARSHAL);
break;
case NPC_SOUTH_MARSHAL:
DoCast(me, SPELL_SOUTH_MARSHAL);
break;
case NPC_STONEHEARTH_MARSHAL:
DoCast(me, SPELL_STONEHEARTH_MARSHAL);
break;
case NPC_ICEWING_MARSHAL:
DoCast(me, SPELL_ICEWING_MARSHAL);
break;
case NPC_EAST_FROSTWOLF_WARMASTER:
DoCast(me, SPELL_EAST_FROSTWOLF_WARMASTER);
break;
case NPC_WEST_FROSTWOLF_WARMASTER:
DoCast(me, SPELL_WEST_FROSTWOLF_WARMASTER);
break;
case NPC_ICEBLOOD_WARMASTER:
DoCast(me, SPELL_ICEBLOOD_WARMASTER);
break;
case NPC_TOWER_POINT_WARMASTER:
DoCast(me, SPELL_TOWER_POINT_WARMASTER);
break;
}
for (uint8 i = 0; i < MAX_SPELL_PAIRS; ++i)
if (_auraPairs[i].npcEntry == me->GetEntry())
DoCast(me, _auraPairs[i].spellId);
bHasAura = true;
_hasAura = true;
}
if (!UpdateVictim())
return;
if (ChargeTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CHARGE);
ChargeTimer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else ChargeTimer -= diff;
events.Update(diff);
if (CleaveTimer <= diff)
{
DoCast(me->getVictim(), SPELL_CLEAVE);
CleaveTimer = urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS);
} else CleaveTimer -= diff;
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
if (DemoralizingShoutTimer <= diff)
while (uint32 eventId = events.ExecuteEvent())
{
DoCast(me->getVictim(), SPELL_DEMORALIZING_SHOUT);
DemoralizingShoutTimer = urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS);
} else DemoralizingShoutTimer -= diff;
if (Whirlwind1Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND1);
Whirlwind1Timer = urand(6 * IN_MILLISECONDS, 20 * IN_MILLISECONDS);
} else Whirlwind1Timer -= diff;
if (Whirlwind2Timer <= diff)
{
DoCast(me->getVictim(), SPELL_WHIRLWIND2);
Whirlwind2Timer = urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS);
} else Whirlwind2Timer -= diff;
if (EnrageTimer <= diff)
{
DoCast(me->getVictim(), SPELL_ENRAGE);
EnrageTimer = urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS);
}else EnrageTimer -= diff;
// check if creature is not outside of building
if (ResetTimer <= diff)
{
if (me->GetDistance2d(me->GetHomePosition().GetPositionX(), me->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
ResetTimer = 5 * IN_MILLISECONDS;
} else ResetTimer -= diff;
switch (eventId)
{
case EVENT_CHARGE_TARGET:
DoCast(me->getVictim(), SPELL_CHARGE);
events.ScheduleEvent(EVENT_CHARGE, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS));
break;
case EVENT_CLEAVE:
DoCast(me->getVictim(), SPELL_CLEAVE);
events.ScheduleEvent(EVENT_CLEAVE, urand(10 * IN_MILLISECONDS, 16 * IN_MILLISECONDS));
break;
case EVENT_DEMORALIZING_SHOUT:
DoCast(me, SPELL_DEMORALIZING_SHOUT);
events.ScheduleEvent(EVENT_DEMORALIZING_SHOUT, urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS));
break;
case EVENT_WHIRLWIND:
DoCast(me, SPELL_WHIRLWIND);
events.ScheduleEvent(EVENT_WHIRLWIND, urand(10 * IN_MILLISECONDS, 25 * IN_MILLISECONDS));
break;
case EVENT_ENRAGE:
DoCast(me, SPELL_ENRAGE);
events.ScheduleEvent(EVENT_ENRAGE, urand(10 * IN_MILLISECONDS, 30 * IN_MILLISECONDS));
break;
case EVENT_CHECK_RESET:
{
Position const& _homePosition = me->GetHomePosition();
if (me->GetDistance2d(_homePosition.GetPositionX(), _homePosition.GetPositionY()) > 50.0f)
{
EnterEvadeMode();
return;
}
events.ScheduleEvent(EVENT_CHECK_RESET, 5000);
break;
}
}
}
DoMeleeAttackIfReady();
}
private:
EventMap events;
bool _hasAura;
};
CreatureAI* GetAI(Creature* creature) const
@@ -22,8 +22,8 @@ enum Yells
{
YELL_AGGRO = 0,
YELL_EVADE = 1,
YELL_RESPAWN1 = -1810010, // no creature_text
YELL_RESPAWN2 = -1810011, // no creature_text
//YELL_RESPAWN1 = -1810010, // Missing in database
//YELL_RESPAWN2 = -1810011, // Missing in database
YELL_RANDOM = 2,
YELL_SPELL = 3,
};
@@ -64,12 +64,6 @@ public:
Talk(YELL_AGGRO);
}
void JustRespawned()
{
Reset();
DoScriptText(RAND(YELL_RESPAWN1, YELL_RESPAWN2), me);
}
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
@@ -20,6 +20,8 @@
#include "ScriptedEscortAI.h"
#include "ScriptedGossip.h"
#include "blackrock_depths.h"
#include "Player.h"
#include "WorldSession.h"
//go_shadowforge_brazier
class go_shadowforge_brazier : public GameObjectScript
@@ -99,12 +101,12 @@ public:
// npc_grimstone
enum GrimstoneTexts
{
SCRIPT_TEXT1 = -1230003,
SCRIPT_TEXT2 = -1230004,
SCRIPT_TEXT3 = -1230005,
SCRIPT_TEXT4 = -1230006,
SCRIPT_TEXT5 = -1230007,
SCRIPT_TEXT6 = -1230008
SAY_TEXT1 = 0,
SAY_TEXT2 = 1,
SAY_TEXT3 = 2,
SAY_TEXT4 = 3,
SAY_TEXT5 = 4,
SAY_TEXT6 = 5
};
//TODO: implement quest part of event (different end boss)
@@ -184,12 +186,12 @@ public:
switch (waypointId)
{
case 0:
DoScriptText(SCRIPT_TEXT1, me);//2
Talk(SAY_TEXT1);
CanWalk = false;
Event_Timer = 5000;
break;
case 1:
DoScriptText(SCRIPT_TEXT2, me);//4
Talk(SAY_TEXT2);
CanWalk = false;
Event_Timer = 5000;
break;
@@ -197,10 +199,10 @@ public:
CanWalk = false;
break;
case 3:
DoScriptText(SCRIPT_TEXT3, me);//5
Talk(SAY_TEXT3);
break;
case 4:
DoScriptText(SCRIPT_TEXT4, me);//6
Talk(SAY_TEXT4);
CanWalk = false;
Event_Timer = 5000;
break;
@@ -270,7 +272,7 @@ public:
switch (EventPhase)
{
case 0:
DoScriptText(SCRIPT_TEXT5, me);//1
Talk(SAY_TEXT5);
HandleGameObject(DATA_ARENA4, false);
Start(false, false);
CanWalk = true;
@@ -305,7 +307,7 @@ public:
case 7:
me->SetVisible(true);
HandleGameObject(DATA_ARENA1, false);
DoScriptText(SCRIPT_TEXT6, me);//4
Talk(SAY_TEXT6);
CanWalk = true;
Event_Timer = 0;
break;
@@ -1176,7 +1178,7 @@ public:
// npc_rocknot
enum RocknotSays
{
SAY_GOT_BEER = -1230000
SAY_GOT_BEER = 0
};
enum RocknotSpells
@@ -1213,7 +1215,7 @@ public:
//keep track of amount in instance script, returns SPECIAL if amount ok and event in progress
if (instance->GetData(TYPE_BAR) == SPECIAL)
{
DoScriptText(SAY_GOT_BEER, creature);
creature->AI()->Talk(SAY_GOT_BEER);
creature->CastSpell(creature, SPELL_DRUNKEN_RAGE, false);
if (npc_escortAI* escortAI = CAST_AI(npc_rocknot::npc_rocknotAI, creature->AI()))
@@ -22,8 +22,8 @@
enum Yells
{
SAY_AGGRO = -1230001,
SAY_SLAY = -1230002
SAY_AGGRO = 0,
SAY_SLAY = 1
};
enum Spells
@@ -63,13 +63,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
me->CallForHelp(VISIBLE_RANGE);
}
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_SLAY, me);
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -19,10 +19,11 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
enum Spells
enum Grizzle
{
SPELL_GROUNDTREMOR = 6524,
SPELL_FRENZY = 28371
SPELL_GROUNDTREMOR = 6524,
SPELL_FRENZY = 28371,
EMOTE_FRENZY_KILL = 0
};
class boss_grizzle : public CreatureScript
@@ -69,7 +70,7 @@ public:
if (Frenzy_Timer <= diff)
{
DoCast(me, SPELL_FRENZY);
DoScriptText(EMOTE_GENERIC_FRENZY_KILL, me);
Talk(EMOTE_FRENZY_KILL);
Frenzy_Timer = 15000;
} else Frenzy_Timer -= diff;
@@ -20,6 +20,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "blackrock_depths.h"
#include "Player.h"
enum Spells
{
@@ -273,7 +273,7 @@ public:
}
}
uint32 GetData(uint32 type)
uint32 GetData(uint32 type) const
{
switch (type)
{
@@ -298,7 +298,7 @@ public:
return 0;
}
uint64 GetData64(uint32 data)
uint64 GetData64(uint32 data) const
{
switch (data)
{
@@ -222,7 +222,7 @@ public:
}
}
uint64 GetData64(uint32 type)
uint64 GetData64(uint32 type) const
{
switch (type)
{
@@ -28,8 +28,8 @@ EndScriptData */
enum Say
{
SAY_AGGRO = -1469000,
SAY_LEASH = -1469001
SAY_AGGRO = 0,
SAY_LEASH = 1,
};
enum Spells
@@ -69,7 +69,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
DoZoneInCombat();
}
@@ -110,7 +110,7 @@ public:
} else KnockBack_Timer -= diff;
if (EnterEvadeIfOutOfCombatArea(diff))
DoScriptText(SAY_LEASH, me);
Talk(SAY_LEASH);
DoMeleeAttackIfReady();
}
@@ -28,8 +28,8 @@ EndScriptData */
enum Emotes
{
EMOTE_FRENZY = -1469002,
EMOTE_SHIMMER = -1469003
EMOTE_FRENZY = 0,
EMOTE_SHIMMER = 1,
};
enum Spells
@@ -219,7 +219,7 @@ public:
DoCast(me, spell);
CurrentVurln_Spell = spell;
DoScriptText(EMOTE_SHIMMER, me);
Talk(EMOTE_SHIMMER);
Shimmer_Timer = 45000;
} else Shimmer_Timer -= diff;
@@ -280,7 +280,7 @@ public:
if (Frenzy_Timer <= diff)
{
DoCast(me, SPELL_FRENZY);
DoScriptText(EMOTE_FRENZY, me);
Talk(EMOTE_FRENZY);
Frenzy_Timer = urand(10000, 15000);
} else Frenzy_Timer -= diff;
@@ -28,7 +28,7 @@ EndScriptData */
enum Emotes
{
EMOTE_FRENZY = -1469031
EMOTE_FRENZY = 0,
};
enum Spells
@@ -93,7 +93,7 @@ public:
//Frenzy_Timer
if (Frenzy_Timer <= diff)
{
DoScriptText(EMOTE_FRENZY, me);
Talk(EMOTE_FRENZY);
DoCast(me, SPELL_FRENZY);
Frenzy_Timer = urand(8000, 10000);
} else Frenzy_Timer -= diff;
@@ -28,22 +28,20 @@ EndScriptData */
enum Say
{
SAY_AGGRO = -1469007,
SAY_XHEALTH = -1469008,
SAY_SHADOWFLAME = -1469009,
SAY_RAISE_SKELETONS = -1469010,
SAY_SLAY = -1469011,
SAY_DEATH = -1469012,
SAY_RANDOM = 0,
SAY_RAISE_SKELETONS = 1,
SAY_SLAY = 2,
SAY_DEATH = 3,
SAY_MAGE = -1469013,
SAY_WARRIOR = -1469014,
SAY_DRUID = -1469015,
SAY_PRIEST = -1469016,
SAY_PALADIN = -1469017,
SAY_SHAMAN = -1469018,
SAY_WARLOCK = -1469019,
SAY_HUNTER = -1469020,
SAY_ROGUE = -1469021
SAY_MAGE = 4,
SAY_WARRIOR = 5,
SAY_DRUID = 6,
SAY_PRIEST = 7,
SAY_PALADIN = 8,
SAY_SHAMAN = 9,
SAY_WARLOCK = 10,
SAY_HUNTER = 11,
SAY_ROGUE = 12,
};
enum Spells
@@ -109,17 +107,17 @@ public:
if (rand()%5)
return;
DoScriptText(SAY_SLAY, me, Victim);
Talk(SAY_SLAY, Victim->GetGUID());
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
}
void EnterCombat(Unit* who)
{
DoScriptText(RAND(SAY_XHEALTH, SAY_AGGRO, SAY_SHADOWFLAME), me);
Talk(SAY_RANDOM);
DoCast(who, SPELL_SHADOWFLAME_INITIAL);
DoZoneInCombat();
@@ -184,39 +182,39 @@ public:
switch (urand(0, 8))
{
case 0:
DoScriptText(SAY_MAGE, me);
Talk(SAY_MAGE);
DoCast(me, SPELL_MAGE);
break;
case 1:
DoScriptText(SAY_WARRIOR, me);
Talk(SAY_WARRIOR);
DoCast(me, SPELL_WARRIOR);
break;
case 2:
DoScriptText(SAY_DRUID, me);
Talk(SAY_DRUID);
DoCast(me, SPELL_DRUID);
break;
case 3:
DoScriptText(SAY_PRIEST, me);
Talk(SAY_PRIEST);
DoCast(me, SPELL_PRIEST);
break;
case 4:
DoScriptText(SAY_PALADIN, me);
Talk(SAY_PALADIN);
DoCast(me, SPELL_PALADIN);
break;
case 5:
DoScriptText(SAY_SHAMAN, me);
Talk(SAY_SHAMAN);
DoCast(me, SPELL_SHAMAN);
break;
case 6:
DoScriptText(SAY_WARLOCK, me);
Talk(SAY_WARLOCK);
DoCast(me, SPELL_WARLOCK);
break;
case 7:
DoScriptText(SAY_HUNTER, me);
Talk(SAY_HUNTER);
DoCast(me, SPELL_HUNTER);
break;
case 8:
DoScriptText(SAY_ROGUE, me);
Talk(SAY_ROGUE);
DoCast(me, SPELL_ROGUE);
break;
}
@@ -228,7 +226,7 @@ public:
if (!Phase3 && HealthBelowPct(20))
{
Phase3 = true;
DoScriptText(SAY_RAISE_SKELETONS, me);
Talk(SAY_RAISE_SKELETONS);
}
DoMeleeAttackIfReady();
@@ -30,10 +30,10 @@ EndScriptData */
enum Say
{
SAY_EGGS_BROKEN1 = -1469022,
SAY_EGGS_BROKEN2 = -1469023,
SAY_EGGS_BROKEN3 = -1469024,
SAY_DEATH = -1469025
SAY_EGGS_BROKEN1 = 0,
SAY_EGGS_BROKEN2 = 1,
SAY_EGGS_BROKEN3 = 2,
SAY_DEATH = 3,
};
enum Spells
@@ -26,14 +26,15 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "Player.h"
enum Says
{
SAY_LINE1 = -1469026,
SAY_LINE2 = -1469027,
SAY_LINE3 = -1469028,
SAY_HALFLIFE = -1469029,
SAY_KILLTARGET = -1469030
SAY_LINE1 = 0,
SAY_LINE2 = 1,
SAY_LINE3 = 2,
SAY_HALFLIFE = 3,
SAY_KILLTARGET = 4
};
#define GOSSIP_ITEM "Start Event <Needs Gossip Text>"
@@ -129,7 +130,7 @@ public:
PlayerGUID = target->GetGUID();
//10 seconds
DoScriptText(SAY_LINE1, me);
Talk(SAY_LINE1);
SpeechTimer = 10000;
SpeechNum = 0;
@@ -143,7 +144,7 @@ public:
if (rand()%5)
return;
DoScriptText(SAY_KILLTARGET, me, victim);
Talk(SAY_KILLTARGET, victim->GetGUID());
}
void EnterCombat(Unit* /*who*/)
@@ -166,13 +167,13 @@ public:
{
case 0:
//16 seconds till next line
DoScriptText(SAY_LINE2, me);
Talk(SAY_LINE2);
SpeechTimer = 16000;
++SpeechNum;
break;
case 1:
//This one is actually 16 seconds but we only go to 10 seconds because he starts attacking after he says "I must fight this!"
DoScriptText(SAY_LINE3, me);
Talk(SAY_LINE3);
SpeechTimer = 10000;
++SpeechNum;
break;
@@ -197,7 +198,7 @@ public:
// Yell if hp lower than 15%
if (HealthBelowPct(15) && !HasYelled)
{
DoScriptText(SAY_HALFLIFE, me);
Talk(SAY_HALFLIFE);
HasYelled = true;
}
@@ -26,12 +26,13 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "Player.h"
enum Says
{
SAY_GAMESBEGIN_1 = -1469004,
SAY_GAMESBEGIN_2 = -1469005,
SAY_VAEL_INTRO = -1469006 //when he corrupts Vaelastrasz
SAY_GAMESBEGIN_1 = 0,
SAY_GAMESBEGIN_2 = 1,
//SAY_VAEL_INTRO = 2, Not used - when he corrupts Vaelastrasz
};
#define GOSSIP_ITEM_1 "I've made no mistakes."
@@ -100,7 +101,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF+3:
player->CLOSE_GOSSIP_MENU();
DoScriptText(SAY_GAMESBEGIN_1, creature);
creature->AI()->Talk(SAY_GAMESBEGIN_1);
CAST_AI(boss_victor_nefarius::boss_victor_nefariusAI, creature->AI())->BeginEvent(player);
break;
}
@@ -237,7 +238,7 @@ public:
void BeginEvent(Player* target)
{
DoScriptText(SAY_GAMESBEGIN_2, me);
Talk(SAY_GAMESBEGIN_2);
//Trinity::Singleton<MapManager>::Instance().GetMap(me->GetMapId(), me)->GetPlayers().begin();
/*
@@ -35,7 +35,7 @@ enum eSpels
EQUIP_SWORD = 5191,
EQUIP_MACE = 7230,
SAY_AGGRO = -1036001
SAY_AGGRO = 0,
};
class boss_mr_smite : public CreatureScript
@@ -82,7 +82,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
bool bCheckChances()
@@ -27,6 +27,8 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "deadmines.h"
#include "Spell.h"
#include "Player.h"
#include "WorldSession.h"
/*#####
# item_Defias_Gunpowder
@@ -26,6 +26,9 @@ EndScriptData */
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "deadmines.h"
#include "TemporarySummon.h"
#include "WorldPacket.h"
#include "Opcodes.h"
enum Sounds
{
@@ -213,7 +216,7 @@ class instance_deadmines : public InstanceMapScript
}
}
uint32 GetData(uint32 type)
uint32 GetData(uint32 type) const
{
switch (type)
{
@@ -224,7 +227,7 @@ class instance_deadmines : public InstanceMapScript
return 0;
}
uint64 GetData64(uint32 data)
uint64 GetData64(uint32 data) const
{
switch (data)
{
@@ -237,16 +240,7 @@ class instance_deadmines : public InstanceMapScript
void DoPlaySound(GameObject* unit, uint32 sound)
{
WorldPacket data(4);
data.SetOpcode(SMSG_PLAY_SOUND);
data << uint32(sound);
unit->SendMessageToSet(&data, false);
}
void DoPlaySoundCreature(Unit* unit, uint32 sound)
{
WorldPacket data(4);
data.SetOpcode(SMSG_PLAY_SOUND);
WorldPacket data(SMSG_PLAY_SOUND, 4);
data << uint32(sound);
unit->SendMessageToSet(&data, false);
}
@@ -27,6 +27,7 @@ Script Data End */
#include "ScriptedGossip.h"
#include "gnomeregan.h"
#include "ScriptedEscortAI.h"
#include "Player.h"
#define GOSSIP_START_EVENT "I am ready to being"
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "gnomeregan.h"
#include "Player.h"
#define MAX_ENCOUNTER 1
@@ -113,7 +114,7 @@ public:
}
}
uint32 GetData(uint32 uiType)
uint32 GetData(uint32 uiType) const
{
switch (uiType)
{
@@ -122,7 +123,7 @@ public:
return 0;
}
uint64 GetData64(uint32 uiType)
uint64 GetData64(uint32 uiType) const
{
switch (uiType)
{
@@ -26,23 +26,27 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#define SAY_AGGRO -1532057
#define SAY_SUMMON1 -1532058
#define SAY_SUMMON2 -1532059
#define SAY_EVOCATE -1532060
#define SAY_ENRAGE -1532061
#define SAY_KILL1 -1532062
#define SAY_KILL2 -1532063
#define SAY_DEATH -1532064
enum Curator
{
SAY_AGGRO = 0,
SAY_SUMMON = 1,
SAY_EVOCATE = 2,
SAY_ENRAGE = 3,
SAY_KILL = 4,
SAY_DEATH = 5,
//Flare spell info
SPELL_ASTRAL_FLARE_PASSIVE = 30234, //Visual effect + Flare damage
//Curator spell info
SPELL_HATEFUL_BOLT = 30383,
SPELL_EVOCATION = 30254,
SPELL_ENRAGE = 30403, //Arcane Infusion: Transforms Curator and adds damage.
SPELL_BERSERK = 26662,
};
//Flare spell info
#define SPELL_ASTRAL_FLARE_PASSIVE 30234 //Visual effect + Flare damage
//Curator spell info
#define SPELL_HATEFUL_BOLT 30383
#define SPELL_EVOCATION 30254
#define SPELL_ENRAGE 30403 //Arcane Infusion: Transforms Curator and adds damage.
#define SPELL_BERSERK 26662
class boss_curator : public CreatureScript
{
@@ -78,17 +82,17 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -109,7 +113,7 @@ public:
}
//may not be correct SAY (generic hard enrage)
DoScriptText(SAY_ENRAGE, me);
Talk(SAY_ENRAGE);
me->InterruptNonMeleeSpells(true);
DoCast(me, SPELL_BERSERK);
@@ -151,7 +155,7 @@ public:
//if this get's us below 10%, then we evocate (the 10th should be summoned now)
if (me->GetPower(POWER_MANA)*100 / me->GetMaxPower(POWER_MANA) < 10)
{
DoScriptText(SAY_EVOCATE, me);
Talk(SAY_EVOCATE);
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_EVOCATION);
Evocating = true;
@@ -162,7 +166,7 @@ public:
{
if (urand(0, 1) == 0)
{
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
Talk(SAY_SUMMON);
}
}
}
@@ -174,7 +178,7 @@ public:
{
Enraged = true;
DoCast(me, SPELL_ENRAGE);
DoScriptText(SAY_ENRAGE, me);
Talk(SAY_ENRAGE);
}
}
@@ -26,19 +26,19 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#define SAY_AGGRO -1532018
#define SAY_SLAY1 -1532019
#define SAY_SLAY2 -1532020
#define SAY_SLAY3 -1532021
#define SAY_REPENTANCE1 -1532022
#define SAY_REPENTANCE2 -1532023
#define SAY_DEATH -1532024
enum MaidenOfVirtue
{
SAY_AGGRO = 0,
SAY_SLAY = 1,
SAY_REPENTANCE = 2,
SAY_DEATH = 3,
#define SPELL_REPENTANCE 29511
#define SPELL_HOLYFIRE 29522
#define SPELL_HOLYWRATH 32445
#define SPELL_HOLYGROUND 29512
#define SPELL_BERSERK 26662
SPELL_REPENTANCE = 29511,
SPELL_HOLYFIRE = 29522,
SPELL_HOLYWRATH = 32445,
SPELL_HOLYGROUND = 29512,
SPELL_BERSERK = 26662,
};
class boss_maiden_of_virtue : public CreatureScript
{
@@ -76,17 +76,17 @@ public:
void KilledUnit(Unit* /*Victim*/)
{
if (urand(0, 1) == 0)
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -109,7 +109,7 @@ public:
if (Repentance_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_REPENTANCE);
DoScriptText(RAND(SAY_REPENTANCE1, SAY_REPENTANCE2), me);
Talk(SAY_REPENTANCE);
Repentance_Timer = urand(25000, 35000); //A little randomness on that spell
} else Repentance_Timer -= diff;
@@ -25,27 +25,27 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#define SAY_MIDNIGHT_KILL -1532000
#define SAY_APPEAR1 -1532001
#define SAY_APPEAR2 -1532002
#define SAY_APPEAR3 -1532003
#define SAY_MOUNT -1532004
#define SAY_KILL1 -1532005
#define SAY_KILL2 -1532006
#define SAY_DISARMED -1532007
#define SAY_DEATH -1532008
#define SAY_RANDOM1 -1532009
#define SAY_RANDOM2 -1532010
enum Midnight
{
SAY_MIDNIGHT_KILL = 0,
SAY_APPEAR = 1,
SAY_MOUNT = 2,
SAY_KILL = 3,
SAY_DISARMED = 4,
SAY_DEATH = 5,
SAY_RANDOM = 6,
#define SPELL_SHADOWCLEAVE 29832
#define SPELL_INTANGIBLE_PRESENCE 29833
#define SPELL_BERSERKER_CHARGE 26561 //Only when mounted
SPELL_SHADOWCLEAVE = 29832,
SPELL_INTANGIBLE_PRESENCE = 29833,
SPELL_BERSERKER_CHARGE = 26561, //Only when mounted
#define MOUNTED_DISPLAYID 16040
MOUNTED_DISPLAYID = 16040,
//Attumen (TODO: Use the summoning spell instead of Creature id. It works, but is not convenient for us)
#define SUMMON_ATTUMEN 15550
//Attumen (TODO: Use the summoning spell instead of Creature id. It works, but is not convenient for us)
SUMMON_ATTUMEN = 15550,
};
class boss_attumen : public CreatureScript
{
@@ -93,14 +93,14 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
if (Unit* pMidnight = Unit::GetUnit(*me, Midnight))
pMidnight->Kill(pMidnight);
Talk(SAY_DEATH);
if (Unit* midnight = Unit::GetUnit(*me, Midnight))
midnight->Kill(midnight);
}
void UpdateAI(const uint32 diff);
@@ -108,7 +108,7 @@ public:
void SpellHit(Unit* /*source*/, const SpellInfo* spell)
{
if (spell->Mechanic == MECHANIC_DISARM)
DoScriptText(SAY_DISARMED, me);
Talk(SAY_DISARMED);
}
};
};
@@ -148,7 +148,7 @@ public:
if (Phase == 2)
{
if (Unit* unit = Unit::GetUnit(*me, Attumen))
DoScriptText(SAY_MIDNIGHT_KILL, unit);
Talk(SAY_MIDNIGHT_KILL, unit->GetGUID());
}
}
@@ -160,12 +160,12 @@ public:
if (Phase == 1 && HealthBelowPct(95))
{
Phase = 2;
if (Creature* pAttumen = me->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000))
if (Creature* attumen = me->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000))
{
Attumen = pAttumen->GetGUID();
pAttumen->AI()->AttackStart(me->getVictim());
SetMidnight(pAttumen, me->GetGUID());
DoScriptText(RAND(SAY_APPEAR1, SAY_APPEAR2, SAY_APPEAR3), pAttumen);
Attumen = attumen->GetGUID();
attumen->AI()->AttackStart(me->getVictim());
SetMidnight(attumen, me->GetGUID());
Talk(SAY_APPEAR, Attumen);
}
}
else if (Phase == 2 && HealthBelowPct(25))
@@ -203,7 +203,7 @@ public:
void Mount(Unit* pAttumen)
{
DoScriptText(SAY_MOUNT, pAttumen);
Talk(SAY_MOUNT, pAttumen->GetGUID());
Phase = 3;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pAttumen->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -273,7 +273,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
if (RandomYellTimer <= diff)
{
DoScriptText(RAND(SAY_RANDOM1, SAY_RANDOM2), me);
Talk(SAY_RANDOM);
RandomYellTimer = urand(30000, 60000);
} else RandomYellTimer -= diff;
@@ -27,19 +27,20 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "karazhan.h"
#define SAY_AGGRO -1532011
#define SAY_SPECIAL_1 -1532012
#define SAY_SPECIAL_2 -1532013
#define SAY_KILL_1 -1532014
#define SAY_KILL_2 -1532015
#define SAY_KILL_3 -1532016
#define SAY_DEATH -1532017
enum Moroes
{
SAY_AGGRO = 0,
SAY_SPECIAL = 1,
SAY_KILL = 2,
SAY_DEATH = 3,
SPELL_VANISH = 29448,
SPELL_GARROTE = 37066,
SPELL_BLIND = 34694,
SPELL_GOUGE = 29425,
SPELL_FRENZY = 37023,
};
#define SPELL_VANISH 29448
#define SPELL_GARROTE 37066
#define SPELL_BLIND 34694
#define SPELL_GOUGE 29425
#define SPELL_FRENZY 37023
#define POS_Z 81.73f
@@ -124,19 +125,19 @@ public:
{
StartEvent();
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
AddsAttack();
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2, SAY_KILL_3), me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_MOROES, DONE);
@@ -294,7 +295,7 @@ public:
{
if (Wait_Timer <= diff)
{
DoScriptText(RAND(SAY_SPECIAL_1, SAY_SPECIAL_2), me);
Talk(SAY_SPECIAL);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
target->CastSpell(target, SPELL_GARROTE, true);
@@ -26,18 +26,23 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "karazhan.h"
#include "Player.h"
#define EMOTE_PHASE_PORTAL -1532089
#define EMOTE_PHASE_BANISH -1532090
enum Netherspite
{
EMOTE_PHASE_PORTAL = 0,
EMOTE_PHASE_BANISH = 1,
SPELL_NETHERBURN_AURA = 30522,
SPELL_VOIDZONE = 37063,
SPELL_NETHER_INFUSION = 38688,
SPELL_NETHERBREATH = 38523,
SPELL_BANISH_VISUAL = 39833,
SPELL_BANISH_ROOT = 42716,
SPELL_EMPOWERMENT = 38549,
SPELL_NETHERSPITE_ROAR = 38684,
};
#define SPELL_NETHERBURN_AURA 30522
#define SPELL_VOIDZONE 37063
#define SPELL_NETHER_INFUSION 38688
#define SPELL_NETHERBREATH 38523
#define SPELL_BANISH_VISUAL 39833
#define SPELL_BANISH_ROOT 42716
#define SPELL_EMPOWERMENT 38549
#define SPELL_NETHERSPITE_ROAR 38684
const float PortalCoord[3][3] =
{
@@ -228,7 +233,7 @@ public:
PortalPhase = true;
PortalTimer = 10000;
EmpowermentTimer = 10000;
DoScriptText(EMOTE_PHASE_PORTAL, me);
Talk(EMOTE_PHASE_PORTAL);
}
void SwitchToBanishPhase()
@@ -240,7 +245,7 @@ public:
DestroyPortals();
PhaseTimer = 30000;
PortalPhase = false;
DoScriptText(EMOTE_PHASE_BANISH, me);
Talk(EMOTE_PHASE_BANISH);
for (int i=0; i<3; ++i)
me->RemoveAurasDueToSpell(NetherBuff[i]);
@@ -26,19 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "karazhan.h"
#define SAY_AGGRO -1532091
#define SAY_AXE_TOSS1 -1532092
#define SAY_AXE_TOSS2 -1532093
#define SAY_SPECIAL1 -1532094
#define SAY_SPECIAL2 -1532095
#define SAY_SPECIAL3 -1532096
#define SAY_SLAY1 -1532097
#define SAY_SLAY2 -1532098
#define SAY_SLAY3 -1532099
#define SAY_SUMMON1 -1532100
#define SAY_SUMMON2 -1532101
#define SAY_DEATH -1532102
#include "SpellInfo.h"
// 18 Coordinates for Infernal spawns
struct InfernalPoint
@@ -70,31 +58,43 @@ static InfernalPoint InfernalPoints[] =
{-10935.7f, -1996.0f}
};
#define TOTAL_INFERNAL_POINTS 18
//Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends
//Along with reducing healing and regen while enfeebled to 0%
//This spell effect will only reduce healing
enum PrinceMalchezaar
{
SAY_AGGRO = 0,
SAY_AXE_TOSS1 = 1,
SAY_AXE_TOSS2 = 2,
// SAY_SPECIAL1 = 3, Not used, needs to be implemented, but I don't know where it should be used.
// SAY_SPECIAL2 = 4, Not used, needs to be implemented, but I don't know where it should be used.
// SAY_SPECIAL3 = 5, Not used, needs to be implemented, but I don't know where it should be used.
SAY_SLAY = 6,
SAY_SUMMON = 7,
SAY_DEATH = 8,
#define SPELL_ENFEEBLE 30843 //Enfeeble during phase 1 and 2
#define SPELL_ENFEEBLE_EFFECT 41624
TOTAL_INFERNAL_POINTS = 18,
#define SPELL_SHADOWNOVA 30852 //Shadownova used during all phases
#define SPELL_SW_PAIN 30854 //Shadow word pain during phase 1 and 3 (different targeting rules though)
#define SPELL_THRASH_PASSIVE 12787 //Extra attack chance during phase 2
#define SPELL_SUNDER_ARMOR 30901 //Sunder armor during phase 2
#define SPELL_THRASH_AURA 12787 //Passive proc chance for thrash
#define SPELL_EQUIP_AXES 30857 //Visual for axe equiping
#define SPELL_AMPLIFY_DAMAGE 39095 //Amplifiy during phase 3
#define SPELL_CLEAVE 30131 //Same as Nightbane.
#define SPELL_HELLFIRE 30859 //Infenals' hellfire aura
#define NETHERSPITE_INFERNAL 17646 //The netherspite infernal creature
#define MALCHEZARS_AXE 17650 //Malchezar's axes (creatures), summoned during phase 3
SPELL_ENFEEBLE = 30843, //Enfeeble during phase 1 and 2
SPELL_ENFEEBLE_EFFECT = 41624,
#define INFERNAL_MODEL_INVISIBLE 11686 //Infernal Effects
#define SPELL_INFERNAL_RELAY 30834
SPELL_SHADOWNOVA = 30852, //Shadownova used during all phases
SPELL_SW_PAIN = 30854, //Shadow word pain during phase 1 and 3 (different targeting rules though)
SPELL_THRASH_PASSIVE = 12787, //Extra attack chance during phase 2
SPELL_SUNDER_ARMOR = 30901, //Sunder armor during phase 2
SPELL_THRASH_AURA = 12787, //Passive proc chance for thrash
SPELL_EQUIP_AXES = 30857, //Visual for axe equiping
SPELL_AMPLIFY_DAMAGE = 39095, //Amplifiy during phase 3
SPELL_CLEAVE = 30131, //Same as Nightbane.
SPELL_HELLFIRE = 30859, //Infenals' hellfire aura
NETHERSPITE_INFERNAL = 17646, //The netherspite infernal creature
MALCHEZARS_AXE = 17650, //Malchezar's axes (creatures), summoned during phase 3
#define EQUIP_ID_AXE 33542 //Axes info
INFERNAL_MODEL_INVISIBLE = 11686, //Infernal Effects
SPELL_INFERNAL_RELAY = 30834,
EQUIP_ID_AXE = 33542, //Axes info
};
//---------Infernal code first
class netherspite_infernal : public CreatureScript
@@ -244,12 +244,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
AxesCleanup();
ClearWeapons();
@@ -265,7 +265,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), false); // Open the door leading further in
@@ -383,7 +383,7 @@ public:
DoCast(Infernal, SPELL_INFERNAL_RELAY);
}
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
Talk(SAY_SUMMON);
}
void UpdateAI(const uint32 diff)
@@ -415,7 +415,7 @@ public:
DoCast(me, SPELL_EQUIP_AXES);
//text
DoScriptText(SAY_AXE_TOSS1, me);
Talk(SAY_AXE_TOSS1);
//passive thrash aura
DoCast(me, SPELL_THRASH_AURA, true);
@@ -451,7 +451,7 @@ public:
//remove thrash
me->RemoveAurasDueToSpell(SPELL_THRASH_AURA);
DoScriptText(SAY_AXE_TOSS2, me);
Talk(SAY_AXE_TOSS2);
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
for (uint8 i = 0; i < 2; ++i)
@@ -27,52 +27,50 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "karazhan.h"
#include "GameObject.h"
#include "SpellInfo.h"
#define SAY_AGGRO1 -1532073
#define SAY_AGGRO2 -1532074
#define SAY_AGGRO3 -1532075
#define SAY_FLAMEWREATH1 -1532076
#define SAY_FLAMEWREATH2 -1532077
#define SAY_BLIZZARD1 -1532078
#define SAY_BLIZZARD2 -1532079
#define SAY_EXPLOSION1 -1532080
#define SAY_EXPLOSION2 -1532081
#define SAY_DRINK -1532082 //Low Mana / AoE Pyroblast
#define SAY_ELEMENTALS -1532083
#define SAY_KILL1 -1532084
#define SAY_KILL2 -1532085
#define SAY_TIMEOVER -1532086
#define SAY_DEATH -1532087
#define SAY_ATIESH -1532088 //Atiesh is equipped by a raid member
enum ShadeOfAran
{
SAY_AGGRO = 0,
SAY_FLAMEWREATH = 1,
SAY_BLIZZARD = 2,
SAY_EXPLOSION = 3,
SAY_DRINK = 4,
SAY_ELEMENTALS = 5,
SAY_KILL = 6,
SAY_TIMEOVER = 7,
SAY_DEATH = 8,
// SAY_ATIESH = 9, Unused
//Spells
#define SPELL_FROSTBOLT 29954
#define SPELL_FIREBALL 29953
#define SPELL_ARCMISSLE 29955
#define SPELL_CHAINSOFICE 29991
#define SPELL_DRAGONSBREATH 29964
#define SPELL_MASSSLOW 30035
#define SPELL_FLAME_WREATH 29946
#define SPELL_AOE_CS 29961
#define SPELL_PLAYERPULL 32265
#define SPELL_AEXPLOSION 29973
#define SPELL_MASS_POLY 29963
#define SPELL_BLINK_CENTER 29967
#define SPELL_ELEMENTALS 29962
#define SPELL_CONJURE 29975
#define SPELL_DRINK 30024
#define SPELL_POTION 32453
#define SPELL_AOE_PYROBLAST 29978
//Spells
SPELL_FROSTBOLT = 29954,
SPELL_FIREBALL = 29953,
SPELL_ARCMISSLE = 29955,
SPELL_CHAINSOFICE = 29991,
SPELL_DRAGONSBREATH = 29964,
SPELL_MASSSLOW = 30035,
SPELL_FLAME_WREATH = 29946,
SPELL_AOE_CS = 29961,
SPELL_PLAYERPULL = 32265,
SPELL_AEXPLOSION = 29973,
SPELL_MASS_POLY = 29963,
SPELL_BLINK_CENTER = 29967,
SPELL_ELEMENTALS = 29962,
SPELL_CONJURE = 29975,
SPELL_DRINK = 30024,
SPELL_POTION = 32453,
SPELL_AOE_PYROBLAST = 29978,
//Creature Spells
#define SPELL_CIRCULAR_BLIZZARD 29951 //29952 is the REAL circular blizzard that leaves persistant blizzards that last for 10 seconds
#define SPELL_WATERBOLT 31012
#define SPELL_SHADOW_PYRO 29978
//Creature Spells
SPELL_CIRCULAR_BLIZZARD = 29951,
SPELL_WATERBOLT = 31012,
SPELL_SHADOW_PYRO = 29978,
//Creatures
#define CREATURE_WATER_ELEMENTAL 17167
#define CREATURE_SHADOW_OF_ARAN 18254
#define CREATURE_ARAN_BLIZZARD 17161
//Creatures
CREATURE_WATER_ELEMENTAL = 17167,
CREATURE_SHADOW_OF_ARAN = 18254,
CREATURE_ARAN_BLIZZARD = 17161,
};
enum SuperSpell
{
@@ -159,12 +157,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (instance)
{
@@ -175,7 +173,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
Talk(SAY_AGGRO);
if (instance)
{
@@ -263,7 +261,7 @@ public:
Drinking = true;
me->InterruptNonMeleeSpells(false);
DoScriptText(SAY_DRINK, me);
Talk(SAY_DRINK);
if (!DrinkInturrupted)
{
@@ -383,7 +381,7 @@ public:
switch (LastSuperSpell)
{
case SUPER_AE:
DoScriptText(RAND(SAY_EXPLOSION1, SAY_EXPLOSION2), me);
Talk(SAY_EXPLOSION);
DoCast(me, SPELL_BLINK_CENTER, true);
DoCast(me, SPELL_PLAYERPULL, true);
@@ -392,7 +390,7 @@ public:
break;
case SUPER_FLAME:
DoScriptText(RAND(SAY_FLAMEWREATH1, SAY_FLAMEWREATH2), me);
Talk(SAY_FLAMEWREATH);
FlameWreathTimer = 20000;
FlameWreathCheckTime = 500;
@@ -405,7 +403,7 @@ public:
break;
case SUPER_BLIZZARD:
DoScriptText(RAND(SAY_BLIZZARD1, SAY_BLIZZARD2), me);
Talk(SAY_BLIZZARD);
if (Creature* pSpawn = me->SummonCreature(CREATURE_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000))
{
@@ -431,7 +429,7 @@ public:
}
}
DoScriptText(SAY_ELEMENTALS, me);
Talk(SAY_ELEMENTALS);
}
if (BerserkTimer <= diff)
@@ -445,7 +443,7 @@ public:
}
}
DoScriptText(SAY_TIMEOVER, me);
Talk(SAY_TIMEOVER);
BerserkTimer = 60000;
} else BerserkTimer -= diff;
@@ -28,35 +28,36 @@ EndScriptData */
#include "karazhan.h"
#include "PassiveAI.h"
#define SAY_SLAY1 -1532065
#define SAY_SLAY2 -1532066
#define SAY_DEATH -1532067
#define SAY_AGGRO -1532068
#define SAY_SACRIFICE1 -1532069
#define SAY_SACRIFICE2 -1532070
#define SAY_SUMMON1 -1532071
#define SAY_SUMMON2 -1532072
enum TerestianIllhoof
{
SAY_SLAY = 1,
SAY_DEATH = 2,
SAY_AGGRO = 3,
SAY_SACRIFICE = 4,
SAY_SUMMON = 5,
#define SPELL_SUMMON_DEMONCHAINS 30120 // Summons demonic chains that maintain the ritual of sacrifice.
#define SPELL_DEMON_CHAINS 30206 // Instant - Visual Effect
#define SPELL_ENRAGE 23537 // Increases the caster's attack speed by 50% and the Physical damage it deals by 219 to 281 for 10 min.
#define SPELL_SHADOW_BOLT 30055 // Hurls a bolt of dark magic at an enemy, inflicting Shadow damage.
#define SPELL_SACRIFICE 30115 // Teleports and adds the debuff
#define SPELL_BERSERK 32965 // Increases attack speed by 75%. Periodically casts Shadow Bolt Volley.
#define SPELL_SUMMON_FIENDISIMP 30184 // Summons a Fiendish Imp.
#define SPELL_SUMMON_IMP 30066 // Summons Kil'rek
SPELL_SUMMON_DEMONCHAINS = 30120, // Summons demonic chains that maintain the ritual of sacrifice.
SPELL_DEMON_CHAINS = 30206, // Instant - Visual Effect
SPELL_ENRAGE = 23537, // Increases the caster's attack speed by 50% and the Physical damage it deals by 219 to 281 for 10 min.
SPELL_SHADOW_BOLT = 30055, // Hurls a bolt of dark magic at an enemy, inflicting Shadow damage.
SPELL_SACRIFICE = 30115, // Teleports and adds the debuff
SPELL_BERSERK = 32965, // Increases attack speed by 75%. Periodically casts Shadow Bolt Volley.
SPELL_SUMMON_FIENDISIMP = 30184, // Summons a Fiendish Imp.
SPELL_SUMMON_IMP = 30066, // Summons Kil'rek
#define SPELL_FIENDISH_PORTAL 30171 // Opens portal and summons Fiendish Portal, 2 sec cast
#define SPELL_FIENDISH_PORTAL_1 30179 // Opens portal and summons Fiendish Portal, instant cast
SPELL_FIENDISH_PORTAL = 30171, // Opens portal and summons Fiendish Portal, 2 sec cast
SPELL_FIENDISH_PORTAL_1 = 30179, // Opens portal and summons Fiendish Portal, instant cast
#define SPELL_FIREBOLT 30050 // Blasts a target for 150 Fire damage.
#define SPELL_BROKEN_PACT 30065 // All damage taken increased by 25%.
#define SPELL_AMPLIFY_FLAMES 30053 // Increases the Fire damage taken by an enemy by 500 for 25 sec.
SPELL_FIREBOLT = 30050, // Blasts a target for 150 Fire damage.
SPELL_BROKEN_PACT = 30065, // All damage taken increased by 25%.
SPELL_AMPLIFY_FLAMES = 30053, // Increases the Fire damage taken by an enemy by 500 for 25 sec.
CREATURE_DEMONCHAINS = 17248,
CREATURE_FIENDISHIMP = 17267,
CREATURE_PORTAL = 17265,
CREATURE_KILREK = 17229,
};
#define CREATURE_DEMONCHAINS 17248
#define CREATURE_FIENDISHIMP 17267
#define CREATURE_PORTAL 17265
#define CREATURE_KILREK 17229
class mob_kilrek : public CreatureScript
{
@@ -319,7 +320,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -331,7 +332,7 @@ public:
if (summoned->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_FIENDISH_PORTAL_1)
{
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
Talk(SAY_SUMMON);
SummonedPortals = true;
}
}
@@ -339,7 +340,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -355,7 +356,7 @@ public:
}
}
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_TERESTIAN, DONE);
@@ -378,7 +379,7 @@ public:
{
CAST_AI(mob_demon_chain::mob_demon_chainAI, Chains->AI())->SacrificeGUID = target->GetGUID();
Chains->CastSpell(Chains, SPELL_DEMON_CHAINS, true);
DoScriptText(RAND(SAY_SACRIFICE1, SAY_SACRIFICE2), me);
Talk(SAY_SACRIFICE);
SacrificeTimer = 30000;
}
}
@@ -27,68 +27,75 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "karazhan.h"
#include "Player.h"
#include "SpellInfo.h"
/***********************************/
/*** OPERA WIZARD OF OZ EVENT *****/
/*********************************/
enum Says
{
SAY_DOROTHEE_DEATH = 0,
SAY_DOROTHEE_SUMMON = 1,
SAY_DOROTHEE_TITO_DEATH = 2,
SAY_DOROTHEE_AGGRO = 3,
#define SAY_DOROTHEE_DEATH -1532025
#define SAY_DOROTHEE_SUMMON -1532026
#define SAY_DOROTHEE_TITO_DEATH -1532027
#define SAY_DOROTHEE_AGGRO -1532028
SAY_ROAR_AGGRO = 0,
SAY_ROAR_DEATH = 1,
SAY_ROAR_SLAY = 2,
#define SAY_ROAR_AGGRO -1532029
#define SAY_ROAR_DEATH -1532030
#define SAY_ROAR_SLAY -1532031
SAY_STRAWMAN_AGGRO = 0,
SAY_STRAWMAN_DEATH = 1,
SAY_STRAWMAN_SLAY = 2,
#define SAY_STRAWMAN_AGGRO -1532032
#define SAY_STRAWMAN_DEATH -1532033
#define SAY_STRAWMAN_SLAY -1532034
SAY_TINHEAD_AGGRO = 0,
SAY_TINHEAD_DEATH = 1,
SAY_TINHEAD_SLAY = 2,
EMOTE_RUST = 3,
#define SAY_TINHEAD_AGGRO -1532035
#define SAY_TINHEAD_DEATH -1532036
#define SAY_TINHEAD_SLAY -1532037
#define EMOTE_RUST -1532038
SAY_CRONE_AGGRO = 0,
SAY_CRONE_DEATH = 1,
SAY_CRONE_SLAY = 2,
};
#define SAY_CRONE_AGGRO -1532039
#define SAY_CRONE_AGGRO2 -1532040
#define SAY_CRONE_DEATH -1532041
#define SAY_CRONE_SLAY -1532042
enum Spells
{
// Dorothee
SPELL_WATERBOLT = 31012,
SPELL_SCREAM = 31013,
SPELL_SUMMONTITO = 31014,
/**** Spells ****/
// Dorothee
#define SPELL_WATERBOLT 31012
#define SPELL_SCREAM 31013
#define SPELL_SUMMONTITO 31014
// Tito
SPELL_YIPPING = 31015,
// Tito
#define SPELL_YIPPING 31015
// Strawman
SPELL_BRAIN_BASH = 31046,
SPELL_BRAIN_WIPE = 31069,
SPELL_BURNING_STRAW = 31075,
// Strawman
#define SPELL_BRAIN_BASH 31046
#define SPELL_BRAIN_WIPE 31069
#define SPELL_BURNING_STRAW 31075
// Tinhead
SPELL_CLEAVE = 31043,
SPELL_RUST = 31086,
// Tinhead
#define SPELL_CLEAVE 31043
#define SPELL_RUST 31086
// Roar
SPELL_MANGLE = 31041,
SPELL_SHRED = 31042,
SPELL_FRIGHTENED_SCREAM = 31013,
// Roar
#define SPELL_MANGLE 31041
#define SPELL_SHRED 31042
#define SPELL_FRIGHTENED_SCREAM 31013
// Crone
SPELL_CHAIN_LIGHTNING = 32337,
// Crone
#define SPELL_CHAIN_LIGHTNING 32337
// Cyclone
SPELL_KNOCKBACK = 32334,
SPELL_CYCLONE_VISUAL = 32332,
};
// Cyclone
#define SPELL_KNOCKBACK 32334
#define SPELL_CYCLONE_VISUAL 32332
/** Creature Entries **/
#define CREATURE_TITO 17548
#define CREATURE_CYCLONE 18412
#define CREATURE_CRONE 18168
enum Creatures
{
CREATURE_TITO = 17548,
CREATURE_CYCLONE = 18412,
CREATURE_CRONE = 18168,
};
void SummonCroneIfReady(InstanceScript* instance, Creature* creature)
{
@@ -146,7 +153,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_DOROTHEE_AGGRO, me);
Talk(SAY_DOROTHEE_AGGRO);
}
void JustReachedHome()
@@ -158,7 +165,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DOROTHEE_DEATH, me);
Talk(SAY_DOROTHEE_DEATH);
if (instance)
SummonCroneIfReady(instance, me);
@@ -251,7 +258,7 @@ public:
if (Dorothee && Dorothee->isAlive())
{
CAST_AI(boss_dorothee::boss_dorotheeAI, Dorothee->AI())->TitoDied = true;
DoScriptText(SAY_DOROTHEE_TITO_DEATH, Dorothee);
Talk(SAY_DOROTHEE_TITO_DEATH, Dorothee->GetGUID());
}
}
}
@@ -276,7 +283,7 @@ void boss_dorothee::boss_dorotheeAI::SummonTito()
{
if (Creature* pTito = me->SummonCreature(CREATURE_TITO, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
{
DoScriptText(SAY_DOROTHEE_SUMMON, me);
Talk(SAY_DOROTHEE_SUMMON);
CAST_AI(mob_tito::mob_titoAI, pTito->AI())->DorotheeGUID = me->GetGUID();
pTito->AI()->AttackStart(me->getVictim());
SummonedTito = true;
@@ -332,7 +339,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_STRAWMAN_AGGRO, me);
Talk(SAY_STRAWMAN_AGGRO);
}
void JustReachedHome()
@@ -355,7 +362,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_STRAWMAN_DEATH, me);
Talk(SAY_STRAWMAN_DEATH);
if (instance)
SummonCroneIfReady(instance, me);
@@ -363,7 +370,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_STRAWMAN_SLAY, me);
Talk(SAY_STRAWMAN_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -434,7 +441,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_TINHEAD_AGGRO, me);
Talk(SAY_TINHEAD_AGGRO);
}
void JustReachedHome()
@@ -460,7 +467,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_TINHEAD_DEATH, me);
Talk(SAY_TINHEAD_DEATH);
if (instance)
SummonCroneIfReady(instance, me);
@@ -468,7 +475,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_TINHEAD_SLAY, me);
Talk(SAY_TINHEAD_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -496,7 +503,7 @@ public:
if (RustTimer <= diff)
{
++RustCount;
DoScriptText(EMOTE_RUST, me);
Talk(EMOTE_RUST);
DoCast(me, SPELL_RUST);
RustTimer = 6000;
} else RustTimer -= diff;
@@ -557,7 +564,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_ROAR_AGGRO, me);
Talk(SAY_ROAR_AGGRO);
}
void JustReachedHome()
@@ -567,7 +574,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_ROAR_DEATH, me);
Talk(SAY_ROAR_DEATH);
if (instance)
SummonCroneIfReady(instance, me);
@@ -575,7 +582,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_ROAR_SLAY, me);
Talk(SAY_ROAR_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -648,16 +655,21 @@ public:
me->DespawnOrUnsummon();
}
void KilledUnit(Unit* /*victim*/)
{
Talk(SAY_CRONE_SLAY);
}
void EnterCombat(Unit* /*who*/)
{
DoScriptText(RAND(SAY_CRONE_AGGRO, SAY_CRONE_AGGRO2), me);
Talk(SAY_CRONE_AGGRO);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_CRONE_DEATH, me);
Talk(SAY_CRONE_DEATH);
if (instance)
{
@@ -742,22 +754,24 @@ public:
/**************************************/
/**** Opera Red Riding Hood Event* ***/
/************************************/
enum RedRidingHood
{
SAY_WOLF_AGGRO = 0,
SAY_WOLF_SLAY = 1,
SAY_WOLF_HOOD = 2,
SOUND_WOLF_DEATH = 9275,
/**** Yells for the Wolf ****/
#define SAY_WOLF_AGGRO -1532043
#define SAY_WOLF_SLAY -1532044
#define SAY_WOLF_HOOD -1532045
#define SOUND_WOLF_DEATH 9275 //Only sound on death, no text.
SPELL_LITTLE_RED_RIDING_HOOD = 30768,
SPELL_TERRIFYING_HOWL = 30752,
SPELL_WIDE_SWIPE = 30761,
CREATURE_BIG_BAD_WOLF = 17521,
};
/**** Spells For The Wolf ****/
#define SPELL_LITTLE_RED_RIDING_HOOD 30768
#define SPELL_TERRIFYING_HOWL 30752
#define SPELL_WIDE_SWIPE 30761
#define GOSSIP_GRANDMA "What phat lewtz you have grandmother?"
/**** The Wolf's Entry* ***/
#define CREATURE_BIG_BAD_WOLF 17521
class npc_grandmother : public CreatureScript
{
@@ -829,7 +843,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_WOLF_AGGRO, me);
Talk(SAY_WOLF_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
Talk(SAY_WOLF_SLAY);
}
void JustReachedHome()
@@ -865,7 +884,7 @@ public:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoScriptText(SAY_WOLF_HOOD, me);
Talk(SAY_WOLF_HOOD);
DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true);
TempThreat = DoGetThreat(target);
if (TempThreat)
@@ -915,41 +934,41 @@ public:
/******** Opera Romeo and Juliet Event* ******/
/********************************************/
/**** Speech *****/
#define SAY_JULIANNE_AGGRO -1532046
#define SAY_JULIANNE_ENTER -1532047
#define SAY_JULIANNE_DEATH01 -1532048
#define SAY_JULIANNE_DEATH02 -1532049
#define SAY_JULIANNE_RESURRECT -1532050
#define SAY_JULIANNE_SLAY -1532051
enum JulianneRomulo
{
/**** Speech *****/
SAY_JULIANNE_AGGRO = 0,
SAY_JULIANNE_ENTER = 1,
SAY_JULIANNE_DEATH01 = 2,
SAY_JULIANNE_DEATH02 = 3,
SAY_JULIANNE_RESURRECT = 4,
SAY_JULIANNE_SLAY = 5,
#define SAY_ROMULO_AGGRO -1532052
#define SAY_ROMULO_DEATH -1532053
#define SAY_ROMULO_ENTER -1532054
#define SAY_ROMULO_RESURRECT -1532055
#define SAY_ROMULO_SLAY -1532056
SAY_ROMULO_AGGRO = 0,
SAY_ROMULO_DEATH = 1,
SAY_ROMULO_ENTER = 2,
SAY_ROMULO_RESURRECT = 3,
SAY_ROMULO_SLAY = 4,
/***** Spells For Julianne *****/
#define SPELL_BLINDING_PASSION 30890
#define SPELL_DEVOTION 30887
#define SPELL_ETERNAL_AFFECTION 30878
#define SPELL_POWERFUL_ATTRACTION 30889
#define SPELL_DRINK_POISON 30907
SPELL_BLINDING_PASSION = 30890,
SPELL_DEVOTION = 30887,
SPELL_ETERNAL_AFFECTION = 30878,
SPELL_POWERFUL_ATTRACTION = 30889,
SPELL_DRINK_POISON = 30907,
/***** Spells For Romulo ****/
#define SPELL_BACKWARD_LUNGE 30815
#define SPELL_DARING 30841
#define SPELL_DEADLY_SWATHE 30817
#define SPELL_POISON_THRUST 30822
SPELL_BACKWARD_LUNGE = 30815,
SPELL_DARING = 30841,
SPELL_DEADLY_SWATHE = 30817,
SPELL_POISON_THRUST = 30822,
/**** Other Misc. Spells ****/
#define SPELL_UNDYING_LOVE 30951
#define SPELL_RES_VISUAL 24171
SPELL_UNDYING_LOVE = 30951,
SPELL_RES_VISUAL = 24171,
CREATURE_ROMULO = 17533,
ROMULO_X = -10900,
ROMULO_Y = -1758,
};
/*** Misc. Information ****/
#define CREATURE_ROMULO 17533
#define ROMULO_X -10900
#define ROMULO_Y -1758
enum RAJPhase
{
@@ -1076,7 +1095,7 @@ public:
{
if (Spell->Id == SPELL_DRINK_POISON)
{
DoScriptText(SAY_JULIANNE_DEATH01, me);
Talk(SAY_JULIANNE_DEATH01);
DrinkPoisonTimer = 2500;
}
}
@@ -1085,7 +1104,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_JULIANNE_DEATH02, me);
Talk(SAY_JULIANNE_DEATH02);
if (instance)
{
@@ -1099,7 +1118,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_JULIANNE_SLAY, me);
Talk(SAY_JULIANNE_SLAY);
}
void UpdateAI(const uint32 diff);
@@ -1170,7 +1189,7 @@ public:
if (Phase == PHASE_ROMULO)
{
DoScriptText(SAY_ROMULO_DEATH, me);
Talk(SAY_ROMULO_DEATH);
PretendToDie(me);
IsFakingDeath = true;
Phase = PHASE_BOTH;
@@ -1217,7 +1236,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_ROMULO_AGGRO, me);
Talk(SAY_ROMULO_AGGRO);
if (JulianneGUID)
{
Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
@@ -1239,7 +1258,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_ROMULO_DEATH, me);
Talk(SAY_ROMULO_DEATH);
if (instance)
{
@@ -1254,7 +1273,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_ROMULO_SLAY, me);
Talk(SAY_ROMULO_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -1269,7 +1288,7 @@ public:
Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
if (Julianne && CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->IsFakingDeath)
{
DoScriptText(SAY_ROMULO_RESURRECT, me);
Talk(SAY_ROMULO_RESURRECT);
Resurrect(Julianne);
CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->IsFakingDeath = false;
JulianneDead = false;
@@ -1318,7 +1337,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
{
if (EntryYellTimer <= diff)
{
DoScriptText(SAY_JULIANNE_ENTER, me);
Talk(SAY_JULIANNE_ENTER);
EntryYellTimer = 0;
} else EntryYellTimer -= diff;
}
@@ -1327,7 +1346,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
{
if (AggroYellTimer <= diff)
{
DoScriptText(SAY_JULIANNE_AGGRO, me);
Talk(SAY_JULIANNE_AGGRO);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->setFaction(16);
AggroYellTimer = 0;
@@ -1389,7 +1408,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
Creature* Romulo = (Unit::GetCreature((*me), RomuloGUID));
if (Romulo && CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->IsFakingDeath)
{
DoScriptText(SAY_JULIANNE_RESURRECT, me);
Talk(SAY_JULIANNE_RESURRECT);
Resurrect(Romulo);
CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->IsFakingDeath = false;
RomuloDead = false;
@@ -241,7 +241,7 @@ public:
return strSaveData;
}
uint32 GetData(uint32 uiData)
uint32 GetData(uint32 uiData) const
{
switch (uiData)
{
@@ -264,7 +264,7 @@ public:
return 0;
}
uint64 GetData64(uint32 uiData)
uint64 GetData64(uint32 uiData) const
{
switch (uiData)
{
@@ -34,6 +34,7 @@ EndContentData */
#include "ScriptedGossip.h"
#include "karazhan.h"
#include "ScriptedEscortAI.h"
#include "Player.h"
/*######
# npc_barnesAI
@@ -62,26 +63,26 @@ struct Dialogue
static Dialogue OzDialogue[]=
{
{-1532103, 6000},
{-1532104, 18000},
{-1532105, 9000},
{-1532106, 15000}
{0, 6000},
{1, 18000},
{2, 9000},
{3, 15000}
};
static Dialogue HoodDialogue[]=
{
{-1532107, 6000},
{-1532108, 10000},
{-1532109, 14000},
{-1532110, 15000}
{4, 6000},
{5, 10000},
{6, 14000},
{7, 15000}
};
static Dialogue RAJDialogue[]=
{
{-1532111, 5000},
{-1532112, 7000},
{-1532113, 14000},
{-1532114, 14000}
{8, 5000},
{9, 7000},
{10, 14000},
{11, 14000}
};
// Entries and spawn locations for creatures in Oz event
@@ -224,7 +225,8 @@ public:
}
if (text)
DoScriptText(text, me);
CreatureAI::Talk(text);
}
void PrepareEncounter()
@@ -27,46 +27,57 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "magisters_terrace.h"
#include "WorldPacket.h"
#include "Opcodes.h"
#define SAY_AGGRO -1585023 //This yell should be done when the room is cleared. For now, set it as a movelineofsight yell.
#define SAY_PHOENIX -1585024
#define SAY_FLAMESTRIKE -1585025
#define SAY_GRAVITY_LAPSE -1585026
#define SAY_TIRED -1585027
#define SAY_RECAST_GRAVITY -1585028
#define SAY_DEATH -1585029
enum Says
{
SAY_AGGRO = 0, //This yell should be done when the room is cleared. For now, set it as a movelineofsight yell.
SAY_PHOENIX = 1,
SAY_FLAMESTRIKE = 2,
SAY_GRAVITY_LAPSE = 3,
SAY_TIRED = 4,
SAY_RECAST_GRAVITY = 5,
SAY_DEATH = 6
};
/*** Spells ***/
// Phase 1 spells
#define SPELL_FIREBALL_NORMAL 44189 // Deals 2700-3300 damage at current target
#define SPELL_FIREBALL_HEROIC 46164 // 4950-6050
enum Spells
{
// Phase 1 spells
SPELL_FIREBALL_NORMAL = 44189, // Deals 2700-3300 damage at current target
SPELL_FIREBALL_HEROIC = 46164, // 4950-6050
#define SPELL_PHOENIX 44194 // Summons a phoenix (Doesn't work?)
#define SPELL_PHOENIX_BURN 44197 // A spell Phoenix uses to damage everything around
#define SPELL_REBIRTH_DMG 44196 // DMG if a Phoenix rebirth happen
SPELL_PHOENIX = 44194, // Summons a phoenix (Doesn't work?)
SPELL_PHOENIX_BURN = 44197, // A spell Phoenix uses to damage everything around
SPELL_REBIRTH_DMG = 44196, // DMG if a Phoenix rebirth happen
#define SPELL_FLAMESTRIKE1_NORMAL 44190 // Damage part
#define SPELL_FLAMESTRIKE1_HEROIC 46163 // Heroic damage part
#define SPELL_FLAMESTRIKE2 44191 // Flamestrike indicator before the damage
#define SPELL_FLAMESTRIKE3 44192 // Summons the trigger + animation (projectile)
SPELL_FLAMESTRIKE1_NORMAL = 44190, // Damage part
SPELL_FLAMESTRIKE1_HEROIC = 46163, // Heroic damage part
SPELL_FLAMESTRIKE2 = 44191, // Flamestrike indicator before the damage
SPELL_FLAMESTRIKE3 = 44192, // Summons the trigger + animation (projectile)
#define SPELL_SHOCK_BARRIER 46165 // Heroic only; 10k damage shield, followed by Pyroblast
#define SPELL_PYROBLAST 36819 // Heroic only; 45-55k fire damage
SPELL_SHOCK_BARRIER = 46165, // Heroic only; 10k damage shield, followed by Pyroblast
SPELL_PYROBLAST = 36819, // Heroic only; 45-55k fire damage
// Phase 2 spells
#define SPELL_GRAVITY_LAPSE_INITIAL 44224 // Cast at the beginning of every Gravity Lapse
#define SPELL_GRAVITY_LAPSE_CHANNEL 44251 // Channeled; blue beam animation to every enemy in range
#define SPELL_TELEPORT_CENTER 44218 // Should teleport people to the center. Requires DB entry in spell_target_position.
#define SPELL_GRAVITY_LAPSE_FLY 44227 // Hastens flyspeed and allows flying for 1 minute. For some reason removes 44226.
#define SPELL_GRAVITY_LAPSE_DOT 44226 // Knocks up in the air and applies a 300 DPS DoT.
#define SPELL_ARCANE_SPHERE_PASSIVE 44263 // Passive auras on Arcane Spheres
#define SPELL_POWER_FEEDBACK 44233 // Stuns him, making him take 50% more damage for 10 seconds. Cast after Gravity Lapse
SPELL_GRAVITY_LAPSE_INITIAL = 44224, // Cast at the beginning of every Gravity Lapse
SPELL_GRAVITY_LAPSE_CHANNEL = 44251, // Channeled; blue beam animation to every enemy in range
SPELL_TELEPORT_CENTER = 44218, // Should teleport people to the center. Requires DB entry in spell_target_position.
SPELL_GRAVITY_LAPSE_FLY = 44227, // Hastens flyspeed and allows flying for 1 minute. For some reason removes 44226.
SPELL_GRAVITY_LAPSE_DOT = 44226, // Knocks up in the air and applies a 300 DPS DoT.
SPELL_ARCANE_SPHERE_PASSIVE = 44263, // Passive auras on Arcane Spheres
SPELL_POWER_FEEDBACK = 44233 // Stuns him, making him take 50% more damage for 10 seconds. Cast after Gravity Lapse
};
enum Creatures
{
CREATURE_PHOENIX = 24674,
CREATURE_PHOENIX_EGG = 24675,
CREATURE_ARCANE_SPHERE = 24708
};
/*** Creatures ***/
#define CREATURE_PHOENIX 24674
#define CREATURE_PHOENIX_EGG 24675
#define CREATURE_ARCANE_SPHERE 24708
/** Locations **/
float KaelLocations[3][2]=
@@ -140,27 +151,21 @@ public:
Phase = 0;
if (instance)
{
instance->SetData(DATA_KAELTHAS_EVENT, NOT_STARTED);
instance->HandleGameObject(instance->GetData64(DATA_KAEL_DOOR), true);
// Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
// Small door opened after event are expected to be closed by default
}
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (!instance)
return;
// Open the encounter door
instance->HandleGameObject(instance->GetData64(DATA_KAEL_DOOR), true);
instance->SetData(DATA_KAELTHAS_EVENT, DONE);
// Enable the Translocation Orb Exit
if (GameObject* escapeOrb = ObjectAccessor::GetGameObject(*me, instance->GetData64(DATA_ESCAPE_ORB)))
escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
escapeOrb->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOT_SELECTABLE);
}
void DamageTaken(Unit* /*done_by*/, uint32 &damage)
@@ -173,16 +178,15 @@ public:
{
if (!instance)
return;
//Close the encounter door, open it in JustDied/Reset
instance->HandleGameObject(instance->GetData64(DATA_KAEL_DOOR), false);
instance->SetData(DATA_KAELTHAS_EVENT, IN_PROGRESS);
}
void MoveInLineOfSight(Unit* who)
{
if (!HasTaunted && me->IsWithinDistInMap(who, 40.0f))
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
HasTaunted = true;
}
@@ -248,8 +252,7 @@ public:
// Also needs an exception in spell system.
unit->CastSpell(unit, SPELL_GRAVITY_LAPSE_FLY, true, 0, 0, me->GetGUID());
// Use packet hack
WorldPacket data(12);
data.SetOpcode(SMSG_MOVE_SET_CAN_FLY);
WorldPacket data(SMSG_MOVE_SET_CAN_FLY, 12);
data.append(unit->GetPackGUID());
data << uint32(0);
unit->SendMessageToSet(&data, true);
@@ -269,8 +272,7 @@ public:
unit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_FLY);
unit->RemoveAurasDueToSpell(SPELL_GRAVITY_LAPSE_DOT);
WorldPacket data(12);
data.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY);
WorldPacket data(SMSG_MOVE_UNSET_CAN_FLY, 12);
data.append(unit->GetPackGUID());
data << uint32(0);
unit->SendMessageToSet(&data, true);
@@ -323,7 +325,7 @@ public:
Phoenix->AI()->AttackStart(target);
}
DoScriptText(SAY_PHOENIX, me);
Talk(SAY_PHOENIX);
PhoenixTimer = 60000;
} else PhoenixTimer -= diff;
@@ -335,7 +337,7 @@ public:
me->InterruptSpell(CURRENT_CHANNELED_SPELL);
me->InterruptSpell(CURRENT_GENERIC_SPELL);
DoCast(target, SPELL_FLAMESTRIKE3, true);
DoScriptText(SAY_FLAMESTRIKE, me);
Talk(SAY_FLAMESTRIKE);
}
FlameStrikeTimer = urand(15000, 25000);
} else FlameStrikeTimer -= diff;
@@ -365,18 +367,14 @@ public:
case 0:
if (FirstGravityLapse) // Different yells at 50%, and at every following Gravity Lapse
{
DoScriptText(SAY_GRAVITY_LAPSE, me);
Talk(SAY_GRAVITY_LAPSE);
FirstGravityLapse = false;
if (instance)
{
instance->HandleGameObject(instance->GetData64(DATA_KAEL_STATUE_LEFT), true);
instance->HandleGameObject(instance->GetData64(DATA_KAEL_STATUE_RIGHT), true);
}
}else
{
DoScriptText(SAY_RECAST_GRAVITY, me);
instance->SetData(DATA_KAELTHAS_STATUES, 1);
}
else
Talk(SAY_RECAST_GRAVITY);
DoCast(me, SPELL_GRAVITY_LAPSE_INITIAL);
GravityLapseTimer = 2000 + diff;// Don't interrupt the visual spell
@@ -419,7 +417,7 @@ public:
case 4:
me->InterruptNonMeleeSpells(false);
DoScriptText(SAY_TIRED, me);
Talk(SAY_TIRED);
DoCast(me, SPELL_POWER_FEEDBACK);
RemoveGravityLapse();
GravityLapseTimer = 10000;
@@ -34,25 +34,25 @@ struct Speech
static Speech LackeyDeath[]=
{
{-1585013},
{-1585014},
{-1585015},
{-1585016},
{1},
{2},
{3},
{4},
};
static Speech PlayerDeath[]=
{
{-1585017},
{-1585018},
{-1585019},
{-1585020},
{-1585021},
{5},
{6},
{7},
{8},
{9},
};
enum eEnums
{
SAY_AGGRO = -1585012,
SAY_DEATH = -1585022,
SAY_AGGRO = 0,
SAY_DEATH = 10,
SPELL_DISPEL_MAGIC = 27609,
SPELL_FLASH_HEAL = 17843,
@@ -144,7 +144,7 @@ public:
void EnterCombat(Unit* who)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
for (uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
{
@@ -216,7 +216,7 @@ public:
if (victim->GetTypeId() != TYPEID_PLAYER)
return;
DoScriptText(PlayerDeath[PlayersKilled].id, me);
Talk(PlayerDeath[PlayersKilled].id);
if (PlayersKilled < 4)
++PlayersKilled;
@@ -224,7 +224,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (!instance)
return;
@@ -415,7 +415,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
return;
//should delrissa really yell if dead?
DoScriptText(LackeyDeath[uiLackeyDeathCount].id, pDelrissa);
pDelrissa->AI()->Talk(LackeyDeath[uiLackeyDeathCount].id);
instance->SetData(DATA_DELRISSA_DEATH_COUNT, SPECIAL);
@@ -27,30 +27,37 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "magisters_terrace.h"
#define SAY_AGGRO -1585000
#define SAY_ENERGY -1585001
#define SAY_EMPOWERED -1585002
#define SAY_KILL_1 -1585003
#define SAY_KILL_2 -1585004
#define SAY_DEATH -1585005
#define EMOTE_CRYSTAL -1585006
enum Says
{
SAY_AGGRO = 0,
SAY_ENERGY = 1,
SAY_EMPOWERED = 2,
SAY_KILL = 3,
SAY_DEATH = 4,
EMOTE_CRYSTAL = 5
};
//Crystal effect spells
#define SPELL_FEL_CRYSTAL_COSMETIC 44374
#define SPELL_FEL_CRYSTAL_DUMMY 44329
#define SPELL_FEL_CRYSTAL_VISUAL 44355
#define SPELL_MANA_RAGE 44320 // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target
enum Spells
{
//Crystal effect spells
SPELL_FEL_CRYSTAL_COSMETIC = 44374,
SPELL_FEL_CRYSTAL_DUMMY = 44329,
SPELL_FEL_CRYSTAL_VISUAL = 44355,
SPELL_MANA_RAGE = 44320, // This spell triggers 44321, which changes scale and regens mana Requires an entry in spell_script_target
//Selin's spells
#define SPELL_DRAIN_LIFE 44294
#define SPELL_FEL_EXPLOSION 44314
//Selin's spells
SPELL_DRAIN_LIFE = 44294,
SPELL_FEL_EXPLOSION = 44314,
#define SPELL_DRAIN_MANA 46153 // Heroic only
SPELL_DRAIN_MANA = 46153 // Heroic only
};
#define CRYSTALS_NUMBER 5
#define DATA_CRYSTALS 6
#define CREATURE_FEL_CRYSTAL 24722
enum Misc
{
CRYSTALS_NUMBER = 5,
DATA_CRYSTALS = 6,
CREATURE_FEL_CRYSTAL = 24722
};
class boss_selin_fireheart : public CreatureScript
{
@@ -75,6 +82,7 @@ public:
uint32 size = instance->GetData(DATA_FEL_CRYSTAL_SIZE);
for (uint8 i = 0; i < size; ++i)
{
instance->SetData64(DATA_FEL_CRYSTAL, i);
uint64 guid = instance->GetData64(DATA_FEL_CRYSTAL);
sLog->outDebug(LOG_FILTER_TSCR, "Selin: Adding Fel Crystal " UI64FMTD " to list", guid);
Crystals.push_back(guid);
@@ -115,10 +123,6 @@ public:
}
}
instance->HandleGameObject(instance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), true);
// Open the big encounter door. Close it in Aggro and open it only in JustDied(and here)
// Small door opened after event are expected to be closed by default
// Set Inst data for encounter
instance->SetData(DATA_SELIN_EVENT, NOT_STARTED);
} else sLog->outError(LOG_FILTER_TSCR, ERROR_INST_DATA);
@@ -164,8 +168,8 @@ public:
}
if (CrystalChosen)
{
DoScriptText(SAY_ENERGY, me);
DoScriptText(EMOTE_CRYSTAL, me);
Talk(SAY_ENERGY);
Talk(EMOTE_CRYSTAL);
CrystalChosen->CastSpell(CrystalChosen, SPELL_FEL_CRYSTAL_COSMETIC, true);
@@ -195,16 +199,14 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), false);
//Close the encounter door, open it in JustDied/Reset
instance->SetData(DATA_SELIN_EVENT, IN_PROGRESS);
}
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2), me);
Talk(SAY_KILL);
}
void MovementInform(uint32 type, uint32 id)
@@ -231,14 +233,12 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (!instance)
return;
instance->SetData(DATA_SELIN_EVENT, DONE); // Encounter complete!
instance->HandleGameObject(instance->GetData64(DATA_SELIN_ENCOUNTER_DOOR), true); // Open the encounter door
instance->HandleGameObject(instance->GetData64(DATA_SELIN_DOOR), true); // Open the door leading further in
ShatterRemainingCrystals();
}
@@ -300,7 +300,7 @@ public:
IsDraining = false;
DrainingCrystal = false;
DoScriptText(SAY_EMPOWERED, me);
Talk(SAY_EMPOWERED);
Unit* CrystalChosen = Unit::GetUnit(*me, CrystalGUID);
if (CrystalChosen && CrystalChosen->isAlive())
@@ -29,11 +29,11 @@ EndScriptData */
enum eEnums
{
SAY_AGGRO = -1585007,
SAY_ENERGY = -1585008,
SAY_OVERLOAD = -1585009,
SAY_KILL = -1585010,
EMOTE_DISCHARGE_ENERGY = -1585011,
SAY_AGGRO = 0,
SAY_ENERGY = 1,
SAY_OVERLOAD = 2,
SAY_KILL = 3,
EMOTE_DISCHARGE_ENERGY = 4,
//is this text for real?
//#define SAY_DEATH "What...happen...ed."
@@ -99,7 +99,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_KILL, me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
@@ -110,7 +110,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
if (instance)
instance->SetData(DATA_VEXALLUS_EVENT, IN_PROGRESS);
@@ -144,8 +144,8 @@ public:
else
++IntervalHealthAmount;
DoScriptText(SAY_ENERGY, me);
DoScriptText(EMOTE_DISCHARGE_ENERGY, me);
Talk(SAY_ENERGY);
Talk(EMOTE_DISCHARGE_ENERGY);
if (IsHeroic())
{
@@ -72,8 +72,7 @@ public:
uint32 Encounter[MAX_ENCOUNTER];
uint32 DelrissaDeathCount;
std::list<uint64> FelCrystals;
std::list<uint64>::const_iterator CrystalItr;
std::vector<uint64> FelCrystals;
uint64 SelinGUID;
uint64 DelrissaGUID;
@@ -84,8 +83,8 @@ public:
uint64 KaelDoorGUID;
uint64 KaelStatue[2];
uint64 EscapeOrbGUID;
bool InitializedItr;
uint32 StatuesState;
uint8 felCristalIndex;
void Initialize()
{
@@ -105,8 +104,8 @@ public:
KaelStatue[0] = 0;
KaelStatue[1] = 0;
EscapeOrbGUID = 0;
InitializedItr = false;
StatuesState = 0;
felCristalIndex = 0;
}
bool IsEncounterInProgress() const
@@ -117,7 +116,7 @@ public:
return false;
}
uint32 GetData(uint32 identifier)
uint32 GetData(uint32 identifier) const
{
switch (identifier)
{
@@ -142,21 +141,35 @@ public:
switch (identifier)
{
case DATA_SELIN_EVENT:
if (data == DONE)
{
HandleGameObject(SelinEncounterDoorGUID, true);
HandleGameObject(SelinDoorGUID, true);
}
else if (data == IN_PROGRESS)
HandleGameObject(SelinEncounterDoorGUID, false);
else if (data == NOT_STARTED)
HandleGameObject(SelinEncounterDoorGUID, true);
Encounter[0] = data;
break;
case DATA_VEXALLUS_EVENT:
if (data == DONE)
DoUseDoorOrButton(VexallusDoorGUID);
HandleGameObject(VexallusDoorGUID, true);
Encounter[1] = data;
break;
case DATA_DELRISSA_EVENT:
if (data == DONE)
DoUseDoorOrButton(DelrissaDoorGUID);
HandleGameObject(DelrissaDoorGUID, true);
if (data == IN_PROGRESS)
DelrissaDeathCount = 0;
Encounter[2] = data;
break;
case DATA_KAELTHAS_EVENT:
if (data == NOT_STARTED || data == DONE)
HandleGameObject(KaelDoorGUID, true);
else if (data == IN_PROGRESS)
HandleGameObject(KaelDoorGUID, false);
Encounter[3] = data;
break;
case DATA_DELRISSA_DEATH_COUNT:
@@ -165,7 +178,14 @@ public:
else
DelrissaDeathCount = 0;
break;
case DATA_KAELTHAS_STATUES:
HandleGameObject(KaelStatue[0], data);
HandleGameObject(KaelStatue[1], data);
StatuesState = data;
break;
}
SaveToDB();
}
void OnCreatureCreate(Creature* creature)
@@ -215,7 +235,45 @@ public:
}
}
uint64 GetData64(uint32 identifier)
std::string GetSaveData()
{
OUT_SAVE_INST_DATA;
std::ostringstream saveStream;
saveStream << Encounter[0] << ' ' << Encounter[1] << ' ' << Encounter[2] << ' ' << Encounter[3] << ' ' << StatuesState;
OUT_SAVE_INST_DATA_COMPLETE;
return saveStream.str();
}
void Load(const char* str)
{
if (!str)
{
OUT_LOAD_INST_DATA_FAIL;
return;
}
OUT_LOAD_INST_DATA(str);
std::istringstream loadStream(str);
for (uint32 i = 0; i < MAX_ENCOUNTER; ++i)
{
uint32 tmpState;
loadStream >> tmpState;
if (tmpState == IN_PROGRESS || tmpState > SPECIAL)
tmpState = NOT_STARTED;
SetData(i, tmpState);
}
loadStream >> StatuesState;
SetData(DATA_KAELTHAS_STATUES, StatuesState);
OUT_LOAD_INST_DATA_COMPLETE;
}
uint64 GetData64(uint32 identifier) const
{
switch (identifier)
{
@@ -225,10 +283,6 @@ public:
return DelrissaGUID;
case DATA_VEXALLUS_DOOR:
return VexallusDoorGUID;
case DATA_SELIN_DOOR:
return SelinDoorGUID;
case DATA_SELIN_ENCOUNTER_DOOR:
return SelinEncounterDoorGUID;
case DATA_DELRISSA_DOOR:
return DelrissaDoorGUID;
case DATA_KAEL_DOOR:
@@ -239,28 +293,23 @@ public:
return KaelStatue[1];
case DATA_ESCAPE_ORB:
return EscapeOrbGUID;
case DATA_FEL_CRYSTAL:
{
if (FelCrystals.empty())
if (FelCrystals.size() < felCristalIndex)
{
sLog->outError(LOG_FILTER_TSCR, "Magisters Terrace: No Fel Crystals loaded in Inst Data");
return 0;
}
if (!InitializedItr)
{
CrystalItr = FelCrystals.begin();
InitializedItr = true;
}
uint64 guid = *CrystalItr;
++CrystalItr;
return guid;
}
return FelCrystals.at(felCristalIndex);
}
return 0;
}
void SetData64(uint32 identifier, uint64 value)
{
if (identifier == DATA_FEL_CRYSTAL)
felCristalIndex = value;
}
};
};
@@ -30,6 +30,8 @@ EndContentData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "Player.h"
#include "SpellInfo.h"
/*######
## npc_kalecgos
@@ -23,28 +23,26 @@
enum Data
{
DATA_SELIN_EVENT = 0,
DATA_VEXALLUS_EVENT = 1,
DATA_DELRISSA_EVENT = 2,
DATA_KAELTHAS_EVENT = 3,
DATA_SELIN_EVENT,
DATA_VEXALLUS_EVENT,
DATA_DELRISSA_EVENT,
DATA_KAELTHAS_EVENT,
DATA_SELIN = 4,
DATA_FEL_CRYSTAL = 5,
DATA_FEL_CRYSTAL_SIZE = 6,
DATA_SELIN,
DATA_FEL_CRYSTAL,
DATA_FEL_CRYSTAL_SIZE,
DATA_VEXALLUS_DOOR = 7,
DATA_SELIN_DOOR = 8,
DATA_DELRISSA = 9,
DATA_DELRISSA_DOOR = 10,
DATA_SELIN_ENCOUNTER_DOOR = 11,
DATA_VEXALLUS_DOOR,
DATA_DELRISSA,
DATA_DELRISSA_DOOR,
DATA_KAEL_DOOR = 12,
DATA_KAEL_STATUE_LEFT = 13,
DATA_KAEL_STATUE_RIGHT = 14,
DATA_KAEL_DOOR,
DATA_KAEL_STATUE_LEFT,
DATA_KAEL_STATUE_RIGHT,
DATA_DELRISSA_DEATH_COUNT = 15,
DATA_ESCAPE_ORB = 16
DATA_DELRISSA_DEATH_COUNT,
DATA_KAELTHAS_STATUES,
DATA_ESCAPE_ORB
};
#endif
@@ -30,7 +30,7 @@ EndScriptData */
enum Texts
{
EMOTE_LOWHP = -1409002,
EMOTE_LOWHP = 0,
};
enum Spells
@@ -149,7 +149,7 @@ class mob_core_rager : public CreatureScript
if (pGolemagg->isAlive())
{
me->AddAura(SPELL_GOLEMAGG_TRUST, me);
DoScriptText(EMOTE_LOWHP, me);
Talk(EMOTE_LOWHP);
me->SetFullHealth();
}
}
@@ -28,6 +28,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "molten_core.h"
#include "Player.h"
enum Texts
{
@@ -29,17 +29,17 @@ EndScriptData */
enum Texts
{
SAY_REINFORCEMENTS1 = -1409013,
SAY_REINFORCEMENTS2 = -1409014,
SAY_HAND = -1409015,
SAY_WRATH = -1409016,
SAY_KILL = -1409017,
SAY_MAGMABURST = -1409018,
SAY_SUMMON_MAJ = -1409008,
SAY_ARRIVAL1_RAG = -1409009,
SAY_ARRIVAL2_MAJ = -1409010,
SAY_ARRIVAL3_RAG = -1409011,
SAY_ARRIVAL5_RAG = -1409012,
SAY_SUMMON_MAJ = 0,
SAY_ARRIVAL1_RAG = 1,
SAY_ARRIVAL2_MAJ = 2,
SAY_ARRIVAL3_RAG = 3,
SAY_ARRIVAL5_RAG = 4,
SAY_REINFORCEMENTS1 = 5,
SAY_REINFORCEMENTS2 = 6,
SAY_HAND = 7,
SAY_WRATH = 8,
SAY_KILL = 9,
SAY_MAGMABURST = 10
};
enum Spells
@@ -112,7 +112,7 @@ class boss_ragnaros : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
if (urand(0, 99) < 25)
DoScriptText(SAY_KILL, me);
Talk(SAY_KILL);
}
void UpdateAI(const uint32 diff)
@@ -137,16 +137,16 @@ class boss_ragnaros : public CreatureScript
switch (eventId)
{
case EVENT_INTRO_1:
DoScriptText(SAY_ARRIVAL1_RAG, me);
Talk(SAY_ARRIVAL1_RAG);
break;
case EVENT_INTRO_2:
DoScriptText(SAY_ARRIVAL3_RAG, me);
Talk(SAY_ARRIVAL3_RAG);
break;
case EVENT_INTRO_3:
me->HandleEmoteCommand(EMOTE_ONESHOT_ATTACK1H);
break;
case EVENT_INTRO_4:
DoScriptText(SAY_ARRIVAL5_RAG, me);
Talk(SAY_ARRIVAL5_RAG);
if (instance)
if (Creature* executus = Unit::GetCreature(*me, instance->GetData64(BOSS_MAJORDOMO_EXECUTUS)))
me->Kill(executus);
@@ -205,13 +205,13 @@ class boss_ragnaros : public CreatureScript
case EVENT_WRATH_OF_RAGNAROS:
DoCastVictim(SPELL_WRATH_OF_RAGNAROS);
if (urand(0, 1))
DoScriptText(SAY_WRATH, me);
Talk(SAY_WRATH);
events.ScheduleEvent(EVENT_WRATH_OF_RAGNAROS, 25000);
break;
case EVENT_HAND_OF_RAGNAROS:
DoCast(me, SPELL_HAND_OF_RAGNAROS);
if (urand(0, 1))
DoScriptText(SAY_HAND, me);
Talk(SAY_HAND);
events.ScheduleEvent(EVENT_HAND_OF_RAGNAROS, 20000);
break;
case EVENT_LAVA_BURST:
@@ -229,7 +229,7 @@ class boss_ragnaros : public CreatureScript
if (!_hasYelledMagmaBurst)
{
//Say our dialog
DoScriptText(SAY_MAGMABURST, me);
Talk(SAY_MAGMABURST);
_hasYelledMagmaBurst = true;
}
}
@@ -256,7 +256,7 @@ class boss_ragnaros : public CreatureScript
if (!_hasSubmergedOnce)
{
DoScriptText(SAY_REINFORCEMENTS1, me);
Talk(SAY_REINFORCEMENTS1);
// summon 8 elementals
for (uint8 i = 0; i < 8; ++i)
@@ -272,7 +272,7 @@ class boss_ragnaros : public CreatureScript
}
else
{
DoScriptText(SAY_REINFORCEMENTS2, me);
Talk(SAY_REINFORCEMENTS2);
for (uint8 i = 0; i < 8; ++i)
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
@@ -28,6 +28,7 @@ EndScriptData */
#include "InstanceScript.h"
#include "CreatureAI.h"
#include "molten_core.h"
#include "TemporarySummon.h"
Position const SummonPositions[10] =
{
@@ -116,7 +117,7 @@ class instance_molten_core : public InstanceMapScript
}
}
uint32 GetData(uint32 type)
uint32 GetData(uint32 type) const
{
switch (type)
{
@@ -127,7 +128,7 @@ class instance_molten_core : public InstanceMapScript
return 0;
}
uint64 GetData64(uint32 type)
uint64 GetData64(uint32 type) const
{
switch (type)
{
@@ -23,6 +23,8 @@
#include "ScriptedEscortAI.h"
#include "CombatAI.h"
#include "PassiveAI.h"
#include "Player.h"
#include "SpellInfo.h"
/*######
##Quest 12848
@@ -307,7 +309,7 @@ public:
prisonerGUID = guid;
}
uint64 GetGUID(int32 /*id*/)
uint64 GetGUID(int32 /*id*/) const
{
return prisonerGUID;
}
@@ -18,33 +18,34 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "ScriptedEscortAI.h"
#include "Player.h"
#include "SpellInfo.h"
//How to win friends and influence enemies
// texts signed for creature 28939 but used for 28939, 28940, 28610
enum win_friends
{
SAY_PERSUADE1 = -1609501,
SAY_PERSUADE2 = -1609502,
SAY_PERSUADE3 = -1609503,
SAY_PERSUADE4 = -1609504,
SAY_PERSUADE5 = -1609505,
SAY_PERSUADE6 = -1609506,
SAY_PERSUADE7 = -1609507,
SAY_CRUSADER1 = -1609508,
SAY_CRUSADER2 = -1609509,
SAY_CRUSADER3 = -1609510,
SAY_CRUSADER4 = -1609511,
SAY_CRUSADER5 = -1609512,
SAY_CRUSADER6 = -1609513,
SAY_PERSUADED1 = -1609514,
SAY_PERSUADED2 = -1609515,
SAY_PERSUADED3 = -1609516,
SAY_PERSUADED4 = -1609517,
SAY_PERSUADED5 = -1609518,
SAY_PERSUADED6 = -1609519,
SPELL_PERSUASIVE_STRIKE = 52781
SAY_CRUSADER = 1,
SAY_PERSUADED1 = 2,
SAY_PERSUADED2 = 3,
SAY_PERSUADED3 = 4,
SAY_PERSUADED4 = 5,
SAY_PERSUADED6 = 6,
SPELL_PERSUASIVE_STRIKE = 52781,
SPELL_THREAT_PULSE = 58111,
QUEST_HOW_TO_WIN_FRIENDS = 12720,
};
#define SAY_PERSUADED5 "LIES! The pain you are about to endure will be talked about for years to come!"
#define SAY_PERSUADE1 "I'll tear the secrets from your soul! Tell me about the \"Crimson Dawn\" and your life may be spared!"
#define SAY_PERSUADE2 "Tell me what you know about \"Crimson Dawn\" or the beatings will continue!"
#define SAY_PERSUADE3 "I'm through being courteous with your kind, human! What is the \"Crimson Dawn\"?"
#define SAY_PERSUADE4 "Is your life worth so little? Just tell me what I need to know about \"Crimson Dawn\" and I'll end your suffering quickly."
#define SAY_PERSUADE5 "I can keep this up for a very long time, Scarlet dog! Tell me about the \"Crimson Dawn\"!"
#define SAY_PERSUADE6 "What is the \"Crimson Dawn\"?"
#define SAY_PERSUADE7 "\"Crimson Dawn\"! What is it! Speak!"
class npc_crusade_persuaded : public CreatureScript
{
public:
@@ -59,97 +60,119 @@ public:
{
npc_crusade_persuadedAI(Creature* creature) : ScriptedAI(creature) {}
uint32 uiSpeech_timer;
uint32 uiSpeech_counter;
uint64 uiPlayerGUID;
uint32 speechTimer;
uint32 speechCounter;
uint64 playerGUID;
void Reset()
{
uiSpeech_timer = 0;
uiSpeech_counter = 0;
uiPlayerGUID = 0;
speechTimer = 0;
speechCounter = 0;
playerGUID = 0;
me->SetReactState(REACT_AGGRESSIVE);
me->RestoreFaction();
}
void SpellHit(Unit* caster, const SpellInfo* spell)
{
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && !uiSpeech_counter)
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && !speechCounter)
{
if (CAST_PLR(caster)->GetQuestStatus(12720) == QUEST_STATUS_INCOMPLETE)
if (Player* player = caster->ToPlayer())
{
uiPlayerGUID = caster->GetGUID();
uiSpeech_timer = 1000;
uiSpeech_counter = 1;
me->setFaction(caster->getFaction());
me->CombatStop(true);
me->GetMotionMaster()->MoveIdle();
me->SetReactState(REACT_PASSIVE);
DoCastAOE(58111, true);
if (player->GetQuestStatus(QUEST_HOW_TO_WIN_FRIENDS) == QUEST_STATUS_INCOMPLETE)
{
playerGUID = player->GetGUID();
speechTimer = 1000;
speechCounter = 1;
me->setFaction(player->getFaction());
me->CombatStop(true);
me->GetMotionMaster()->MoveIdle();
me->SetReactState(REACT_PASSIVE);
DoCastAOE(SPELL_THREAT_PULSE, true);
DoScriptText(RAND(SAY_PERSUADE1, SAY_PERSUADE2, SAY_PERSUADE3,
SAY_PERSUADE4, SAY_PERSUADE5, SAY_PERSUADE6,
SAY_PERSUADE7), caster);
DoScriptText(RAND(SAY_CRUSADER1, SAY_CRUSADER2, SAY_CRUSADER3,
SAY_CRUSADER4, SAY_CRUSADER5, SAY_CRUSADER6), me);
switch (urand(1, 7))
{
case 1:
player->Say(SAY_PERSUADE1, LANG_UNIVERSAL);
break;
case 2:
player->Say(SAY_PERSUADE2, LANG_UNIVERSAL);
break;
case 3:
player->Say(SAY_PERSUADE3, LANG_UNIVERSAL);
break;
case 4:
player->Say(SAY_PERSUADE4, LANG_UNIVERSAL);
break;
case 5:
player->Say(SAY_PERSUADE5, LANG_UNIVERSAL);
break;
case 6:
player->Say(SAY_PERSUADE6, LANG_UNIVERSAL);
break;
case 7:
player->Say(SAY_PERSUADE7, LANG_UNIVERSAL);
break;
}
Talk(SAY_CRUSADER);
}
}
}
}
void UpdateAI(const uint32 diff)
{
if (uiSpeech_counter)
if (speechCounter)
{
if (uiSpeech_timer <= diff)
if (speechTimer <= diff)
{
Player* player = Unit::GetPlayer(*me, uiPlayerGUID);
Player* player = Unit::GetPlayer(*me, playerGUID);
if (!player)
{
EnterEvadeMode();
return;
}
switch (uiSpeech_counter)
switch (speechCounter)
{
case 1:
DoScriptText(SAY_PERSUADED1, me);
uiSpeech_timer = 8000;
Talk(SAY_PERSUADED1);
speechTimer = 8000;
break;
case 2:
DoScriptText(SAY_PERSUADED2, me);
uiSpeech_timer = 8000;
Talk(SAY_PERSUADED2);
speechTimer = 8000;
break;
case 3:
DoScriptText(SAY_PERSUADED3, me);
uiSpeech_timer = 8000;
Talk(SAY_PERSUADED3);
speechTimer = 8000;
break;
case 4:
DoScriptText(SAY_PERSUADED4, me);
uiSpeech_timer = 8000;
Talk(SAY_PERSUADED4);
speechTimer = 8000;
break;
case 5:
DoScriptText(SAY_PERSUADED5, player);
uiSpeech_timer = 8000;
player->Say(SAY_PERSUADED5, LANG_UNIVERSAL);
speechTimer = 8000;
break;
case 6:
DoScriptText(SAY_PERSUADED6, me);
Talk(SAY_PERSUADED6);
player->Kill(me);
//me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
//me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
uiSpeech_counter = 0;
player->GroupEventHappens(12720, me);
speechCounter = 0;
player->GroupEventHappens(QUEST_HOW_TO_WIN_FRIENDS, me);
return;
}
++uiSpeech_counter;
DoCastAOE(58111, true);
} else uiSpeech_timer -= diff;
++speechCounter;
DoCastAOE(SPELL_THREAT_PULSE, true);
} else
speechTimer -= diff;
return;
}
@@ -169,16 +192,16 @@ public:
enum eKoltira
{
SAY_BREAKOUT1 = -1609561,
SAY_BREAKOUT2 = -1609562,
SAY_BREAKOUT3 = -1609563,
SAY_BREAKOUT4 = -1609564,
SAY_BREAKOUT5 = -1609565,
SAY_BREAKOUT6 = -1609566,
SAY_BREAKOUT7 = -1609567,
SAY_BREAKOUT8 = -1609568,
SAY_BREAKOUT9 = -1609569,
SAY_BREAKOUT10 = -1609570,
SAY_BREAKOUT1 = 0,
SAY_BREAKOUT2 = 1,
SAY_BREAKOUT3 = 2,
SAY_BREAKOUT4 = 3,
SAY_BREAKOUT5 = 4,
SAY_BREAKOUT6 = 5,
SAY_BREAKOUT7 = 6,
SAY_BREAKOUT8 = 7,
SAY_BREAKOUT9 = 8,
SAY_BREAKOUT10 = 9,
SPELL_KOLTIRA_TRANSFORM = 52899,
SPELL_ANTI_MAGIC_ZONE = 52894,
@@ -245,7 +268,7 @@ public:
switch (waypointId)
{
case 0:
DoScriptText(SAY_BREAKOUT1, me);
Talk(SAY_BREAKOUT1);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
break;
case 1:
@@ -260,7 +283,7 @@ public:
case 3:
SetEscortPaused(true);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
DoScriptText(SAY_BREAKOUT2, me);
Talk(SAY_BREAKOUT2);
DoCast(me, SPELL_ANTI_MAGIC_ZONE); // cast again that makes bubble up
break;
case 4:
@@ -304,22 +327,22 @@ public:
switch (m_uiWave)
{
case 0:
DoScriptText(SAY_BREAKOUT3, me);
Talk(SAY_BREAKOUT3);
SummonAcolyte(3);
m_uiWave_Timer = 20000;
break;
case 1:
DoScriptText(SAY_BREAKOUT4, me);
Talk(SAY_BREAKOUT4);
SummonAcolyte(3);
m_uiWave_Timer = 20000;
break;
case 2:
DoScriptText(SAY_BREAKOUT5, me);
Talk(SAY_BREAKOUT5);
SummonAcolyte(4);
m_uiWave_Timer = 20000;
break;
case 3:
DoScriptText(SAY_BREAKOUT6, me);
Talk(SAY_BREAKOUT6);
me->SummonCreature(NPC_HIGH_INQUISITOR_VALROTH, 1642.329f, -6045.818f, 127.583f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 1000);
m_uiWave_Timer = 1000;
break;
@@ -329,7 +352,7 @@ public:
if (!temp || !temp->isAlive())
{
DoScriptText(SAY_BREAKOUT8, me);
Talk(SAY_BREAKOUT8);
m_uiWave_Timer = 5000;
}
else
@@ -340,13 +363,13 @@ public:
break;
}
case 5:
DoScriptText(SAY_BREAKOUT9, me);
Talk(SAY_BREAKOUT9);
me->RemoveAurasDueToSpell(SPELL_ANTI_MAGIC_ZONE);
// i do not know why the armor will also be removed
m_uiWave_Timer = 2500;
break;
case 6:
DoScriptText(SAY_BREAKOUT10, me);
Talk(SAY_BREAKOUT10);
SetEscortPaused(false);
break;
}
@@ -364,8 +387,8 @@ public:
//Scarlet courier
enum ScarletCourierEnum
{
SAY_TREE1 = -1609531,
SAY_TREE2 = -1609532,
SAY_TREE1 = 0,
SAY_TREE2 = 1,
SPELL_SHOOT = 52818,
GO_INCONSPICUOUS_TREE = 191144,
NPC_SCARLET_COURIER = 29076
@@ -397,7 +420,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_TREE2, me);
Talk(SAY_TREE2);
me->Dismount();
uiStage = 0;
}
@@ -423,7 +446,7 @@ public:
me->SetWalk(true);
if (GameObject* tree = me->FindNearestGameObject(GO_INCONSPICUOUS_TREE, 40.0f))
{
DoScriptText(SAY_TREE1, me);
Talk(SAY_TREE1);
float x, y, z;
tree->GetContactPoint(me, x, y, z);
me->GetMotionMaster()->MovePoint(1, x, y, z);
@@ -453,12 +476,10 @@ public:
enum valroth
{
SAY_VALROTH1 = -1609581,
SAY_VALROTH2 = -1609582,
SAY_VALROTH3 = -1609583,
SAY_VALROTH4 = -1609584,
SAY_VALROTH5 = -1609585,
SAY_VALROTH6 = -1609586,
//SAY_VALROTH1 = 0, Unused
SAY_VALROTH_AGGRO = 1,
SAY_VALROTH_RAND = 2,
SAY_VALROTH_DEATH = 3,
SPELL_RENEW = 38210,
SPELL_INQUISITOR_PENANCE = 52922,
SPELL_VALROTH_SMITE = 52926,
@@ -492,7 +513,7 @@ public:
void EnterCombat(Unit* who)
{
DoScriptText(SAY_VALROTH2, me);
Talk(SAY_VALROTH_AGGRO);
DoCast(who, SPELL_VALROTH_SMITE);
}
@@ -525,12 +546,12 @@ public:
void Shout()
{
if (rand()%100 < 15)
DoScriptText(RAND(SAY_VALROTH3, SAY_VALROTH4, SAY_VALROTH5), me);
Talk(SAY_VALROTH_RAND);
}
void JustDied(Unit* killer)
{
DoScriptText(SAY_VALROTH6, me);
Talk(SAY_VALROTH_DEATH);
killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true);
}
};
@@ -543,60 +564,60 @@ public:
//used by 29032, 29061, 29065, 29067, 29068, 29070, 29074, 29072, 29073, 29071 but signed for 29032
enum SpecialSurprise
{
SAY_EXEC_START_1 = -1609025, // speech for all
SAY_EXEC_START_2 = -1609026,
SAY_EXEC_START_3 = -1609027,
SAY_EXEC_PROG_1 = -1609028,
SAY_EXEC_PROG_2 = -1609029,
SAY_EXEC_PROG_3 = -1609030,
SAY_EXEC_PROG_4 = -1609031,
SAY_EXEC_PROG_5 = -1609032,
SAY_EXEC_PROG_6 = -1609033,
SAY_EXEC_PROG_7 = -1609034,
SAY_EXEC_NAME_1 = -1609035,
SAY_EXEC_NAME_2 = -1609036,
SAY_EXEC_RECOG_1 = -1609037,
SAY_EXEC_RECOG_2 = -1609038,
SAY_EXEC_RECOG_3 = -1609039,
SAY_EXEC_RECOG_4 = -1609040,
SAY_EXEC_RECOG_5 = -1609041,
SAY_EXEC_RECOG_6 = -1609042,
SAY_EXEC_NOREM_1 = -1609043,
SAY_EXEC_NOREM_2 = -1609044,
SAY_EXEC_NOREM_3 = -1609045,
SAY_EXEC_NOREM_4 = -1609046,
SAY_EXEC_NOREM_5 = -1609047,
SAY_EXEC_NOREM_6 = -1609048,
SAY_EXEC_NOREM_7 = -1609049,
SAY_EXEC_NOREM_8 = -1609050,
SAY_EXEC_NOREM_9 = -1609051,
SAY_EXEC_THINK_1 = -1609052,
SAY_EXEC_THINK_2 = -1609053,
SAY_EXEC_THINK_3 = -1609054,
SAY_EXEC_THINK_4 = -1609055,
SAY_EXEC_THINK_5 = -1609056,
SAY_EXEC_THINK_6 = -1609057,
SAY_EXEC_THINK_7 = -1609058,
SAY_EXEC_THINK_8 = -1609059,
SAY_EXEC_THINK_9 = -1609060,
SAY_EXEC_THINK_10 = -1609061,
SAY_EXEC_LISTEN_1 = -1609062,
SAY_EXEC_LISTEN_2 = -1609063,
SAY_EXEC_LISTEN_3 = -1609064,
SAY_EXEC_LISTEN_4 = -1609065,
SAY_PLAGUEFIST = -1609066,
SAY_EXEC_TIME_1 = -1609067,
SAY_EXEC_TIME_2 = -1609068,
SAY_EXEC_TIME_3 = -1609069,
SAY_EXEC_TIME_4 = -1609070,
SAY_EXEC_TIME_5 = -1609071,
SAY_EXEC_TIME_6 = -1609072,
SAY_EXEC_TIME_7 = -1609073,
SAY_EXEC_TIME_8 = -1609074,
SAY_EXEC_TIME_9 = -1609075,
SAY_EXEC_TIME_10 = -1609076,
SAY_EXEC_WAITING = -1609077,
EMOTE_DIES = -1609078,
SAY_EXEC_START_1 = 0, // speech for all
SAY_EXEC_START_2 = 1,
SAY_EXEC_START_3 = 2,
SAY_EXEC_PROG_1 = 3,
SAY_EXEC_PROG_2 = 4,
SAY_EXEC_PROG_3 = 5,
SAY_EXEC_PROG_4 = 6,
SAY_EXEC_PROG_5 = 7,
SAY_EXEC_PROG_6 = 8,
SAY_EXEC_PROG_7 = 9,
SAY_EXEC_NAME_1 = 10,
SAY_EXEC_NAME_2 = 11,
SAY_EXEC_RECOG_1 = 12,
SAY_EXEC_RECOG_2 = 13,
SAY_EXEC_RECOG_3 = 14,
SAY_EXEC_RECOG_4 = 15,
SAY_EXEC_RECOG_5 = 16,
SAY_EXEC_RECOG_6 = 17,
SAY_EXEC_NOREM_1 = 18,
SAY_EXEC_NOREM_2 = 19,
SAY_EXEC_NOREM_3 = 20,
SAY_EXEC_NOREM_4 = 21,
SAY_EXEC_NOREM_5 = 22,
SAY_EXEC_NOREM_6 = 23,
SAY_EXEC_NOREM_7 = 24,
SAY_EXEC_NOREM_8 = 25,
SAY_EXEC_NOREM_9 = 26,
SAY_EXEC_THINK_1 = 27,
SAY_EXEC_THINK_2 = 28,
SAY_EXEC_THINK_3 = 29,
SAY_EXEC_THINK_4 = 30,
SAY_EXEC_THINK_5 = 31,
SAY_EXEC_THINK_6 = 32,
SAY_EXEC_THINK_7 = 33,
SAY_EXEC_THINK_8 = 34,
SAY_EXEC_THINK_9 = 35,
SAY_EXEC_THINK_10 = 36,
SAY_EXEC_LISTEN_1 = 37,
SAY_EXEC_LISTEN_2 = 38,
SAY_EXEC_LISTEN_3 = 39,
SAY_EXEC_LISTEN_4 = 40,
SAY_PLAGUEFIST = 41,
SAY_EXEC_TIME_1 = 42,
SAY_EXEC_TIME_2 = 43,
SAY_EXEC_TIME_3 = 44,
SAY_EXEC_TIME_4 = 45,
SAY_EXEC_TIME_5 = 46,
SAY_EXEC_TIME_6 = 47,
SAY_EXEC_TIME_7 = 48,
SAY_EXEC_TIME_8 = 49,
SAY_EXEC_TIME_9 = 50,
SAY_EXEC_TIME_10 = 51,
SAY_EXEC_WAITING = 52,
EMOTE_DIES = 53,
NPC_PLAGUEFIST = 29053
};
@@ -707,28 +728,28 @@ public:
case RACE_HUMAN:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_1, me, player); break;
case 0: Talk(SAY_EXEC_START_1, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_5, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_1, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_5, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_7, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_1, me, player); break;
case 2: Talk(SAY_EXEC_PROG_5, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_1, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_5, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_7, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_1, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_6, me, player);
Talk(SAY_EXEC_TIME_6, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -737,28 +758,28 @@ public:
case RACE_ORC:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_1, me, player); break;
case 0: Talk(SAY_EXEC_START_1, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_6, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_1, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_7, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_8, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_1, me, player); break;
case 2: Talk(SAY_EXEC_PROG_6, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_1, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_7, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_8, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_1, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_8, me, player);
Talk(SAY_EXEC_TIME_8, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -767,28 +788,28 @@ public:
case RACE_DWARF:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_2, me, player); break;
case 0: Talk(SAY_EXEC_START_2, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_2, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_3, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_2, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_5, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_2, me, player); break;
case 2: Talk(SAY_EXEC_PROG_2, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_3, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_2, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_5, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_2, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_3, me, player);
Talk(SAY_EXEC_TIME_3, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -797,28 +818,28 @@ public:
case RACE_NIGHTELF:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_1, me, player); break;
case 0: Talk(SAY_EXEC_START_1, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_5, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_1, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_6, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_2, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_1, me, player); break;
case 2: Talk(SAY_EXEC_PROG_5, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_1, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_6, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_2, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_1, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_7, me, player);
Talk(SAY_EXEC_TIME_7, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -827,28 +848,28 @@ public:
case RACE_UNDEAD_PLAYER:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_1, me, player); break;
case 0: Talk(SAY_EXEC_START_1, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_3, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_4, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_3, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_1, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_3, me, player); break;
case 2: Talk(SAY_EXEC_PROG_3, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_4, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_3, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_1, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_3, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_4, me, player);
Talk(SAY_EXEC_TIME_4, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -857,28 +878,28 @@ public:
case RACE_TAUREN:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_1, me, player); break;
case 0: Talk(SAY_EXEC_START_1, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_1, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_5, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_8, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_9, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_1, me, player); break;
case 2: Talk(SAY_EXEC_PROG_1, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_5, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_8, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_9, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_1, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_9, me, player);
Talk(SAY_EXEC_TIME_9, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -887,28 +908,28 @@ public:
case RACE_GNOME:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_1, me, player); break;
case 0: Talk(SAY_EXEC_START_1, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_4, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_1, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_4, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_6, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_1, me, player); break;
case 2: Talk(SAY_EXEC_PROG_4, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_1, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_4, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_6, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_1, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_5, me, player);
Talk(SAY_EXEC_TIME_5, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -917,28 +938,28 @@ public:
case RACE_TROLL:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_3, me, player); break;
case 0: Talk(SAY_EXEC_START_3, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_7, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_2, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_6, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_9, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_10, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_4, me, player); break;
case 2: Talk(SAY_EXEC_PROG_7, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_2, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_6, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_9, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_10, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_4, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_10, me, player);
Talk(SAY_EXEC_TIME_10, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -947,28 +968,28 @@ public:
case RACE_BLOODELF:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_1, me, player); break;
case 0: Talk(SAY_EXEC_START_1, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_1, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_1, me, player); break;
case 2: Talk(SAY_EXEC_PROG_1, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_1, player->GetGUID()); break;
//case 5: //unknown
case 6: DoScriptText(SAY_EXEC_THINK_3, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_1, me, player); break;
case 6: Talk(SAY_EXEC_THINK_3, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_1, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_1, me, player);
Talk(SAY_EXEC_TIME_1, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -977,28 +998,28 @@ public:
case RACE_DRAENEI:
switch (ExecuteSpeech_Counter)
{
case 0: DoScriptText(SAY_EXEC_START_1, me, player); break;
case 0: Talk(SAY_EXEC_START_1, player->GetGUID()); break;
case 1: me->SetStandState(UNIT_STAND_STATE_STAND); break;
case 2: DoScriptText(SAY_EXEC_PROG_1, me, player); break;
case 3: DoScriptText(SAY_EXEC_NAME_1, me, player); break;
case 4: DoScriptText(SAY_EXEC_RECOG_2, me, player); break;
case 5: DoScriptText(SAY_EXEC_NOREM_1, me, player); break;
case 6: DoScriptText(SAY_EXEC_THINK_4, me, player); break;
case 7: DoScriptText(SAY_EXEC_LISTEN_1, me, player); break;
case 2: Talk(SAY_EXEC_PROG_1, player->GetGUID()); break;
case 3: Talk(SAY_EXEC_NAME_1, player->GetGUID()); break;
case 4: Talk(SAY_EXEC_RECOG_2, player->GetGUID()); break;
case 5: Talk(SAY_EXEC_NOREM_1, player->GetGUID()); break;
case 6: Talk(SAY_EXEC_THINK_4, player->GetGUID()); break;
case 7: Talk(SAY_EXEC_LISTEN_1, player->GetGUID()); break;
case 8:
if (Creature* Plaguefist = GetClosestCreatureWithEntry(me, NPC_PLAGUEFIST, 85.0f))
DoScriptText(SAY_PLAGUEFIST, Plaguefist, player);
Plaguefist->AI()->Talk(SAY_PLAGUEFIST, player->GetGUID());
break;
case 9:
DoScriptText(SAY_EXEC_TIME_2, me, player);
Talk(SAY_EXEC_TIME_2, player->GetGUID());
me->SetStandState(UNIT_STAND_STATE_KNEEL);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
break;
case 10:
DoScriptText(SAY_EXEC_WAITING, me, player);
Talk(SAY_EXEC_WAITING, player->GetGUID());
break;
case 11:
DoScriptText(EMOTE_DIES, me);
Talk(EMOTE_DIES);
me->setDeathState(JUST_DIED);
me->SetHealth(0);
return;
@@ -19,6 +19,7 @@
#include "ScriptedCreature.h"
#include "ScriptedGossip.h"
#include "ScriptedEscortAI.h"
#include "Player.h"
#define LESS_MOB // if you do not have a good server and do not want it to be laggy as hell
//Light of Dawn
@@ -50,93 +51,78 @@ enum mograine
WORLD_STATE_COUNTDOWN = 3603,
WORLD_STATE_EVENT_BEGIN = 3605,
SAY_LIGHT_OF_DAWN01 = -1609201, // pre text
SAY_LIGHT_OF_DAWN02 = -1609202,
SAY_LIGHT_OF_DAWN03 = -1609203,
SAY_LIGHT_OF_DAWN04 = -1609204, // intro
SAY_LIGHT_OF_DAWN05 = -1609205,
SAY_LIGHT_OF_DAWN06 = -1609206,
SAY_LIGHT_OF_DAWN07 = -1609207, // During the fight - Korfax, Champion of the Light
SAY_LIGHT_OF_DAWN08 = -1609208, // Lord Maxwell Tyrosus
SAY_LIGHT_OF_DAWN09 = -1609209, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN10 = -1609210,
SAY_LIGHT_OF_DAWN11 = -1609211,
SAY_LIGHT_OF_DAWN12 = -1609212,
SAY_LIGHT_OF_DAWN13 = -1609213,
SAY_LIGHT_OF_DAWN14 = -1609214,
SAY_LIGHT_OF_DAWN15 = -1609215,
SAY_LIGHT_OF_DAWN16 = -1609216,
SAY_LIGHT_OF_DAWN17 = -1609217,
SAY_LIGHT_OF_DAWN18 = -1609218,
SAY_LIGHT_OF_DAWN19 = -1609219,
SAY_LIGHT_OF_DAWN20 = -1609220,
SAY_LIGHT_OF_DAWN21 = -1609221,
SAY_LIGHT_OF_DAWN22 = -1609222,
SAY_LIGHT_OF_DAWN23 = -1609223,
SAY_LIGHT_OF_DAWN24 = -1609224,
SAY_LIGHT_OF_DAWN25 = -1609225, // After the fight
SAY_LIGHT_OF_DAWN26 = -1609226, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN27 = -1609227, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN28 = -1609228, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN29 = -1609229, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN30 = -1609230, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN31 = -1609231, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN32 = -1609232, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN33 = -1609233, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN34 = -1609234, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN35 = -1609235, // Darion Mograine
SAY_LIGHT_OF_DAWN36 = -1609236, // Darion Mograine
SAY_LIGHT_OF_DAWN37 = -1609237, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN38 = -1609238, // Darion Mograine
SAY_LIGHT_OF_DAWN39 = -1609239, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN40 = -1609240, // Darion Mograine
SAY_LIGHT_OF_DAWN41 = -1609241, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN42 = -1609242, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN43 = -1609243, // The Lich King
SAY_LIGHT_OF_DAWN44 = -1609244, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN45 = -1609245, // The Lich King
SAY_LIGHT_OF_DAWN46 = -1609246, // The Lich King
SAY_LIGHT_OF_DAWN47 = -1609247, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN48 = -1609248, // The Lich King
SAY_LIGHT_OF_DAWN49 = -1609249, // The Lich King
SAY_LIGHT_OF_DAWN50 = -1609250, // Lord Maxwell Tyrosus
SAY_LIGHT_OF_DAWN51 = -1609251, // The Lich King
SAY_LIGHT_OF_DAWN52 = -1609252, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN53 = -1609253, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN54 = -1609254, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN55 = -1609255, // The Lich King
SAY_LIGHT_OF_DAWN56 = -1609256, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN57 = -1609257, // The Lich King
SAY_LIGHT_OF_DAWN58 = -1609258, // The Lich King
SAY_LIGHT_OF_DAWN59 = -1609259, // The Lich King
SAY_LIGHT_OF_DAWN60 = -1609260, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN61 = -1609261, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN62 = -1609262, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN63 = -1609263, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN64 = -1609264, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN65 = -1609265, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN66 = -1609266, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN67 = -1609267, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN68 = -1609268, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN01 = 0, // pre text
SAY_LIGHT_OF_DAWN02 = 1,
SAY_LIGHT_OF_DAWN03 = 2,
SAY_LIGHT_OF_DAWN04 = 3, // intro
SAY_LIGHT_OF_DAWN05 = 4,
SAY_LIGHT_OF_DAWN06 = 5,
SAY_LIGHT_OF_DAWN07 = 6, // During the fight - Korfax, Champion of the Light
SAY_LIGHT_OF_DAWN08 = 7, // Lord Maxwell Tyrosus
SAY_LIGHT_OF_DAWN09 = 8, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN25 = 24, // After the fight
SAY_LIGHT_OF_DAWN26 = 25, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN27 = 26, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN28 = 27, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN29 = 28, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN30 = 29, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN31 = 30, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN32 = 31, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN33 = 32, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN34 = 33, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN35 = 34, // Darion Mograine
SAY_LIGHT_OF_DAWN36 = 35, // Darion Mograine
SAY_LIGHT_OF_DAWN37 = 36, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN38 = 37, // Darion Mograine
SAY_LIGHT_OF_DAWN39 = 38, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN40 = 39, // Darion Mograine
SAY_LIGHT_OF_DAWN41 = 40, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN42 = 41, // Highlord Alexandros Mograine
SAY_LIGHT_OF_DAWN43 = 42, // The Lich King
SAY_LIGHT_OF_DAWN44 = 43, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN45 = 44, // The Lich King
SAY_LIGHT_OF_DAWN46 = 45, // The Lich King
SAY_LIGHT_OF_DAWN47 = 46, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN48 = 47, // The Lich King
SAY_LIGHT_OF_DAWN49 = 48, // The Lich King
SAY_LIGHT_OF_DAWN50 = 49, // Lord Maxwell Tyrosus
SAY_LIGHT_OF_DAWN51 = 50, // The Lich King
SAY_LIGHT_OF_DAWN52 = 51, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN53 = 52, // Highlord Darion Mograine
SAY_LIGHT_OF_DAWN54 = 53, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN55 = 54, // The Lich King
SAY_LIGHT_OF_DAWN56 = 55, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN57 = 56, // The Lich King
SAY_LIGHT_OF_DAWN58 = 57, // The Lich King
SAY_LIGHT_OF_DAWN59 = 58, // The Lich King
SAY_LIGHT_OF_DAWN60 = 59, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN61 = 60, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN62 = 61, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN63 = 62, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN64 = 63, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN65 = 64, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN66 = 65, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN67 = 66, // Highlord Tirion Fordring
SAY_LIGHT_OF_DAWN68 = 67, // Highlord Darion Mograine
EMOTE_LIGHT_OF_DAWN01 = -1609269, // Emotes
EMOTE_LIGHT_OF_DAWN02 = -1609270,
EMOTE_LIGHT_OF_DAWN03 = -1609271,
EMOTE_LIGHT_OF_DAWN04 = -1609272,
EMOTE_LIGHT_OF_DAWN05 = -1609273,
EMOTE_LIGHT_OF_DAWN06 = -1609274,
EMOTE_LIGHT_OF_DAWN07 = -1609275,
EMOTE_LIGHT_OF_DAWN08 = -1609276,
EMOTE_LIGHT_OF_DAWN09 = -1609277,
EMOTE_LIGHT_OF_DAWN10 = -1609278,
EMOTE_LIGHT_OF_DAWN11 = -1609279,
EMOTE_LIGHT_OF_DAWN12 = -1609280,
EMOTE_LIGHT_OF_DAWN13 = -1609281,
EMOTE_LIGHT_OF_DAWN14 = -1609282,
EMOTE_LIGHT_OF_DAWN15 = -1609283,
EMOTE_LIGHT_OF_DAWN16 = -1609284,
EMOTE_LIGHT_OF_DAWN17 = -1609285,
EMOTE_LIGHT_OF_DAWN18 = -1609286,
EMOTE_LIGHT_OF_DAWN01 = 68, // Emotes
EMOTE_LIGHT_OF_DAWN02 = 69,
EMOTE_LIGHT_OF_DAWN03 = 70,
EMOTE_LIGHT_OF_DAWN04 = 71,
EMOTE_LIGHT_OF_DAWN05 = 72,
EMOTE_LIGHT_OF_DAWN06 = 73,
EMOTE_LIGHT_OF_DAWN07 = 74,
EMOTE_LIGHT_OF_DAWN08 = 75,
EMOTE_LIGHT_OF_DAWN09 = 76,
EMOTE_LIGHT_OF_DAWN10 = 77,
EMOTE_LIGHT_OF_DAWN11 = 78,
EMOTE_LIGHT_OF_DAWN12 = 79,
EMOTE_LIGHT_OF_DAWN13 = 80,
EMOTE_LIGHT_OF_DAWN14 = 81,
EMOTE_LIGHT_OF_DAWN15 = 82,
EMOTE_LIGHT_OF_DAWN16 = 83,
EMOTE_LIGHT_OF_DAWN17 = 84,
EMOTE_LIGHT_OF_DAWN18 = 85,
GO_LIGHT_OF_DAWN = 191330,
SPELL_THE_LIGHT_OF_DAWN_Q = 53606, // quest credit
@@ -511,9 +497,9 @@ public:
SetHoldState(true);
SpawnNPC();
if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
DoScriptText(SAY_LIGHT_OF_DAWN07, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN07);
if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
DoScriptText(SAY_LIGHT_OF_DAWN08, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN08);
for (uint8 i = 0; i < ENCOUNTER_GHOUL_NUMBER; ++i)
NPCChangeTarget(uiGhoulGUID[i]);
@@ -545,7 +531,7 @@ public:
{
//Unit* pTirion = Unit::GetCreature(*me, uiTirionGUID);
DoScriptText(EMOTE_LIGHT_OF_DAWN05, me);
Talk(EMOTE_LIGHT_OF_DAWN05);
if (me->HasAura(SPELL_THE_LIGHT_OF_DAWN, 0))
me->RemoveAurasDueToSpell(SPELL_THE_LIGHT_OF_DAWN);
if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
@@ -582,7 +568,7 @@ public:
}
break;
case 4:
DoScriptText(SAY_LIGHT_OF_DAWN27, me);
Talk(SAY_LIGHT_OF_DAWN27);
me->SetStandState(UNIT_STAND_STATE_KNEEL);
if (Creature* temp = Unit::GetCreature(*me, uiKoltiraGUID))
@@ -592,7 +578,7 @@ public:
SetHoldState(true);
break;
case 5:
DoScriptText(SAY_LIGHT_OF_DAWN33, me);
Talk(SAY_LIGHT_OF_DAWN33);
SetHoldState(true);
break;
case 6:
@@ -608,7 +594,7 @@ public:
me->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_UNEQUIP));
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
me->CastSpell(temp, SPELL_ASHBRINGER, true);
DoScriptText(EMOTE_LIGHT_OF_DAWN14, me);
Talk(EMOTE_LIGHT_OF_DAWN14);
SetHoldState(true);
break;
}
@@ -644,7 +630,7 @@ public:
break;
case 2:
DoScriptText(SAY_LIGHT_OF_DAWN04, me);
Talk(SAY_LIGHT_OF_DAWN04);
if (Creature* pKoltira = GetClosestCreatureWithEntry(me, NPC_KOLTIRA_DEATHWEAVER, 50.0f))
uiKoltiraGUID = pKoltira->GetGUID();
if (Creature* pOrbaz = GetClosestCreatureWithEntry(me, NPC_ORBAZ_BLOODBANE, 50.0f))
@@ -655,7 +641,7 @@ public:
break;
case 3: // rise
DoScriptText(SAY_LIGHT_OF_DAWN05, me);
Talk(SAY_LIGHT_OF_DAWN05);
JumpToNextStep(3000);
break;
@@ -733,7 +719,7 @@ public:
break;
case 8: // summon announce
DoScriptText(SAY_LIGHT_OF_DAWN06, me);
Talk(SAY_LIGHT_OF_DAWN06);
JumpToNextStep(5000);
break;
@@ -772,34 +758,34 @@ public:
// ******* After battle *****************************************************************
case 11: // Tirion starts to speak
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN28, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN28);
JumpToNextStep(21000);
break;
case 12:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN29, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN29);
JumpToNextStep(13000);
break;
case 13:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN30, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN30);
JumpToNextStep(13000);
break;
case 14:
me->SetStandState(UNIT_STAND_STATE_STAND);
DoScriptText(SAY_LIGHT_OF_DAWN31, me);
Talk(SAY_LIGHT_OF_DAWN31);
JumpToNextStep(7000);
break;
case 15: // summon gate
if (Unit* temp = me->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, LightofDawnLoc[22].x, LightofDawnLoc[22].y, LightofDawnLoc[22].z, LightofDawnLoc[22].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_ALEXANDROS_MOGRAINE, LightofDawnLoc[22].x, LightofDawnLoc[22].y, LightofDawnLoc[22].z, LightofDawnLoc[22].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
temp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
temp->CastSpell(temp, SPELL_ALEXANDROS_MOGRAINE_SPAWN, true);
DoScriptText(EMOTE_LIGHT_OF_DAWN06, temp);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN06);
uiAlexandrosGUID = temp->GetGUID();
}
JumpToNextStep(4000);
@@ -810,7 +796,7 @@ public:
{
temp->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[23].x, LightofDawnLoc[23].y, LightofDawnLoc[23].z);
DoScriptText(SAY_LIGHT_OF_DAWN32, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN32);
}
SetHoldState(false); // makes darion turns back
JumpToNextStep(5000);
@@ -818,14 +804,14 @@ public:
case 17:
me->SetStandState(UNIT_STAND_STATE_KNEEL);
DoScriptText(SAY_LIGHT_OF_DAWN34, me);
Talk(SAY_LIGHT_OF_DAWN34);
JumpToNextStep(5000);
break;
case 18: // Darion's spirit out
if (Unit* temp = me->SummonCreature(NPC_DARION_MOGRAINE, LightofDawnLoc[24].x, LightofDawnLoc[24].y, LightofDawnLoc[24].z, LightofDawnLoc[24].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
if (Creature* temp = me->SummonCreature(NPC_DARION_MOGRAINE, LightofDawnLoc[24].x, LightofDawnLoc[24].y, LightofDawnLoc[24].z, LightofDawnLoc[24].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
DoScriptText(SAY_LIGHT_OF_DAWN35, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN35);
temp->SetWalk(false);
uiDarionGUID = temp->GetGUID();
}
@@ -835,7 +821,7 @@ public:
case 19: // runs to father
if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
{
DoScriptText(EMOTE_LIGHT_OF_DAWN07, temp);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN07);
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[25].x, LightofDawnLoc[25].y, LightofDawnLoc[25].z);
}
JumpToNextStep(4000);
@@ -843,31 +829,31 @@ public:
case 20:
if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN36, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN36);
JumpToNextStep(4000);
break;
case 21:
if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
DoScriptText(EMOTE_LIGHT_OF_DAWN08, temp);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN08);
JumpToNextStep(4000);
break;
case 22:
if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
DoScriptText(SAY_LIGHT_OF_DAWN37, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN37);
JumpToNextStep(8000);
break;
case 23:
if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN38, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN38);
JumpToNextStep(8000);
break;
case 24:
if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
DoScriptText(SAY_LIGHT_OF_DAWN39, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN39);
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID)) // Tirion moves forward here
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[1].x, LightofDawnLoc[1].y, LightofDawnLoc[1].z);
@@ -877,13 +863,13 @@ public:
case 25:
if (Creature* temp = Unit::GetCreature(*me, uiDarionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN40, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN40);
JumpToNextStep(11000);
break;
case 26:
if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
DoScriptText(SAY_LIGHT_OF_DAWN41, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN41);
JumpToNextStep(5000);
break;
@@ -895,14 +881,14 @@ public:
case 28:
if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID))
DoScriptText(SAY_LIGHT_OF_DAWN42, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN42);
JumpToNextStep(6000);
break;
case 29: // lich king spawns
if (Unit* temp = me->SummonCreature(NPC_THE_LICH_KING, LightofDawnLoc[26].x, LightofDawnLoc[26].y, LightofDawnLoc[26].z, LightofDawnLoc[26].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
if (Creature* temp = me->SummonCreature(NPC_THE_LICH_KING, LightofDawnLoc[26].x, LightofDawnLoc[26].y, LightofDawnLoc[26].z, LightofDawnLoc[26].o, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 300000))
{
DoScriptText(SAY_LIGHT_OF_DAWN43, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN43);
uiLichKingGUID = temp->GetGUID();
if (Unit* pAlex = Unit::GetCreature(*me, uiAlexandrosGUID))
temp->CastSpell(pAlex, SPELL_SOUL_FEAST_ALEX, false);
@@ -913,21 +899,21 @@ public:
case 30:
if (Creature* temp = Unit::GetCreature(*me, uiAlexandrosGUID)) // just hide him
{
DoScriptText(EMOTE_LIGHT_OF_DAWN09, temp);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN09);
temp->SetVisible(false);
}
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
{
temp->InterruptNonMeleeSpells(false);
DoScriptText(SAY_LIGHT_OF_DAWN45, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN45);
}
JumpToNextStep(3000);
break;
case 31:
me->SetStandState(UNIT_STAND_STATE_STAND);
DoScriptText(EMOTE_LIGHT_OF_DAWN10, me);
DoScriptText(SAY_LIGHT_OF_DAWN44, me);
Talk(EMOTE_LIGHT_OF_DAWN10);
Talk(SAY_LIGHT_OF_DAWN44);
JumpToNextStep(3000);
break;
@@ -951,7 +937,7 @@ public:
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
{
temp->HandleEmoteCommand(EMOTE_ONESHOT_KICK);
DoScriptText(SAY_LIGHT_OF_DAWN46, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN46);
}
me->SetSpeed(MOVE_RUN, 6.0f);
me->SetStandState(UNIT_STAND_STATE_DEAD);
@@ -966,33 +952,33 @@ public:
case 38:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN47, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN47);
JumpToNextStep(8000);
break;
case 39:
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
DoScriptText(SAY_LIGHT_OF_DAWN48, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN48);
JumpToNextStep(15000);
break;
case 40:
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
DoScriptText(SAY_LIGHT_OF_DAWN49, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN49);
JumpToNextStep(17000);
break;
case 41: // Lich king - Apocalypse
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
{
DoScriptText(EMOTE_LIGHT_OF_DAWN11, temp);
DoScriptText(SAY_LIGHT_OF_DAWN51, temp);
if (Unit* pTirion = Unit::GetCreature(*me, uiTirionGUID))
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN11);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN51);
if (Creature* pTirion = Unit::GetCreature(*me, uiTirionGUID))
{
pTirion->SetStandState(UNIT_STAND_STATE_KNEEL);
//temp->CastSpell(pTirion, SPELL_APOCALYPSE, false); // not working
temp->CastSpell(pTirion, SPELL_SOUL_FEAST_TIRION, false);
DoScriptText(EMOTE_LIGHT_OF_DAWN12, pTirion);
pTirion->AI()->Talk(EMOTE_LIGHT_OF_DAWN12);
}
}
JumpToNextStep(2000);
@@ -1034,7 +1020,7 @@ public:
temp->SetWalk(false);
temp->SetSpeed(MOVE_RUN, 2.0f);
temp->GetMotionMaster()->MovePoint(0, fLichPositionX, fLichPositionY, fLichPositionZ);
DoScriptText(SAY_LIGHT_OF_DAWN50, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN50);
}
if (Creature* temp = Unit::GetCreature(*me, uiKorfaxGUID))
{
@@ -1057,7 +1043,7 @@ public:
case 43: // They all got kicked
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
DoScriptText(EMOTE_LIGHT_OF_DAWN13, temp);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN13);
if (Creature* temp = Unit::GetCreature(*me, uiMaxwellGUID))
{
@@ -1106,7 +1092,7 @@ public:
break;
case 45:
DoScriptText(SAY_LIGHT_OF_DAWN52, me);
Talk(SAY_LIGHT_OF_DAWN52);
JumpToNextStep(5000);
break;
@@ -1114,14 +1100,14 @@ public:
me->SetSpeed(MOVE_RUN, 1.0f);
me->SetWalk(true);
me->SetStandState(UNIT_STAND_STATE_STAND);
DoScriptText(SAY_LIGHT_OF_DAWN53, me);
Talk(SAY_LIGHT_OF_DAWN53);
SetHoldState(false); // Darion throws sword
JumpToNextStep(7000);
break;
case 47: // Ashbringer rebirth
me->SetStandState(UNIT_STAND_STATE_KNEEL);
DoScriptText(EMOTE_LIGHT_OF_DAWN15, me);
Talk(EMOTE_LIGHT_OF_DAWN15);
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
{
temp->SetStandState(UNIT_STAND_STATE_STAND);
@@ -1149,26 +1135,26 @@ public:
case 49:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN54, temp);
Talk(SAY_LIGHT_OF_DAWN54);
JumpToNextStep(4000);
break;
case 50:
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
DoScriptText(SAY_LIGHT_OF_DAWN55, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN55);
JumpToNextStep(5000);
break;
case 51:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN56, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN56);
JumpToNextStep(1000);
break;
case 52: // Tiron charges
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
{
DoScriptText(EMOTE_LIGHT_OF_DAWN16, temp);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN16);
temp->CastSpell(temp, SPELL_TIRION_CHARGE, false); // jumping charge
temp->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H);
temp->SetSpeed(MOVE_RUN, 3.0f); // workarounds, make Tirion still running
@@ -1182,7 +1168,7 @@ public:
case 53:
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
DoScriptText(SAY_LIGHT_OF_DAWN57, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN57);
JumpToNextStep(1000);
break;
@@ -1210,13 +1196,13 @@ public:
case 57:
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
DoScriptText(SAY_LIGHT_OF_DAWN58, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN58);
JumpToNextStep(10000);
break;
case 58:
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID))
DoScriptText(SAY_LIGHT_OF_DAWN59, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN59);
JumpToNextStep(10000);
break;
@@ -1235,7 +1221,7 @@ public:
case 60:
if (Creature* temp = Unit::GetCreature(*me, uiLichKingGUID)) // Lich king disappears here
{
DoScriptText(EMOTE_LIGHT_OF_DAWN17, temp);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN17);
temp->Kill(temp);
}
JumpToNextStep(10000);
@@ -1243,7 +1229,7 @@ public:
case 61:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN60, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN60);
JumpToNextStep(3000);
break;
@@ -1260,50 +1246,50 @@ public:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
{
temp->GetMotionMaster()->MovePoint(0, LightofDawnLoc[8].x, LightofDawnLoc[8].y, LightofDawnLoc[8].z);
DoScriptText(SAY_LIGHT_OF_DAWN61, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN61);
}
JumpToNextStep(15000);
break;
case 64:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN62, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN62);
JumpToNextStep(7000);
break;
case 65:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN63, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN63);
JumpToNextStep(10000);
break;
case 66:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN64, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN64);
JumpToNextStep(11000);
break;
case 67:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN65, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN65);
JumpToNextStep(10000);
break;
case 68:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN66, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN66);
JumpToNextStep(8000);
break;
case 69:
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN67, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN67);
JumpToNextStep(10000);
break;
case 70:
me->SetStandState(UNIT_STAND_STATE_STAND);
DoScriptText(SAY_LIGHT_OF_DAWN68, me);
Talk(SAY_LIGHT_OF_DAWN68);
JumpToNextStep(10000);
break;
@@ -1381,12 +1367,7 @@ public:
if (uiFight_speech <= diff)
{
DoScriptText(RAND(SAY_LIGHT_OF_DAWN09, SAY_LIGHT_OF_DAWN10, SAY_LIGHT_OF_DAWN11,
SAY_LIGHT_OF_DAWN12, SAY_LIGHT_OF_DAWN13, SAY_LIGHT_OF_DAWN14,
SAY_LIGHT_OF_DAWN15, SAY_LIGHT_OF_DAWN16, SAY_LIGHT_OF_DAWN17,
SAY_LIGHT_OF_DAWN18, SAY_LIGHT_OF_DAWN19, SAY_LIGHT_OF_DAWN20,
SAY_LIGHT_OF_DAWN21, SAY_LIGHT_OF_DAWN22, SAY_LIGHT_OF_DAWN23,
SAY_LIGHT_OF_DAWN24), me);
Talk(SAY_LIGHT_OF_DAWN09);
uiFight_speech = urand(15000, 20000);
} else uiFight_speech -= diff;
@@ -1419,11 +1400,11 @@ public:
if (uiFight_duration <= diff + 5000)
{
if (!uiTirionGUID)
if (Unit* temp = me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, LightofDawnLoc[0].x, LightofDawnLoc[0].y, LightofDawnLoc[0].z, 1.528f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000))
if (Creature* temp = me->SummonCreature(NPC_HIGHLORD_TIRION_FORDRING, LightofDawnLoc[0].x, LightofDawnLoc[0].y, LightofDawnLoc[0].z, 1.528f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 600000))
{
temp->setFaction(me->getFaction());
temp->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID + 0, uint32(EQUIP_UNEQUIP));
DoScriptText(SAY_LIGHT_OF_DAWN25, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN25);
uiTirionGUID = temp->GetGUID();
}
}
@@ -1500,7 +1481,7 @@ public:
}
if (Creature* temp = Unit::GetCreature(*me, uiOrbazGUID))
DoScriptText(EMOTE_LIGHT_OF_DAWN04, temp);
temp->AI()->Talk(EMOTE_LIGHT_OF_DAWN04);
if (Creature* temp = Unit::GetCreature(*me, uiThassarianGUID))
{
@@ -1515,7 +1496,7 @@ public:
}
if (Creature* temp = Unit::GetCreature(*me, uiTirionGUID))
DoScriptText(SAY_LIGHT_OF_DAWN26, temp);
temp->AI()->Talk(SAY_LIGHT_OF_DAWN26);
SetHoldState(false);
@@ -18,6 +18,7 @@
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "PassiveAI.h"
#include "Player.h"
/*####
## npc_valkyr_battle_maiden
@@ -28,8 +28,8 @@ EndScriptData */
enum eEnums
{
SAY_AGGRO = -1189019,
SAY_SPECIALAE = -1189020,
SAY_AGGRO = 0,
SAY_SPECIALAE = 1,
SPELL_POLYMORPH = 13323,
SPELL_AOESILENCE = 8988,
@@ -69,7 +69,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -93,7 +93,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
return;
DoScriptText(SAY_SPECIALAE, me);
Talk(SAY_SPECIALAE);
DoCast(me, SPELL_ARCANEBUBBLE);
bCanDetonate = true;
@@ -28,9 +28,9 @@ EndScriptData */
enum eEnums
{
SAY_AGGRO = -1189016,
SAY_HEALTH = -1189017,
SAY_KILL = -1189018,
SAY_AGGRO = 0,
SAY_HEALTH = 1,
SAY_KILL = 2,
SPELL_FLAMESHOCK = 8053,
SPELL_SHADOWBOLT = 1106,
@@ -69,12 +69,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*Victim*/)
{
DoScriptText(SAY_KILL, me);
Talk(SAY_KILL);
}
void UpdateAI(const uint32 diff)
@@ -85,7 +85,7 @@ public:
//If we are <35% hp
if (!HpYell && !HealthAbovePct(35))
{
DoScriptText(SAY_HEALTH, me);
Talk(SAY_HEALTH);
HpYell = true;
}
@@ -28,17 +28,20 @@ EndScriptData */
#include "SpellMgr.h"
#include "scarlet_monastery.h"
#include "LFGMgr.h"
#include "Player.h"
#include "SpellInfo.h"
//this texts are already used by 3975 and 3976
enum Says
{
SAY_ENTRANCE = -1189001,
SAY_REJOINED = -1189002,
SAY_LOST_HEAD = -1189003,
SAY_CONFLAGRATION = -1189004,
SAY_SPROUTING_PUMPKINS = -1189005,
SAY_PLAYER_DEATH = -1189006,
SAY_DEATH = -1189007
SAY_LOST_HEAD = 0,
SAY_PLAYER_DEATH = 1,
SAY_ENTRANCE = 0,
SAY_REJOINED = 1,
SAY_CONFLAGRATION = 2,
SAY_SPROUTING_PUMPKINS = 3,
SAY_DEATH = 4,
};
uint32 RandomLaugh[] = {11965, 11975, 11976};
@@ -249,13 +252,17 @@ public:
laugh = urand(15000, 30000);
}
void EnterCombat(Unit* /*who*/) {}
void SaySound(int32 textEntry, Unit* target = 0)
void EnterCombat(Unit* /*who*/) { }
void SaySound(uint8 textEntry, Unit* target = 0)
{
DoScriptText(textEntry, me, target);
if (target)
Talk(textEntry, target->GetGUID());
else
Talk(textEntry);
//DoCast(me, SPELL_HEAD_SPEAKS, true);
Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
if (speaker)
if (Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000))
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
laugh += 3000;
}
@@ -515,9 +522,12 @@ public:
}
}
void SaySound(int32 textEntry, Unit* target = 0)
void SaySound(uint8 textEntry, Unit* target = 0)
{
DoScriptText(textEntry, me, target);
if (target)
Talk(textEntry, target->GetGUID());
else
Talk(textEntry);
laugh += 4000;
}
@@ -29,15 +29,11 @@ EndScriptData */
enum Says
{
SAY_AGGRO = -1189000,
SAY_WHIRLWIND = -1189001,
SAY_ENRAGE = -1189002,
SAY_KILL = -1189003
};
enum Emotes
{
EMOTE_ENRAGE = -1189004
SAY_AGGRO = 0,
SAY_WHIRLWIND = 1,
SAY_ENRAGE = 2,
SAY_KILL = 3,
EMOTE_ENRAGE = 4
};
enum Spells
@@ -82,13 +78,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
DoCast(me, SPELL_RUSHINGCHARGE);
}
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_KILL, me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
@@ -105,8 +101,8 @@ public:
//If we are <30% hp goes Enraged
if (!Enrage && !HealthAbovePct(30) && !me->IsNonMeleeSpellCasted(false))
{
DoScriptText(EMOTE_ENRAGE, me);
DoScriptText(SAY_ENRAGE, me);
Talk(EMOTE_ENRAGE);
Talk(SAY_ENRAGE);
DoCast(me, SPELL_FRENZY);
Enrage = true;
}
@@ -122,7 +118,7 @@ public:
// Whirlwind_Timer
if (Whirlwind_Timer <= diff)
{
DoScriptText(SAY_WHIRLWIND, me);
Talk(SAY_WHIRLWIND);
DoCast(me->getVictim(), SPELL_WHIRLWIND);
Whirlwind_Timer = 30000;
}
@@ -28,7 +28,7 @@ EndScriptData */
enum eEnums
{
SAY_AGGRO = -1189021,
SAY_AGGRO = 0,
SPELL_SUMMONSCARLETHOUND = 17164,
SPELL_BLOODLUST = 6742
};
@@ -56,7 +56,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -29,11 +29,11 @@ EndScriptData */
enum Says
{
SAY_AGGRO = -1189011,
SAY_HEALTH1 = -1189012,
SAY_HEALTH2 = -1189013,
SAY_KILL = -1189014,
SAY_TRIGGER_VORREL = -1189015
SAY_AGGRO = 0,
SAY_HEALTH1 = 1,
SAY_HEALTH2 = 2,
SAY_KILL = 3,
SAY_TRIGGER_VORREL = 0
};
enum Spells
@@ -71,12 +71,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*Victim*/)
{
DoScriptText(SAY_KILL, me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
@@ -85,8 +85,8 @@ public:
return;
//Any other Actions to do with vorrel? setStandState?
if (Unit* vorrel = Unit::GetUnit(*me, instance->GetData64(DATA_VORREL)))
DoScriptText(SAY_TRIGGER_VORREL, vorrel);
if (Creature* vorrel = Creature::GetCreature(*me, instance->GetData64(DATA_VORREL)))
vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
}
void UpdateAI(const uint32 diff)
@@ -97,13 +97,13 @@ public:
//If we are low on hp Do sayings
if (!Yell60 && !HealthAbovePct(60))
{
DoScriptText(SAY_HEALTH1, me);
Talk(SAY_HEALTH1);
Yell60 = true;
}
if (!Yell30 && !HealthAbovePct(30))
{
DoScriptText(SAY_HEALTH2, me);
Talk(SAY_HEALTH2);
Yell30 = true;
}
@@ -26,18 +26,19 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "scarlet_monastery.h"
#include "SpellInfo.h"
enum Says
{
//Mograine says
SAY_MO_AGGRO = -1189005,
SAY_MO_KILL = -1189006,
SAY_MO_RESSURECTED = -1189007,
SAY_MO_AGGRO = 0,
SAY_MO_KILL = 1,
SAY_MO_RESSURECTED = 2,
//Whitemane says
SAY_WH_INTRO = -1189008,
SAY_WH_KILL = -1189009,
SAY_WH_RESSURECT = -1189010,
SAY_WH_INTRO = 0,
SAY_WH_KILL = 1,
SAY_WH_RESSURECT = 2,
};
enum Spells
@@ -113,7 +114,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_MO_AGGRO, me);
Talk(SAY_MO_AGGRO);
DoCast(me, SPELL_RETRIBUTIONAURA);
me->CallForHelp(VISIBLE_RANGE);
@@ -121,7 +122,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_MO_KILL, me);
Talk(SAY_MO_KILL);
}
void DamageTaken(Unit* /*doneBy*/, uint32 &damage)
@@ -166,7 +167,7 @@ public:
//When hit with ressurection say text
if (spell->Id == SPELL_SCARLETRESURRECTION)
{
DoScriptText(SAY_MO_RESSURECTED, me);
Talk(SAY_MO_RESSURECTED);
_bFakeDeath = false;
if (instance)
@@ -275,12 +276,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_WH_INTRO, me);
Talk(SAY_WH_INTRO);
}
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_WH_KILL, me);
Talk(SAY_WH_KILL);
}
void DamageTaken(Unit* /*attacker*/, uint32& damage)
@@ -302,7 +303,7 @@ public:
if (Unit* Mograine = Unit::GetUnit(*me, instance->GetData64(DATA_MOGRAINE)))
{
DoCast(Mograine, SPELL_SCARLETRESURRECTION);
DoScriptText(SAY_WH_RESSURECT, me);
Talk(SAY_WH_RESSURECT);
_bCanResurrect = false;
}
}
@@ -132,7 +132,7 @@ public:
}
}
uint64 GetData64(uint32 type)
uint64 GetData64(uint32 type) const
{
switch (type)
{
@@ -147,7 +147,7 @@ public:
return 0;
}
uint32 GetData(uint32 type)
uint32 GetData(uint32 type) const
{
if (type == TYPE_MOGRAINE_AND_WHITE_EVENT)
return encounter[0];
@@ -29,6 +29,7 @@ EndScriptData */
enum eEnums
{
EMOTE_FRENZY_KILL = 0,
SPELL_REND = 16509,
SPELL_BACKHAND = 18103,
SPELL_FRENZY = 8269
@@ -67,7 +68,10 @@ public:
instance->SetData(DATA_DOCTORTHEOLENKRASTINOV_DEATH, 0);
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
{
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
}
}
@@ -100,7 +104,7 @@ public:
if (m_uiFrenzy_Timer <= uiDiff)
{
DoCast(me, SPELL_FRENZY);
DoScriptText(EMOTE_GENERIC_FRENZY_KILL, me);
Talk(EMOTE_FRENZY_KILL);
m_uiFrenzy_Timer = 120000;
}
@@ -67,7 +67,10 @@ public:
instance->SetData(DATA_LADYILLUCIABAROV_DEATH, 0);
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
{
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
}
}
@@ -74,7 +74,10 @@ public:
instance->SetData(DATA_INSTRUCTORMALICIA_DEATH, 0);
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
{
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
}
}
@@ -63,7 +63,10 @@ public:
instance->SetData(DATA_LORDALEXEIBAROV_DEATH, 0);
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
{
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
}
}
@@ -67,7 +67,10 @@ public:
instance->SetData(DATA_LOREKEEPERPOLKELT_DEATH, 0);
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
{
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
}
}
@@ -69,7 +69,10 @@ public:
instance->SetData(DATA_THERAVENIAN_DEATH, 0);
if (instance->GetData(TYPE_GANDLING) == IN_PROGRESS)
{
instance->SetData(TYPE_GANDLING, IN_PROGRESS);
me->SummonCreature(1853, 180.73f, -9.43856f, 75.507f, 1.61399f, TEMPSUMMON_DEAD_DESPAWN, 0);
}
}
}
@@ -28,6 +28,7 @@ EndScriptData */
enum eEnums
{
EMOTE_FRENZY_KILL = 0,
SPELL_FLAMESTRIKE = 18399,
SPELL_BLAST_WAVE = 16046,
SPELL_FIRESHIELD = 19626,
@@ -88,7 +89,7 @@ public:
if (m_uiFrenzy_Timer <= uiDiff)
{
DoCast(me, SPELL_FRENZY);
DoScriptText(EMOTE_GENERIC_FRENZY_KILL, me);
Talk(EMOTE_FRENZY_KILL);
m_uiFrenzy_Timer = 24000;
}
@@ -128,21 +128,14 @@ public:
}
}
uint32 GetData(uint32 type)
uint32 GetData(uint32 type) const
{
if (type == TYPE_GANDLING)
{
if (IsBossDied[0] && IsBossDied[1] && IsBossDied[2] && IsBossDied[3] && IsBossDied[4] && IsBossDied[5])
{
m_auiEncounter[0] = IN_PROGRESS;
return IN_PROGRESS;
}
}
return 0;
return (type == TYPE_GANDLING &&
IsBossDied[0] && IsBossDied[1] && IsBossDied[2] &&
IsBossDied[3] && IsBossDied[4] && IsBossDied[5])
? IN_PROGRESS : 0;
}
};
};
void AddSC_instance_scholomance()
@@ -23,17 +23,19 @@ SDComment:
SDCategory: Shadowfang Keep
EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "shadowfang_keep.h"
#include "TemporarySummon.h"
#define MAX_ENCOUNTER 4
enum eEnums
{
SAY_BOSS_DIE_AD = -1033007,
SAY_BOSS_DIE_AS = -1033008,
SAY_ARCHMAGE = -1033009,
SAY_BOSS_DIE_AD = 0,
SAY_BOSS_DIE_AS = 0,
SAY_ARCHMAGE = 0,
NPC_ASH = 3850,
NPC_ADA = 3849,
@@ -138,8 +140,8 @@ public:
if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive())
{
DoScriptText(SAY_BOSS_DIE_AD, pAda);
DoScriptText(SAY_BOSS_DIE_AS, pAsh);
pAda->AI()->Talk(SAY_BOSS_DIE_AD);
pAsh->AI()->Talk(SAY_BOSS_DIE_AS);
}
}
@@ -191,7 +193,7 @@ public:
}
}
uint32 GetData(uint32 type)
uint32 GetData(uint32 type) const
{
switch (type)
{
@@ -256,7 +258,7 @@ public:
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
summon->SetReactState(REACT_DEFENSIVE);
summon->CastSpell(summon, SPELL_ASHCROMBE_TELEPORT, true);
DoScriptText(SAY_ARCHMAGE, summon);
summon->AI()->Talk(SAY_ARCHMAGE);
uiTimer = 2000;
uiPhase = 2;
break;
@@ -34,6 +34,7 @@ EndContentData */
#include "SpellAuraEffects.h"
#include "ScriptedEscortAI.h"
#include "shadowfang_keep.h"
#include "Player.h"
/*######
## npc_shadowfang_prisoner
@@ -41,13 +42,13 @@ EndContentData */
enum eEnums
{
SAY_FREE_AS = -1033000,
SAY_OPEN_DOOR_AS = -1033001,
SAY_POST_DOOR_AS = -1033002,
SAY_FREE_AD = -1033003,
SAY_OPEN_DOOR_AD = -1033004,
SAY_POST1_DOOR_AD = -1033005,
SAY_POST2_DOOR_AD = -1033006,
SAY_FREE_AS = 0,
SAY_OPEN_DOOR_AS = 1,
SAY_POST_DOOR_AS = 2,
SAY_FREE_AD = 0,
SAY_OPEN_DOOR_AD = 1,
SAY_POST1_DOOR_AD = 2,
SAY_POST2_DOOR_AD = 3,
SPELL_UNLOCK = 6421,
NPC_ASH = 3850,
@@ -109,15 +110,15 @@ public:
{
case 0:
if (uiNpcEntry == NPC_ASH)
DoScriptText(SAY_FREE_AS, me);
Talk(SAY_FREE_AS);
else
DoScriptText(SAY_FREE_AD, me);
Talk(SAY_FREE_AD);
break;
case 10:
if (uiNpcEntry == NPC_ASH)
DoScriptText(SAY_OPEN_DOOR_AS, me);
Talk(SAY_OPEN_DOOR_AS);
else
DoScriptText(SAY_OPEN_DOOR_AD, me);
Talk(SAY_OPEN_DOOR_AD);
break;
case 11:
if (uiNpcEntry == NPC_ASH)
@@ -125,16 +126,16 @@ public:
break;
case 12:
if (uiNpcEntry == NPC_ASH)
DoScriptText(SAY_POST_DOOR_AS, me);
Talk(SAY_POST_DOOR_AS);
else
DoScriptText(SAY_POST1_DOOR_AD, me);
Talk(SAY_POST1_DOOR_AD);
if (instance)
instance->SetData(TYPE_FREE_NPC, DONE);
break;
case 13:
if (uiNpcEntry != NPC_ASH)
DoScriptText(SAY_POST2_DOOR_AD, me);
Talk(SAY_POST2_DOOR_AD);
break;
}
}
@@ -26,6 +26,7 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#include "stratholme.h"
#include "Player.h"
/*#####
# Additional:
@@ -27,6 +27,7 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "InstanceScript.h"
#include "stratholme.h"
#include "Player.h"
#define GO_SERVICE_ENTRANCE 175368
#define GO_GAUNTLET_GATE1 175357
@@ -401,7 +402,7 @@ class instance_stratholme : public InstanceMapScript
OUT_LOAD_INST_DATA_COMPLETE;
}
uint32 GetData(uint32 type)
uint32 GetData(uint32 type) const
{
switch (type)
{
@@ -425,7 +426,7 @@ class instance_stratholme : public InstanceMapScript
return 0;
}
uint64 GetData64(uint32 data)
uint64 GetData64(uint32 data) const
{
switch (data)
{
@@ -34,6 +34,8 @@ EndContentData */
#include "ScriptedCreature.h"
#include "stratholme.h"
#include "Group.h"
#include "Player.h"
#include "SpellInfo.h"
/*######
## go_gauntlet_gate (this is the _first_ of the gauntlet gates, two exist)
@@ -193,7 +193,7 @@ public:
State = data;
}
uint32 GetData(uint32 type)
uint32 GetData(uint32 type) const
{
if (type == EVENT_STATE)
return State;

Some files were not shown because too many files have changed in this diff Show More