*Even more cleanup and optimization.
--HG-- branch : trunk
This commit is contained in:
@@ -184,15 +184,17 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget)
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
pSource->MonsterWhisper(iTextEntry, pTarget->GetGUID());
|
||||
else
|
||||
error_log("TSCR: DoScriptText entry %i cannot whisper without pTarget unit (TYPEID_PLAYER).", iTextEntry);
|
||||
}break;
|
||||
error_log("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
|
||||
}
|
||||
break;
|
||||
case CHAT_TYPE_BOSS_WHISPER:
|
||||
{
|
||||
if (pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
pSource->MonsterWhisper(iTextEntry, pTarget->GetGUID(), true);
|
||||
else
|
||||
error_log("TSCR: DoScriptText entry %i cannot whisper without pTarget unit (TYPEID_PLAYER).", iTextEntry);
|
||||
}break;
|
||||
error_log("TSCR: DoScriptText entry %i cannot whisper without target unit (TYPEID_PLAYER).", iTextEntry);
|
||||
}
|
||||
break;
|
||||
case CHAT_TYPE_ZONE_YELL:
|
||||
pSource->MonsterYellToZone(iTextEntry, pData->uiLanguage, pTarget ? pTarget->GetGUID() : 0);
|
||||
break;
|
||||
|
||||
+12
-12
@@ -720,12 +720,12 @@ struct TRINITY_DLL_DECL npc_marshal_windsorAI : public npc_escortAI
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0:m_creature->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID);break;
|
||||
case 1:m_creature->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID);break;
|
||||
case 2:m_creature->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID);break;
|
||||
}
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0: m_creature->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 1: m_creature->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 2: m_creature->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() {}
|
||||
@@ -916,12 +916,12 @@ struct TRINITY_DLL_DECL npc_marshal_reginald_windsorAI : public npc_escortAI
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
switch(rand()%3)
|
||||
{
|
||||
case 0:m_creature->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID);break;
|
||||
case 1:m_creature->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID);break;
|
||||
case 2:m_creature->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID);break;
|
||||
}
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0: m_creature->Say(SAY_WINDSOR_AGGRO1, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 1: m_creature->Say(SAY_WINDSOR_AGGRO2, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
case 2: m_creature->Say(SAY_WINDSOR_AGGRO3, LANG_UNIVERSAL, PlayerGUID); break;
|
||||
}
|
||||
}
|
||||
void Reset() {}
|
||||
|
||||
|
||||
+2
-2
@@ -76,12 +76,12 @@ struct TRINITY_DLL_DECL boss_draganthaurissanAI : public ScriptedAI
|
||||
//if (Counter < 3)
|
||||
//{
|
||||
// HandOfThaurissan_Timer = 1000;
|
||||
// Counter++;
|
||||
// ++Counter;
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
HandOfThaurissan_Timer = 5000;
|
||||
//Counter=0;
|
||||
//Counter = 0;
|
||||
//}
|
||||
} else HandOfThaurissan_Timer -= diff;
|
||||
|
||||
|
||||
+1
-1
@@ -399,7 +399,7 @@ struct TRINITY_DLL_DECL instance_blackrock_depths : public ScriptedInstance
|
||||
if (TombTimer <= diff)
|
||||
{
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
TombEventCounter++;
|
||||
++TombEventCounter;
|
||||
TombOfSevenEvent();
|
||||
} else TombTimer -= diff;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ struct TRINITY_DLL_DECL boss_terestianAI : public ScriptedAI
|
||||
if (pSummoned->GetEntry() == CREATURE_PORTAL)
|
||||
{
|
||||
PortalGUID[PortalsCount] = pSummoned->GetGUID();
|
||||
PortalsCount++;
|
||||
++PortalsCount;
|
||||
|
||||
if (pSummoned->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_FIENDISH_PORTAL_1)
|
||||
{
|
||||
|
||||
@@ -625,12 +625,12 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
|
||||
pTemp->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
pTemp->setFaction(2084);
|
||||
uiGhoulGUID[uiSummon_counter] = pTemp->GetGUID();
|
||||
uiSummon_counter++;
|
||||
++uiSummon_counter;
|
||||
}
|
||||
else
|
||||
{
|
||||
uiSummon_counter = 0;
|
||||
uiStep++;
|
||||
++uiStep;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -643,12 +643,12 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
|
||||
pTemp->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
pTemp->setFaction(2084);
|
||||
uiAbominationGUID[uiSummon_counter] = pTemp->GetGUID();
|
||||
uiSummon_counter++;
|
||||
++uiSummon_counter;
|
||||
}
|
||||
else
|
||||
{
|
||||
uiSummon_counter = 0;
|
||||
uiStep++;
|
||||
++uiStep;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -661,12 +661,12 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
|
||||
pTemp->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
pTemp->setFaction(2084);
|
||||
uiWarriorGUID[uiSummon_counter] = pTemp->GetGUID();
|
||||
uiSummon_counter++;
|
||||
++uiSummon_counter;
|
||||
}
|
||||
else
|
||||
{
|
||||
uiSummon_counter = 0;
|
||||
uiStep++;
|
||||
++uiStep;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -679,12 +679,12 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
|
||||
pTemp->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
|
||||
pTemp->setFaction(2084);
|
||||
uiBehemothGUID[uiSummon_counter] = pTemp->GetGUID();
|
||||
uiSummon_counter++;
|
||||
++uiSummon_counter;
|
||||
}
|
||||
else
|
||||
{
|
||||
uiSummon_counter = 0;
|
||||
uiStep++;
|
||||
++uiStep;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1472,7 +1472,7 @@ struct TRINITY_DLL_DECL npc_highlord_darion_mograineAI : public npc_escortAI
|
||||
void JumpToNextStep(uint32 uiTimer)
|
||||
{
|
||||
uiPhase_timer = uiTimer;
|
||||
uiStep++;
|
||||
++uiStep;
|
||||
}
|
||||
|
||||
void NPCChangeTarget(uint64 ui_GUID)
|
||||
|
||||
+2
-2
@@ -107,7 +107,7 @@ struct TRINITY_DLL_DECL boss_instructormaliciaAI : public ScriptedAI
|
||||
if (FlashCounter < 2)
|
||||
{
|
||||
FlashHeal_Timer = 5000;
|
||||
FlashCounter++;
|
||||
++FlashCounter;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -125,7 +125,7 @@ struct TRINITY_DLL_DECL boss_instructormaliciaAI : public ScriptedAI
|
||||
if (HealingTouch_Timer < 2)
|
||||
{
|
||||
HealingTouch_Timer = 5500;
|
||||
TouchCounter++;
|
||||
++TouchCounter;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -123,12 +123,12 @@ struct TRINITY_DLL_DECL boss_jandicebarovAI : public ScriptedAI
|
||||
// if (Illusioncounter < 3)
|
||||
// {
|
||||
// Illusion_Timer = 500;
|
||||
// Illusioncounter++;
|
||||
// ++Illusioncounter;
|
||||
// }
|
||||
// else {
|
||||
// //15 seconds until we should cast this again
|
||||
// Illusion_Timer = 15000;
|
||||
// Illusioncounter=0;
|
||||
// Illusioncounter = 0;
|
||||
// }
|
||||
//
|
||||
// } else Illusion_Timer -= diff;
|
||||
|
||||
@@ -390,7 +390,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
||||
break;
|
||||
case 8:
|
||||
m_creature->RemoveAurasDueToSpell(SPELL_FOG_BREATH);
|
||||
BreathCount++;
|
||||
++BreathCount;
|
||||
Timer[EVENT_SUMMON_FOG] = 0;
|
||||
Timer[EVENT_FLIGHT_SEQUENCE] = 1;
|
||||
if (BreathCount < 3) FlightCount = 4;
|
||||
@@ -419,7 +419,7 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
||||
default:
|
||||
break;
|
||||
}
|
||||
FlightCount++;
|
||||
++FlightCount;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -471,7 +471,8 @@ struct TRINITY_DLL_DECL boss_felmystAI : public ScriptedAI
|
||||
{
|
||||
m_creature->CastSpell(pTarget, SPELL_ENCAPSULATE_CHANNEL, false);
|
||||
Timer[EVENT_ENCAPSULATE] = 25000 + rand()%5 * 1000;
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case EVENT_FLIGHT:
|
||||
EnterPhase(PHASE_FLIGHT);
|
||||
break;
|
||||
|
||||
@@ -210,7 +210,7 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
me->CombatStop();
|
||||
TalkSequence++;
|
||||
++TalkSequence;
|
||||
}
|
||||
if (TalkTimer <= diff)
|
||||
{
|
||||
@@ -218,7 +218,7 @@ struct TRINITY_DLL_DECL boss_kalecgosAI : public ScriptedAI
|
||||
GoodEnding();
|
||||
else
|
||||
BadEnding();
|
||||
TalkSequence++;
|
||||
++TalkSequence;
|
||||
} else TalkTimer -= diff;
|
||||
}
|
||||
else
|
||||
@@ -690,20 +690,20 @@ struct TRINITY_DLL_DECL boss_kalecAI : public ScriptedAI
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_GOOD_AGGRO, me);
|
||||
YellSequence++;
|
||||
++YellSequence;
|
||||
break;
|
||||
case 1:
|
||||
if (HealthBelowPct(50))
|
||||
{
|
||||
DoScriptText(SAY_GOOD_NEAR_DEATH, me);
|
||||
YellSequence++;
|
||||
++YellSequence;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (HealthBelowPct(10))
|
||||
{
|
||||
DoScriptText(SAY_GOOD_NEAR_DEATH2, me);
|
||||
YellSequence++;
|
||||
++YellSequence;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
@@ -737,7 +737,7 @@ bool GOkalecgos_teleporter(Player* pPlayer, GameObject* pGo)
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if(i->getSource() && i->getSource()->GetPositionZ() < DEMON_REALM_Z + 5)
|
||||
SpectralPlayers++;
|
||||
++SpectralPlayers;
|
||||
}
|
||||
if (pPlayer->HasAura(AURA_SPECTRAL_EXHAUSTION) || (MAX_PLAYERS_IN_SPECTRAL_REALM && SpectralPlayers >= MAX_PLAYERS_IN_SPECTRAL_REALM))
|
||||
pPlayer->GetSession()->SendNotification(GO_FAILED);
|
||||
|
||||
+2
-1
@@ -213,7 +213,8 @@ struct TRINITY_DLL_DECL instance_sunwell_plateau : public ScriptedInstance
|
||||
HandleGameObject(KalecgosWall[1],false);
|
||||
}
|
||||
m_auiEncounter[0] = data;
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case DATA_BRUTALLUS_EVENT: m_auiEncounter[1] = data; break;
|
||||
case DATA_FELMYST_EVENT:
|
||||
if (data == DONE)
|
||||
|
||||
@@ -310,23 +310,25 @@ bool GOHello_go_altar_of_archaedas(Player* pPlayer, GameObject* pGo)
|
||||
pPlayer->CastSpell (pPlayer, SPELL_BOSS_OBJECT_VISUAL, false);
|
||||
|
||||
/*
|
||||
if (altarOfArchaedasCounter < NUMBER_NEEDED_TO_ACTIVATE) {
|
||||
if (altarOfArchaedasCounter < NUMBER_NEEDED_TO_ACTIVATE)
|
||||
return false; // not enough people yet
|
||||
}
|
||||
|
||||
// Check to make sure at least three people are still casting
|
||||
uint32 count=0;
|
||||
uint8 count = 0;
|
||||
Unit *pTarget;
|
||||
for (uint32 x=0; x<=5; x++) {
|
||||
for (uint8 x = 0; x <= 5; ++x)
|
||||
{
|
||||
pTarget = Unit::GetUnit(*pPlayer, altarOfArchaedasCount[x]);
|
||||
if (!pTarget) continue;
|
||||
if (pTarget->IsNonMeleeSpellCasted(true)) count++;
|
||||
if (count >= NUMBER_NEEDED_TO_ACTIVATE) break;
|
||||
if (!pTarget)
|
||||
continue;
|
||||
if (pTarget->IsNonMeleeSpellCasted(true))
|
||||
++count;
|
||||
if (count >= NUMBER_NEEDED_TO_ACTIVATE)
|
||||
break;
|
||||
}
|
||||
|
||||
if (count < NUMBER_NEEDED_TO_ACTIVATE) {
|
||||
if (count < NUMBER_NEEDED_TO_ACTIVATE)
|
||||
return false; // not enough people
|
||||
}
|
||||
*/
|
||||
|
||||
ScriptedInstance* pInstance = pPlayer->GetInstanceData();
|
||||
@@ -420,7 +422,7 @@ bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* pGo)
|
||||
|
||||
//bool alreadyUsed;
|
||||
|
||||
//pGo->AddUse ();
|
||||
//pGo->AddUse();
|
||||
|
||||
//alreadyUsed = false;
|
||||
//for (uint32 loop=0; loop<5; ++loop)
|
||||
@@ -434,30 +436,33 @@ bool GOHello_go_altar_of_the_keepers(Player* pPlayer, GameObject* pGo)
|
||||
|
||||
//if (altarOfTheKeeperCounter < NUMBER_NEEDED_TO_ACTIVATE)
|
||||
//{
|
||||
//error_log ("not enough people yet, altarOfTheKeeperCounter = %d", altarOfTheKeeperCounter);
|
||||
// return false; // not enough people yet
|
||||
//error_log("not enough people yet, altarOfTheKeeperCounter = %d", altarOfTheKeeperCounter);
|
||||
// return false; // not enough people yet
|
||||
//}
|
||||
/*
|
||||
// Check to make sure at least three people are still casting
|
||||
uint32 count=0;
|
||||
uint8 count = 0;
|
||||
Unit *pTarget;
|
||||
for (uint32 x = 0; x < 5; ++x)
|
||||
for (uint8 x = 0; x < 5; ++x)
|
||||
{
|
||||
pTarget = Unit::GetUnit(*pPlayer, altarOfTheKeeperCount[x]);
|
||||
//error_log ("number of people currently activating it: %d", x+1);
|
||||
if (!pTarget) continue;
|
||||
if (pTarget->IsNonMeleeSpellCasted(true)) count++;
|
||||
if (count >= NUMBER_NEEDED_TO_ACTIVATE) break;
|
||||
//error_log("number of people currently activating it: %d", x+1);
|
||||
if (!pTarget)
|
||||
continue;
|
||||
if (pTarget->IsNonMeleeSpellCasted(true))
|
||||
++count;
|
||||
if (count >= NUMBER_NEEDED_TO_ACTIVATE)
|
||||
break;
|
||||
}
|
||||
|
||||
if (count < NUMBER_NEEDED_TO_ACTIVATE)
|
||||
{
|
||||
// error_log ("still not enough people");
|
||||
return true; // not enough people
|
||||
//error_log("still not enough people");
|
||||
return true; // not enough people
|
||||
}
|
||||
*/
|
||||
//error_log ("activating stone keepers");
|
||||
pInstance->SetData(NULL,1); // activate the Stone Keepers
|
||||
pInstance->SetData(NULL,1); // activate the Stone Keepers
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -185,17 +185,18 @@ struct TRINITY_DLL_DECL boss_halazziAI : public ScriptedAI
|
||||
TotemTimer = 12000;
|
||||
break;
|
||||
case PHASE_MERGE:
|
||||
if (Unit *Lynx = Unit::GetUnit(*m_creature, LynxGUID))
|
||||
if (Unit *pLynx = Unit::GetUnit(*m_creature, LynxGUID))
|
||||
{
|
||||
m_creature->MonsterYell(YELL_MERGE, LANG_UNIVERSAL, NULL);
|
||||
DoPlaySoundToSet(m_creature, SOUND_MERGE);
|
||||
Lynx->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
Lynx->GetMotionMaster()->Clear();
|
||||
Lynx->GetMotionMaster()->MoveFollow(m_creature, 0, 0);
|
||||
pLynx->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pLynx->GetMotionMaster()->Clear();
|
||||
pLynx->GetMotionMaster()->MoveFollow(m_creature, 0, 0);
|
||||
m_creature->GetMotionMaster()->Clear();
|
||||
m_creature->GetMotionMaster()->MoveFollow(Lynx, 0, 0);
|
||||
TransformCount++;
|
||||
}break;
|
||||
m_creature->GetMotionMaster()->MoveFollow(pLynx, 0, 0);
|
||||
++TransformCount;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -474,7 +474,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
||||
if (m_creature->IsWithinMeleeRange(pTarget))
|
||||
{
|
||||
m_creature->CastSpell(pTarget, SPELL_CLAW_RAGE_DAMAGE, true);
|
||||
Claw_Counter++;
|
||||
++Claw_Counter;
|
||||
if (Claw_Counter == 12)
|
||||
{
|
||||
Claw_Rage_Timer = 15000 + rand()%5000;
|
||||
@@ -522,7 +522,7 @@ struct TRINITY_DLL_DECL boss_zuljinAI : public ScriptedAI
|
||||
if (m_creature->IsWithinMeleeRange(pTarget))
|
||||
{
|
||||
m_creature->CastSpell(pTarget, SPELL_LYNX_RUSH_DAMAGE, true);
|
||||
Claw_Counter++;
|
||||
++Claw_Counter;
|
||||
if (Claw_Counter == 9)
|
||||
{
|
||||
Lynx_Rush_Timer = 15000 + rand()%5000;
|
||||
|
||||
@@ -243,7 +243,7 @@ struct TRINITY_DLL_DECL instance_zulaman : public ScriptedInstance
|
||||
HandleGameObject(ZulJinDoorGUID, data != IN_PROGRESS);
|
||||
break;
|
||||
case DATA_CHESTLOOTED:
|
||||
ChestLooted++;
|
||||
++ChestLooted;
|
||||
SaveToDB();
|
||||
break;
|
||||
case TYPE_RAND_VENDOR_1:
|
||||
@@ -256,7 +256,7 @@ struct TRINITY_DLL_DECL instance_zulaman : public ScriptedInstance
|
||||
|
||||
if (data == DONE)
|
||||
{
|
||||
BossKilled++;
|
||||
++BossKilled;
|
||||
if (QuestMinute && BossKilled >= 4)
|
||||
{
|
||||
QuestMinute = 0;
|
||||
|
||||
@@ -223,7 +223,7 @@ struct TRINITY_DLL_DECL boss_mandokirAI : public ScriptedAI
|
||||
{
|
||||
Unit* pUnit = Unit::GetUnit(*m_creature, (*i)->getUnitGuid());
|
||||
if (pUnit && m_creature->IsWithinMeleeRange(pUnit))
|
||||
TargetInRange++;
|
||||
++TargetInRange;
|
||||
}
|
||||
|
||||
if (TargetInRange > 3)
|
||||
|
||||
@@ -112,11 +112,11 @@ struct TRINITY_DLL_DECL boss_venoxisAI : public ScriptedAI
|
||||
if (HolyNova_Timer <= diff)
|
||||
{
|
||||
TargetInRange = 0;
|
||||
for (uint8 i=0; i<10; ++i)
|
||||
for (uint8 i = 0; i < 10; ++i)
|
||||
{
|
||||
if (Unit *pTarget = SelectUnit(SELECT_TARGET_TOPAGGRO,i))
|
||||
if (m_creature->IsWithinMeleeRange(pTarget))
|
||||
TargetInRange++;
|
||||
++TargetInRange;
|
||||
}
|
||||
|
||||
if (TargetInRange > 1)
|
||||
|
||||
@@ -51,7 +51,7 @@ struct TRINITY_DLL_DECL mob_webbed_creatureAI : public ScriptedAI
|
||||
{
|
||||
uint32 spawnCreatureID = 0;
|
||||
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
spawnCreatureID = 17681;
|
||||
@@ -60,7 +60,7 @@ struct TRINITY_DLL_DECL mob_webbed_creatureAI : public ScriptedAI
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
spawnCreatureID = possibleSpawns[rand()%31];
|
||||
spawnCreatureID = possibleSpawns[urand(0,30)];
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
+23
-25
@@ -263,7 +263,7 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
||||
if(Creature *summon = m_creature->SummonCreature(entry, pos, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000))
|
||||
return summon;
|
||||
|
||||
debug_log("TSCR: Instance Dark Portal: what just happened there? No boss, no loot, no fun...");
|
||||
debug_log("TSCR: Instance Dark Portal: What just happened there? No boss, no loot, no fun...");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -271,36 +271,34 @@ struct TRINITY_DLL_DECL instance_dark_portal : public ScriptedInstance
|
||||
{
|
||||
if (Creature* pMedivh = instance->GetCreature(MedivhGUID))
|
||||
{
|
||||
int tmp = rand()%(4-1);
|
||||
uint8 tmp = urand(0,2);
|
||||
|
||||
if (tmp >= CurrentRiftId)
|
||||
tmp++;
|
||||
debug_log("TSCR: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).",tmp,CurrentRiftId);
|
||||
++tmp;
|
||||
|
||||
CurrentRiftId = tmp;
|
||||
debug_log("TSCR: Instance Dark Portal: Creating Time Rift at locationId %i (old locationId was %u).",tmp,CurrentRiftId);
|
||||
|
||||
Creature* pTemp = pMedivh->SummonCreature(C_TIME_RIFT,
|
||||
PortalLocation[tmp][0],PortalLocation[tmp][1],PortalLocation[tmp][2],PortalLocation[tmp][3],
|
||||
TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||
if (pTemp)
|
||||
CurrentRiftId = tmp;
|
||||
|
||||
Creature *pTemp = pMedivh->SummonCreature(C_TIME_RIFT,
|
||||
PortalLocation[tmp][0],PortalLocation[tmp][1],PortalLocation[tmp][2],PortalLocation[tmp][3],
|
||||
TEMPSUMMON_CORPSE_DESPAWN,0);
|
||||
if (pTemp)
|
||||
{
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
if (Creature *pBoss = SummonedPortalBoss(pTemp))
|
||||
{
|
||||
if (pBoss->GetEntry() == C_AEONUS)
|
||||
pBoss->AddThreat(pMedivh,0.0f);
|
||||
else
|
||||
{
|
||||
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
|
||||
if (Creature* pBoss = SummonedPortalBoss(pTemp))
|
||||
{
|
||||
if (pBoss->GetEntry() == C_AEONUS)
|
||||
{
|
||||
pBoss->AddThreat(pMedivh,0.0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
pBoss->AddThreat(pTemp,0.0f);
|
||||
pTemp->CastSpell(pBoss,SPELL_RIFT_CHANNEL,false);
|
||||
}
|
||||
}
|
||||
pBoss->AddThreat(pTemp,0.0f);
|
||||
pTemp->CastSpell(pBoss,SPELL_RIFT_CHANNEL,false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ struct TRINITY_DLL_DECL boss_anetheronAI : public hyjal_trashAI
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
|
||||
|
||||
@@ -380,7 +380,7 @@ struct TRINITY_DLL_DECL boss_archimondeAI : public hyjal_trashAI
|
||||
uint32 chargeSpell = 0;
|
||||
uint32 unleashSpell = 0;
|
||||
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
chargeSpell = SPELL_SOUL_CHARGE_RED;
|
||||
|
||||
@@ -73,7 +73,7 @@ struct TRINITY_DLL_DECL boss_azgalorAI : public hyjal_trashAI
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
|
||||
|
||||
@@ -68,7 +68,7 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
|
||||
|
||||
void KilledUnit(Unit *victim)
|
||||
{
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_ONSLAY1);
|
||||
@@ -165,7 +165,7 @@ struct TRINITY_DLL_DECL boss_kazrogalAI : public hyjal_trashAI
|
||||
if (MarkTimerBase < 5500)
|
||||
MarkTimerBase = 5500;
|
||||
MarkTimer = MarkTimerBase;
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoPlaySoundToSet(m_creature, SOUND_MARK1);
|
||||
|
||||
@@ -462,18 +462,19 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
||||
}
|
||||
break;
|
||||
case 17907: //FROST_WYRM ,
|
||||
if (FirstBossDead && WaveCount == 1)
|
||||
{//summon at gate
|
||||
if (FirstBossDead && WaveCount == 1) //summon at gate
|
||||
pCreature = m_creature->SummonCreature(entry, SpawnPointSpecial[SPAWN_WYRM_GATE][0],SpawnPointSpecial[SPAWN_WYRM_GATE][1],SpawnPointSpecial[SPAWN_WYRM_GATE][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||
}else{
|
||||
else
|
||||
{
|
||||
pCreature = m_creature->SummonCreature(entry, SpawnPointSpecial[SPAWN_NEAR_TOWER][0], SpawnPointSpecial[SPAWN_NEAR_TOWER][1],SpawnPointSpecial[SPAWN_NEAR_TOWER][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||
if (pCreature)
|
||||
CAST_AI(hyjal_trashAI, pCreature->AI())->useFlyPath = true;
|
||||
}
|
||||
break;
|
||||
case 17908: //GIANT_INFERNAL
|
||||
InfernalCount++;
|
||||
if (InfernalCount > 7)InfernalCount = 0;
|
||||
++InfernalCount;
|
||||
if (InfernalCount > 7)
|
||||
InfernalCount = 0;
|
||||
pCreature = m_creature->SummonCreature(entry, InfernalPos[InfernalCount][0], InfernalPos[InfernalCount][1], InfernalPos[InfernalCount][2], 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 120000);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -748,7 +748,7 @@ struct mob_necromancerAI : public hyjal_trashAI
|
||||
|
||||
void KilledUnit(Unit* victim)
|
||||
{
|
||||
switch (rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
DoSpawnCreature(17902,3,0,0,0,TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
@@ -759,10 +759,7 @@ struct mob_necromancerAI : public hyjal_trashAI
|
||||
DoSpawnCreature(17903,-3,0,0,0,TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
break;
|
||||
case 2:
|
||||
if (rand()%2)
|
||||
DoSpawnCreature(17902,3,0,0,0,TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
else
|
||||
DoSpawnCreature(17903,3,0,0,0,TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
DoSpawnCreature(RAND(17902,17903),3,0,0,0,TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ struct TRINITY_DLL_DECL boss_lieutenant_drakeAI : public ScriptedAI
|
||||
if (CanPatrol && wpId == 0)
|
||||
{
|
||||
m_creature->GetMotionMaster()->MovePoint(DrakeWP[0].wpId, DrakeWP[0].x, DrakeWP[0].y, DrakeWP[0].z);
|
||||
wpId++;
|
||||
++wpId;
|
||||
}
|
||||
|
||||
//Return since we have no target
|
||||
|
||||
+1
-1
@@ -146,7 +146,7 @@ struct TRINITY_DLL_DECL instance_old_hillsbrad : public ScriptedInstance
|
||||
{
|
||||
if (mThrallEventCount <= 20)
|
||||
{
|
||||
mThrallEventCount++;
|
||||
++mThrallEventCount;
|
||||
m_auiEncounter[1] = NOT_STARTED;
|
||||
debug_log("TSCR: Instance Old Hillsbrad: Thrall event failed %u times. Resetting all sub-events.",mThrallEventCount);
|
||||
m_auiEncounter[2] = NOT_STARTED;
|
||||
|
||||
@@ -270,7 +270,7 @@ struct TRINITY_DLL_DECL boss_yaujAI : public ScriptedAI
|
||||
Unit *pKri = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_KRI));
|
||||
Unit *pVem = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_VEM));
|
||||
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
if (pKri)
|
||||
|
||||
@@ -325,7 +325,7 @@ struct TRINITY_DLL_DECL eye_of_cthunAI : public Scripted_NoMovementAI
|
||||
m_creature->CastSpell(m_creature, SPELL_DARK_GLARE, false);
|
||||
|
||||
//Increase tick
|
||||
DarkGlareTick++;
|
||||
++DarkGlareTick;
|
||||
|
||||
//1 second per tick
|
||||
DarkGlareTickTimer = 1000;
|
||||
@@ -628,7 +628,7 @@ struct TRINITY_DLL_DECL cthunAI : public ScriptedAI
|
||||
Spawned = me->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS1_X, TENTACLE_POS1_Y, TENTACLE_POS1_Z, TENTACLE_POS1_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
if (!Spawned)
|
||||
FleshTentaclesKilled++;
|
||||
++FleshTentaclesKilled;
|
||||
else
|
||||
CAST_AI(flesh_tentacleAI, (Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
||||
|
||||
@@ -636,7 +636,7 @@ struct TRINITY_DLL_DECL cthunAI : public ScriptedAI
|
||||
Spawned = me->SummonCreature(MOB_FLESH_TENTACLE, TENTACLE_POS2_X, TENTACLE_POS2_Y, TENTACLE_POS2_Z, TENTACLE_POS2_O, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
|
||||
if (!Spawned)
|
||||
FleshTentaclesKilled++;
|
||||
++FleshTentaclesKilled;
|
||||
else
|
||||
CAST_AI(flesh_tentacleAI, (Spawned->AI()))->SpawnedByCthun(m_creature->GetGUID());
|
||||
|
||||
@@ -821,7 +821,8 @@ struct TRINITY_DLL_DECL cthunAI : public ScriptedAI
|
||||
EyeTentacleTimer = 30000;
|
||||
} else EyeTentacleTimer -= diff;
|
||||
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
|
||||
//Weakened state
|
||||
case 4:
|
||||
@@ -905,7 +906,7 @@ struct TRINITY_DLL_DECL cthunAI : public ScriptedAI
|
||||
|
||||
void FleshTentcleKilled()
|
||||
{
|
||||
FleshTentaclesKilled++;
|
||||
++FleshTentaclesKilled;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ struct TRINITY_DLL_DECL boss_fankrissAI : public ScriptedAI
|
||||
//Summon 1-3 Spawns of Fankriss at random time.
|
||||
if (SpawnSpawns_Timer <= diff)
|
||||
{
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
SummonSpawn(SelectUnit(SELECT_TARGET_RANDOM,0));
|
||||
|
||||
@@ -144,7 +144,7 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
|
||||
if (Blink_Timer <= diff)
|
||||
{
|
||||
//DoCast(m_creature, SPELL_BLINK);
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
m_creature->GetMap()->CreatureRelocation(m_creature, -8340.782227,2083.814453,125.648788,0.0f);
|
||||
@@ -206,7 +206,7 @@ struct TRINITY_DLL_DECL boss_skeramAI : public ScriptedAI
|
||||
|
||||
ov_mycoordinates *bossc=place1, *i1=place2, *i2=place3;
|
||||
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0:
|
||||
bossc=place1;
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ struct TRINITY_DLL_DECL instance_temple_of_ahnqiraj : public ScriptedInstance
|
||||
break;
|
||||
|
||||
case DATA_BUG_TRIO_DEATH:
|
||||
BugTrioDeathCount++;
|
||||
++BugTrioDeathCount;
|
||||
break;
|
||||
|
||||
case DATA_VEKLOR_DEATH:
|
||||
|
||||
@@ -165,7 +165,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
case TYPE_NARALEX_PART1:
|
||||
if (eventProgress == 1)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
DoScriptText(SAY_TEMPLE_OF_PROMISE, m_creature);
|
||||
m_creature->SummonCreature(NPC_DEVIATE_RAVAGER, -82.1763, 227.874, -93.3233, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
m_creature->SummonCreature(NPC_DEVIATE_RAVAGER, -72.9506, 216.645, -93.6756, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 5000);
|
||||
@@ -174,7 +174,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
case TYPE_NARALEX_PART2:
|
||||
if (eventProgress == 1)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
DoScriptText(SAY_BANISH_THE_SPIRITS, m_creature);
|
||||
DoCast(m_creature, SPELL_SERPENTINE_CLEANSING);
|
||||
//CAST_AI(npc_escortAI, m_creature->AI())->SetCanDefend(false);
|
||||
@@ -196,7 +196,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
case TYPE_NARALEX_PART3:
|
||||
if (eventProgress == 1)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 4000;
|
||||
m_creature->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||
DoScriptText(SAY_EMERALD_DREAM, m_creature);
|
||||
@@ -204,7 +204,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 2)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 15000;
|
||||
//CAST_AI(npc_escortAI, m_creature->AI())->SetCanDefend(false);
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
@@ -214,7 +214,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 3)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 15000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
DoScriptText(EMOTE_TROUBLED_SLEEP, naralex);
|
||||
@@ -225,7 +225,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 4)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 30000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
DoScriptText(EMOTE_WRITHE_IN_AGONY, naralex);
|
||||
@@ -240,7 +240,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 5)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
DoScriptText(EMOTE_HORRENDOUS_VISION, naralex);
|
||||
m_creature->SummonCreature(NPC_MUTANUS_THE_DEVOURER, 150.872, 262.905, -103.503, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 300000);
|
||||
@@ -250,7 +250,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 6 && pInstance->GetData(TYPE_MUTANUS_THE_DEVOURER) == DONE)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 3000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
{
|
||||
@@ -275,7 +275,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 7)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 6000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
DoScriptText(SAY_THANK_YOU, naralex);
|
||||
@@ -283,7 +283,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 8)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 8000;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
{
|
||||
@@ -297,7 +297,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 9)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 1500;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
naralex->GetMotionMaster()->MovePoint(25, naralex->GetPositionX(), naralex->GetPositionY(), naralex->GetPositionZ());
|
||||
@@ -305,7 +305,7 @@ struct TRINITY_DLL_DECL npc_disciple_of_naralexAI : public npc_escortAI
|
||||
else
|
||||
if (eventProgress == 10)
|
||||
{
|
||||
eventProgress++;
|
||||
++eventProgress;
|
||||
eventTimer = 2500;
|
||||
if (Creature* naralex = pInstance->instance->GetCreature(pInstance->GetData64(DATA_NARALEX)))
|
||||
{
|
||||
|
||||
@@ -337,7 +337,7 @@ struct TRINITY_DLL_DECL npc_brann_hosAI : public npc_escortAI
|
||||
void JumpToNextStep(uint32 uiTimer)
|
||||
{
|
||||
uiPhaseTimer = uiTimer;
|
||||
uiStep++;
|
||||
++uiStep;
|
||||
}
|
||||
|
||||
void StartWP()
|
||||
|
||||
+1
-1
@@ -375,7 +375,7 @@ struct TRINITY_DLL_DECL mob_annhylde_the_callerAI : public ScriptedAI
|
||||
CAST_AI(boss_ingvar_the_plundererAI, (c_ingvar->AI()))->StartZombiePhase();
|
||||
|
||||
m_creature->GetMotionMaster()->MovePoint(2,x+1,y,z+30);
|
||||
Resurect_Phase++;
|
||||
++Resurect_Phase;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+17
-17
@@ -194,40 +194,40 @@ struct TRINITY_DLL_DECL boss_palehoofAI : public ScriptedAI
|
||||
|
||||
void NextPhase()
|
||||
{
|
||||
if(currentPhase==PHASE_NONE)
|
||||
if(currentPhase == PHASE_NONE)
|
||||
{
|
||||
pInstance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS);
|
||||
m_creature->SummonCreature(MOB_STASIS_CONTROLLER,moveLocs[5].x,moveLocs[5].y,moveLocs[5].z,0,TEMPSUMMON_CORPSE_DESPAWN);
|
||||
}
|
||||
Phase move = PHASE_NONE;
|
||||
if(AddCount>=(HeroicMode?4:2))
|
||||
{
|
||||
move=PHASE_GORTOK_PALEHOOF;
|
||||
}
|
||||
if (AddCount >= HEROIC(2,4))
|
||||
move = PHASE_GORTOK_PALEHOOF;
|
||||
else
|
||||
{
|
||||
//select random not yet defeated add
|
||||
uint8 next = rand()%4;
|
||||
for(int i=0;i<16;i++)
|
||||
uint8 next = urand(0,3);
|
||||
for(uint8 i=0; i < 16; i++)
|
||||
{
|
||||
if(!DoneAdds[i%4]&&next==0){
|
||||
move=(Phase)(i%4);
|
||||
if(!DoneAdds[i%4] && next == 0)
|
||||
{
|
||||
move = (Phase)(i%4);
|
||||
break;
|
||||
} else if(!DoneAdds[i%4]&&next>0)
|
||||
next--;
|
||||
} else if (!DoneAdds[i%4] && next > 0)
|
||||
--next;
|
||||
}
|
||||
AddCount++;
|
||||
DoneAdds[move]=true;
|
||||
move=(Phase)(move%4);
|
||||
++AddCount;
|
||||
DoneAdds[move] = true;
|
||||
move = (Phase)(move%4);
|
||||
}
|
||||
//send orb to summon spot
|
||||
Creature *pOrb = Unit::GetCreature((*m_creature), pInstance ? pInstance->GetData64(DATA_MOB_ORB) : 0);
|
||||
if (pOrb && pOrb->isAlive()){
|
||||
if(currentPhase==PHASE_NONE)
|
||||
if (pOrb && pOrb->isAlive())
|
||||
{
|
||||
if(currentPhase == PHASE_NONE)
|
||||
pOrb->CastSpell(m_creature,SPELL_ORB_VISUAL,true);
|
||||
pOrb->GetMotionMaster()->MovePoint(move,moveLocs[move].x,moveLocs[move].y,moveLocs[move].z);
|
||||
}
|
||||
currentPhase=move;
|
||||
currentPhase = move;
|
||||
}
|
||||
|
||||
void JustReachedHome()
|
||||
|
||||
@@ -220,7 +220,7 @@ struct TRINITY_DLL_DECL boss_skadiAI : public ScriptedAI
|
||||
for (uint8 i = 0; i < uiMaxSpawn; ++i)
|
||||
{
|
||||
Creature* pTemp;
|
||||
switch (rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0: pTemp = m_creature->SummonCreature(CREATURE_YMIRJAR_WARRIOR, SpawnLoc[spot].x+rand()%5, SpawnLoc[spot].y+rand()%5, SpawnLoc[spot].z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break;
|
||||
case 1: pTemp = m_creature->SummonCreature(CREATURE_YMIRJAR_WITCH_DOCTOR, SpawnLoc[spot].x+rand()%5, SpawnLoc[spot].y+rand()%5, SpawnLoc[spot].z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000); break;
|
||||
|
||||
@@ -640,7 +640,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
default:
|
||||
break;
|
||||
}
|
||||
FlightCount++;
|
||||
++FlightCount;
|
||||
}
|
||||
|
||||
void HandleTransformSequence()
|
||||
@@ -688,7 +688,7 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
}
|
||||
if (Phase == PHASE_TRANSFORM_SEQUENCE)
|
||||
Timer[EVENT_TRANSFORM_SEQUENCE] = DemonTransformation[TransformCount].timer;
|
||||
TransformCount++;
|
||||
++TransformCount;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
@@ -785,7 +785,8 @@ struct TRINITY_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 200, true))
|
||||
m_creature->CastSpell(pTarget, SPELL_PARASITIC_SHADOWFIEND, true);
|
||||
Timer[EVENT_PARASITIC_SHADOWFIEND] = 35000 + rand()%10000;
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
|
||||
case EVENT_PARASITE_CHECK:
|
||||
Timer[EVENT_PARASITE_CHECK] = 0;
|
||||
@@ -1156,7 +1157,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
CAST_AI(boss_illidan_stormrageAI, Illidan->AI())->DeleteFromThreatList(m_creature->GetGUID());
|
||||
EnterEvadeMode();
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
WalkCount++;
|
||||
++WalkCount;
|
||||
}
|
||||
JustCreated = false;
|
||||
BeginWalk();
|
||||
@@ -1222,7 +1223,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
EnterPhase(PHASE_WALK);
|
||||
break;
|
||||
}
|
||||
TalkCount++;
|
||||
++TalkCount;
|
||||
}
|
||||
|
||||
void HandleChannelSequence()
|
||||
@@ -1280,7 +1281,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ChannelCount++;
|
||||
++ChannelCount;
|
||||
}
|
||||
|
||||
void HandleWalkSequence()
|
||||
@@ -1306,7 +1307,7 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
if (Phase == PHASE_WALK)
|
||||
{
|
||||
Timer = 0;
|
||||
WalkCount++;
|
||||
++WalkCount;
|
||||
m_creature->GetMotionMaster()->MovePoint(WalkCount, AkamaWP[WalkCount].x, AkamaWP[WalkCount].y, AkamaWP[WalkCount].z);
|
||||
}
|
||||
}
|
||||
@@ -1359,7 +1360,8 @@ struct TRINITY_DLL_DECL npc_akama_illidanAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(), SPELL_CHAIN_LIGHTNING);
|
||||
Timer = 30000;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case PHASE_FIGHT_MINIONS:
|
||||
{
|
||||
float x, y, z;
|
||||
@@ -1551,7 +1553,8 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
|
||||
Timer[EVENT_MAIEV_STEALTH] = 0;
|
||||
BlinkToPlayer();
|
||||
EnterPhase(Phase);
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case EVENT_MAIEV_TAUNT:
|
||||
{
|
||||
uint32 random = rand()%4;
|
||||
@@ -1560,7 +1563,8 @@ struct TRINITY_DLL_DECL boss_maievAI : public ScriptedAI
|
||||
m_creature->MonsterYell(text, LANG_UNIVERSAL, 0);
|
||||
DoPlaySoundToSet(m_creature, sound);
|
||||
Timer[EVENT_MAIEV_TAUNT] = 22000 + rand()%21 * 1000;
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case EVENT_MAIEV_SHADOW_STRIKE:
|
||||
DoCast(m_creature->getVictim(), SPELL_SHADOW_STRIKE);
|
||||
Timer[EVENT_MAIEV_SHADOW_STRIKE] = 60000;
|
||||
@@ -1880,13 +1884,15 @@ void boss_illidan_stormrageAI::JustSummoned(Creature* summon)
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true);
|
||||
if (pTarget)
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case SHADOW_DEMON:
|
||||
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 999, true)) // only on players.
|
||||
{
|
||||
summon->AddThreat(pTarget, 5000000.0f);
|
||||
summon->AI()->AttackStart(pTarget);
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case MAIEV_SHADOWSONG:
|
||||
{
|
||||
summon->SetVisibility(VISIBILITY_OFF); // Leave her invisible until she has to talk
|
||||
@@ -1894,11 +1900,13 @@ void boss_illidan_stormrageAI::JustSummoned(Creature* summon)
|
||||
MaievGUID = summon->GetGUID();
|
||||
CAST_AI(boss_maievAI, summon->AI())->GetIllidanGUID(m_creature->GetGUID());
|
||||
summon->AI()->DoAction(PHASE_TALK_SEQUENCE);
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case FLAME_OF_AZZINOTH:
|
||||
{
|
||||
summon->AI()->AttackStart(summon->SelectNearestTarget(999));
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1938,7 +1946,8 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
|
||||
m_creature->SetInFront(Maiev); // Face her, so it's not rude =P
|
||||
Maiev->GetMotionMaster()->MoveIdle();
|
||||
m_creature->GetMotionMaster()->MoveIdle();
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case 14:
|
||||
if (GETCRE(Maiev, MaievGUID))
|
||||
{
|
||||
@@ -1947,7 +1956,8 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
|
||||
Maiev->AddThreat(m_creature, 10000000.0f); // Have Maiev add a lot of threat on us so that players don't pull her off if they damage her via AOE
|
||||
Maiev->AI()->AttackStart(m_creature); // Force Maiev to attack us.
|
||||
EnterPhase(PHASE_NORMAL_MAIEV);
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
DoCast(m_creature, SPELL_DEATH); // Animate his kneeling + stun him
|
||||
Summons.DespawnAll();
|
||||
@@ -1984,7 +1994,7 @@ void boss_illidan_stormrageAI::HandleTalkSequence()
|
||||
}
|
||||
if (Phase == PHASE_TALK_SEQUENCE)
|
||||
Talk(TalkCount); // This function does most of the talking
|
||||
TalkCount++;
|
||||
++TalkCount;
|
||||
}
|
||||
|
||||
void boss_illidan_stormrageAI::CastEyeBlast()
|
||||
|
||||
@@ -199,7 +199,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
DoCast(pTarget, SPELL_BEAM_SINFUL);
|
||||
break;
|
||||
}
|
||||
BeamCount++;
|
||||
++BeamCount;
|
||||
uint32 Beam = CurrentBeam;
|
||||
if (BeamCount > 3)
|
||||
while(CurrentBeam == Beam)
|
||||
@@ -245,7 +245,7 @@ struct TRINITY_DLL_DECL boss_shahrazAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
ExplosionCount++;
|
||||
++ExplosionCount;
|
||||
FatalAttractionExplodeTimer = 1000;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -311,22 +311,23 @@ struct TRINITY_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI
|
||||
if (SoulCount < NUMBER_ENSLAVED_SOUL)
|
||||
{
|
||||
if (SummonSoul())
|
||||
SoulCount++;
|
||||
++SoulCount;
|
||||
Timer = 500;
|
||||
return;
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (SoulDeathCount >= SoulCount)
|
||||
{
|
||||
Counter = 1;
|
||||
Phase++;
|
||||
++Phase;
|
||||
Timer = 5000;
|
||||
}
|
||||
return;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
Counter++;
|
||||
++Counter;
|
||||
} else Timer -= diff;
|
||||
}
|
||||
};
|
||||
@@ -627,11 +628,9 @@ struct TRINITY_DLL_DECL boss_essence_of_angerAI : public ScriptedAI
|
||||
void npc_enslaved_soulAI::JustDied(Unit *killer)
|
||||
{
|
||||
if (ReliquaryGUID)
|
||||
{
|
||||
Creature* Reliquary = (Unit::GetCreature((*m_creature), ReliquaryGUID));
|
||||
if (Reliquary)
|
||||
CAST_AI(boss_reliquary_of_soulsAI, Reliquary->AI())->SoulDeathCount++;
|
||||
}
|
||||
if (Creature *Reliquary = (Unit::GetCreature((*m_creature), ReliquaryGUID)))
|
||||
++(CAST_AI(boss_reliquary_of_soulsAI, Reliquary->AI())->SoulDeathCount);
|
||||
|
||||
DoCast(m_creature, SPELL_SOUL_RELEASE, true);
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -228,7 +228,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
{
|
||||
uint32 mark_spell;
|
||||
|
||||
switch(MarkOfCorruption_Count)
|
||||
switch (MarkOfCorruption_Count)
|
||||
{
|
||||
case 0: mark_spell = SPELL_MARK_OF_CORRUPTION1; break;
|
||||
case 1: mark_spell = SPELL_MARK_OF_CORRUPTION2; break;
|
||||
@@ -241,7 +241,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(), mark_spell);
|
||||
|
||||
if (MarkOfCorruption_Count < 5)
|
||||
MarkOfCorruption_Count++;
|
||||
++MarkOfCorruption_Count;
|
||||
}
|
||||
|
||||
MarkOfCorruption_Timer = 15000;
|
||||
@@ -308,7 +308,7 @@ struct TRINITY_DLL_DECL boss_hydross_the_unstableAI : public ScriptedAI
|
||||
DoCast(m_creature->getVictim(), mark_spell);
|
||||
|
||||
if (MarkOfHydross_Count < 5)
|
||||
MarkOfHydross_Count++;
|
||||
++MarkOfHydross_Count;
|
||||
}
|
||||
|
||||
MarkOfHydross_Timer = 15000;
|
||||
|
||||
+1
-1
@@ -486,7 +486,7 @@ struct TRINITY_DLL_DECL boss_lady_vashjAI : public ScriptedAI
|
||||
if (EnchantedElemental_Pos == 7)
|
||||
EnchantedElemental_Pos = 0;
|
||||
else
|
||||
EnchantedElemental_Pos++;
|
||||
++EnchantedElemental_Pos;
|
||||
|
||||
EnchantedElemental_Timer = 10000+rand()%5000;
|
||||
} else EnchantedElemental_Timer -= diff;
|
||||
|
||||
+8
-7
@@ -173,7 +173,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
||||
float x,y,z;
|
||||
|
||||
uint64 InnderDemon[5];
|
||||
uint32 InnderDemon_Count;
|
||||
uint32 InnerDemon_Count;
|
||||
uint64 Demon;
|
||||
uint64 SpellBinderGUID[3];
|
||||
|
||||
@@ -193,7 +193,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
||||
IsFinalForm = false;
|
||||
NeedThreatReset = false;
|
||||
EnrageUsed = false;
|
||||
InnderDemon_Count = 0;
|
||||
InnerDemon_Count = 0;
|
||||
m_creature->SetSpeed(MOVE_RUN, 2.0f, true);
|
||||
m_creature->SetDisplayId(MODEL_NIGHTELF);
|
||||
m_creature->SetUInt32Value(UNIT_VIRTUAL_ITEM_SLOT_ID , 0);
|
||||
@@ -259,7 +259,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
||||
{
|
||||
Unit *add = Unit::GetUnit(*m_creature,SpellBinderGUID[i]);
|
||||
if (add && add->isAlive())
|
||||
AliveChannelers++;
|
||||
++AliveChannelers;
|
||||
}
|
||||
|
||||
// channelers == 0 remove banish aura
|
||||
@@ -319,7 +319,7 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
|
||||
InnderDemon_Count = 0;
|
||||
InnerDemon_Count = 0;
|
||||
}
|
||||
|
||||
void CastConsumingMadness() //remove this once SPELL_INSIDIOUS_WHISPER is supported by core
|
||||
@@ -505,13 +505,14 @@ struct TRINITY_DLL_DECL boss_leotheras_the_blindAI : public ScriptedAI
|
||||
eff_mask|=1<<i;
|
||||
}
|
||||
(*itr)->AddAura(new Aura(spell, eff_mask, *itr, *itr, *itr));
|
||||
if (InnderDemon_Count > 4) InnderDemon_Count = 0;
|
||||
if (InnerDemon_Count > 4)
|
||||
InnerDemon_Count = 0;
|
||||
|
||||
//Safe storing of creatures
|
||||
InnderDemon[InnderDemon_Count] = demon->GetGUID();
|
||||
InnderDemon[InnerDemon_Count] = demon->GetGUID();
|
||||
|
||||
//Update demon count
|
||||
InnderDemon_Count++;
|
||||
++InnerDemon_Count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-8
@@ -227,14 +227,20 @@ struct TRINITY_DLL_DECL boss_morogrim_tidewalkerAI : public ScriptedAI
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
{
|
||||
counter = 0;
|
||||
do{pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
|
||||
if (counter < Playercount)
|
||||
break;
|
||||
if (pTarget) itr = list.find(pTarget->GetGUID());
|
||||
counter++;
|
||||
}while(itr != list.end());
|
||||
if (pTarget){list.insert(pTarget->GetGUID());
|
||||
ApplyWateryGrave(pTarget, i);
|
||||
do
|
||||
{
|
||||
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 50, true); //target players only
|
||||
if (counter < Playercount)
|
||||
break;
|
||||
if (pTarget)
|
||||
itr = list.find(pTarget->GetGUID());
|
||||
++counter;
|
||||
} while(itr != list.end());
|
||||
|
||||
if (pTarget)
|
||||
{
|
||||
list.insert(pTarget->GetGUID());
|
||||
ApplyWateryGrave(pTarget, i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -238,7 +238,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
/*case TRASHMOB_COILFANG_PRIESTESS:
|
||||
case TRASHMOB_COILFANG_SHATTERER:
|
||||
if(pCreature->isAlive())
|
||||
TrashCount++;
|
||||
++TrashCount;
|
||||
break;*/
|
||||
}
|
||||
}
|
||||
@@ -290,7 +290,7 @@ struct TRINITY_DLL_DECL instance_serpentshrine_cavern : public ScriptedInstance
|
||||
case DATA_TRASH :
|
||||
{
|
||||
if(data == 1 && TrashCount < MIN_KILLS)
|
||||
TrashCount++;//+1 died
|
||||
++TrashCount;//+1 died
|
||||
SaveToDB();
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -264,7 +264,7 @@ struct TRINITY_DLL_DECL boss_magtheridonAI : public ScriptedAI
|
||||
{
|
||||
DebuffClicker(clicker);
|
||||
(*i).second = 0;
|
||||
} else ClickerNum++;
|
||||
} else ++ClickerNum;
|
||||
}
|
||||
|
||||
// if 5 clickers from other cubes apply shadow cage
|
||||
|
||||
+6
-3
@@ -147,7 +147,8 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
|
||||
}
|
||||
CageTimer = 0;
|
||||
HandleGameObject(DoorGUID, true);
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case IN_PROGRESS: // Event start.
|
||||
if (m_auiEncounter[1] != IN_PROGRESS)
|
||||
{
|
||||
@@ -167,7 +168,8 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
|
||||
CageTimer = 120000;
|
||||
}
|
||||
HandleGameObject(DoorGUID, false);
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case DONE: // Add buff and check if all channelers are dead.
|
||||
for (std::set<uint64>::iterator i = ChannelerGUID.begin(); i != ChannelerGUID.end(); ++i)
|
||||
{
|
||||
@@ -178,7 +180,8 @@ struct TRINITY_DLL_DECL instance_magtheridons_lair : public ScriptedInstance
|
||||
data = IN_PROGRESS;
|
||||
break;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
m_auiEncounter[1] = data;
|
||||
break;
|
||||
|
||||
+4
-3
@@ -247,15 +247,16 @@ struct TRINITY_DLL_DECL boss_warchief_kargath_bladefistAI : public ScriptedAI
|
||||
|
||||
for (uint8 i = 0; i < summoned; ++i)
|
||||
{
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0: m_creature->SummonCreature(MOB_HEARTHEN_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
|
||||
case 1: m_creature->SummonCreature(MOB_SHARPSHOOTER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
|
||||
case 2: m_creature->SummonCreature(MOB_REAVER_GUARD,AddsEntrance[0],AddsEntrance[1], AddsEntrance[2], 0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,30000); break;
|
||||
}
|
||||
}
|
||||
if (rand()%100 < 20) summoned++;
|
||||
Summon_Assistant_Timer = 25000 + (rand()%10000) ;
|
||||
if (urand(0,9) < 2)
|
||||
++summoned;
|
||||
Summon_Assistant_Timer = urand(25000,35000);
|
||||
} else Summon_Assistant_Timer -= diff;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
@@ -759,7 +759,8 @@ struct TRINITY_DLL_DECL npc_overlord_morghorAI : public ScriptedAI
|
||||
return 5000;
|
||||
}else{
|
||||
CAST_PLR(plr)->FailQuest(QUEST_LORD_ILLIDAN_STORMRAGE); Step = 30; return 100;
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case 17: DoScriptText(LORD_ILLIDAN_SAY_5, Illi); return 5000; break;
|
||||
case 18: DoScriptText(LORD_ILLIDAN_SAY_6, Illi); return 5000; break;
|
||||
case 19: DoScriptText(LORD_ILLIDAN_SAY_7, Illi); return 5000; break;
|
||||
@@ -784,7 +785,8 @@ struct TRINITY_DLL_DECL npc_overlord_morghorAI : public ScriptedAI
|
||||
Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
|
||||
if (Yarzill)
|
||||
Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, PlayerGUID);
|
||||
return 500; }break;
|
||||
return 500; }
|
||||
break;
|
||||
case 28:
|
||||
plr->RemoveAurasDueToSpell(SPELL_TWO);
|
||||
plr->RemoveAurasDueToSpell(41519);
|
||||
@@ -796,19 +798,22 @@ struct TRINITY_DLL_DECL npc_overlord_morghorAI : public ScriptedAI
|
||||
Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
|
||||
if (Yarzill)
|
||||
DoScriptText(YARZILL_THE_MERC_SAY, Yarzill, plr);
|
||||
return 5000; }break;
|
||||
return 5000; }
|
||||
break;
|
||||
case 30:
|
||||
{
|
||||
Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
|
||||
if (Yarzill)
|
||||
Yarzill->SetUInt64Value(UNIT_FIELD_TARGET, 0);
|
||||
return 5000; }break;
|
||||
return 5000; }
|
||||
break;
|
||||
case 31:
|
||||
{
|
||||
Unit* Yarzill = me->FindNearestCreature(C_YARZILL, 50);
|
||||
if (Yarzill)
|
||||
Yarzill->CastSpell(plr, 41540, true);
|
||||
return 1000;}break;
|
||||
return 1000;}
|
||||
break;
|
||||
case 32: m_creature->GetMotionMaster()->MovePoint(0, -5085.77, 577.231, 86.6719); return 5000; break;
|
||||
case 33: Reset(); return 100; break;
|
||||
|
||||
|
||||
@@ -324,13 +324,13 @@ struct TRINITY_DLL_DECL boss_alarAI : public ScriptedAI
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rand()%5) // next platform
|
||||
if (urand(0,4)) // next platform
|
||||
{
|
||||
DoSpawnCreature(CREATURE_EMBER_OF_ALAR, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
if (cur_wp == 3)
|
||||
cur_wp = 0;
|
||||
else
|
||||
cur_wp++;
|
||||
++cur_wp;
|
||||
WaitEvent = WE_PLATFORM;
|
||||
}
|
||||
else // flame quill
|
||||
|
||||
@@ -624,7 +624,8 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
||||
}
|
||||
break;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
{
|
||||
@@ -661,24 +662,25 @@ struct TRINITY_DLL_DECL boss_kaelthasAI : public ScriptedAI
|
||||
PhaseSubphase = 0;
|
||||
} else Phase_Timer -= diff;
|
||||
}
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
{
|
||||
if (PhaseSubphase == 0)
|
||||
{
|
||||
//Respawn advisors
|
||||
Unit* Target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
Creature* Advisor;
|
||||
for (uint32 i = 0; i < MAX_ADVISORS; ++i)
|
||||
Creature *Advisor;
|
||||
for (uint8 i = 0; i < MAX_ADVISORS; ++i)
|
||||
{
|
||||
Advisor = (Unit::GetCreature((*m_creature), m_auiAdvisorGuid[i]));
|
||||
Advisor = Unit::GetCreature((*m_creature), m_auiAdvisorGuid[i]);
|
||||
|
||||
if (!Advisor)
|
||||
error_log("SD2: Kael'Thas Advisor %u does not exist. Possibly despawned? Incorrectly Killed?", i);
|
||||
else
|
||||
CAST_AI(advisorbase_ai, Advisor->AI())->Revive(Target);
|
||||
CAST_AI(advisorbase_ai, Advisor->AI())->Revive(pTarget);
|
||||
}
|
||||
|
||||
PhaseSubphase = 1;
|
||||
|
||||
@@ -425,7 +425,8 @@ struct TRINITY_DLL_DECL npc_isla_starmaneAI : public npc_escortAI
|
||||
GameObject* Cage = me->FindNearestGameObject(GO_CAGE, 10);
|
||||
if (Cage)
|
||||
Cage->SetGoState(GO_STATE_ACTIVE);
|
||||
}break;
|
||||
}
|
||||
break;
|
||||
case 2: DoScriptText(SAY_PROGRESS_1, m_creature, pPlayer); break;
|
||||
case 5: DoScriptText(SAY_PROGRESS_2, m_creature, pPlayer); break;
|
||||
case 6: DoScriptText(SAY_PROGRESS_3, m_creature, pPlayer); break;
|
||||
|
||||
@@ -770,7 +770,7 @@ void npc_doctorAI::UpdateAI(const uint32 diff)
|
||||
Coordinates.erase(itr);
|
||||
}
|
||||
SummonPatient_Timer = 10000;
|
||||
SummonPatientCount++;
|
||||
++SummonPatientCount;
|
||||
} else SummonPatient_Timer -= diff;
|
||||
}
|
||||
}
|
||||
@@ -1442,11 +1442,11 @@ bool ReceiveEmote_npc_winter_reveler(Player* pPlayer, Creature* pCreature, uint3
|
||||
{
|
||||
pCreature->CastSpell(pCreature, 26218, false);
|
||||
pPlayer->CastSpell(pPlayer, 26218, false);
|
||||
switch(rand()%3)
|
||||
switch (urand(0,2))
|
||||
{
|
||||
case 0: pCreature->CastSpell(pPlayer, 26207, false); break;
|
||||
case 1: pCreature->CastSpell(pPlayer, 26206, false); break;
|
||||
case 2: pCreature->CastSpell(pPlayer, 45036, false); break;
|
||||
case 0: pCreature->CastSpell(pPlayer, 26207, false); break;
|
||||
case 1: pCreature->CastSpell(pPlayer, 26206, false); break;
|
||||
case 2: pCreature->CastSpell(pPlayer, 45036, false); break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user