Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: sql/old/3.3.5a/TDB52_to_TDB53_updates/world/2013_07_24_00_world_spell_script_names.sql sql/updates/world/2013_07_24_00_world_spell_script_names.sql sql/updates/world/2013_07_24_00_world_spell_script_names_335.sql src/server/game/Achievements/AchievementMgr.cpp src/server/game/Achievements/AchievementMgr.h src/server/game/Battlegrounds/ArenaTeamMgr.cpp src/server/game/Chat/ChatLink.cpp src/server/game/DataStores/DBCStores.cpp src/server/game/DataStores/DBCStructure.h src/server/game/DataStores/DBCfmt.h src/server/game/Entities/DynamicObject/DynamicObject.h src/server/game/Entities/Object/Object.cpp src/server/game/Entities/Player/Player.cpp src/server/game/Entities/Unit/StatSystem.cpp src/server/game/Entities/Unit/Unit.cpp src/server/game/Entities/Unit/Unit.h src/server/game/Groups/Group.cpp src/server/game/Handlers/QuestHandler.cpp src/server/game/Miscellaneous/SharedDefines.h src/server/game/Spells/Auras/SpellAuraEffects.cpp src/server/game/Spells/Auras/SpellAuras.cpp src/server/game/World/World.h src/server/scripts/Commands/cs_character.cpp src/server/scripts/Commands/cs_lookup.cpp src/server/scripts/Commands/cs_titles.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_halazzi.cpp src/server/scripts/EasternKingdoms/ZulAman/boss_zuljin.cpp src/server/scripts/EasternKingdoms/ZulGurub/boss_jeklik.cpp src/server/scripts/Kalimdor/zone_darkshore.cpp src/server/scripts/Kalimdor/zone_mulgore.cpp src/server/scripts/Kalimdor/zone_tanaris.cpp src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp src/server/scripts/Spells/spell_dk.cpp src/server/scripts/Spells/spell_mage.cpp src/server/scripts/Spells/spell_rogue.cpp src/server/shared/Database/Implementation/CharacterDatabase.cpp src/server/shared/Database/Implementation/CharacterDatabase.h src/tools/vmap4_extractor/mpq_libmpq04.h
This commit is contained in:
commit
e4b14b943d
1018 files changed
+106417
-3858
No files matched your search
@@ -217,7 +217,7 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UDP_RESTORE_DELETE_INFO);
|
||||
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_UPD_RESTORE_DELETE_INFO);
|
||||
stmt->setString(0, delInfo.name);
|
||||
stmt->setUInt32(1, delInfo.accountId);
|
||||
stmt->setUInt32(2, delInfo.lowGuid);
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
|
||||
if (titleInfo && target->HasTitle(titleInfo))
|
||||
{
|
||||
std::string name = titleInfo->name;
|
||||
std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale;
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -441,6 +441,7 @@ public:
|
||||
|
||||
// update to parent zone if exist (client map show only zones without parents)
|
||||
AreaTableEntry const* zoneEntry = areaEntry->zone ? GetAreaEntryByAreaID(areaEntry->zone) : areaEntry;
|
||||
ASSERT(zoneEntry);
|
||||
|
||||
Map const* map = sMapMgr->CreateBaseMap(zoneEntry->mapid);
|
||||
|
||||
|
||||
@@ -1072,7 +1072,8 @@ public:
|
||||
CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(id);
|
||||
if (titleInfo)
|
||||
{
|
||||
std::string name = titleInfo->name;
|
||||
std::string name = target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale;
|
||||
|
||||
if (name.empty())
|
||||
continue;
|
||||
|
||||
|
||||
@@ -808,10 +808,13 @@ public:
|
||||
if (handler->HasLowerSecurity(target, 0))
|
||||
return false;
|
||||
|
||||
char const* kickReason = strtok(NULL, "\r");
|
||||
std::string kickReasonStr = "No reason";
|
||||
if (kickReason != NULL)
|
||||
kickReasonStr = kickReason;
|
||||
if (*args != '\0')
|
||||
{
|
||||
char const* kickReason = strtok(NULL, "\r");
|
||||
if (kickReason != NULL)
|
||||
kickReasonStr = kickReason;
|
||||
}
|
||||
|
||||
if (sWorld->getBoolConfig(CONFIG_SHOW_KICK_IN_WORLD))
|
||||
sWorld->SendWorldText(LANG_COMMAND_KICKMESSAGE_WORLD, (handler->GetSession() ? handler->GetSession()->GetPlayerName().c_str() : "Server"), playerName.c_str(), kickReasonStr.c_str());
|
||||
@@ -1014,7 +1017,6 @@ public:
|
||||
|
||||
int32 area = GetAreaFlagByAreaID(atoi((char*)args));
|
||||
int32 offset = area / 32;
|
||||
uint32 val = uint32((1 << (area % 32)));
|
||||
|
||||
if (area<0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
|
||||
{
|
||||
@@ -1023,6 +1025,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 val = uint32((1 << (area % 32)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
|
||||
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields | val)));
|
||||
|
||||
@@ -1045,7 +1048,6 @@ public:
|
||||
|
||||
int32 area = GetAreaFlagByAreaID(atoi((char*)args));
|
||||
int32 offset = area / 32;
|
||||
uint32 val = uint32((1 << (area % 32)));
|
||||
|
||||
if (area < 0 || offset >= PLAYER_EXPLORED_ZONES_SIZE)
|
||||
{
|
||||
@@ -1054,6 +1056,7 @@ public:
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 val = uint32((1 << (area % 32)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
|
||||
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields ^ val)));
|
||||
|
||||
|
||||
@@ -147,7 +147,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
player->RemoveActiveQuest(entry);
|
||||
player->RemoveActiveQuest(entry, false);
|
||||
player->RemoveRewardedQuest(entry);
|
||||
|
||||
handler->SendSysMessage(LANG_COMMAND_QUEST_REMOVED);
|
||||
|
||||
@@ -96,8 +96,7 @@ public:
|
||||
target->SetTitle(titleInfo); // to be sure that title now known
|
||||
target->SetUInt32Value(PLAYER_CHOSEN_TITLE, titleInfo->bit_index);
|
||||
|
||||
handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, titleInfo->name, tNameLink.c_str());
|
||||
|
||||
handler->PSendSysMessage(LANG_TITLE_CURRENT_RES, id, target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, tNameLink.c_str());
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -139,7 +138,7 @@ public:
|
||||
std::string tNameLink = handler->GetNameLink(target);
|
||||
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr, 80, titleInfo->name, target->GetName().c_str());
|
||||
snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, target->GetName().c_str());
|
||||
|
||||
target->SetTitle(titleInfo);
|
||||
handler->PSendSysMessage(LANG_TITLE_ADD_RES, id, titleNameStr, tNameLink.c_str());
|
||||
@@ -187,7 +186,7 @@ public:
|
||||
std::string tNameLink = handler->GetNameLink(target);
|
||||
|
||||
char titleNameStr[80];
|
||||
snprintf(titleNameStr, 80, titleInfo->name, target->GetName().c_str());
|
||||
snprintf(titleNameStr, 80, target->getGender() == GENDER_MALE ? titleInfo->nameMale : titleInfo->nameFemale, target->GetName().c_str());
|
||||
|
||||
handler->PSendSysMessage(LANG_TITLE_REMOVE_RES, id, titleNameStr, tNameLink.c_str());
|
||||
|
||||
|
||||
@@ -50,7 +50,12 @@ public:
|
||||
|
||||
struct npc_water_elementalAI : public ScriptedAI
|
||||
{
|
||||
npc_water_elementalAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_water_elementalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
waterBoltTimer = 3 * IN_MILLISECONDS;
|
||||
resetTimer = 5 * IN_MILLISECONDS;
|
||||
balindaGUID = 0;
|
||||
}
|
||||
|
||||
uint32 waterBoltTimer;
|
||||
uint64 balindaGUID;
|
||||
|
||||
+6
-1
@@ -164,7 +164,12 @@ public:
|
||||
|
||||
struct boss_rend_blackhandAI : public BossAI
|
||||
{
|
||||
boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND) { }
|
||||
boss_rend_blackhandAI(Creature* creature) : BossAI(creature, DATA_WARCHIEF_REND_BLACKHAND)
|
||||
{
|
||||
gythEvent = false;
|
||||
victorGUID = 0;
|
||||
portcullisGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
|
||||
+1
-1
@@ -342,7 +342,7 @@ public:
|
||||
nefarian->setActive(true);
|
||||
nefarian->SetCanFly(true);
|
||||
nefarian->SetDisableGravity(true);
|
||||
nefarian->AI()->DoCastAOE(SPELL_SHADOWFLAME_INITIAL);
|
||||
nefarian->CastSpell((Unit*)NULL, SPELL_SHADOWFLAME_INITIAL);
|
||||
nefarian->GetMotionMaster()->MovePoint(1, NefarianLoc[1]);
|
||||
}
|
||||
events.CancelEvent(EVENT_MIND_CONTROL);
|
||||
|
||||
+22
@@ -56,6 +56,28 @@ public:
|
||||
{
|
||||
instance_blackwing_lair_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
// Razorgore
|
||||
EggCount = 0;
|
||||
EggEvent = 0;
|
||||
RazorgoreTheUntamedGUID = 0;
|
||||
RazorgoreDoorGUID = 0;
|
||||
// Vaelastrasz the Corrupt
|
||||
VaelastraszTheCorruptGUID = 0;
|
||||
VaelastraszDoorGUID = 0;
|
||||
// Broodlord Lashlayer
|
||||
BroodlordLashlayerGUID = 0;
|
||||
BroodlordDoorGUID = 0;
|
||||
// 3 Dragons
|
||||
FiremawGUID = 0;
|
||||
EbonrocGUID = 0;
|
||||
FlamegorGUID = 0;
|
||||
ChrommagusDoorGUID = 0;
|
||||
// Chormaggus
|
||||
ChromaggusGUID = 0;
|
||||
NefarianDoorGUID = 0;
|
||||
// Nefarian
|
||||
LordVictorNefariusGUID = 0;
|
||||
NefarianGUID = 0;
|
||||
SetBossNumber(EncounterCount);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -107,7 +107,7 @@ class boss_majordomo : public CreatureScript
|
||||
{
|
||||
instance->UpdateEncounterState(ENCOUNTER_CREDIT_KILL_CREATURE, me->GetEntry(), me);
|
||||
me->setFaction(35);
|
||||
me->AI()->EnterEvadeMode();
|
||||
EnterEvadeMode();
|
||||
Talk(SAY_DEFEAT);
|
||||
_JustDied();
|
||||
events.ScheduleEvent(EVENT_OUTRO_1, 32000);
|
||||
|
||||
@@ -584,10 +584,13 @@ public:
|
||||
arca->MonsterYell(SAY_DIALOG_ARCANAGOS_8, LANG_UNIVERSAL, NULL);
|
||||
return 5000;
|
||||
case 12:
|
||||
arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f);
|
||||
arca->setActive(true);
|
||||
arca->InterruptNonMeleeSpells(true);
|
||||
arca->SetSpeed(MOVE_FLIGHT, 2.0f);
|
||||
if (arca)
|
||||
{
|
||||
arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f);
|
||||
arca->setActive(true);
|
||||
arca->InterruptNonMeleeSpells(true);
|
||||
arca->SetSpeed(MOVE_FLIGHT, 2.0f);
|
||||
}
|
||||
return 10000;
|
||||
case 13:
|
||||
me->MonsterYell(SAY_DIALOG_MEDIVH_9, LANG_UNIVERSAL, NULL);
|
||||
|
||||
@@ -787,7 +787,11 @@ public:
|
||||
|
||||
struct npc_pulsing_pumpkinAI : public ScriptedAI
|
||||
{
|
||||
npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_pulsing_pumpkinAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
sprouted = false;
|
||||
debuffGUID = 0;
|
||||
}
|
||||
|
||||
bool sprouted;
|
||||
uint64 debuffGUID;
|
||||
|
||||
@@ -310,6 +310,15 @@ class instance_stratholme : public InstanceMapScript
|
||||
{
|
||||
HandleGameObject(ziggurat4GUID, false);
|
||||
HandleGameObject(ziggurat5GUID, false);
|
||||
}
|
||||
if (data == DONE || data == NOT_STARTED)
|
||||
{
|
||||
HandleGameObject(ziggurat4GUID, true);
|
||||
HandleGameObject(ziggurat5GUID, true);
|
||||
}
|
||||
if (data == DONE)
|
||||
{
|
||||
HandleGameObject(portGauntletGUID, true);
|
||||
if (GetData(TYPE_BARON_RUN) == IN_PROGRESS)
|
||||
{
|
||||
DoRemoveAurasDueToSpellOnPlayers(SPELL_BARON_ULTIMATUM);
|
||||
@@ -318,18 +327,13 @@ class instance_stratholme : public InstanceMapScript
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
player->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA);
|
||||
|
||||
player->KilledMonsterCredit(NPC_YSIDA);
|
||||
}
|
||||
SetData(TYPE_BARON_RUN, DONE);
|
||||
}
|
||||
}
|
||||
if (data == DONE || data == NOT_STARTED)
|
||||
{
|
||||
HandleGameObject(ziggurat4GUID, true);
|
||||
HandleGameObject(ziggurat5GUID, true);
|
||||
}
|
||||
if (data == DONE)
|
||||
HandleGameObject(portGauntletGUID, true);
|
||||
EncounterState[5] = data;
|
||||
break;
|
||||
case TYPE_SH_AELMAR:
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
{
|
||||
if (me->GetDistance(CENTER_X, CENTER_Y, DRAGON_REALM_Z) >= 75)
|
||||
{
|
||||
me->AI()->EnterEvadeMode();
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
if (HealthBelowPct(10) && !isEnraged)
|
||||
@@ -733,7 +733,7 @@ public:
|
||||
Creature* Kalecgos = ObjectAccessor::GetCreature(*me, KalecgosGUID);
|
||||
if (Kalecgos && !Kalecgos->IsInCombat())
|
||||
{
|
||||
me->AI()->EnterEvadeMode();
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -17,11 +17,7 @@
|
||||
|
||||
/*
|
||||
Blasted_Lands
|
||||
Quest support: 3628. Teleporter to Rise of the Defiler.
|
||||
*/
|
||||
|
||||
/*
|
||||
npc_deathly_usher
|
||||
Quest support: 3628.
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
@@ -31,10 +27,6 @@ npc_deathly_usher
|
||||
#include "Player.h"
|
||||
#include "Group.h"
|
||||
|
||||
/*######
|
||||
## npc_deathly_usher
|
||||
######*/
|
||||
|
||||
enum DeathlyUsher
|
||||
{
|
||||
SPELL_TELEPORT_SINGLE = 12885,
|
||||
@@ -42,28 +34,6 @@ enum DeathlyUsher
|
||||
SPELL_TELEPORT_GROUP = 27686
|
||||
};
|
||||
|
||||
class npc_deathly_usher : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_deathly_usher() : CreatureScript("npc_deathly_usher") { }
|
||||
|
||||
struct npc_deathly_usherAI : public ScriptedAI
|
||||
{
|
||||
npc_deathly_usherAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void sGossipSelect(Player* player, uint32 /*sender*/, uint32 /*action*/) OVERRIDE
|
||||
{
|
||||
player->CLOSE_GOSSIP_MENU();
|
||||
me->CastSpell(player, SPELL_TELEPORT_GROUP, true);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_deathly_usherAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# spell_razelikh_teleport_group
|
||||
#####*/
|
||||
@@ -113,6 +83,5 @@ class spell_razelikh_teleport_group : public SpellScriptLoader
|
||||
|
||||
void AddSC_blasted_lands()
|
||||
{
|
||||
new npc_deathly_usher();
|
||||
new spell_razelikh_teleport_group();
|
||||
}
|
||||
@@ -96,7 +96,7 @@ public:
|
||||
Summ1->Attack(me, true);
|
||||
Summ2->Attack(player, true);
|
||||
}
|
||||
me->AI()->AttackStart(Summ1);
|
||||
AttackStart(Summ1);
|
||||
}
|
||||
break;
|
||||
case 19:
|
||||
|
||||
@@ -19,13 +19,12 @@
|
||||
/* ScriptData
|
||||
SDName: Westfall
|
||||
SD%Complete: 90
|
||||
SDComment: Quest support: 155, 1651
|
||||
SDComment: Quest support: 1651
|
||||
SDCategory: Westfall
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_daphne_stilwell
|
||||
npc_defias_traitor
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
@@ -202,79 +201,7 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_defias_traitor
|
||||
######*/
|
||||
enum DefiasSays
|
||||
{
|
||||
SAY_START = 0,
|
||||
SAY_PROGRESS = 1,
|
||||
SAY_END = 2,
|
||||
SAY_AGGRO = 3
|
||||
};
|
||||
|
||||
|
||||
#define QUEST_DEFIAS_BROTHERHOOD 155
|
||||
|
||||
class npc_defias_traitor : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_defias_traitor() : CreatureScript("npc_defias_traitor") { }
|
||||
|
||||
bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) OVERRIDE
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_DEFIAS_BROTHERHOOD)
|
||||
{
|
||||
if (npc_escortAI* pEscortAI = CAST_AI(npc_defias_traitor::npc_defias_traitorAI, creature->AI()))
|
||||
pEscortAI->Start(true, true, player->GetGUID());
|
||||
|
||||
creature->AI()->Talk(SAY_START, player);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_defias_traitorAI(creature);
|
||||
}
|
||||
|
||||
struct npc_defias_traitorAI : public npc_escortAI
|
||||
{
|
||||
npc_defias_traitorAI(Creature* creature) : npc_escortAI(creature) { Reset(); }
|
||||
|
||||
void WaypointReached(uint32 waypointId) OVERRIDE
|
||||
{
|
||||
Player* player = GetPlayerForEscort();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
switch (waypointId)
|
||||
{
|
||||
case 35:
|
||||
SetRun(false);
|
||||
break;
|
||||
case 36:
|
||||
Talk(SAY_PROGRESS, player);
|
||||
break;
|
||||
case 44:
|
||||
Talk(SAY_END, player);
|
||||
player->GroupEventHappens(QUEST_DEFIAS_BROTHERHOOD, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO, who);
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE { }
|
||||
};
|
||||
};
|
||||
|
||||
void AddSC_westfall()
|
||||
{
|
||||
new npc_daphne_stilwell();
|
||||
new npc_defias_traitor();
|
||||
}
|
||||
@@ -308,7 +308,7 @@ class npc_snowfall_glade_playmate : public CreatureScript
|
||||
break;
|
||||
case 4:
|
||||
orphan->AI()->Talk(TEXT_WOLVAR_ORPHAN_2);
|
||||
orphan->AI()->DoCast(me, SPELL_SNOWBALL);
|
||||
orphan->CastSpell(me, SPELL_SNOWBALL);
|
||||
timer = 5000;
|
||||
break;
|
||||
case 5:
|
||||
|
||||
@@ -185,6 +185,8 @@ public:
|
||||
{
|
||||
npc_towering_infernalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
ImmolationTimer = 5000;
|
||||
CheckTimer = 5000;
|
||||
instance = creature->GetInstanceScript();
|
||||
AnetheronGUID = instance->GetData64(DATA_ANETHERON);
|
||||
}
|
||||
|
||||
@@ -191,6 +191,9 @@ public:
|
||||
{
|
||||
npc_lesser_doomguardAI(Creature* creature) : hyjal_trashAI(creature)
|
||||
{
|
||||
CrippleTimer = 50000;
|
||||
WarstompTimer = 10000;
|
||||
CheckTimer = 5000;
|
||||
instance = creature->GetInstanceScript();
|
||||
AzgalorGUID = instance->GetData64(DATA_AZGALOR);
|
||||
}
|
||||
|
||||
@@ -212,13 +212,24 @@ public:
|
||||
{
|
||||
if (eruptTimer <= diff)
|
||||
{
|
||||
uint32 treeHeight = 0;
|
||||
do
|
||||
uint64 frontGuid = FloorEruptionGUIDQueue.front();
|
||||
std::map<uint64, uint32>::iterator itr = FloorEruptionGUID[1].find(frontGuid);
|
||||
if (itr != FloorEruptionGUID[1].end())
|
||||
{
|
||||
treeHeight = (*FloorEruptionGUID[1].find(FloorEruptionGUIDQueue.front())).second;
|
||||
FloorEruption(FloorEruptionGUIDQueue.front());
|
||||
FloorEruptionGUIDQueue.pop();
|
||||
} while (!FloorEruptionGUIDQueue.empty() && (*FloorEruptionGUID[1].find(FloorEruptionGUIDQueue.front())).second == treeHeight);
|
||||
uint32 treeHeight = itr->second;
|
||||
|
||||
do
|
||||
{
|
||||
FloorEruption(frontGuid);
|
||||
FloorEruptionGUIDQueue.pop();
|
||||
if (FloorEruptionGUIDQueue.empty())
|
||||
break;
|
||||
|
||||
frontGuid = FloorEruptionGUIDQueue.front();
|
||||
itr = FloorEruptionGUID[1].find(frontGuid);
|
||||
} while (itr != FloorEruptionGUID[1].end() && itr->second == treeHeight);
|
||||
}
|
||||
|
||||
eruptTimer = 1000;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -42,6 +42,7 @@ public:
|
||||
{
|
||||
boss_gluttonAI(Creature* creature) : BossAI(creature, DATA_GLUTTON)
|
||||
{
|
||||
hp50 = false;
|
||||
hp15 = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,8 @@ public:
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
eventInProgress = false;
|
||||
channeling = false;
|
||||
eventProgress = 0;
|
||||
spawnerCount = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -171,7 +171,11 @@ public:
|
||||
|
||||
struct npc_snufflenose_gopherAI : public PetAI
|
||||
{
|
||||
npc_snufflenose_gopherAI(Creature* creature) : PetAI(creature) { }
|
||||
npc_snufflenose_gopherAI(Creature* creature) : PetAI(creature)
|
||||
{
|
||||
IsMovementActive = false;
|
||||
TargetTubberGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
|
||||
@@ -208,11 +208,13 @@ class boss_ayamiss : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_SWARMER_ATTACK, 60000);
|
||||
break;
|
||||
case EVENT_SUMMON_SWARMER:
|
||||
{
|
||||
Position Pos;
|
||||
me->GetRandomPoint(SwarmerPos, 80.0f, Pos);
|
||||
me->SummonCreature(NPC_SWARMER, Pos);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SWARMER, 5000);
|
||||
break;
|
||||
}
|
||||
case EVENT_TRASH:
|
||||
DoCastVictim(SPELL_TRASH);
|
||||
events.ScheduleEvent(EVENT_TRASH, urand(5000, 7000));
|
||||
|
||||
@@ -898,6 +898,9 @@ public:
|
||||
{
|
||||
eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
MindflayTimer = 500;
|
||||
KillSelfTimer = 35000;
|
||||
|
||||
Portal = 0;
|
||||
if (Creature* pPortal = me->SummonCreature(NPC_SMALL_PORTAL, *me, TEMPSUMMON_CORPSE_DESPAWN))
|
||||
{
|
||||
@@ -974,6 +977,10 @@ public:
|
||||
{
|
||||
claw_tentacleAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
GroundRuptureTimer = 500;
|
||||
HamstringTimer = 2000;
|
||||
EvadeTimer = 5000;
|
||||
|
||||
SetCombatMovement(false);
|
||||
|
||||
Portal = 0;
|
||||
@@ -1085,6 +1092,11 @@ public:
|
||||
{
|
||||
giant_claw_tentacleAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
GroundRuptureTimer = 500;
|
||||
HamstringTimer = 2000;
|
||||
ThrashTimer = 5000;
|
||||
EvadeTimer = 5000;
|
||||
|
||||
SetCombatMovement(false);
|
||||
|
||||
Portal = 0;
|
||||
@@ -1205,6 +1217,8 @@ public:
|
||||
{
|
||||
giant_eye_tentacleAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
BeamTimer = 500;
|
||||
|
||||
SetCombatMovement(false);
|
||||
|
||||
Portal = 0;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 TrinityCore <http://www.trinitycore.org/>
|
||||
* Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the
|
||||
|
||||
@@ -24,7 +24,6 @@ SDCategory: Mulgore
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_skorn_whitecloud
|
||||
npc_kyle_frenzied
|
||||
EndContentData */
|
||||
|
||||
@@ -34,41 +33,6 @@ EndContentData */
|
||||
#include "Player.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
/*######
|
||||
# npc_skorn_whitecloud
|
||||
######*/
|
||||
|
||||
#define GOSSIP_SW "Tell me a story, Skorn."
|
||||
|
||||
class npc_skorn_whitecloud : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_skorn_whitecloud() : CreatureScript("npc_skorn_whitecloud") { }
|
||||
|
||||
bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action)
|
||||
{
|
||||
player->PlayerTalkClass->ClearMenus();
|
||||
if (action == GOSSIP_ACTION_INFO_DEF)
|
||||
player->SEND_GOSSIP_MENU(523, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
if (creature->IsQuestGiver())
|
||||
player->PrepareQuestMenu(creature->GetGUID());
|
||||
|
||||
if (!player->GetQuestRewardStatus(770))
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SW, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
|
||||
|
||||
player->SEND_GOSSIP_MENU(522, creature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
/*#####
|
||||
# npc_kyle_frenzied
|
||||
######*/
|
||||
@@ -202,6 +166,5 @@ public:
|
||||
|
||||
void AddSC_mulgore()
|
||||
{
|
||||
new npc_skorn_whitecloud();
|
||||
new npc_kyle_frenzied();
|
||||
}
|
||||
@@ -649,11 +649,11 @@ public:
|
||||
Unit* mob = NULL;
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
mob = player->FindNearestCreature(entries[i], 50, me);
|
||||
mob = player->FindNearestCreature(entries[i], 50);
|
||||
while (mob)
|
||||
{
|
||||
mob->RemoveFromWorld();
|
||||
mob = player->FindNearestCreature(15423, 50, me);
|
||||
mob = player->FindNearestCreature(15423, 50);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -728,7 +728,7 @@ public:
|
||||
if (AnimationCount < 65)
|
||||
me->CombatStop();
|
||||
if (AnimationCount == 65 || eventEnd)
|
||||
me->AI()->EnterEvadeMode();
|
||||
EnterEvadeMode();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -830,7 +830,7 @@ public:
|
||||
}
|
||||
hasTarget = true;
|
||||
if (target)
|
||||
me->AI()->AttackStart(target);
|
||||
AttackStart(target);
|
||||
}
|
||||
if (!(me->FindNearestCreature(15379, 60)))
|
||||
DoCast(me, 33652);
|
||||
@@ -1021,7 +1021,7 @@ public:
|
||||
{
|
||||
if (quest->GetQuestId() == QUEST_A_PAWN_ON_THE_ETERNAL_BOARD)
|
||||
{
|
||||
if (Creature* trigger = go->FindNearestCreature(15454, 100, player))
|
||||
if (Creature* trigger = go->FindNearestCreature(15454, 100))
|
||||
{
|
||||
Unit* Merithra = trigger->SummonCreature(15378, -8034.535f, 1535.14f, 2.61f, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
|
||||
Unit* Caelestrasz = trigger->SummonCreature(15379, -8032.767f, 1533.148f, 2.61f, 1.5f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 220000);
|
||||
|
||||
@@ -88,6 +88,9 @@ class boss_prince_taldaram : public CreatureScript
|
||||
boss_prince_taldaramAI(Creature* creature) : BossAI(creature, DATA_PRINCE_TALDARAM)
|
||||
{
|
||||
me->SetDisableGravity(true);
|
||||
_flameSphereTargetGUID = 0;
|
||||
_embraceTargetGUID = 0;
|
||||
_embraceTakenDamage = 0;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
@@ -283,7 +286,10 @@ class npc_prince_taldaram_flame_sphere : public CreatureScript
|
||||
|
||||
struct npc_prince_taldaram_flame_sphereAI : public ScriptedAI
|
||||
{
|
||||
npc_prince_taldaram_flame_sphereAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_prince_taldaram_flame_sphereAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_flameSphereTargetGUID = 0;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
|
||||
+485
-364
@@ -26,30 +26,22 @@
|
||||
enum Spells
|
||||
{
|
||||
SPELL_MIND_FLAY = 52586,
|
||||
H_SPELL_MIND_FLAY = 59367,
|
||||
SPELL_CURSE_OF_FATIGUE = 52592,
|
||||
H_SPELL_CURSE_OF_FATIGUE = 59368,
|
||||
SPELL_FRENZY = 28747, //maybe 53361
|
||||
SPELL_SUMMON_SKITTERING_SWARMER = 52438, //AOE Effect 140, maybe 52439
|
||||
SPELL_SUMMON_SKITTERING_SWARMER_1 = 52439, //Summon 3x 28735
|
||||
H_SPELL_ACID_SPLASH = 59363,
|
||||
SPELL_ACID_SPLASH = 52446,
|
||||
SPELL_CHARGE = 16979, //maybe is another spell
|
||||
SPELL_BACKSTAB = 52540,
|
||||
SPELL_SHADOW_BOLT = 52534,
|
||||
H_SPELL_SHADOW_BOLT = 59357,
|
||||
SPELL_SHADOW_NOVA = 52535,
|
||||
H_SPELL_SHADOW_NOVA = 59358,
|
||||
SPELL_STRIKE = 52532,
|
||||
SPELL_CLEAVE = 49806,
|
||||
SPELL_ENRAGE = 52470,
|
||||
SPELL_INFECTED_BITE = 52469,
|
||||
H_SPELL_INFECTED_BITE = 59364,
|
||||
SPELL_WEB_WRAP = 52086, //the spell is not working properly
|
||||
SPELL_BLINDING_WEBS = 52524,
|
||||
H_SPELL_BLINDING_WEBS = 59365,
|
||||
SPELL_POSION_SPRAY = 52493,
|
||||
H_SPELL_POSION_SPRAY = 59366
|
||||
SPELL_POSION_SPRAY = 52493
|
||||
};
|
||||
|
||||
enum Mobs
|
||||
@@ -69,7 +61,7 @@ enum Yells
|
||||
SAY_SEND_GROUP = 5
|
||||
};
|
||||
|
||||
const Position SpawnPoint[] =
|
||||
Position const SpawnPoint[] =
|
||||
{
|
||||
{ 566.164f, 682.087f, 769.079f, 2.21657f },
|
||||
{ 529.042f, 706.941f, 777.298f, 1.0821f },
|
||||
@@ -81,444 +73,573 @@ const Position SpawnPoint[] =
|
||||
{ 552.625f, 706.408f, 777.177f, 3.4383f }
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_SUMMON = 1,
|
||||
EVENT_MIND_FLAY,
|
||||
EVENT_CURSE_FATIGUE
|
||||
};
|
||||
|
||||
class boss_krik_thir : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_krik_thir() : CreatureScript("boss_krik_thir") { }
|
||||
public:
|
||||
boss_krik_thir() : CreatureScript("boss_krik_thir") { }
|
||||
|
||||
struct boss_krik_thirAI : public ScriptedAI
|
||||
{
|
||||
boss_krik_thirAI(Creature* creature) : ScriptedAI(creature)
|
||||
struct boss_krik_thirAI : public BossAI
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
boss_krik_thirAI(Creature* creature) : BossAI(creature, DATA_KRIKTHIR_THE_GATEWATCHER) { }
|
||||
|
||||
InstanceScript* instance;
|
||||
|
||||
uint32 uiMindFlayTimer;
|
||||
uint32 uiCurseFatigueTimer;
|
||||
uint32 uiSummonTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
uiMindFlayTimer = 15*IN_MILLISECONDS;
|
||||
uiCurseFatigueTimer = 12*IN_MILLISECONDS;
|
||||
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, NOT_STARTED);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
Summon();
|
||||
uiSummonTimer = 15*IN_MILLISECONDS;
|
||||
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, IN_PROGRESS);
|
||||
}
|
||||
|
||||
void Summon()
|
||||
{
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[0], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[0], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[1], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[1], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[2], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[2], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[3], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[3], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_INFECTIOR, SpawnPoint[4], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[4], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_INFECTIOR, SpawnPoint[5], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[5], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_INFECTIOR, SpawnPoint[6], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[6], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[7], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[7], TEMPSUMMON_TIMED_DESPAWN, 25*IN_MILLISECONDS);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiSummonTimer <= diff)
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
_EnterCombat();
|
||||
Summon();
|
||||
uiSummonTimer = 15*IN_MILLISECONDS;
|
||||
} else uiSummonTimer -= diff;
|
||||
|
||||
if (uiMindFlayTimer <= diff)
|
||||
events.ScheduleEvent(EVENT_SUMMON, 15000);
|
||||
events.ScheduleEvent(EVENT_MIND_FLAY, 15000);
|
||||
events.ScheduleEvent(EVENT_CURSE_FATIGUE, 12000);
|
||||
}
|
||||
|
||||
void Summon()
|
||||
{
|
||||
DoCastVictim(SPELL_MIND_FLAY);
|
||||
uiMindFlayTimer = 15*IN_MILLISECONDS;
|
||||
} else uiMindFlayTimer -= diff;
|
||||
for (uint8 i = 0; i < 8; i++)
|
||||
{
|
||||
me->SummonCreature(NPC_SKITTERING_SWARMER, SpawnPoint[i], TEMPSUMMON_TIMED_DESPAWN, 25000);
|
||||
uint32 summon_entry = (i == 4 || i == 5 || i == 6) ? NPC_SKITTERING_INFECTIOR : NPC_SKITTERING_SWARMER;
|
||||
me->SummonCreature(summon_entry, SpawnPoint[i], TEMPSUMMON_TIMED_DESPAWN, 25000);
|
||||
}
|
||||
}
|
||||
|
||||
if (uiCurseFatigueTimer <= diff)
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
//WowWiki say "Curse of Fatigue-Kirk'thir will cast Curse of Fatigue on 2-3 targets periodically."
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_CURSE_OF_FATIGUE);
|
||||
if (Unit* tankTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true))
|
||||
DoCast(tankTarget, SPELL_CURSE_OF_FATIGUE);
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
uiCurseFatigueTimer = 10*IN_MILLISECONDS;
|
||||
} else uiCurseFatigueTimer -= diff;
|
||||
events.Update(diff);
|
||||
|
||||
if (!me->HasAura(SPELL_FRENZY) && HealthBelowPct(10))
|
||||
DoCast(me, SPELL_FRENZY, true);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SUMMON:
|
||||
Summon();
|
||||
events.ScheduleEvent(EVENT_SUMMON, 15000);
|
||||
break;
|
||||
case EVENT_MIND_FLAY:
|
||||
DoCastVictim(SPELL_MIND_FLAY);
|
||||
events.ScheduleEvent(EVENT_MIND_FLAY, 15000);
|
||||
break;
|
||||
case EVENT_CURSE_FATIGUE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_CURSE_OF_FATIGUE);
|
||||
events.ScheduleEvent(EVENT_CURSE_FATIGUE, 10000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!me->HasAura(SPELL_FRENZY) && HealthBelowPct(10))
|
||||
DoCast(me, SPELL_FRENZY, true);
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
{
|
||||
summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
instance->SetBossState(DATA_KRIKTHIR_THE_GATEWATCHER, DONE);
|
||||
return GetAzjolNerubAI<boss_krik_thirAI>(creature);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) OVERRIDE
|
||||
{
|
||||
if (victim->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) OVERRIDE
|
||||
{
|
||||
summoned->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ());
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetInstanceAI<boss_krik_thirAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_skittering_infector : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_skittering_infector() : CreatureScript("npc_skittering_infector") { }
|
||||
public:
|
||||
npc_skittering_infector() : CreatureScript("npc_skittering_infector") { }
|
||||
|
||||
struct npc_skittering_infectorAI : public ScriptedAI
|
||||
{
|
||||
npc_skittering_infectorAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
struct npc_skittering_infectorAI : public ScriptedAI
|
||||
{
|
||||
//The spell is not working propperly
|
||||
DoCastVictim(SPELL_ACID_SPLASH, true);
|
||||
}
|
||||
};
|
||||
npc_skittering_infectorAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_skittering_infectorAI(creature);
|
||||
}
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
DoCastAOE(SPELL_ACID_SPLASH);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetAzjolNerubAI<npc_skittering_infectorAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
enum TrashEvents
|
||||
{
|
||||
// Anubar Skrimisher
|
||||
EVENT_ANUBAR_CHARGE = 1,
|
||||
EVENT_BACKSTAB,
|
||||
|
||||
// Anubar Shadowcaster
|
||||
EVENT_SHADOW_BOLT,
|
||||
EVENT_SHADOW_NOVA,
|
||||
|
||||
// Anubar Warrior
|
||||
EVENT_STRIKE,
|
||||
EVENT_CLEAVE,
|
||||
|
||||
// Watcher Gashra
|
||||
EVENT_WEB_WRAP_GASHRA,
|
||||
EVENT_INFECTED_BITE_GASHRA,
|
||||
|
||||
// Watcher Narjil
|
||||
EVENT_WEB_WRAP_NARJIL,
|
||||
EVENT_INFECTED_BITE_NARJIL,
|
||||
EVENT_BINDING_WEBS,
|
||||
|
||||
// Watcher Silthik
|
||||
EVENT_WEB_WRAP_SILTHIK,
|
||||
EVENT_INFECTED_BITE_SILTHIK,
|
||||
EVENT_POISON_SPRAY
|
||||
};
|
||||
|
||||
class npc_anub_ar_skirmisher : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_anub_ar_skirmisher() : CreatureScript("npc_anub_ar_skirmisher") { }
|
||||
public:
|
||||
npc_anub_ar_skirmisher() : CreatureScript("npc_anub_ar_skirmisher") { }
|
||||
|
||||
struct npc_anub_ar_skirmisherAI : public ScriptedAI
|
||||
{
|
||||
npc_anub_ar_skirmisherAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 uiChargeTimer;
|
||||
uint32 uiBackstabTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct npc_anub_ar_skirmisherAI : public ScriptedAI
|
||||
{
|
||||
uiChargeTimer = 11*IN_MILLISECONDS;
|
||||
uiBackstabTimer = 7*IN_MILLISECONDS;
|
||||
}
|
||||
npc_anub_ar_skirmisherAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiChargeTimer <= diff)
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
events.ScheduleEvent(EVENT_ANUBAR_CHARGE, 11000);
|
||||
events.ScheduleEvent(EVENT_BACKSTAB, 7000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
DoResetThreat();
|
||||
me->AddThreat(target, 1.0f);
|
||||
DoCast(target, SPELL_CHARGE, true);
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ANUBAR_CHARGE:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
{
|
||||
DoResetThreat();
|
||||
me->AddThreat(target, 1.0f);
|
||||
DoCast(target, SPELL_CHARGE, true);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_ANUBAR_CHARGE, 15000);
|
||||
break;
|
||||
case EVENT_BACKSTAB:
|
||||
DoCastVictim(SPELL_BACKSTAB);
|
||||
events.ScheduleEvent(EVENT_BACKSTAB, 12000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
uiChargeTimer = 15*IN_MILLISECONDS;
|
||||
} else uiChargeTimer -= diff;
|
||||
|
||||
if (uiBackstabTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_BACKSTAB);
|
||||
uiBackstabTimer = 12*IN_MILLISECONDS;
|
||||
} else uiBackstabTimer -= diff;
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetAzjolNerubAI<npc_anub_ar_skirmisherAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_anub_ar_skirmisherAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_anub_ar_shadowcaster : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_anub_ar_shadowcaster() : CreatureScript("npc_anub_ar_shadowcaster") { }
|
||||
public:
|
||||
npc_anub_ar_shadowcaster() : CreatureScript("npc_anub_ar_shadowcaster") { }
|
||||
|
||||
struct npc_anub_ar_shadowcasterAI : public ScriptedAI
|
||||
{
|
||||
npc_anub_ar_shadowcasterAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 uiShadowBoltTimer;
|
||||
uint32 uiShadowNovaTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct npc_anub_ar_shadowcasterAI : public ScriptedAI
|
||||
{
|
||||
uiShadowBoltTimer = 6*IN_MILLISECONDS;
|
||||
uiShadowNovaTimer = 15*IN_MILLISECONDS;
|
||||
}
|
||||
npc_anub_ar_shadowcasterAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT, 6000);
|
||||
events.ScheduleEvent(EVENT_SHADOW_NOVA, 15000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_SHADOW_BOLT:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_SHADOW_BOLT, true);
|
||||
events.ScheduleEvent(EVENT_SHADOW_BOLT, 15000);
|
||||
break;
|
||||
case EVENT_SHADOW_NOVA:
|
||||
DoCastVictim(SPELL_SHADOW_NOVA, true);
|
||||
events.ScheduleEvent(EVENT_SHADOW_NOVA, 17000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiShadowBoltTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_SHADOW_BOLT, true);
|
||||
uiShadowBoltTimer = 15*IN_MILLISECONDS;
|
||||
} else uiShadowBoltTimer -= diff;
|
||||
|
||||
if (uiShadowNovaTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_SHADOW_NOVA, true);
|
||||
uiShadowNovaTimer = 17*IN_MILLISECONDS;
|
||||
} else uiShadowNovaTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
return GetAzjolNerubAI<npc_anub_ar_shadowcasterAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_anub_ar_shadowcasterAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_anub_ar_warrior : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_anub_ar_warrior() : CreatureScript("npc_anub_ar_warrior") { }
|
||||
public:
|
||||
npc_anub_ar_warrior() : CreatureScript("npc_anub_ar_warrior") { }
|
||||
|
||||
struct npc_anub_ar_warriorAI : public ScriptedAI
|
||||
{
|
||||
npc_anub_ar_warriorAI(Creature* creature) : ScriptedAI(creature){ }
|
||||
|
||||
uint32 uiCleaveTimer;
|
||||
uint32 uiStrikeTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct npc_anub_ar_warriorAI : public ScriptedAI
|
||||
{
|
||||
uiCleaveTimer = 11*IN_MILLISECONDS;
|
||||
uiStrikeTimer = 6*IN_MILLISECONDS;
|
||||
}
|
||||
npc_anub_ar_warriorAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 11000);
|
||||
events.ScheduleEvent(EVENT_STRIKE, 6000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_CLEAVE:
|
||||
DoCastVictim(SPELL_STRIKE, true);
|
||||
events.ScheduleEvent(EVENT_CLEAVE, 15000);
|
||||
break;
|
||||
case EVENT_STRIKE:
|
||||
DoCastVictim(SPELL_CLEAVE, true);
|
||||
events.ScheduleEvent(EVENT_STRIKE, 17000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiStrikeTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_STRIKE, true);
|
||||
uiStrikeTimer = 15*IN_MILLISECONDS;
|
||||
} else uiStrikeTimer -= diff;
|
||||
|
||||
if (uiCleaveTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_CLEAVE, true);
|
||||
uiCleaveTimer = 17*IN_MILLISECONDS;
|
||||
} else uiCleaveTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
return GetAzjolNerubAI<npc_anub_ar_warriorAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_anub_ar_warriorAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_watcher_gashra : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_watcher_gashra() : CreatureScript("npc_watcher_gashra") { }
|
||||
public:
|
||||
npc_watcher_gashra() : CreatureScript("npc_watcher_gashra") { }
|
||||
|
||||
struct npc_watcher_gashraAI : public ScriptedAI
|
||||
{
|
||||
npc_watcher_gashraAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 uiWebWrapTimer;
|
||||
uint32 uiInfectedBiteTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct npc_watcher_gashraAI : public ScriptedAI
|
||||
{
|
||||
uiWebWrapTimer = 11*IN_MILLISECONDS;
|
||||
uiInfectedBiteTimer = 4*IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE, true);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiWebWrapTimer <= diff)
|
||||
npc_watcher_gashraAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_WEB_WRAP, true);
|
||||
uiWebWrapTimer = 17*IN_MILLISECONDS;
|
||||
} else uiWebWrapTimer -= diff;
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
if (uiInfectedBiteTimer <= diff)
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
DoCastVictim(SPELL_INFECTED_BITE, true);
|
||||
uiInfectedBiteTimer = 15*IN_MILLISECONDS;
|
||||
} else uiInfectedBiteTimer -= diff;
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
DoCast(me, SPELL_ENRAGE, true);
|
||||
_events.ScheduleEvent(EVENT_WEB_WRAP_GASHRA, 11000);
|
||||
_events.ScheduleEvent(EVENT_INFECTED_BITE_GASHRA, 4000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Creature* krikthir = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_KRIKTHIR_THE_GATEWATCHER));
|
||||
if (krikthir && krikthir->IsAlive())
|
||||
krikthir->AI()->Talk(SAY_PREFIGHT);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_WEB_WRAP_GASHRA:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_WEB_WRAP, true);
|
||||
_events.ScheduleEvent(EVENT_WEB_WRAP_GASHRA, 17000);
|
||||
break;
|
||||
case EVENT_INFECTED_BITE_GASHRA:
|
||||
DoCastVictim(SPELL_INFECTED_BITE, true);
|
||||
_events.ScheduleEvent(EVENT_INFECTED_BITE_GASHRA, 15000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return GetAzjolNerubAI<npc_watcher_gashraAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_watcher_gashraAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_watcher_narjil : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_watcher_narjil() : CreatureScript("npc_watcher_narjil") { }
|
||||
public:
|
||||
npc_watcher_narjil() : CreatureScript("npc_watcher_narjil") { }
|
||||
|
||||
struct npc_watcher_narjilAI : public ScriptedAI
|
||||
{
|
||||
npc_watcher_narjilAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 uiWebWrapTimer;
|
||||
uint32 uiInfectedBiteTimer;
|
||||
uint32 uiBindingWebsTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct npc_watcher_narjilAI : public ScriptedAI
|
||||
{
|
||||
uiWebWrapTimer = 11*IN_MILLISECONDS;
|
||||
uiInfectedBiteTimer = 4*IN_MILLISECONDS;
|
||||
uiBindingWebsTimer = 17*IN_MILLISECONDS;
|
||||
}
|
||||
npc_watcher_narjilAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_WEB_WRAP_NARJIL, 11000);
|
||||
_events.ScheduleEvent(EVENT_INFECTED_BITE_NARJIL, 4000);
|
||||
_events.ScheduleEvent(EVENT_BINDING_WEBS, 17000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Creature* krikthir = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_KRIKTHIR_THE_GATEWATCHER));
|
||||
if (krikthir && krikthir->IsAlive())
|
||||
krikthir->AI()->Talk(SAY_PREFIGHT);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_WEB_WRAP_NARJIL:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_WEB_WRAP, true);
|
||||
_events.ScheduleEvent(EVENT_WEB_WRAP_NARJIL, 15000);
|
||||
break;
|
||||
case EVENT_INFECTED_BITE_NARJIL:
|
||||
DoCastVictim(SPELL_INFECTED_BITE, true);
|
||||
_events.ScheduleEvent(EVENT_INFECTED_BITE_NARJIL, 11000);
|
||||
break;
|
||||
case EVENT_BINDING_WEBS:
|
||||
DoCastVictim(SPELL_BLINDING_WEBS, true);
|
||||
_events.ScheduleEvent(EVENT_BINDING_WEBS, 17000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiWebWrapTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_WEB_WRAP, true);
|
||||
uiWebWrapTimer = 15*IN_MILLISECONDS;
|
||||
} else uiWebWrapTimer -= diff;
|
||||
|
||||
if (uiInfectedBiteTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_INFECTED_BITE, true);
|
||||
uiInfectedBiteTimer = 11*IN_MILLISECONDS;
|
||||
} else uiInfectedBiteTimer -= diff;
|
||||
|
||||
if (uiBindingWebsTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_BLINDING_WEBS, true);
|
||||
uiBindingWebsTimer = 17*IN_MILLISECONDS;
|
||||
} else uiBindingWebsTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
return GetAzjolNerubAI<npc_watcher_narjilAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_watcher_narjilAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class npc_watcher_silthik : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_watcher_silthik() : CreatureScript("npc_watcher_silthik") { }
|
||||
public:
|
||||
npc_watcher_silthik() : CreatureScript("npc_watcher_silthik") { }
|
||||
|
||||
struct npc_watcher_silthikAI : public ScriptedAI
|
||||
{
|
||||
npc_watcher_silthikAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 uiWebWrapTimer;
|
||||
uint32 uiInfectedBiteTimer;
|
||||
uint32 uiPoisonSprayTimer;
|
||||
|
||||
void Reset() OVERRIDE
|
||||
struct npc_watcher_silthikAI : public ScriptedAI
|
||||
{
|
||||
uiWebWrapTimer = 11*IN_MILLISECONDS;
|
||||
uiInfectedBiteTimer = 4*IN_MILLISECONDS;
|
||||
uiPoisonSprayTimer = 15*IN_MILLISECONDS;
|
||||
}
|
||||
npc_watcher_silthikAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) OVERRIDE
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_WEB_WRAP_SILTHIK, 11000);
|
||||
_events.ScheduleEvent(EVENT_INFECTED_BITE_SILTHIK, 4000);
|
||||
_events.ScheduleEvent(EVENT_POISON_SPRAY, 15000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) OVERRIDE
|
||||
{
|
||||
Creature* krikthir = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_KRIKTHIR_THE_GATEWATCHER));
|
||||
if (krikthir && krikthir->IsAlive())
|
||||
krikthir->AI()->Talk(SAY_PREFIGHT);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_WEB_WRAP_SILTHIK:
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_WEB_WRAP, true);
|
||||
_events.ScheduleEvent(EVENT_WEB_WRAP_SILTHIK, 15000);
|
||||
break;
|
||||
case EVENT_INFECTED_BITE_SILTHIK:
|
||||
DoCastVictim(SPELL_INFECTED_BITE, true);
|
||||
_events.ScheduleEvent(EVENT_INFECTED_BITE_SILTHIK, 11000);
|
||||
break;
|
||||
case EVENT_POISON_SPRAY:
|
||||
DoCastVictim(SPELL_POSION_SPRAY, true);
|
||||
_events.ScheduleEvent(EVENT_POISON_SPRAY, 17000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (uiWebWrapTimer <= diff)
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||
DoCast(target, SPELL_WEB_WRAP, true);
|
||||
|
||||
uiWebWrapTimer = 15*IN_MILLISECONDS;
|
||||
} else uiWebWrapTimer -= diff;
|
||||
|
||||
if (uiInfectedBiteTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_INFECTED_BITE, true);
|
||||
uiInfectedBiteTimer = 15*IN_MILLISECONDS;
|
||||
} else uiInfectedBiteTimer -= diff;
|
||||
|
||||
if (uiPoisonSprayTimer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_POSION_SPRAY, true);
|
||||
uiPoisonSprayTimer = 17*IN_MILLISECONDS;
|
||||
} else uiPoisonSprayTimer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
return GetAzjolNerubAI<npc_watcher_silthikAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const OVERRIDE
|
||||
{
|
||||
return new npc_watcher_silthikAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class achievement_watch_him_die : public AchievementCriteriaScript
|
||||
|
||||
@@ -168,6 +168,7 @@ set(scripts_STAT_SRCS
|
||||
Northrend/IcecrownCitadel/icecrown_citadel_teleport.cpp
|
||||
Northrend/IcecrownCitadel/boss_lord_marrowgar.cpp
|
||||
Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
|
||||
Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
|
||||
Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp
|
||||
Northrend/IcecrownCitadel/boss_festergut.cpp
|
||||
Northrend/IcecrownCitadel/boss_rotface.cpp
|
||||
|
||||
@@ -73,7 +73,7 @@ enum Enums
|
||||
|
||||
//Whelps
|
||||
NPC_TWILIGHT_WHELP = 30890,
|
||||
NPC_SHARTHARION_TWILIGHT_WHELP = 31214,
|
||||
NPC_SARTHARION_TWILIGHT_WHELP = 31214,
|
||||
SPELL_FADE_ARMOR = 60708, // Reduces the armor of an enemy by 1500 for 15s
|
||||
|
||||
//flame tsunami
|
||||
@@ -253,7 +253,7 @@ struct dummy_dragonAI : public ScriptedAI
|
||||
{
|
||||
case NPC_TENEBRON:
|
||||
{
|
||||
if (!instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
|
||||
if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
|
||||
{
|
||||
for (uint32 i = 0; i < 6; ++i)
|
||||
me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[i], TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
|
||||
@@ -267,7 +267,7 @@ struct dummy_dragonAI : public ScriptedAI
|
||||
}
|
||||
case NPC_SHADRON:
|
||||
{
|
||||
if (!instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
|
||||
if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
|
||||
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
|
||||
else
|
||||
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
|
||||
@@ -276,7 +276,7 @@ struct dummy_dragonAI : public ScriptedAI
|
||||
}
|
||||
case NPC_VESPERON:
|
||||
{
|
||||
if (!instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
|
||||
if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
|
||||
{
|
||||
if (Creature* acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
|
||||
{
|
||||
@@ -816,10 +816,10 @@ public:
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
|
||||
if (!instance->GetBossState(DATA_SARTHARION) == IN_PROGRESS)
|
||||
if (instance->GetBossState(DATA_SARTHARION) != IN_PROGRESS)
|
||||
me->SummonCreature(NPC_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
|
||||
else
|
||||
me->SummonCreature(NPC_SHARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
|
||||
me->SummonCreature(NPC_SARTHARION_TWILIGHT_WHELP, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
|
||||
me->DealDamage(me, me->GetHealth());
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -357,7 +357,7 @@ public:
|
||||
if (instance->GetData(BOSS_ARGENT_CHALLENGE_E) == NOT_STARTED && instance->GetData(BOSS_ARGENT_CHALLENGE_P) == NOT_STARTED)
|
||||
{
|
||||
if (instance->GetData(BOSS_GRAND_CHAMPIONS) == NOT_STARTED)
|
||||
me->AI()->SetData(DATA_START, 0);
|
||||
SetData(DATA_START, 0);
|
||||
|
||||
if (instance->GetData(BOSS_GRAND_CHAMPIONS) == DONE)
|
||||
DoStartArgentChampionEncounter();
|
||||
@@ -452,7 +452,7 @@ public:
|
||||
case VEHICLE_ORGRIMMAR_WOLF:
|
||||
case VEHICLE_SILVERMOON_HAWKSTRIDER:
|
||||
case VEHICLE_DARKSPEAR_RAPTOR:
|
||||
me->AI()->SetData(DATA_LESSER_CHAMPIONS_DEFEATED, 0);
|
||||
SetData(DATA_LESSER_CHAMPIONS_DEFEATED, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -294,6 +294,8 @@ class npc_snobold_vassal : public CreatureScript
|
||||
{
|
||||
npc_snobold_vassalAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_targetGUID = 0;
|
||||
_targetDied = false;
|
||||
_instance = creature->GetInstanceScript();
|
||||
_instance->SetData(DATA_SNOBOLD_COUNT, INCREASE);
|
||||
}
|
||||
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
if (Creature* crystalChannelTarget = crystal->FindNearestCreature(NPC_CRYSTAL_CHANNEL_TARGET, 5.0f))
|
||||
{
|
||||
if (active)
|
||||
crystalChannelTarget->AI()->DoCastAOE(SPELL_BEAM_CHANNEL);
|
||||
crystalChannelTarget->CastSpell((Unit*)NULL, SPELL_BEAM_CHANNEL);
|
||||
else if (crystalChannelTarget->HasUnitState(UNIT_STATE_CASTING))
|
||||
crystalChannelTarget->CastStop();
|
||||
}
|
||||
|
||||
+16
-13
@@ -891,7 +891,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
lichking->AI()->Talk(SAY_LK_ESCAPE_3);
|
||||
lichking->AI()->DoCast(me, SPELL_RAISE_DEAD);
|
||||
lichking->CastSpell(me, SPELL_RAISE_DEAD);
|
||||
lichking->Attack(me, true);
|
||||
}
|
||||
_events.ScheduleEvent(EVENT_ESCAPE_13, 4000);
|
||||
@@ -899,15 +899,15 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
case EVENT_ESCAPE_13:
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
lichking->AI()->DoCast(lichking, SPELL_REMORSELESS_WINTER, true);
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
lichking->CastSpell(lichking, SPELL_REMORSELESS_WINTER, true);
|
||||
lichking->CastSpell(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
lichking->GetMotionMaster()->MoveIdle();
|
||||
lichking->GetMotionMaster()->MoveChase(me);
|
||||
}
|
||||
if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL, IceWalls[0], TEMPSUMMON_MANUAL_DESPAWN, 720000))
|
||||
{
|
||||
_walltargetGUID = walltarget->GetGUID();
|
||||
walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL);
|
||||
walltarget->CastSpell(walltarget, SPELL_SUMMON_ICE_WALL);
|
||||
walltarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->Attack(walltarget, false);
|
||||
}
|
||||
@@ -948,7 +948,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
{
|
||||
lichking->StopMoving();
|
||||
lichking->AI()->Talk(SAY_LK_ESCAPE_3);
|
||||
lichking->AI()->DoCast(me, SPELL_RAISE_DEAD);
|
||||
lichking->CastSpell(me, SPELL_RAISE_DEAD);
|
||||
}
|
||||
|
||||
DestroyIceWall();
|
||||
@@ -969,7 +969,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
if (_icewall && _icewall < 4)
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
lichking->CastSpell(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
lichking->GetMotionMaster()->MoveIdle();
|
||||
lichking->GetMotionMaster()->MoveChase(me);
|
||||
lichking->SetReactState(REACT_PASSIVE);
|
||||
@@ -980,7 +980,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* walltarget = me->SummonCreature(NPC_ICE_WALL, IceWalls[_icewall], TEMPSUMMON_MANUAL_DESPAWN, 720000))
|
||||
{
|
||||
_walltargetGUID = walltarget->GetGUID();
|
||||
walltarget->AI()->DoCast(walltarget, SPELL_SUMMON_ICE_WALL);
|
||||
walltarget->CastSpell(walltarget, SPELL_SUMMON_ICE_WALL);
|
||||
walltarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->Attack(walltarget, false);
|
||||
}
|
||||
@@ -1018,9 +1018,9 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
if (_icewall && _icewall < 3)
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
lichking->CastSpell(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
else
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
|
||||
lichking->CastSpell(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
|
||||
}
|
||||
if (_icewall == 3)
|
||||
_events.ScheduleEvent(EVENT_ESCAPE_21, 16000); // last wall, really far
|
||||
@@ -1036,10 +1036,10 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
if (_icewall == 1)
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
|
||||
lichking->CastSpell(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
|
||||
else if (_icewall > 1 && _icewall < 4)
|
||||
{
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
lichking->CastSpell(lichking, SPELL_SUMMON_RISE_WITCH_DOCTOR);
|
||||
_events.ScheduleEvent(EVENT_ESCAPE_22, 1000);
|
||||
}
|
||||
}
|
||||
@@ -1048,7 +1048,7 @@ class npc_jaina_or_sylvanas_escape_hor : public CreatureScript
|
||||
if (Creature* lichking = ObjectAccessor::GetCreature(*me, _lichkingGUID))
|
||||
{
|
||||
if (_icewall >= 2 && _icewall < 4)
|
||||
lichking->AI()->DoCast(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
|
||||
lichking->CastSpell(lichking, SPELL_SUMMON_LUMBERING_ABOMINATION);
|
||||
}
|
||||
break;
|
||||
case EVENT_ESCAPE_23: // FINAL PART
|
||||
@@ -1180,7 +1180,10 @@ enum TrashEvents
|
||||
|
||||
struct npc_gauntlet_trash : public ScriptedAI
|
||||
{
|
||||
npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript()) { }
|
||||
npc_gauntlet_trash(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript())
|
||||
{
|
||||
InternalWaveId = 0;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
|
||||
@@ -219,7 +219,10 @@ public:
|
||||
|
||||
struct npc_slad_ran_constrictorAI : public ScriptedAI
|
||||
{
|
||||
npc_slad_ran_constrictorAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_slad_ran_constrictorAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
uiGripOfSladRanTimer = 1 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
uint32 uiGripOfSladRanTimer;
|
||||
|
||||
@@ -247,8 +250,9 @@ public:
|
||||
target->CastSpell(target, SPELL_SNAKE_WRAP, true);
|
||||
|
||||
if (TempSummon* _me = me->ToTempSummon())
|
||||
if (Creature* sladran = _me->GetSummoner()->ToCreature())
|
||||
sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES);
|
||||
if (Unit* summoner = _me->GetSummoner())
|
||||
if (Creature* sladran = summoner->ToCreature())
|
||||
sladran->AI()->SetGUID(target->GetGUID(), DATA_SNAKES_WHYD_IT_HAVE_TO_BE_SNAKES);
|
||||
|
||||
me->DespawnOrUnsummon();
|
||||
}
|
||||
@@ -270,7 +274,10 @@ public:
|
||||
|
||||
struct npc_slad_ran_viperAI : public ScriptedAI
|
||||
{
|
||||
npc_slad_ran_viperAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_slad_ran_viperAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
uiVenomousBiteTimer = 2 * IN_MILLISECONDS;
|
||||
}
|
||||
|
||||
uint32 uiVenomousBiteTimer;
|
||||
|
||||
|
||||
@@ -800,7 +800,7 @@ class spell_blood_queen_pact_of_the_darkfallen_dmg : public SpellScriptLoader
|
||||
// this is an additional effect to be executed
|
||||
void PeriodicTick(AuraEffect const* aurEff)
|
||||
{
|
||||
SpellInfo const* damageSpell = sSpellMgr->GetSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE);
|
||||
SpellInfo const* damageSpell = sSpellMgr->EnsureSpellInfo(SPELL_PACT_OF_THE_DARKFALLEN_DAMAGE);
|
||||
int32 damage = damageSpell->Effects[EFFECT_0].CalcValue();
|
||||
float multiplier = 0.3375f + 0.1f * uint32(aurEff->GetTickNumber()/10); // do not convert to 0.01f - we need tick number/10 as INT (damage increases every 10 ticks)
|
||||
damage = int32(damage * multiplier);
|
||||
|
||||
@@ -333,6 +333,7 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
void JustReachedHome() OVERRIDE
|
||||
{
|
||||
_JustReachedHome();
|
||||
Reset();
|
||||
instance->SetBossState(DATA_DEATHBRINGER_SAURFANG, FAIL);
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_MARK_OF_THE_FALLEN_CHAMPION);
|
||||
}
|
||||
@@ -376,7 +377,16 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
{
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
|
||||
{
|
||||
if (target->GetTransport())
|
||||
{
|
||||
summon->DespawnOrUnsummon(1);
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
summon->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
summon->CastSpell(summon, SPELL_BLOOD_LINK_BEAST, true);
|
||||
summon->CastSpell(summon, SPELL_RESISTANT_SKIN, true);
|
||||
@@ -399,6 +409,12 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
|
||||
void SpellHitTarget(Unit* target, SpellInfo const* spell) OVERRIDE
|
||||
{
|
||||
if (target->GetTransport())
|
||||
{
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_MARK_OF_THE_FALLEN_CHAMPION:
|
||||
@@ -571,6 +587,14 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
bool CanAIAttack(Unit const* target) const OVERRIDE
|
||||
{
|
||||
if (target->GetTransport())
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static uint32 const FightWonValue;
|
||||
|
||||
private:
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -545,7 +545,7 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
void Summon(uint32 entry, const Position& pos)
|
||||
{
|
||||
if (TempSummon* summon = me->SummonCreature(entry, pos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000))
|
||||
summon->AI()->DoCast(summon, SPELL_TELEPORT_VISUAL);
|
||||
summon->CastSpell(summon, SPELL_TELEPORT_VISUAL);
|
||||
}
|
||||
|
||||
void SetGUID(uint64 guid, int32 id/* = 0*/) OVERRIDE
|
||||
|
||||
@@ -539,7 +539,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
me->VisitNearbyGridObject(333.0f, worker);
|
||||
|
||||
// Reset any light override
|
||||
SendLightOverride(0, 5000);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, 0, 5000);
|
||||
}
|
||||
|
||||
bool CanAIAttack(Unit const* target) const OVERRIDE
|
||||
@@ -572,7 +572,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
case ACTION_START_ENCOUNTER:
|
||||
instance->SetBossState(DATA_THE_LICH_KING, IN_PROGRESS);
|
||||
Talk(SAY_LK_INTRO_1);
|
||||
SendMusicToPlayers(MUSIC_FROZEN_THRONE);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_FROZEN_THRONE);
|
||||
// schedule talks
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
events.ScheduleEvent(EVENT_INTRO_MOVE_1, 4000);
|
||||
@@ -581,10 +581,10 @@ class boss_the_lich_king : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_START_ATTACK, 5000);
|
||||
break;
|
||||
case ACTION_PLAY_MUSIC:
|
||||
SendMusicToPlayers(MUSIC_FINAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_FINAL);
|
||||
break;
|
||||
case ACTION_RESTORE_LIGHT:
|
||||
SendLightOverride(0, 5000);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, 0, 5000);
|
||||
break;
|
||||
case ACTION_BREAK_FROSTMOURNE:
|
||||
me->CastSpell((Unit*)NULL, SPELL_SUMMON_BROKEN_FROSTMOURNE, TRIGGERED_IGNORE_CAST_IN_PROGRESS);
|
||||
@@ -666,7 +666,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
events.Reset();
|
||||
events.SetPhase(PHASE_OUTRO);
|
||||
summons.DespawnAll();
|
||||
SendMusicToPlayers(MUSIC_FURY_OF_FROSTMOURNE);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_FURY_OF_FROSTMOURNE);
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
me->CastSpell((Unit*)NULL, SPELL_FURY_OF_FROSTMOURNE, TRIGGERED_NONE);
|
||||
me->SetWalk(true);
|
||||
@@ -718,8 +718,8 @@ class boss_the_lich_king : public CreatureScript
|
||||
{
|
||||
summon->CastSpell((Unit*)NULL, SPELL_BROKEN_FROSTMOURNE, true);
|
||||
|
||||
SendLightOverride(LIGHT_SOULSTORM, 10000);
|
||||
SendWeather(WEATHER_STATE_BLACKSNOW);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, LIGHT_SOULSTORM, 10000);
|
||||
me->GetMap()->SetZoneWeather(AREA_THE_FROZEN_THRONE, WEATHER_STATE_BLACKSNOW, 0.5f);
|
||||
|
||||
events.ScheduleEvent(EVENT_OUTRO_SOUL_BARRAGE, 5000, 0, PHASE_OUTRO);
|
||||
return;
|
||||
@@ -771,8 +771,8 @@ class boss_the_lich_king : public CreatureScript
|
||||
{
|
||||
if (spell->Id == REMORSELESS_WINTER_1 || spell->Id == REMORSELESS_WINTER_2)
|
||||
{
|
||||
SendLightOverride(LIGHT_SNOWSTORM, 5000);
|
||||
SendWeather(WEATHER_STATE_LIGHT_SNOW);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_THE_FROZEN_THRONE, LIGHT_SNOWSTORM, 5000);
|
||||
me->GetMap()->SetZoneWeather(AREA_THE_FROZEN_THRONE, WEATHER_STATE_LIGHT_SNOW, 0.5f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -798,7 +798,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
case POINT_CENTER_1:
|
||||
me->SetFacingTo(0.0f);
|
||||
Talk(SAY_LK_REMORSELESS_WINTER);
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
|
||||
DoCast(me, SPELL_REMORSELESS_WINTER_1);
|
||||
events.DelayEvents(62500, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions
|
||||
events.ScheduleEvent(EVENT_QUAKE, 62500, 0, PHASE_TRANSITION);
|
||||
@@ -813,7 +813,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
case POINT_CENTER_2:
|
||||
me->SetFacingTo(0.0f);
|
||||
Talk(SAY_LK_REMORSELESS_WINTER);
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
|
||||
DoCast(me, SPELL_REMORSELESS_WINTER_2);
|
||||
summons.DespawnEntry(NPC_VALKYR_SHADOWGUARD);
|
||||
events.DelayEvents(62500, EVENT_GROUP_BERSERK); // delay berserk timer, its not ticking during phase transitions
|
||||
@@ -899,7 +899,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
break;
|
||||
case EVENT_SUMMON_SHAMBLING_HORROR:
|
||||
DoCast(me, SPELL_SUMMON_SHAMBLING_HORROR);
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
|
||||
events.ScheduleEvent(EVENT_SUMMON_SHAMBLING_HORROR, 60000, 0, PHASE_ONE);
|
||||
break;
|
||||
case EVENT_SUMMON_DRUDGE_GHOUL:
|
||||
@@ -959,18 +959,18 @@ class boss_the_lich_king : public CreatureScript
|
||||
events.SetPhase(PHASE_TWO);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING); // clear state to ensure check in DoCastAOE passes
|
||||
DoCastAOE(SPELL_QUAKE);
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
|
||||
Talk(SAY_LK_QUAKE);
|
||||
break;
|
||||
case EVENT_QUAKE_2:
|
||||
events.SetPhase(PHASE_THREE);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING); // clear state to ensure check in DoCastAOE passes
|
||||
DoCastAOE(SPELL_QUAKE);
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
|
||||
Talk(SAY_LK_QUAKE);
|
||||
break;
|
||||
case EVENT_SUMMON_VALKYR:
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
|
||||
Talk(SAY_LK_SUMMON_VALKYR);
|
||||
DoCastAOE(SUMMON_VALKYR);
|
||||
events.ScheduleEvent(EVENT_SUMMON_VALKYR, urand(45000, 50000), 0, PHASE_TWO);
|
||||
@@ -981,7 +981,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
events.SetPhase(PHASE_THREE);
|
||||
break;
|
||||
case EVENT_VILE_SPIRITS:
|
||||
SendMusicToPlayers(MUSIC_SPECIAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_SPECIAL);
|
||||
DoCastAOE(SPELL_VILE_SPIRITS);
|
||||
events.ScheduleEvent(EVENT_VILE_SPIRITS, urand(35000, 40000), EVENT_GROUP_VILE_SPIRITS, PHASE_THREE);
|
||||
break;
|
||||
@@ -1052,7 +1052,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
case EVENT_OUTRO_RAISE_DEAD:
|
||||
DoCastAOE(SPELL_RAISE_DEAD);
|
||||
me->ClearUnitState(UNIT_STATE_CASTING);
|
||||
SendMusicToPlayers(MUSIC_FINAL);
|
||||
me->GetMap()->SetZoneMusic(AREA_THE_FROZEN_THRONE, MUSIC_FINAL);
|
||||
break;
|
||||
case EVENT_OUTRO_TALK_5:
|
||||
Talk(SAY_LK_OUTRO_5);
|
||||
@@ -1093,43 +1093,6 @@ class boss_the_lich_king : public CreatureScript
|
||||
}
|
||||
|
||||
private:
|
||||
void SendMusicToPlayers(uint32 musicId) const
|
||||
{
|
||||
WorldPacket data(SMSG_PLAY_MUSIC, 4);
|
||||
data << uint32(musicId);
|
||||
data << uint64(me->GetGUID());
|
||||
SendPacketToPlayers(&data);
|
||||
}
|
||||
|
||||
void SendLightOverride(uint32 overrideId, uint32 fadeInTime) const
|
||||
{
|
||||
WorldPacket data(SMSG_OVERRIDE_LIGHT, 12);
|
||||
data << uint32(2488); // Light.dbc entry (map default)
|
||||
data << uint32(overrideId); // Light.dbc entry (override)
|
||||
data << uint32(fadeInTime);
|
||||
SendPacketToPlayers(&data);
|
||||
}
|
||||
|
||||
void SendWeather(WeatherState weather) const
|
||||
{
|
||||
WorldPacket data(SMSG_WEATHER, 9);
|
||||
data << uint32(weather);
|
||||
data << float(0.5f);
|
||||
data << uint8(0);
|
||||
SendPacketToPlayers(&data);
|
||||
}
|
||||
|
||||
// Send packet to all players in The Frozen Throne
|
||||
void SendPacketToPlayers(WorldPacket const* data) const
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->GetAreaId() == AREA_THE_FROZEN_THRONE)
|
||||
player->GetSession()->SendPacket(data);
|
||||
}
|
||||
|
||||
uint32 _necroticPlagueStack;
|
||||
uint32 _vileSpiritExplosions;
|
||||
};
|
||||
@@ -2586,38 +2549,6 @@ class spell_the_lich_king_valkyr_target_search : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_the_lich_king_eject_all_passengers : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_the_lich_king_eject_all_passengers() : SpellScriptLoader("spell_the_lich_king_eject_all_passengers") { }
|
||||
|
||||
class spell_the_lich_king_eject_all_passengers_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_the_lich_king_eject_all_passengers_SpellScript);
|
||||
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
return GetCaster()->IsVehicle();
|
||||
}
|
||||
|
||||
void HandleDummy(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
GetCaster()->GetVehicleKit()->RemoveAllPassengers();
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_eject_all_passengers_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_the_lich_king_eject_all_passengers_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_the_lich_king_cast_back_to_caster : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -3215,7 +3146,6 @@ void AddSC_boss_the_lich_king()
|
||||
new spell_the_lich_king_summon_into_air();
|
||||
new spell_the_lich_king_soul_reaper();
|
||||
new spell_the_lich_king_valkyr_target_search();
|
||||
new spell_the_lich_king_eject_all_passengers();
|
||||
new spell_the_lich_king_cast_back_to_caster();
|
||||
new spell_the_lich_king_life_siphon();
|
||||
new spell_the_lich_king_vile_spirits();
|
||||
|
||||
@@ -68,7 +68,7 @@ enum TeleporterSpells
|
||||
DEATHBRINGER_S_RISE_TELEPORT = 70858,
|
||||
UPPER_SPIRE_TELEPORT = 70859,
|
||||
FROZEN_THRONE_TELEPORT = 70860,
|
||||
SINDRAGOSA_S_LAIR_TELEPORT = 70861,
|
||||
SINDRAGOSA_S_LAIR_TELEPORT = 70861
|
||||
};
|
||||
|
||||
enum DataTypes
|
||||
@@ -76,7 +76,7 @@ enum DataTypes
|
||||
// Encounter States/Boss GUIDs
|
||||
DATA_LORD_MARROWGAR = 0,
|
||||
DATA_LADY_DEATHWHISPER = 1,
|
||||
DATA_GUNSHIP_EVENT = 2,
|
||||
DATA_ICECROWN_GUNSHIP_BATTLE = 2,
|
||||
DATA_DEATHBRINGER_SAURFANG = 3,
|
||||
DATA_FESTERGUT = 4,
|
||||
DATA_ROTFACE = 5,
|
||||
@@ -116,6 +116,7 @@ enum DataTypes
|
||||
DATA_HIGHLORD_TIRION_FORDRING = 37,
|
||||
DATA_ARTHAS_PLATFORM = 38,
|
||||
DATA_TERENAS_MENETHIL = 39,
|
||||
DATA_ENEMY_GUNSHIP = 40
|
||||
};
|
||||
|
||||
enum CreaturesIds
|
||||
@@ -169,6 +170,33 @@ enum CreaturesIds
|
||||
NPC_REANIMATED_ADHERENT = 38010,
|
||||
NPC_VENGEFUL_SHADE = 38222,
|
||||
|
||||
// Icecrown Gunship Battle
|
||||
NPC_MARTYR_STALKER_IGB_SAURFANG = 38569,
|
||||
NPC_ALLIANCE_GUNSHIP_CANNON = 36838,
|
||||
NPC_HORDE_GUNSHIP_CANNON = 36839,
|
||||
NPC_SKYBREAKER_DECKHAND = 36970,
|
||||
NPC_ORGRIMS_HAMMER_CREW = 36971,
|
||||
NPC_IGB_HIGH_OVERLORD_SAURFANG = 36939,
|
||||
NPC_IGB_MURADIN_BRONZEBEARD = 36948,
|
||||
NPC_THE_SKYBREAKER = 37540,
|
||||
NPC_ORGRIMS_HAMMER = 37215,
|
||||
NPC_GUNSHIP_HULL = 37547,
|
||||
NPC_TELEPORT_PORTAL = 37227,
|
||||
NPC_TELEPORT_EXIT = 37488,
|
||||
NPC_SKYBREAKER_SORCERER = 37116,
|
||||
NPC_SKYBREAKER_RIFLEMAN = 36969,
|
||||
NPC_SKYBREAKER_MORTAR_SOLDIER = 36978,
|
||||
NPC_SKYBREAKER_MARINE = 36950,
|
||||
NPC_SKYBREAKER_SERGEANT = 36961,
|
||||
NPC_KOR_KRON_BATTLE_MAGE = 37117,
|
||||
NPC_KOR_KRON_AXETHROWER = 36968,
|
||||
NPC_KOR_KRON_ROCKETEER = 36982,
|
||||
NPC_KOR_KRON_REAVER = 36957,
|
||||
NPC_KOR_KRON_SERGEANT = 36960,
|
||||
NPC_ZAFOD_BOOMBOX = 37184,
|
||||
NPC_HIGH_CAPTAIN_JUSTIN_BARTLETT = 37182,
|
||||
NPC_SKY_REAVER_KORM_BLACKSCAR = 37833,
|
||||
|
||||
// Deathbringer Saurfang
|
||||
NPC_DEATHBRINGER_SAURFANG = 37813,
|
||||
NPC_BLOOD_BEAST = 38508,
|
||||
@@ -285,7 +313,7 @@ enum CreaturesIds
|
||||
NPC_FROSTMOURNE_TRIGGER = 38584,
|
||||
|
||||
// Generic
|
||||
NPC_INVISIBLE_STALKER = 30298,
|
||||
NPC_INVISIBLE_STALKER = 30298
|
||||
};
|
||||
|
||||
enum GameObjectsIds
|
||||
@@ -305,6 +333,22 @@ enum GameObjectsIds
|
||||
GO_ORATORY_OF_THE_DAMNED_ENTRANCE = 201563,
|
||||
GO_LADY_DEATHWHISPER_ELEVATOR = 202220,
|
||||
|
||||
// Icecrown Gunship Battle - Horde raid
|
||||
GO_ORGRIMS_HAMMER_H = 201812,
|
||||
GO_THE_SKYBREAKER_H = 201811,
|
||||
GO_GUNSHIP_ARMORY_H_10N = 202178,
|
||||
GO_GUNSHIP_ARMORY_H_25N = 202180,
|
||||
GO_GUNSHIP_ARMORY_H_10H = 202177,
|
||||
GO_GUNSHIP_ARMORY_H_25H = 202179,
|
||||
|
||||
// Icecrown Gunship Battle - Alliance raid
|
||||
GO_ORGRIMS_HAMMER_A = 201581,
|
||||
GO_THE_SKYBREAKER_A = 201580,
|
||||
GO_GUNSHIP_ARMORY_A_10N = 201873,
|
||||
GO_GUNSHIP_ARMORY_A_25N = 201874,
|
||||
GO_GUNSHIP_ARMORY_A_10H = 201872,
|
||||
GO_GUNSHIP_ARMORY_A_25H = 201875,
|
||||
|
||||
// Deathbringer Saurfang
|
||||
GO_SAURFANG_S_DOOR = 201825,
|
||||
GO_DEATHBRINGER_S_CACHE_10N = 202239,
|
||||
@@ -368,7 +412,7 @@ enum GameObjectsIds
|
||||
GO_DOODAD_ICECROWN_SNOWEDGEWARNING01 = 202190,
|
||||
GO_FROZEN_LAVAMAN = 202436,
|
||||
GO_LAVAMAN_PILLARS_CHAINED = 202437,
|
||||
GO_LAVAMAN_PILLARS_UNCHAINED = 202438,
|
||||
GO_LAVAMAN_PILLARS_UNCHAINED = 202438
|
||||
};
|
||||
|
||||
enum AchievementCriteriaIds
|
||||
@@ -403,11 +447,15 @@ enum AchievementCriteriaIds
|
||||
CRITERIA_ONCE_BITTEN_TWICE_SHY_10N = 12780,
|
||||
CRITERIA_ONCE_BITTEN_TWICE_SHY_25N = 13012,
|
||||
CRITERIA_ONCE_BITTEN_TWICE_SHY_10V = 13011,
|
||||
CRITERIA_ONCE_BITTEN_TWICE_SHY_25V = 13013,
|
||||
CRITERIA_ONCE_BITTEN_TWICE_SHY_25V = 13013
|
||||
};
|
||||
|
||||
enum SharedActions
|
||||
{
|
||||
// Icecrown Gunship Battle
|
||||
ACTION_ENEMY_GUNSHIP_TALK = -369390,
|
||||
ACTION_EXIT_SHIP = -369391,
|
||||
|
||||
// Festergut
|
||||
ACTION_FESTERGUT_COMBAT = -366260,
|
||||
ACTION_FESTERGUT_GAS = -366261,
|
||||
@@ -431,7 +479,7 @@ enum SharedActions
|
||||
|
||||
// The Lich King
|
||||
ACTION_RESTORE_LIGHT = -72262,
|
||||
ACTION_FROSTMOURNE_INTRO = -36823,
|
||||
ACTION_FROSTMOURNE_INTRO = -36823
|
||||
};
|
||||
|
||||
enum WeekliesICC
|
||||
@@ -445,7 +493,7 @@ enum WeekliesICC
|
||||
QUEST_BLOOD_QUICKENING_10 = 24874,
|
||||
QUEST_BLOOD_QUICKENING_25 = 24879,
|
||||
QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10 = 24872,
|
||||
QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25 = 24880,
|
||||
QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25 = 24880
|
||||
};
|
||||
|
||||
enum WorldStatesICC
|
||||
@@ -454,12 +502,13 @@ enum WorldStatesICC
|
||||
WORLDSTATE_EXECUTION_TIME = 4904,
|
||||
WORLDSTATE_SHOW_ATTEMPTS = 4940,
|
||||
WORLDSTATE_ATTEMPTS_REMAINING = 4941,
|
||||
WORLDSTATE_ATTEMPTS_MAX = 4942,
|
||||
WORLDSTATE_ATTEMPTS_MAX = 4942
|
||||
};
|
||||
|
||||
enum AreaIds
|
||||
{
|
||||
AREA_THE_FROZEN_THRONE = 4859,
|
||||
AREA_ICECROWN_CITADEL = 4812,
|
||||
AREA_THE_FROZEN_THRONE = 4859
|
||||
};
|
||||
|
||||
class spell_trigger_spell_from_caster : public SpellScriptLoader
|
||||
|
||||
@@ -38,7 +38,7 @@ class icecrown_citadel_teleport : public GameObjectScript
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Oratory of the Damned.", GOSSIP_SENDER_ICC_PORT, ORATORY_OF_THE_DAMNED_TELEPORT);
|
||||
if (instance->GetBossState(DATA_LADY_DEATHWHISPER) == DONE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Rampart of Skulls.", GOSSIP_SENDER_ICC_PORT, RAMPART_OF_SKULLS_TELEPORT);
|
||||
if (instance->GetBossState(DATA_GUNSHIP_EVENT) == DONE)
|
||||
if (instance->GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Deathbringer's Rise.", GOSSIP_SENDER_ICC_PORT, DEATHBRINGER_S_RISE_TELEPORT);
|
||||
if (instance->GetData(DATA_COLDFLAME_JETS) == DONE)
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Teleport to the Upper Spire.", GOSSIP_SENDER_ICC_PORT, UPPER_SPIRE_TELEPORT);
|
||||
|
||||
@@ -15,23 +15,30 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "ObjectMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Map.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "icecrown_citadel.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "Player.h"
|
||||
#include "PoolMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Transport.h"
|
||||
#include "TransportMgr.h"
|
||||
#include "WorldPacket.h"
|
||||
#include "WorldSession.h"
|
||||
#include "icecrown_citadel.h"
|
||||
|
||||
enum EventIds
|
||||
{
|
||||
EVENT_PLAYERS_GUNSHIP_SPAWN = 22663,
|
||||
EVENT_PLAYERS_GUNSHIP_COMBAT = 22664,
|
||||
EVENT_PLAYERS_GUNSHIP_SAURFANG = 22665,
|
||||
EVENT_ENEMY_GUNSHIP_COMBAT = 22860,
|
||||
EVENT_ENEMY_GUNSHIP_DESPAWN = 22861,
|
||||
EVENT_QUAKE = 23437,
|
||||
EVENT_SECOND_REMORSELESS_WINTER = 23507,
|
||||
EVENT_TELEPORT_TO_FROSMOURNE = 23617,
|
||||
EVENT_TELEPORT_TO_FROSTMOURNE = 23617
|
||||
};
|
||||
|
||||
enum TimedEvents
|
||||
@@ -39,6 +46,7 @@ enum TimedEvents
|
||||
EVENT_UPDATE_EXECUTION_TIME = 1,
|
||||
EVENT_QUAKE_SHATTER = 2,
|
||||
EVENT_REBUILD_PLATFORM = 3,
|
||||
EVENT_RESPAWN_GUNSHIP = 4
|
||||
};
|
||||
|
||||
DoorData const doorData[] =
|
||||
@@ -68,7 +76,7 @@ DoorData const doorData[] =
|
||||
{GO_SINDRAGOSA_SHORTCUT_EXIT_DOOR, DATA_SINDRAGOSA, DOOR_TYPE_PASSAGE, BOUNDARY_NONE},
|
||||
{GO_ICE_WALL, DATA_SINDRAGOSA, DOOR_TYPE_ROOM, BOUNDARY_SE },
|
||||
{GO_ICE_WALL, DATA_SINDRAGOSA, DOOR_TYPE_ROOM, BOUNDARY_SW },
|
||||
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE}, // END
|
||||
{0, 0, DOOR_TYPE_ROOM, BOUNDARY_NONE} // END
|
||||
};
|
||||
|
||||
// this doesnt have to only store questgivers, also can be used for related quest spawns
|
||||
@@ -89,7 +97,7 @@ WeeklyQuest const WeeklyQuestData[WeeklyNPCs] =
|
||||
{NPC_ALRIN_THE_AGILE, {QUEST_BLOOD_QUICKENING_10, QUEST_BLOOD_QUICKENING_25 }}, // Blood Quickening
|
||||
{NPC_INFILTRATOR_MINCHAR_BQ, {QUEST_BLOOD_QUICKENING_10, QUEST_BLOOD_QUICKENING_25 }}, // Blood Quickening
|
||||
{NPC_MINCHAR_BEAM_STALKER, {QUEST_BLOOD_QUICKENING_10, QUEST_BLOOD_QUICKENING_25 }}, // Blood Quickening
|
||||
{NPC_VALITHRIA_DREAMWALKER_QUEST, {QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10, QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25}}, // Respite for a Tormented Soul
|
||||
{NPC_VALITHRIA_DREAMWALKER_QUEST, {QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_10, QUEST_RESPITE_FOR_A_TORNMENTED_SOUL_25}} // Respite for a Tormented Soul
|
||||
};
|
||||
|
||||
class instance_icecrown_citadel : public InstanceMapScript
|
||||
@@ -106,6 +114,9 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
TeamInInstance = 0;
|
||||
HeroicAttempts = MaxHeroicAttempts;
|
||||
LadyDeathwisperElevatorGUID = 0;
|
||||
GunshipGUID = 0;
|
||||
EnemyGunshipGUID = 0;
|
||||
GunshipArmoryGUID = 0;
|
||||
DeathbringerSaurfangGUID = 0;
|
||||
DeathbringerSaurfangDoorGUID = 0;
|
||||
DeathbringerSaurfangEventGUID = 0;
|
||||
@@ -164,6 +175,9 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
if (!TeamInInstance)
|
||||
TeamInInstance = player->GetTeam();
|
||||
|
||||
if (GetBossState(DATA_LADY_DEATHWHISPER) == DONE && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE)
|
||||
SpawnGunship();
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) OVERRIDE
|
||||
@@ -217,6 +231,10 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
case NPC_DEATHBRINGER_SAURFANG:
|
||||
DeathbringerSaurfangGUID = creature->GetGUID();
|
||||
break;
|
||||
case NPC_ALLIANCE_GUNSHIP_CANNON:
|
||||
case NPC_HORDE_GUNSHIP_CANNON:
|
||||
creature->SetControlled(true, UNIT_STATE_ROOT);
|
||||
break;
|
||||
case NPC_SE_HIGH_OVERLORD_SAURFANG:
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
creature->UpdateEntry(NPC_SE_MURADIN_BRONZEBEARD, ALLIANCE, creature->GetCreatureData());
|
||||
@@ -335,12 +353,60 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
uint8 diffIndex = uint8(instance->GetSpawnMode() & 1);
|
||||
if (!sPoolMgr->IsSpawnedObject<Quest>(WeeklyQuestData[questIndex].questId[diffIndex]))
|
||||
entry = 0;
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NPC_HORDE_GUNSHIP_CANNON:
|
||||
case NPC_ORGRIMS_HAMMER_CREW:
|
||||
case NPC_SKY_REAVER_KORM_BLACKSCAR:
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
return 0;
|
||||
break;
|
||||
case NPC_ALLIANCE_GUNSHIP_CANNON:
|
||||
case NPC_SKYBREAKER_DECKHAND:
|
||||
case NPC_HIGH_CAPTAIN_JUSTIN_BARTLETT:
|
||||
if (TeamInInstance == HORDE)
|
||||
return 0;
|
||||
break;
|
||||
case NPC_ZAFOD_BOOMBOX:
|
||||
if (GameObjectTemplate const* go = sObjectMgr->GetGameObjectTemplate(GO_THE_SKYBREAKER_A))
|
||||
if ((TeamInInstance == ALLIANCE && data->mapid == go->moTransport.mapID) ||
|
||||
(TeamInInstance == HORDE && data->mapid != go->moTransport.mapID))
|
||||
return entry;
|
||||
return 0;
|
||||
case NPC_IGB_MURADIN_BRONZEBEARD:
|
||||
if ((TeamInInstance == ALLIANCE && data->posX > 10.0f) ||
|
||||
(TeamInInstance == HORDE && data->posX < 10.0f))
|
||||
return entry;
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return entry;
|
||||
}
|
||||
|
||||
uint32 GetGameObjectEntry(uint32 /*guidLow*/, uint32 entry) OVERRIDE
|
||||
{
|
||||
switch (entry)
|
||||
{
|
||||
case GO_GUNSHIP_ARMORY_H_10N:
|
||||
case GO_GUNSHIP_ARMORY_H_25N:
|
||||
case GO_GUNSHIP_ARMORY_H_10H:
|
||||
case GO_GUNSHIP_ARMORY_H_25H:
|
||||
if (TeamInInstance == ALLIANCE)
|
||||
return 0;
|
||||
break;
|
||||
case GO_GUNSHIP_ARMORY_A_10N:
|
||||
case GO_GUNSHIP_ARMORY_A_25N:
|
||||
case GO_GUNSHIP_ARMORY_A_10H:
|
||||
case GO_GUNSHIP_ARMORY_A_25H:
|
||||
if (TeamInInstance == HORDE)
|
||||
return 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -446,6 +512,20 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
go->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
break;
|
||||
case GO_THE_SKYBREAKER_H:
|
||||
case GO_ORGRIMS_HAMMER_A:
|
||||
EnemyGunshipGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_GUNSHIP_ARMORY_H_10N:
|
||||
case GO_GUNSHIP_ARMORY_H_25N:
|
||||
case GO_GUNSHIP_ARMORY_H_10H:
|
||||
case GO_GUNSHIP_ARMORY_H_25H:
|
||||
case GO_GUNSHIP_ARMORY_A_10N:
|
||||
case GO_GUNSHIP_ARMORY_A_25N:
|
||||
case GO_GUNSHIP_ARMORY_A_10H:
|
||||
case GO_GUNSHIP_ARMORY_A_25H:
|
||||
GunshipArmoryGUID = go->GetGUID();
|
||||
break;
|
||||
case GO_SAURFANG_S_DOOR:
|
||||
DeathbringerSaurfangDoorGUID = go->GetGUID();
|
||||
AddDoor(go, true);
|
||||
@@ -583,6 +663,10 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
case GO_ICE_WALL:
|
||||
AddDoor(go, false);
|
||||
break;
|
||||
case GO_THE_SKYBREAKER_A:
|
||||
case GO_ORGRIMS_HAMMER_H:
|
||||
GunshipGUID = 0;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -617,6 +701,10 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_ICECROWN_GUNSHIP_BATTLE:
|
||||
return GunshipGUID;
|
||||
case DATA_ENEMY_GUNSHIP:
|
||||
return EnemyGunshipGUID;
|
||||
case DATA_DEATHBRINGER_SAURFANG:
|
||||
return DeathbringerSaurfangGUID;
|
||||
case DATA_SAURFANG_EVENT_NPC:
|
||||
@@ -687,7 +775,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
switch (type)
|
||||
{
|
||||
case DATA_LADY_DEATHWHISPER:
|
||||
SetBossState(DATA_GUNSHIP_EVENT, state); // TEMP HACK UNTIL GUNSHIP SCRIPTED
|
||||
{
|
||||
if (state == DONE)
|
||||
{
|
||||
if (GameObject* elevator = instance->GetGameObject(LadyDeathwisperElevatorGUID))
|
||||
@@ -695,8 +783,20 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
elevator->SetUInt32Value(GAMEOBJECT_LEVEL, 0);
|
||||
elevator->SetGoState(GO_STATE_READY);
|
||||
}
|
||||
|
||||
SpawnGunship();
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DATA_ICECROWN_GUNSHIP_BATTLE:
|
||||
if (state == DONE)
|
||||
{
|
||||
if (GameObject* loot = instance->GetGameObject(GunshipArmoryGUID))
|
||||
loot->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_LOCKED | GO_FLAG_NOT_SELECTABLE | GO_FLAG_NODESPAWN);
|
||||
}
|
||||
else if (state == FAIL)
|
||||
Events.ScheduleEvent(EVENT_RESPAWN_GUNSHIP, 30000);
|
||||
break;
|
||||
case DATA_DEATHBRINGER_SAURFANG:
|
||||
switch (state)
|
||||
{
|
||||
@@ -842,6 +942,17 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return true;
|
||||
}
|
||||
|
||||
void SpawnGunship()
|
||||
{
|
||||
if (!GunshipGUID)
|
||||
{
|
||||
SetBossState(DATA_ICECROWN_GUNSHIP_BATTLE, NOT_STARTED);
|
||||
uint32 gunshipEntry = TeamInInstance == HORDE ? GO_ORGRIMS_HAMMER_H : GO_THE_SKYBREAKER_A;
|
||||
if (Transport* gunship = sTransportMgr->CreateTransport(gunshipEntry, 0, instance))
|
||||
GunshipGUID = gunship->GetGUID();
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 data) OVERRIDE
|
||||
{
|
||||
switch (type)
|
||||
@@ -1062,10 +1173,10 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
return false;
|
||||
// no break
|
||||
case DATA_DEATHBRINGER_SAURFANG:
|
||||
if (GetBossState(DATA_GUNSHIP_EVENT) != DONE)
|
||||
if (GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != DONE)
|
||||
return false;
|
||||
// no break
|
||||
case DATA_GUNSHIP_EVENT:
|
||||
case DATA_ICECROWN_GUNSHIP_BATTLE:
|
||||
if (GetBossState(DATA_LADY_DEATHWHISPER) != DONE)
|
||||
return false;
|
||||
// no break
|
||||
@@ -1159,7 +1270,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
|
||||
void Update(uint32 diff) OVERRIDE
|
||||
{
|
||||
if (BloodQuickeningState != IN_PROGRESS && GetBossState(DATA_THE_LICH_KING) != IN_PROGRESS)
|
||||
if (BloodQuickeningState != IN_PROGRESS && GetBossState(DATA_THE_LICH_KING) != IN_PROGRESS && GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) != FAIL)
|
||||
return;
|
||||
|
||||
Events.Update(diff);
|
||||
@@ -1209,16 +1320,42 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
if (GameObject* wind = instance->GetGameObject(FrozenThroneWindGUID))
|
||||
wind->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case EVENT_RESPAWN_GUNSHIP:
|
||||
SpawnGunship();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ProcessEvent(WorldObject* /*source*/, uint32 eventId) OVERRIDE
|
||||
void ProcessEvent(WorldObject* source, uint32 eventId) OVERRIDE
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ENEMY_GUNSHIP_DESPAWN:
|
||||
if (GetBossState(DATA_ICECROWN_GUNSHIP_BATTLE) == DONE)
|
||||
source->AddObjectToRemoveList();
|
||||
break;
|
||||
case EVENT_ENEMY_GUNSHIP_COMBAT:
|
||||
if (Creature* captain = source->FindNearestCreature(TeamInInstance == HORDE ? NPC_IGB_HIGH_OVERLORD_SAURFANG : NPC_IGB_MURADIN_BRONZEBEARD, 100.0f))
|
||||
captain->AI()->DoAction(ACTION_ENEMY_GUNSHIP_TALK);
|
||||
// no break;
|
||||
case EVENT_PLAYERS_GUNSHIP_SPAWN:
|
||||
case EVENT_PLAYERS_GUNSHIP_COMBAT:
|
||||
if (GameObject* go = source->ToGameObject())
|
||||
if (Transport* transport = go->ToTransport())
|
||||
transport->EnableMovement(false);
|
||||
break;
|
||||
case EVENT_PLAYERS_GUNSHIP_SAURFANG:
|
||||
{
|
||||
if (Creature* captain = source->FindNearestCreature(TeamInInstance == HORDE ? NPC_IGB_HIGH_OVERLORD_SAURFANG : NPC_IGB_MURADIN_BRONZEBEARD, 100.0f))
|
||||
captain->AI()->DoAction(ACTION_EXIT_SHIP);
|
||||
if (GameObject* go = source->ToGameObject())
|
||||
if (Transport* transport = go->ToTransport())
|
||||
transport->EnableMovement(false);
|
||||
break;
|
||||
}
|
||||
case EVENT_QUAKE:
|
||||
if (GameObject* warning = instance->GetGameObject(FrozenThroneWarningGUID))
|
||||
warning->SetGoState(GO_STATE_ACTIVE);
|
||||
@@ -1231,7 +1368,7 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
Events.ScheduleEvent(EVENT_REBUILD_PLATFORM, 1500);
|
||||
}
|
||||
break;
|
||||
case EVENT_TELEPORT_TO_FROSMOURNE: // Harvest Soul (normal mode)
|
||||
case EVENT_TELEPORT_TO_FROSTMOURNE: // Harvest Soul (normal mode)
|
||||
if (Creature* terenas = instance->SummonCreature(NPC_TERENAS_MENETHIL_FROSTMOURNE, TerenasSpawn, NULL, 63000))
|
||||
{
|
||||
terenas->AI()->DoAction(ACTION_FROSTMOURNE_INTRO);
|
||||
@@ -1257,6 +1394,9 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
protected:
|
||||
EventMap Events;
|
||||
uint64 LadyDeathwisperElevatorGUID;
|
||||
uint64 GunshipGUID;
|
||||
uint64 EnemyGunshipGUID;
|
||||
uint64 GunshipArmoryGUID;
|
||||
uint64 DeathbringerSaurfangGUID;
|
||||
uint64 DeathbringerSaurfangDoorGUID;
|
||||
uint64 DeathbringerSaurfangEventGUID; // Muradin Bronzebeard or High Overlord Saurfang
|
||||
|
||||
@@ -469,6 +469,7 @@ public:
|
||||
DoCast(me, SPELL_VORTEX_3, true);
|
||||
break;
|
||||
case ACTION_LIFT_IN_AIR:
|
||||
{
|
||||
Position _zToLift;
|
||||
me->GetPosition(&_zToLift);
|
||||
if (_phase == PHASE_ONE)
|
||||
@@ -482,6 +483,7 @@ public:
|
||||
me->GetMotionMaster()->MoveTakeoff(POINT_PHASE_ONE_TO_TWO_TRANSITION, _zToLift);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ACTION_HANDLE_P_THREE_INTRO:
|
||||
events.CancelEventGroup(0);
|
||||
events.CancelEventGroup(1);
|
||||
@@ -544,7 +546,7 @@ public:
|
||||
break;
|
||||
case PHASE_TWO:
|
||||
events.ScheduleEvent(EVENT_MOVE_TO_POINT_SURGE_P_TWO, 60*IN_MILLISECONDS, 0, _phase);
|
||||
me->AI()->DoAction(ACTION_LIFT_IN_AIR);
|
||||
DoAction(ACTION_LIFT_IN_AIR);
|
||||
break;
|
||||
case PHASE_THREE:
|
||||
events.ScheduleEvent(EVENT_ARCANE_PULSE, 7*IN_MILLISECONDS, 0, _phase);
|
||||
@@ -584,7 +586,7 @@ public:
|
||||
{
|
||||
instance->SetBossState(DATA_MALYGOS_EVENT, FAIL);
|
||||
|
||||
SendLightOverride(LIGHT_GET_DEFAULT_FOR_MAP, 1*IN_MILLISECONDS);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_GET_DEFAULT_FOR_MAP, 1*IN_MILLISECONDS);
|
||||
|
||||
if (_phase == PHASE_THREE)
|
||||
me->SetControlled(false, UNIT_STATE_ROOT);
|
||||
@@ -725,8 +727,8 @@ public:
|
||||
me->SetDisableGravity(true);
|
||||
if (Creature* alexstraszaBunny = ObjectAccessor::GetCreature(*me, instance->GetData64(DATA_ALEXSTRASZA_BUNNY_GUID)))
|
||||
me->SetFacingToObject(alexstraszaBunny);
|
||||
SendLightOverride(LIGHT_ARCANE_RUNES, 5*IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_FLY_OUT_OF_PLATFORM, 18*IN_MILLISECONDS, 0, PHASE_TWO);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_ARCANE_RUNES, 5 * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_FLY_OUT_OF_PLATFORM, 18 * IN_MILLISECONDS, 0, PHASE_TWO);
|
||||
break;
|
||||
case POINT_SURGE_OF_POWER_P_TWO:
|
||||
if (!_performingDestroyPlatform)
|
||||
@@ -737,7 +739,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case POINT_DESTROY_PLATFORM_P_TWO:
|
||||
SendLightOverride(LIGHT_OBSCURE_SPACE, 1*IN_MILLISECONDS);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_OBSCURE_SPACE, 1 * IN_MILLISECONDS);
|
||||
DoCast(me, SPELL_DESTROY_PLATFORM_CHANNEL);
|
||||
events.ScheduleEvent(EVENT_MOVE_TO_P_THREE_POINT, 11*IN_MILLISECONDS, 0, PHASE_TWO);
|
||||
break;
|
||||
@@ -929,7 +931,7 @@ public:
|
||||
}
|
||||
break;
|
||||
case EVENT_LIGHT_DIMENSION_CHANGE:
|
||||
SendLightOverride(LIGHT_CHANGE_DIMENSIONS, 2*IN_MILLISECONDS);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_CHANGE_DIMENSIONS, 2 * IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_DELAY_MOVE_TO_DESTROY_P:
|
||||
me->GetMotionMaster()->MovePoint(POINT_DESTROY_PLATFORM_P_TWO, MalygosPositions[0]);
|
||||
@@ -939,7 +941,7 @@ public:
|
||||
me->GetMotionMaster()->MovePoint(POINT_IDLE_P_THREE, MalygosPositions[4]);
|
||||
break;
|
||||
case EVENT_START_P_THREE:
|
||||
SendLightOverride(LIGHT_OBSCURE_ARCANE_RUNES, 1*IN_MILLISECONDS);
|
||||
me->GetMap()->SetZoneOverrideLight(AREA_EYE_OF_ETERNITY, LIGHT_OBSCURE_ARCANE_RUNES, 1 * IN_MILLISECONDS);
|
||||
DoCast(me, SPELL_CLEAR_ALL_DEBUFFS);
|
||||
DoCast(me, SPELL_IMMUNE_CURSES);
|
||||
_canAttack = true;
|
||||
@@ -1026,27 +1028,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
// Function that will change lights of map for all players on map.
|
||||
void SendLightOverride(uint32 overrideId, uint32 fadeInTime) const
|
||||
{
|
||||
WorldPacket data(SMSG_OVERRIDE_LIGHT, 12);
|
||||
data << uint32(1773); // Light.dbc entry (map default)
|
||||
data << uint32(overrideId); // Light.dbc entry (override)
|
||||
data << uint32(fadeInTime);
|
||||
SendPacketToPlayers(&data);
|
||||
}
|
||||
|
||||
// Send packet to all players in Eye of Eternity
|
||||
void SendPacketToPlayers(WorldPacket const* data) const
|
||||
{
|
||||
Map::PlayerList const& players = me->GetMap()->GetPlayers();
|
||||
if (!players.isEmpty())
|
||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
||||
if (Player* player = itr->GetSource())
|
||||
if (player->GetAreaId() == AREA_EYE_OF_ETERNITY)
|
||||
player->GetSession()->SendPacket(data);
|
||||
}
|
||||
|
||||
uint8 _phase; // Counter for phases used with a getter.
|
||||
uint8 _summonDeaths; // Keeps count of arcane trash.
|
||||
uint8 _preparingPulsesChecker; // In retail they use 2 preparing pulses with 7 sec CD, after they pass 2 seconds.
|
||||
@@ -2346,7 +2327,7 @@ class spell_malygos_surge_of_power_warning_selector_25 : public SpellScriptLoade
|
||||
|
||||
void ExecuteMainSpell()
|
||||
{
|
||||
GetCaster()->ToCreature()->AI()->DoCastAOE(SPELL_SURGE_OF_POWER_PHASE_3_25);
|
||||
GetCaster()->ToCreature()->CastSpell((Unit*)NULL, SPELL_SURGE_OF_POWER_PHASE_3_25);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
|
||||
@@ -199,17 +199,17 @@ public:
|
||||
|
||||
if (summon->GetGUID() == uiFireMagusGUID)
|
||||
{
|
||||
me->AI()->DoAction(ACTION_MAGUS_DEAD);
|
||||
DoAction(ACTION_MAGUS_DEAD);
|
||||
bFireMagusDead = true;
|
||||
}
|
||||
else if (summon->GetGUID() == uiFrostMagusGUID)
|
||||
{
|
||||
me->AI()->DoAction(ACTION_MAGUS_DEAD);
|
||||
DoAction(ACTION_MAGUS_DEAD);
|
||||
bFrostMagusDead = true;
|
||||
}
|
||||
else if (summon->GetGUID() == uiArcaneMagusGUID)
|
||||
{
|
||||
me->AI()->DoAction(ACTION_MAGUS_DEAD);
|
||||
DoAction(ACTION_MAGUS_DEAD);
|
||||
bArcaneMagusDead = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,9 +208,11 @@ class instance_oculus : public InstanceMapScript
|
||||
break;
|
||||
case DATA_VAROS:
|
||||
if (state == DONE)
|
||||
{
|
||||
DoUpdateWorldState(WORLD_STATE_CENTRIFUGE_CONSTRUCT_SHOW, 0);
|
||||
if (Creature* urom = instance->GetCreature(UromGUID))
|
||||
urom->SetPhaseMask(1, true);
|
||||
}
|
||||
break;
|
||||
case DATA_UROM:
|
||||
if (state == DONE)
|
||||
|
||||
@@ -652,7 +652,6 @@ class boss_algalon_the_observer : public CreatureScript
|
||||
break;
|
||||
case EVENT_OUTRO_2:
|
||||
_EnterEvadeMode();
|
||||
me->AddUnitState(UNIT_STATE_EVADE);
|
||||
me->GetMotionMaster()->MovePoint(POINT_ALGALON_OUTRO, AlgalonOutroPos);
|
||||
break;
|
||||
case EVENT_OUTRO_3:
|
||||
|
||||
@@ -364,7 +364,7 @@ class npc_sanctum_sentry : public CreatureScript
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
{
|
||||
me->AddThreat(target, 100.0f);
|
||||
me->AI()->AttackStart(target);
|
||||
AttackStart(target);
|
||||
DoCast(target, SPELL_SAVAGE_POUNCE);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_POUNCE, urand(12000, 17000));
|
||||
@@ -430,7 +430,7 @@ class npc_feral_defender : public CreatureScript
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
{
|
||||
me->AddThreat(target, 100.0f);
|
||||
me->AI()->AttackStart(target);
|
||||
AttackStart(target);
|
||||
DoCast(target, SPELL_FERAL_POUNCE);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_FERAL_POUNCE, urand(10000, 12000));
|
||||
@@ -439,7 +439,7 @@ class npc_feral_defender : public CreatureScript
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
{
|
||||
me->AddThreat(target, 100.0f);
|
||||
me->AI()->AttackStart(target);
|
||||
AttackStart(target);
|
||||
DoCast(target, SPELL_FERAL_RUSH);
|
||||
}
|
||||
events.ScheduleEvent(EVENT_RUSH, urand(10000, 12000));
|
||||
|
||||
@@ -589,17 +589,19 @@ class boss_flame_leviathan_seat : public CreatureScript
|
||||
else if (Creature* leviathan = me->GetVehicleCreatureBase())
|
||||
leviathan->AI()->Talk(SAY_PLAYER_RIDING);
|
||||
|
||||
if (Creature* turret = me->GetVehicleKit()->GetPassenger(SEAT_TURRET)->ToCreature())
|
||||
{
|
||||
turret->setFaction(me->GetVehicleBase()->getFaction());
|
||||
turret->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable
|
||||
turret->AI()->AttackStart(who);
|
||||
}
|
||||
if (Creature* device = me->GetVehicleKit()->GetPassenger(SEAT_DEVICE)->ToCreature())
|
||||
{
|
||||
device->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
device->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
if (Unit* turretPassenger = me->GetVehicleKit()->GetPassenger(SEAT_TURRET))
|
||||
if (Creature* turret = turretPassenger->ToCreature())
|
||||
{
|
||||
turret->setFaction(me->GetVehicleBase()->getFaction());
|
||||
turret->SetUInt32Value(UNIT_FIELD_FLAGS, 0); // unselectable
|
||||
turret->AI()->AttackStart(who);
|
||||
}
|
||||
if (Unit* devicePassenger = me->GetVehicleKit()->GetPassenger(SEAT_DEVICE))
|
||||
if (Creature* device = devicePassenger->ToCreature())
|
||||
{
|
||||
device->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_SPELLCLICK);
|
||||
device->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
}
|
||||
|
||||
@@ -1069,7 +1069,7 @@ class npc_detonating_lasher : public CreatureScript
|
||||
{
|
||||
// Switching to other target - modify aggro of new target by 20% from current target's aggro
|
||||
me->AddThreat(target, me->getThreatManager().getThreat(me->GetVictim(), false) * 1.2f);
|
||||
me->AI()->AttackStart(target);
|
||||
AttackStart(target);
|
||||
}
|
||||
changeTargetTimer = urand(5000, 10000);
|
||||
}
|
||||
|
||||
@@ -455,7 +455,7 @@ class boss_hodir : public CreatureScript
|
||||
if (Unit* target = ObjectAccessor::GetUnit(*me, (*itr)->getUnitGuid()))
|
||||
if (Aura* BitingColdAura = target->GetAura(SPELL_BITING_COLD_TRIGGERED))
|
||||
if ((target->GetTypeId() == TYPEID_PLAYER) && (BitingColdAura->GetStackAmount() > 2))
|
||||
me->AI()->SetData(DATA_GETTING_COLD_IN_HERE, 0);
|
||||
SetData(DATA_GETTING_COLD_IN_HERE, 0);
|
||||
gettingColdInHereTimer = 1000;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -211,8 +211,8 @@ class boss_razorscale_controller : public CreatureScript
|
||||
Harpoon3->RemoveFromWorld();
|
||||
if (GameObject* Harpoon4 = ObjectAccessor::GetGameObject(*me, instance->GetData64(GO_RAZOR_HARPOON_4)))
|
||||
Harpoon4->RemoveFromWorld();
|
||||
me->AI()->DoAction(ACTION_HARPOON_BUILD);
|
||||
me->AI()->DoAction(ACTION_PLACE_BROKEN_HARPOON);
|
||||
DoAction(ACTION_HARPOON_BUILD);
|
||||
DoAction(ACTION_PLACE_BROKEN_HARPOON);
|
||||
break;
|
||||
case SPELL_HARPOON_SHOT_1:
|
||||
case SPELL_HARPOON_SHOT_2:
|
||||
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
m_uiCrushTimer = 8000;
|
||||
m_uiPoisonedSpearTimer = 10000;
|
||||
m_uiWhirlwindTimer = 20000;
|
||||
me->AI()->AttackStart(SelectTarget(SELECT_TARGET_RANDOM));
|
||||
AttackStart(SelectTarget(SELECT_TARGET_RANDOM));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
void JustSummoned(Creature* summon) OVERRIDE
|
||||
{
|
||||
summon->AI()->AttackStart(me->GetVictim());
|
||||
summon->AI()->DoCastAOE(SPELL_ZURAMAT_ADD_2);
|
||||
summon->CastSpell((Unit*)NULL, SPELL_ZURAMAT_ADD_2);
|
||||
summon->SetPhaseMask(17, true);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -44,6 +44,7 @@ EndContentData */
|
||||
#include "Player.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "WorldSession.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
/*######
|
||||
## npc_sinkhole_kill_credit
|
||||
@@ -2414,7 +2415,7 @@ public:
|
||||
{
|
||||
me->setFaction(14);
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, uiPlayerGUID))
|
||||
me->AI()->AttackStart(player);
|
||||
AttackStart(player);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 uiDiff) OVERRIDE
|
||||
@@ -2537,6 +2538,39 @@ public:
|
||||
|
||||
};
|
||||
|
||||
enum WindsoulTotemAura
|
||||
{
|
||||
SPELL_WINDSOUL_CREDT = 46378
|
||||
};
|
||||
|
||||
class spell_windsoul_totem_aura : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_windsoul_totem_aura() : SpellScriptLoader("spell_windsoul_totem_aura") { }
|
||||
|
||||
class spell_windsoul_totem_aura_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_windsoul_totem_aura_AuraScript);
|
||||
|
||||
void OnRemove(AuraEffect const*, AuraEffectHandleModes)
|
||||
{
|
||||
if (GetTarget()->isDead())
|
||||
if (Unit* caster = GetCaster())
|
||||
caster->CastSpell(NULL, SPELL_WINDSOUL_CREDT);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_windsoul_totem_aura_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
{
|
||||
return new spell_windsoul_totem_aura_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_borean_tundra()
|
||||
{
|
||||
new npc_sinkhole_kill_credit();
|
||||
@@ -2565,4 +2599,5 @@ void AddSC_borean_tundra()
|
||||
new npc_valiance_keep_cannoneer();
|
||||
new npc_warmage_coldarra();
|
||||
new npc_hidden_cultist();
|
||||
new spell_windsoul_totem_aura();
|
||||
}
|
||||
@@ -654,6 +654,7 @@ class npc_torturer_lecraft : public CreatureScript
|
||||
{
|
||||
npc_torturer_lecraftAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_textCounter = 1;
|
||||
_playerGUID = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -458,10 +458,10 @@ class spell_mindless_abomination_explosion_fx_master : public SpellScriptLoader
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
caster->AI()->DoCast(caster, SPELL_COSMETIC_BLOOD_EXPLOSION_GREEN_LARGE);
|
||||
caster->CastSpell(caster, SPELL_COSMETIC_BLOOD_EXPLOSION_GREEN_LARGE);
|
||||
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
caster->AI()->DoCast(caster, SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON);
|
||||
caster->CastSpell(caster, SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON);
|
||||
|
||||
caster->DespawnOrUnsummon(4000);
|
||||
}
|
||||
|
||||
@@ -527,7 +527,7 @@ public:
|
||||
{
|
||||
me->setRegeneratingHealth(false);
|
||||
DoCast(SPELL_THREAT_PULSE);
|
||||
me->AI()->Talk(BANNER_SAY);
|
||||
Talk(BANNER_SAY);
|
||||
events.ScheduleEvent(EVENT_SPAWN, 3000);
|
||||
}
|
||||
|
||||
|
||||
@@ -1003,7 +1003,7 @@ enum ReconnaissanceFlight
|
||||
VIC_SAY_6 = 6,
|
||||
PLANE_EMOTE = 0,
|
||||
|
||||
AURA_ENGINE = 52255, // Engine on Fire
|
||||
SPELL_ENGINE = 52255, // Engine on Fire
|
||||
|
||||
SPELL_LAND = 52226, // Land Flying Machine
|
||||
SPELL_CREDIT = 53328 // Land Flying Machine Credit
|
||||
@@ -1054,8 +1054,8 @@ public:
|
||||
pilot->AI()->Talk(VIC_SAY_6);
|
||||
break;
|
||||
case 25:
|
||||
me->AI()->Talk(PLANE_EMOTE);
|
||||
me->AI()->DoCast(AURA_ENGINE);
|
||||
Talk(PLANE_EMOTE);
|
||||
DoCast(SPELL_ENGINE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,22 +290,23 @@ public:
|
||||
events.ScheduleEvent(EVENT_CHECK_AREA, 5000);
|
||||
break;
|
||||
case EVENT_REACHED_HOME:
|
||||
Unit* player = me->GetVehicleKit()->GetPassenger(0);
|
||||
if (player && player->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
// for each prisoner on drake, give credit
|
||||
for (uint8 i = 1; i < 4; ++i)
|
||||
if (Unit* prisoner = me->GetVehicleKit()->GetPassenger(i))
|
||||
if (Vehicle* vehicle = me->GetVehicleKit())
|
||||
if (Unit* player = vehicle->GetPassenger(0))
|
||||
if (player->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (prisoner->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
prisoner->CastSpell(player, SPELL_KILL_CREDIT_PRISONER, true);
|
||||
prisoner->CastSpell(prisoner, SPELL_SUMMON_LIBERATED, true);
|
||||
prisoner->ExitVehicle();
|
||||
// for each prisoner on drake, give credit
|
||||
for (uint8 i = 1; i < 4; ++i)
|
||||
if (Unit* prisoner = me->GetVehicleKit()->GetPassenger(i))
|
||||
{
|
||||
if (prisoner->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
prisoner->CastSpell(player, SPELL_KILL_CREDIT_PRISONER, true);
|
||||
prisoner->CastSpell(prisoner, SPELL_SUMMON_LIBERATED, true);
|
||||
prisoner->ExitVehicle();
|
||||
}
|
||||
me->CastSpell(me, SPELL_KILL_CREDIT_DRAKE, true);
|
||||
player->ExitVehicle();
|
||||
}
|
||||
me->CastSpell(me, SPELL_KILL_CREDIT_DRAKE, true);
|
||||
player->ExitVehicle();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -453,6 +454,9 @@ public:
|
||||
{
|
||||
npc_brann_bronzebeard_keystoneAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
memset(&objectGUID, 0, sizeof(objectGUID));
|
||||
playerGUID = 0;
|
||||
voiceGUID = 0;
|
||||
objectCounter = 0;
|
||||
}
|
||||
|
||||
@@ -500,7 +504,7 @@ public:
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
|
||||
if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID))
|
||||
{
|
||||
voice->AI()->DoCast(voice, SPELL_RESURRECTION);
|
||||
voice->CastSpell(voice, SPELL_RESURRECTION);
|
||||
if (Player* player = ObjectAccessor::GetPlayer(*me, playerGUID))
|
||||
voice->AI()->Talk(SAY_VOICE_1, player);
|
||||
}
|
||||
@@ -542,7 +546,7 @@ public:
|
||||
break;
|
||||
case EVENT_SCRIPT_9:
|
||||
if (Creature* voice = ObjectAccessor::GetCreature(*me, voiceGUID))
|
||||
voice->AI()->DoCast(voice, SPELL_RESURRECTION);
|
||||
voice->CastSpell(voice, SPELL_RESURRECTION);
|
||||
events.ScheduleEvent(EVENT_SCRIPT_10, 6000);
|
||||
break;
|
||||
case EVENT_SCRIPT_10:
|
||||
@@ -639,6 +643,7 @@ public:
|
||||
{
|
||||
npc_king_jokkum_vehicleAI(Creature* creature) : VehicleAI(creature)
|
||||
{
|
||||
playerGUID = 0;
|
||||
pathEnd = false;
|
||||
}
|
||||
|
||||
@@ -787,37 +792,6 @@ class spell_veranus_summon : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
/*#####
|
||||
# spell_jokkum_eject_all
|
||||
#####*/
|
||||
|
||||
class spell_jokkum_eject_all : public SpellScriptLoader
|
||||
{
|
||||
public: spell_jokkum_eject_all() : SpellScriptLoader("spell_jokkum_eject_all") { }
|
||||
|
||||
class spell_jokkum_eject_all_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_jokkum_eject_all_SpellScript);
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex /* effIndex */)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (caster->IsVehicle())
|
||||
caster->GetVehicleKit()->RemoveAllPassengers();
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_jokkum_eject_all_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_jokkum_eject_all_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum CloseRift
|
||||
{
|
||||
SPELL_DESPAWN_RIFT = 61665
|
||||
@@ -877,6 +851,5 @@ void AddSC_storm_peaks()
|
||||
new npc_king_jokkum_vehicle();
|
||||
new spell_jokkum_scriptcast();
|
||||
new spell_veranus_summon();
|
||||
new spell_jokkum_eject_all();
|
||||
new spell_close_rift();
|
||||
}
|
||||
@@ -453,7 +453,11 @@ public:
|
||||
|
||||
struct npc_alchemist_finklesteinAI : public ScriptedAI
|
||||
{
|
||||
npc_alchemist_finklesteinAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_alchemist_finklesteinAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_playerGUID = 0;
|
||||
_getingredienttry = 0;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
|
||||
@@ -61,7 +61,11 @@ public:
|
||||
|
||||
struct npc_stolen_soulAI : public ScriptedAI
|
||||
{
|
||||
npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_stolen_soulAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
myClass = CLASS_NONE;
|
||||
Class_Timer = 1000;
|
||||
}
|
||||
|
||||
uint8 myClass;
|
||||
uint32 Class_Timer;
|
||||
|
||||
@@ -156,11 +156,11 @@ public:
|
||||
{
|
||||
for (std::list<uint64>::const_iterator itr = bloodmage.begin(); itr != bloodmage.end(); ++itr)
|
||||
if (Creature* bloodmage = (Unit::GetCreature(*me, *itr)))
|
||||
bloodmage->AI()->DoCast(SPELL_SUMMON_CHANNEL);
|
||||
bloodmage->CastSpell((Unit*)NULL, SPELL_SUMMON_CHANNEL);
|
||||
|
||||
for (std::list<uint64>::const_iterator itr = deathshaper.begin(); itr != deathshaper.end(); ++itr)
|
||||
if (Creature* deathshaper = (Unit::GetCreature(*me, *itr)))
|
||||
deathshaper->AI()->DoCast(SPELL_SUMMON_CHANNEL);
|
||||
deathshaper->CastSpell((Unit*)NULL, SPELL_SUMMON_CHANNEL);
|
||||
|
||||
events.ScheduleEvent(EVENT_SET_CHANNELERS, 12000);
|
||||
|
||||
|
||||
@@ -295,13 +295,13 @@ public:
|
||||
Timer = 1000;
|
||||
if (Phase == 3)
|
||||
{
|
||||
if (!Essence->IsAlive())
|
||||
if (Essence && !Essence->IsAlive())
|
||||
DoCast(me, 7, true);
|
||||
else return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||
if (Essence && Essence->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
|
||||
{
|
||||
MergeThreatList(Essence);
|
||||
Essence->RemoveAllAuras();
|
||||
@@ -312,31 +312,37 @@ public:
|
||||
break;
|
||||
case 4:
|
||||
Timer = 1500;
|
||||
if (Essence->IsWithinDistInMap(me, 10))
|
||||
if (Essence)
|
||||
{
|
||||
Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE, 374); //rotate and disappear
|
||||
Timer = 2000;
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
|
||||
}
|
||||
else
|
||||
{
|
||||
MergeThreatList(Essence);
|
||||
Essence->RemoveAllAuras();
|
||||
Essence->DeleteThreatList();
|
||||
Essence->GetMotionMaster()->MoveFollow(me, 0, 0);
|
||||
return;
|
||||
if (Essence->IsWithinDistInMap(me, 10))
|
||||
{
|
||||
Essence->SetUInt32Value(UNIT_NPC_EMOTESTATE, 374); //rotate and disappear
|
||||
Timer = 2000;
|
||||
me->RemoveAurasDueToSpell(SPELL_SUBMERGE);
|
||||
}
|
||||
else
|
||||
{
|
||||
MergeThreatList(Essence);
|
||||
Essence->RemoveAllAuras();
|
||||
Essence->DeleteThreatList();
|
||||
Essence->GetMotionMaster()->MoveFollow(me, 0, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
if (Phase == 1)
|
||||
if (Essence)
|
||||
{
|
||||
Essence->AI()->Talk(SUFF_SAY_AFTER);
|
||||
if (Phase == 1)
|
||||
{
|
||||
Essence->AI()->Talk(SUFF_SAY_AFTER);
|
||||
}
|
||||
else
|
||||
{
|
||||
Essence->AI()->Talk(DESI_SAY_AFTER);
|
||||
}
|
||||
Essence->DespawnOrUnsummon();
|
||||
}
|
||||
else
|
||||
{
|
||||
Essence->AI()->Talk(DESI_SAY_AFTER);
|
||||
}
|
||||
Essence->DespawnOrUnsummon();
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);
|
||||
EssenceGUID = 0;
|
||||
SoulCount = 0;
|
||||
|
||||
@@ -186,7 +186,7 @@ public:
|
||||
if (target && me->IsWithinDistInMap(target, me->GetAttackDistance(target)))
|
||||
{
|
||||
DoCast(target, SPELL_ATROPHY);
|
||||
me->AI()->AttackStart(target);
|
||||
AttackStart(target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -135,7 +135,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC | UNIT_FLAG_NON_ATTACKABLE);
|
||||
if (killer)
|
||||
me->AI()->AttackStart(killer);
|
||||
AttackStart(killer);
|
||||
}
|
||||
|
||||
uint64 GetChanneled(Creature* channeler1)
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ class boss_nazan : public CreatureScript
|
||||
me->SetWalk(true);
|
||||
me->GetMotionMaster()->Clear();
|
||||
if (Unit* victim = SelectTarget(SELECT_TARGET_NEAREST, 0))
|
||||
me->AI()->AttackStart(victim);
|
||||
AttackStart(victim);
|
||||
DoStartMovement(me->GetVictim());
|
||||
Talk(EMOTE);
|
||||
return;
|
||||
|
||||
@@ -435,7 +435,7 @@ class boss_alar : public CreatureScript
|
||||
Unit* target = NULL;
|
||||
target = me->SelectNearestTargetInAttackDistance(5);
|
||||
if (target)
|
||||
me->AI()->AttackStart(target);
|
||||
AttackStart(target);
|
||||
else
|
||||
{
|
||||
DoCast(me, SPELL_FLAME_BUFFET, true);
|
||||
|
||||
@@ -48,9 +48,9 @@ enum Spells
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_STREAM_OF_MACHINE_FLUID = 0,
|
||||
EVENT_JACKHAMMER = 1,
|
||||
EVENT_SHADOW_POWER = 2
|
||||
EVENT_STREAM_OF_MACHINE_FLUID = 1,
|
||||
EVENT_JACKHAMMER = 2,
|
||||
EVENT_SHADOW_POWER = 3
|
||||
};
|
||||
|
||||
class boss_gatewatcher_iron_hand : public CreatureScript
|
||||
|
||||
@@ -132,11 +132,13 @@ class boss_mechano_lord_capacitus : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_POSITIVE_SHIFT, urand(45, 60) * IN_MILLISECONDS);
|
||||
break;
|
||||
case EVENT_SUMMON_NETHER_CHARGE:
|
||||
{
|
||||
Position pos;
|
||||
me->GetRandomNearPosition(pos, 5.0f);
|
||||
me->SummonCreature(NPC_NETHER_CHARGE, pos, TEMPSUMMON_TIMED_DESPAWN, 18000);
|
||||
events.ScheduleEvent(EVENT_SUMMON_NETHER_CHARGE, 10 * IN_MILLISECONDS);
|
||||
break;
|
||||
}
|
||||
case EVENT_BERSERK:
|
||||
DoCast(me, SPELL_BERSERK);
|
||||
break;
|
||||
|
||||
@@ -59,11 +59,16 @@ class boss_dalliah_the_doomsayer : public CreatureScript
|
||||
|
||||
struct boss_dalliah_the_doomsayerAI : public BossAI
|
||||
{
|
||||
boss_dalliah_the_doomsayerAI(Creature* creature) : BossAI(creature, DATA_DALLIAH) { }
|
||||
boss_dalliah_the_doomsayerAI(Creature* creature) : BossAI(creature, DATA_DALLIAH)
|
||||
{
|
||||
soccothratesTaunt = false;
|
||||
soccothratesDeath = false;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
_Reset();
|
||||
soccothratesTaunt = false;
|
||||
soccothratesDeath = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,12 @@ class boss_wrath_scryer_soccothrates : public CreatureScript
|
||||
|
||||
struct boss_wrath_scryer_soccothratesAI : public BossAI
|
||||
{
|
||||
boss_wrath_scryer_soccothratesAI(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES) { }
|
||||
boss_wrath_scryer_soccothratesAI(Creature* creature) : BossAI(creature, DATA_SOCCOTHRATES)
|
||||
{
|
||||
preFight = false;
|
||||
dalliahTaunt = false;
|
||||
dalliahDeath = false;
|
||||
}
|
||||
|
||||
void Reset() OVERRIDE
|
||||
{
|
||||
|
||||
@@ -115,6 +115,7 @@ public:
|
||||
{
|
||||
npc_bloodmaul_bruteAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
hp30 = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -728,7 +728,15 @@ public:
|
||||
|
||||
struct npc_phase_hunterAI : public ScriptedAI
|
||||
{
|
||||
npc_phase_hunterAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_phase_hunterAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Weak = false;
|
||||
Materialize = false;
|
||||
Drained = false;
|
||||
WeakPercent = 25;
|
||||
PlayerGUID = 0;
|
||||
ManaBurnTimer = 5000;
|
||||
}
|
||||
|
||||
bool Weak;
|
||||
bool Materialize;
|
||||
|
||||
@@ -190,7 +190,7 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32 & amount, bool & /*canBeRecalculated*/)
|
||||
{
|
||||
SpellInfo const* talentSpell = sSpellMgr->GetSpellInfo(SPELL_DK_ANTI_MAGIC_SHELL_TALENT);
|
||||
SpellInfo const* talentSpell = sSpellMgr->EnsureSpellInfo(SPELL_DK_ANTI_MAGIC_SHELL_TALENT);
|
||||
amount = talentSpell->Effects[EFFECT_0].CalcValue(GetCaster());
|
||||
if (Player* player = GetCaster()->ToPlayer())
|
||||
amount += int32(2 * player->GetTotalAttackPowerValue(BASE_ATTACK));
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "SkillDiscovery.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "Vehicle.h"
|
||||
|
||||
class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader
|
||||
{
|
||||
@@ -776,7 +777,7 @@ class spell_gen_clone : public SpellScriptLoader
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
GetHitUnit()->CastSpell(GetCaster(), GetEffectValue(), true);
|
||||
GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
@@ -824,10 +825,7 @@ class spell_gen_clone_weapon : public SpellScriptLoader
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
if (Unit* target = GetHitUnit())
|
||||
caster->CastSpell(target, GetEffectValue(), true);
|
||||
GetHitUnit()->CastSpell(GetCaster(), uint32(GetEffectValue()), true);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
@@ -851,8 +849,6 @@ class spell_gen_clone_weapon_aura : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_gen_clone_weapon_auraScript);
|
||||
|
||||
uint32 prevItem;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_AURA) ||
|
||||
@@ -865,6 +861,12 @@ class spell_gen_clone_weapon_aura : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() OVERRIDE
|
||||
{
|
||||
prevItem = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
@@ -950,6 +952,8 @@ class spell_gen_clone_weapon_aura : public SpellScriptLoader
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_gen_clone_weapon_auraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 prevItem;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const OVERRIDE
|
||||
@@ -1208,7 +1212,7 @@ class spell_gen_defend : public SpellScriptLoader
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
|
||||
SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(m_scriptSpellId);
|
||||
|
||||
// Defend spells cast by NPCs (add visuals)
|
||||
if (spell->Effects[EFFECT_0].ApplyAuraName == SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN)
|
||||
@@ -2010,7 +2014,7 @@ class spell_gen_mounted_charge: public SpellScriptLoader
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
SpellInfo const* spell = sSpellMgr->GetSpellInfo(m_scriptSpellId);
|
||||
SpellInfo const* spell = sSpellMgr->EnsureSpellInfo(m_scriptSpellId);
|
||||
|
||||
if (spell->HasEffect(SPELL_EFFECT_SCRIPT_EFFECT))
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_mounted_charge_SpellScript::HandleScriptEffect, EFFECT_FIRST_FOUND, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
@@ -3268,6 +3272,33 @@ class spell_gen_summon_tournament_mount : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 41213, 43416, 69222, 73076 - Throw Shield
|
||||
class spell_gen_throw_shield : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_throw_shield() : SpellScriptLoader("spell_gen_throw_shield") { }
|
||||
|
||||
class spell_gen_throw_shield_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_throw_shield_SpellScript);
|
||||
|
||||
void HandleScriptEffect(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
GetCaster()->CastSpell(GetHitUnit(), uint32(GetEffectValue()), true);
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_throw_shield_SpellScript::HandleScriptEffect, EFFECT_1, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_gen_throw_shield_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum MountedDuelSpells
|
||||
{
|
||||
@@ -3660,6 +3691,33 @@ class spell_gen_whisper_gulch_yogg_saron_whisper : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_eject_all_passengers : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_eject_all_passengers() : SpellScriptLoader("spell_gen_eject_all_passengers") { }
|
||||
|
||||
class spell_gen_eject_all_passengers_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_eject_all_passengers_SpellScript);
|
||||
|
||||
void RemoveVehicleAuras()
|
||||
{
|
||||
if (Vehicle* vehicle = GetHitUnit()->GetVehicleKit())
|
||||
vehicle->RemoveAllPassengers();
|
||||
}
|
||||
|
||||
void Register() OVERRIDE
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_gen_eject_all_passengers_SpellScript::RemoveVehicleAuras);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const OVERRIDE
|
||||
{
|
||||
return new spell_gen_eject_all_passengers_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_absorb0_hitlimit1();
|
||||
@@ -3734,6 +3792,7 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_summon_elemental("spell_gen_summon_fire_elemental", SPELL_SUMMON_FIRE_ELEMENTAL);
|
||||
new spell_gen_summon_elemental("spell_gen_summon_earth_elemental", SPELL_SUMMON_EARTH_ELEMENTAL);
|
||||
new spell_gen_summon_tournament_mount();
|
||||
new spell_gen_throw_shield();
|
||||
new spell_gen_tournament_duel();
|
||||
new spell_gen_tournament_pennant();
|
||||
new spell_pvp_trinket_wotf_shared_cd();
|
||||
@@ -3743,4 +3802,5 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_vendor_bark_trigger();
|
||||
new spell_gen_wg_water();
|
||||
new spell_gen_whisper_gulch_yogg_saron_whisper();
|
||||
new spell_gen_eject_all_passengers();
|
||||
}
|
||||
@@ -331,7 +331,7 @@ class spell_mage_cold_snap : public SpellScriptLoader
|
||||
const SpellCooldowns& cm = caster->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first);
|
||||
|
||||
if (spellInfo->SpellFamilyName == SPELLFAMILY_MAGE &&
|
||||
(spellInfo->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) &&
|
||||
@@ -824,7 +824,7 @@ class spell_mage_ignite : public SpellScriptLoader
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
SpellInfo const* igniteDot = sSpellMgr->GetSpellInfo(SPELL_MAGE_IGNITE);
|
||||
SpellInfo const* igniteDot = sSpellMgr->EnsureSpellInfo(SPELL_MAGE_IGNITE);
|
||||
int32 pct = 8 * GetSpellInfo()->GetRank();
|
||||
|
||||
int32 amount = int32(CalculatePct(eventInfo.GetDamageInfo()->GetDamage(), pct) / igniteDot->GetMaxTicks());
|
||||
|
||||
@@ -895,7 +895,7 @@ public:
|
||||
|
||||
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
AddPct(mod, spellInfo->Effects[EFFECT_0].CalcValue());
|
||||
}
|
||||
|
||||
@@ -938,7 +938,7 @@ public:
|
||||
|
||||
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
mod += CalculatePct(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
|
||||
}
|
||||
|
||||
@@ -968,7 +968,7 @@ public:
|
||||
|
||||
if (itr != pet->ToPet()->m_spells.end()) // If pet has Wild Hunt
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first); // Then get the SpellProto and add the dummy effect value
|
||||
mod += CalculatePct(1.0f, spellInfo->Effects[EFFECT_1].CalcValue());
|
||||
}
|
||||
|
||||
|
||||
@@ -368,7 +368,7 @@ class spell_pri_glyph_of_prayer_of_healing : public SpellScriptLoader
|
||||
{
|
||||
PreventDefaultAction();
|
||||
|
||||
SpellInfo const* triggeredSpellInfo = sSpellMgr->GetSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL);
|
||||
SpellInfo const* triggeredSpellInfo = sSpellMgr->EnsureSpellInfo(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL);
|
||||
int32 heal = int32(CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount()) / triggeredSpellInfo->GetMaxTicks());
|
||||
GetTarget()->CastCustomSpell(SPELL_PRIEST_GLYPH_OF_PRAYER_OF_HEALING_HEAL, SPELLVALUE_BASE_POINT0, heal, eventInfo.GetProcTarget(), true, NULL, aurEff);
|
||||
}
|
||||
|
||||
@@ -903,7 +903,7 @@ class spell_q12659_ahunaes_knife : public SpellScriptLoader
|
||||
enum StoppingTheSpread
|
||||
{
|
||||
NPC_VILLAGER_KILL_CREDIT = 18240,
|
||||
SPELL_FLAMES = 39199,
|
||||
SPELL_FLAMES = 39199
|
||||
};
|
||||
|
||||
class spell_q9874_liquid_fire : public SpellScriptLoader
|
||||
@@ -926,7 +926,7 @@ class spell_q9874_liquid_fire : public SpellScriptLoader
|
||||
{
|
||||
Player* caster = GetCaster()->ToPlayer();
|
||||
if (Creature* target = GetHitCreature())
|
||||
if (target && target->HasAura(SPELL_FLAMES))
|
||||
if (target && !target->HasAura(SPELL_FLAMES))
|
||||
{
|
||||
caster->KilledMonsterCredit(NPC_VILLAGER_KILL_CREDIT, 0);
|
||||
target->CastSpell(target, SPELL_FLAMES, true);
|
||||
|
||||
@@ -586,8 +586,8 @@ class spell_rog_preparation : public SpellScriptLoader
|
||||
SpellCooldowns const& cm = caster->GetSpellCooldownMap();
|
||||
for (SpellCooldowns::const_iterator itr = cm.begin(); itr != cm.end();)
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
|
||||
if (!spellInfo || spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE)
|
||||
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(itr->first);
|
||||
if (spellInfo->SpellFamilyName != SPELLFAMILY_ROGUE)
|
||||
{
|
||||
++itr;
|
||||
continue;
|
||||
|
||||
@@ -333,7 +333,7 @@ class spell_warl_demonic_circle_summon : public SpellScriptLoader
|
||||
// WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST; allowing him to cast the WARLOCK_DEMONIC_CIRCLE_TELEPORT.
|
||||
// If not in range remove the WARLOCK_DEMONIC_CIRCLE_ALLOW_CAST.
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARLOCK_DEMONIC_CIRCLE_TELEPORT);
|
||||
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(SPELL_WARLOCK_DEMONIC_CIRCLE_TELEPORT);
|
||||
|
||||
if (GetTarget()->IsWithinDist(circle, spellInfo->GetMaxRange(true)))
|
||||
{
|
||||
@@ -485,6 +485,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader
|
||||
if (targetCreature->IsPet())
|
||||
{
|
||||
CreatureTemplate const* ci = sObjectMgr->GetCreatureTemplate(targetCreature->GetEntry());
|
||||
ASSERT(ci);
|
||||
switch (ci->family)
|
||||
{
|
||||
case CREATURE_FAMILY_SUCCUBUS:
|
||||
@@ -492,7 +493,7 @@ class spell_warl_demonic_empowerment : public SpellScriptLoader
|
||||
break;
|
||||
case CREATURE_FAMILY_VOIDWALKER:
|
||||
{
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER);
|
||||
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER);
|
||||
int32 hp = int32(targetCreature->CountPctFromMaxHealth(GetCaster()->CalculateSpellDamage(targetCreature, spellInfo, 0)));
|
||||
targetCreature->CastCustomSpell(targetCreature, SPELL_WARLOCK_DEMONIC_EMPOWERMENT_VOIDWALKER, &hp, NULL, NULL, true);
|
||||
break;
|
||||
|
||||
@@ -247,7 +247,7 @@ class spell_warr_deep_wounds : public SpellScriptLoader
|
||||
|
||||
damage = target->SpellDamageBonusTaken(caster, GetSpellInfo(), damage, SPELL_DIRECT_DAMAGE);
|
||||
|
||||
SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC);
|
||||
SpellInfo const* spellInfo = sSpellMgr->EnsureSpellInfo(SPELL_WARRIOR_DEEP_WOUNDS_RANK_PERIODIC);
|
||||
uint32 ticks = spellInfo->GetDuration() / spellInfo->Effects[EFFECT_0].Amplitude;
|
||||
|
||||
// Add remaining ticks to damage done
|
||||
|
||||
@@ -162,7 +162,6 @@ public:
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CRIMSONWING, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+25);
|
||||
break;
|
||||
case 17209:
|
||||
player->SetTaxiCheater(true);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 28);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 29);
|
||||
player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_WILLIAMKEILAR3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 30);
|
||||
|
||||
Reference in new issue
Block a user