aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp534
-rw-r--r--src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp77
-rw-r--r--src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp21
-rw-r--r--src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp19
4 files changed, 322 insertions, 329 deletions
diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp
index c3224fdc0b6..8176a7b7353 100644
--- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp
+++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_priestess_delrissa.cpp
@@ -16,7 +16,7 @@
/* ScriptData
SDName: Boss_Priestess_Delrissa
-SD%Complete: 45
+SD%Complete: 65
SDComment: No Heroic support yet. Needs further testing. Several scripts for pets disabled, not seem to require any special script.
SDCategory: Magister's Terrace
EndScriptData */
@@ -101,7 +101,6 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
std::vector<uint32> LackeyEntryList;
uint64 m_auiLackeyGUID[MAX_ACTIVE_LACKEY];
- uint8 LackeysKilled;
uint8 PlayersKilled;
uint32 HealTimer;
@@ -113,7 +112,6 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
void Reset()
{
- LackeysKilled = 0;
PlayersKilled = 0;
HealTimer = 15000;
@@ -124,12 +122,13 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
ResetTimer = 5000;
InitializeLackeys();
+ }
+ //this mean she at some point evaded
+ void JustReachedHome()
+ {
if (pInstance)
- {
- pInstance->SetData(DATA_DELRISSA_EVENT, NOT_STARTED);
- pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 0);
- } else error_log(ERROR_INST_DATA);
+ pInstance->SetData(DATA_DELRISSA_EVENT, FAIL);
}
void EnterCombat(Unit* who)
@@ -147,10 +146,17 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
}
}
}
+
+ if (pInstance)
+ pInstance->SetData(DATA_DELRISSA_EVENT, IN_PROGRESS);
}
void InitializeLackeys()
{
+ //can be called if creature are dead, so avoid
+ if (!m_creature->isAlive())
+ return;
+
uint8 j = 0;
//it's empty, so first time
@@ -204,38 +210,20 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
++PlayersKilled;
}
- void KilledLackey()
- {
- DoScriptText(LackeyDeath[LackeysKilled].id, m_creature);
-
- if (LackeysKilled < 3)
- ++LackeysKilled;
- }
-
void JustDied(Unit* killer)
{
DoScriptText(SAY_DEATH, m_creature);
- CheckLootable();
-
if (!pInstance)
- {
- error_log(ERROR_INST_DATA);
return;
- }
-
- pInstance->SetData(DATA_DELRISSA_EVENT, DONE);
-
- if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_DELRISSA_DOOR)))
- Door->SetGoState(GO_STATE_ACTIVE);
- }
- void CheckLootable()
- {
- if (LackeysKilled > 3)
- m_creature->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ if (pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) == MAX_ACTIVE_LACKEY)
+ pInstance->SetData(DATA_DELRISSA_EVENT, DONE);
else
- m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ {
+ if (m_creature->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE))
+ m_creature->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ }
}
void UpdateAI(const uint32 diff)
@@ -346,11 +334,20 @@ struct TRINITY_DLL_DECL boss_priestess_delrissaAI : public ScriptedAI
}
};
-#define SPELL_HEALING_POTION 15503
+CreatureAI* GetAI_boss_priestess_delrissa(Creature* pCreature)
+{
+ return new boss_priestess_delrissaAI(pCreature);
+}
+
+enum
+{
+ SPELL_HEALING_POTION = 15503
+};
-struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
+//all 8 possible lackey use this common
+struct TRINITY_DLL_DECL boss_priestess_lackey_commonAI : public ScriptedAI
{
- boss_priestess_guestAI(Creature* c) : ScriptedAI(c)
+ boss_priestess_lackey_commonAI(Creature* c) : ScriptedAI(c)
{
pInstance = c->GetInstanceData();
memset(&m_auiLackeyGUIDs, 0, sizeof(m_auiLackeyGUIDs));
@@ -367,37 +364,87 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
void Reset()
{
UsedPotion = false;
- ResetThreatTimer = 5000 + rand()%15000; // These guys like to switch targets often, and are not meant to be tanked.
+
+ // These guys does not follow normal threat system rules
+ // For later development, some alternative threat system should be made
+ // We do not know what this system is based upon, but one theory is class (healers=high threat, dps=medium, etc)
+ // We reset their threat frequently as an alternative until such a system exist
+ ResetThreatTimer = 5000 + rand()%15000;
+
+ // in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her)
+ if (Creature* pDelrissa = (Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA)))
+ {
+ if (!pDelrissa->isAlive())
+ pDelrissa->Respawn();
+ }
}
- void EnterCombat(Unit* who) {}
+ void EnterCombat(Unit* pWho)
+ {
+ if (!pWho)
+ return;
+
+ if (pInstance)
+ {
+ for(uint8 i = 0; i < MAX_ACTIVE_LACKEY; ++i)
+ {
+ if (Unit* pAdd = Unit::GetUnit(*m_creature, m_auiLackeyGUIDs[i]))
+ {
+ if (!pAdd->getVictim() && pAdd != m_creature)
+ {
+ pWho->SetInCombatWith(pAdd);
+ pAdd->AddThreat(pWho, 0.0f);
+ }
+ }
+ }
+
+ if (Creature* pDelrissa = (Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA)))
+ {
+ if (pDelrissa->isAlive() && !pDelrissa->getVictim())
+ {
+ pWho->SetInCombatWith(pDelrissa);
+ pDelrissa->AddThreat(pWho, 0.0f);
+ }
+ }
+ }
+ }
void JustDied(Unit* killer)
{
if (!pInstance)
- {
- error_log(ERROR_INST_DATA);
return;
- }
- if (Creature* Delrissa = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_DELRISSA))))
- {
- pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, 1);
+ Creature* pDelrissa = (Creature*)Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_DELRISSA));
+ uint32 uiLackeyDeathCount = pInstance->GetData(DATA_DELRISSA_DEATH_COUNT);
+
+ if (!pDelrissa)
+ return;
+
+ //should delrissa really yell if dead?
+ DoScriptText(LackeyDeath[uiLackeyDeathCount].id, pDelrissa);
+
+ pInstance->SetData(DATA_DELRISSA_DEATH_COUNT, SPECIAL);
- CAST_AI(boss_priestess_delrissaAI, Delrissa->AI())->KilledLackey();
+ //increase local var, since we now may have four dead
+ ++uiLackeyDeathCount;
+
+ if (uiLackeyDeathCount == MAX_ACTIVE_LACKEY)
+ {
+ //time to make her lootable and complete event if she died before lackeys
+ if (!pDelrissa->isAlive())
+ {
+ if (!pDelrissa->HasFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE))
+ pDelrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
- if (!Delrissa->isAlive() && pInstance->GetData(DATA_DELRISSA_DEATH_COUNT) > 3)
- Delrissa->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
+ pInstance->SetData(DATA_DELRISSA_EVENT, DONE);
+ }
}
}
void KilledUnit(Unit* victim)
{
if (!pInstance)
- {
- error_log(ERROR_INST_DATA);
return;
- }
if (Creature* Delrissa = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_DELRISSA))))
Delrissa->AI()->KilledUnit(victim);
@@ -406,10 +453,7 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
void AcquireGUIDs()
{
if (!pInstance)
- {
- error_log(ERROR_INST_DATA);
return;
- }
if (Creature* Delrissa = (Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_DELRISSA))))
{
@@ -420,9 +464,9 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) && !UsedPotion)
+ if (!UsedPotion && ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25))
{
- DoCast(m_creature, SPELL_HEALING_POTION, true);
+ DoCast(m_creature, SPELL_HEALING_POTION);
UsedPotion = true;
}
@@ -434,17 +478,20 @@ struct TRINITY_DLL_DECL boss_priestess_guestAI : public ScriptedAI
}
};
-#define SPELL_KIDNEY_SHOT 27615
-#define SPELL_GOUGE 12540
-#define SPELL_KICK 27613
-#define SPELL_VANISH 44290
-#define SPELL_BACKSTAB 15657
-#define SPELL_EVISCERATE 27611
+enum
+{
+ SPELL_KIDNEY_SHOT = 27615,
+ SPELL_GOUGE = 12540,
+ SPELL_KICK = 27613,
+ SPELL_VANISH = 44290,
+ SPELL_BACKSTAB = 15657,
+ SPELL_EVISCERATE = 27611
+};
-struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_guestAI
+struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_lackey_commonAI
{
//Rogue
- boss_kagani_nightstrikeAI(Creature *c) : boss_priestess_guestAI(c) {}
+ boss_kagani_nightstrikeAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
uint32 Gouge_Timer;
uint32 Kick_Timer;
@@ -463,7 +510,7 @@ struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_guestA
InVanish = false;
m_creature->SetVisibility(VISIBILITY_ON);
- boss_priestess_guestAI::Reset();
+ boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(const uint32 diff)
@@ -471,7 +518,7 @@ struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_guestA
if (!UpdateVictim())
return;
- boss_priestess_guestAI::UpdateAI(diff);
+ boss_priestess_lackey_commonAI::UpdateAI(diff);
if (Vanish_Timer < diff)
{
@@ -523,50 +570,26 @@ struct TRINITY_DLL_DECL boss_kagani_nightstrikeAI : public boss_priestess_guestA
}
};
-#define SPELL_IMMOLATE 44267
-#define SPELL_SHADOW_BOLT 12471
-#define SPELL_SEED_OF_CORRUPTION 44141
-#define SPELL_CURSE_OF_AGONY 14875
-#define SPELL_FEAR 38595
-#define SPELL_IMP_FIREBALL 44164
-#define SPELL_SUMMON_IMP 44163
-
-//#define CREATURE_IMP 44163
-//#define CREATURE_FIZZLE 24656
-
-/*struct TRINITY_DLL_DECL mob_fizzleAI : public ScriptedAI
+CreatureAI* GetAI_boss_kagani_nightstrike(Creature* pCreature)
{
- mob_fizzleAI(Creature *c) : ScriptedAI(c) {}
-
- uint64 EllrisGUID;
- uint32 Firebal_Timer;
-
- void Reset() { EllrisGUID = 0; }
-
- void KilledUnit(Unit* victim);
- void JustDied(Unit* killer);
-
- void EnterCombat(Unit* who){}
-
- void UpdateAI(const uint32 diff)
- {
- //Return since we have no target
- if (!UpdateVictim())
- return;
+ return new boss_kagani_nightstrikeAI(pCreature);
+}
- //Chain cast
- if (!m_creature->IsNonMeleeSpellCasted(false))
- DoCast(m_creature->getVictim(),SPELL_IMP_FIREBALL);
- else DoMeleeAttackIfReady();
- }
-};*/
+enum
+{
+ SPELL_IMMOLATE = 44267,
+ SPELL_SHADOW_BOLT = 12471,
+ SPELL_SEED_OF_CORRUPTION = 44141,
+ SPELL_CURSE_OF_AGONY = 14875,
+ SPELL_FEAR = 38595,
+ SPELL_IMP_FIREBALL = 44164,
+ SPELL_SUMMON_IMP = 44163
+};
-struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_guestAI
+struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_lackey_commonAI
{
//Warlock
- boss_ellris_duskhallowAI(Creature *c) : boss_priestess_guestAI(c) {}
-
- bool HasSummonedImp;
+ boss_ellris_duskhallowAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
uint32 Immolate_Timer;
uint32 Shadow_Bolt_Timer;
@@ -576,35 +599,26 @@ struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_guestAI
void Reset()
{
- HasSummonedImp = false;
-
Immolate_Timer = 6000;
Shadow_Bolt_Timer = 3000;
Seed_of_Corruption_Timer = 2000;
Curse_of_Agony_Timer = 1000;
Fear_Timer = 10000;
- boss_priestess_guestAI::Reset();
+ boss_priestess_lackey_commonAI::Reset();
}
- void JustDied(Unit* killer)
+ void Aggro(Unit* pWho)
{
- boss_priestess_guestAI::JustDied(killer);
+ DoCast(m_creature,SPELL_SUMMON_IMP);
}
-
+
void UpdateAI(const uint32 diff)
{
- if (!HasSummonedImp)
- {
- //Imp will not despawn unless it's killed, even if owner dies, this is correct way.
- DoCast(m_creature,SPELL_SUMMON_IMP);
- HasSummonedImp = true;
- }
-
if (!UpdateVictim())
return;
- boss_priestess_guestAI::UpdateAI(diff);
+ boss_priestess_lackey_commonAI::UpdateAI(diff);
if (Immolate_Timer < diff)
{
@@ -646,25 +660,21 @@ struct TRINITY_DLL_DECL boss_ellris_duskhallowAI : public boss_priestess_guestAI
}
};
-/*void mob_fizzleAI::JustDied(Unit* killer)
+CreatureAI* GetAI_ellris_duskhallow(Creature* pCreature)
{
- if(Creature* Ellris = (Unit::GetCreature(*m_creature, EllrisGUID)))
- CAST_AI(boss_ellris_duskhallowAI, Ellris->AI())->ImpGUID = 0;
+ return new boss_ellris_duskhallowAI(pCreature);
}
-void mob_fizzleAI::KilledUnit(Unit* victim)
+enum
{
- if(Creature* Ellris = (Unit::GetCreature(*m_creature, EllrisGUID)))
- CAST_AI(boss_ellris_duskhallowAI, Ellris->AI())->KilledUnit(victim);
-}*/
-
-#define SPELL_KNOCKDOWN 11428
-#define SPELL_SNAP_KICK 46182
+ SPELL_KNOCKDOWN = 11428,
+ SPELL_SNAP_KICK = 46182
+};
-struct TRINITY_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_guestAI
+struct TRINITY_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_lackey_commonAI
{
//Monk
- boss_eramas_brightblazeAI(Creature *c) : boss_priestess_guestAI(c) {}
+ boss_eramas_brightblazeAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
uint32 Knockdown_Timer;
uint32 Snap_Kick_Timer;
@@ -674,7 +684,7 @@ struct TRINITY_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_guestA
Knockdown_Timer = 6000;
Snap_Kick_Timer = 4500;
- boss_priestess_guestAI::Reset();
+ boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(const uint32 diff)
@@ -682,7 +692,7 @@ struct TRINITY_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_guestA
if (!UpdateVictim())
return;
- boss_priestess_guestAI::UpdateAI(diff);
+ boss_priestess_lackey_commonAI::UpdateAI(diff);
if (Knockdown_Timer < diff)
{
@@ -700,18 +710,26 @@ struct TRINITY_DLL_DECL boss_eramas_brightblazeAI : public boss_priestess_guestA
}
};
-#define SPELL_POLYMORPH 13323
-#define SPELL_ICE_BLOCK 27619
-#define SPELL_BLIZZARD 44178
-#define SPELL_ICE_LANCE 46194
-#define SPELL_CONE_OF_COLD 38384
-#define SPELL_FROSTBOLT 15043
-#define SPELL_BLINK 14514
+CreatureAI* GetAI_eramas_brightblaze(Creature* pCreature)
+{
+ return new boss_eramas_brightblazeAI(pCreature);
+}
+
+enum
+{
+ SPELL_POLYMORPH = 13323,
+ SPELL_ICE_BLOCK = 27619,
+ SPELL_BLIZZARD = 44178,
+ SPELL_ICE_LANCE = 46194,
+ SPELL_CONE_OF_COLD = 38384,
+ SPELL_FROSTBOLT = 15043,
+ SPELL_BLINK = 14514
+};
-struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_guestAI
+struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_lackey_commonAI
{
//Mage
- boss_yazzaiAI(Creature *c) : boss_priestess_guestAI(c) {}
+ boss_yazzaiAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
bool HasIceBlocked;
@@ -737,7 +755,7 @@ struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_guestAI
Frostbolt_Timer = 3000;
Blink_Timer = 8000;
- boss_priestess_guestAI::Reset();
+ boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(const uint32 diff)
@@ -745,7 +763,7 @@ struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_guestAI
if (!UpdateVictim())
return;
- boss_priestess_guestAI::UpdateAI(diff);
+ boss_priestess_lackey_commonAI::UpdateAI(diff);
if (Polymorph_Timer < diff)
{
@@ -816,18 +834,26 @@ struct TRINITY_DLL_DECL boss_yazzaiAI : public boss_priestess_guestAI
}
};
-#define SPELL_INTERCEPT_STUN 27577
-#define SPELL_DISARM 27581
-#define SPELL_PIERCING_HOWL 23600
-#define SPELL_FRIGHTENING_SHOUT 19134
-#define SPELL_HAMSTRING 27584
-#define SPELL_BATTLE_SHOUT 27578
-#define SPELL_MORTAL_STRIKE 44268
+CreatureAI* GetAI_yazzai(Creature* pCreature)
+{
+ return new boss_yazzaiAI(pCreature);
+}
-struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_guestAI
+enum
+{
+ SPELL_INTERCEPT_STUN = 27577,
+ SPELL_DISARM = 27581,
+ SPELL_PIERCING_HOWL = 23600,
+ SPELL_FRIGHTENING_SHOUT = 19134,
+ SPELL_HAMSTRING = 27584,
+ SPELL_BATTLE_SHOUT = 27578,
+ SPELL_MORTAL_STRIKE = 44268
+};
+
+struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_lackey_commonAI
{
//Warrior
- boss_warlord_salarisAI(Creature *c) : boss_priestess_guestAI(c) {}
+ boss_warlord_salarisAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
uint32 Intercept_Stun_Timer;
uint32 Disarm_Timer;
@@ -844,9 +870,8 @@ struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_guestAI
Frightening_Shout_Timer = 18000;
Hamstring_Timer = 4500;
Mortal_Strike_Timer = 8000;
- DoCast(m_creature, SPELL_BATTLE_SHOUT);
- boss_priestess_guestAI::Reset();
+ boss_priestess_lackey_commonAI::Reset();
}
void EnterCombat(Unit* who)
@@ -859,7 +884,7 @@ struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_guestAI
if (!UpdateVictim())
return;
- boss_priestess_guestAI::UpdateAI(diff);
+ boss_priestess_lackey_commonAI::UpdateAI(diff);
if (Intercept_Stun_Timer < diff)
{
@@ -870,7 +895,7 @@ struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_guestAI
if (Unit* target = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()))
{
//if in melee range
- if (target->IsWithinDistInMap(m_creature, 5))
+ if (target->IsWithinDistInMap(m_creature, ATTACK_DISTANCE))
{
InMeleeRange = true;
break;
@@ -922,35 +947,27 @@ struct TRINITY_DLL_DECL boss_warlord_salarisAI : public boss_priestess_guestAI
}
};
-#define SPELL_AIMED_SHOT 44271
-#define SPELL_SHOOT 15620
-#define SPELL_CONCUSSIVE_SHOT 27634
-#define TRIGGER_CONCUSSIVE_SHOT 19410
-#define SPELL_MULTI_SHOT 31942
-#define SPELL_WING_CLIP 44286
-#define SPELL_FREEZING_TRAP 44136
-
-#define NPC_SLIVER 24552
-
-/*struct TRINITY_DLL_DECL mob_sliverAI : public ScriptedAI
+CreatureAI* GetAI_warlord_salaris(Creature* pCreature)
{
- mob_sliverAI(Creature *c) : ScriptedAI(c) {}
-
- uint64 GaraxxasGUID;
-
- void Reset() { GaraxxasGUID = 0; }
-
- void KilledUnit(Unit* victim);
- void JustDied(Unit* killer);
-
- void EnterCombat(Unit* who){}
+ return new boss_warlord_salarisAI(pCreature);
+}
-};*/
+enum
+{
+ SPELL_AIMED_SHOT = 44271,
+ SPELL_SHOOT = 15620,
+ SPELL_CONCUSSIVE_SHOT = 27634,
+ SPELL_MULTI_SHOT = 31942,
+ SPELL_WING_CLIP = 44286,
+ SPELL_FREEZING_TRAP = 44136,
+
+ NPC_SLIVER = 24552
+};
-struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
+struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_lackey_commonAI
{
//Hunter
- boss_garaxxasAI(Creature *c) : boss_priestess_guestAI(c) { m_uiPetGUID = 0; }
+ boss_garaxxasAI(Creature *c) : boss_priestess_lackey_commonAI(c) { m_uiPetGUID = 0; }
uint64 m_uiPetGUID;
@@ -974,7 +991,7 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
if (!pPet)
m_creature->SummonCreature(NPC_SLIVER, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
- boss_priestess_guestAI::Reset();
+ boss_priestess_lackey_commonAI::Reset();
}
void JustSummoned(Creature* pSummoned)
@@ -982,19 +999,14 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
m_uiPetGUID = pSummoned->GetGUID();
}
- void JustDied(Unit* killer)
- {
- boss_priestess_guestAI::JustDied(killer);
- }
-
void UpdateAI(const uint32 diff)
{
if (!UpdateVictim())
return;
- boss_priestess_guestAI::UpdateAI(diff);
+ boss_priestess_lackey_commonAI::UpdateAI(diff);
- if (m_creature->IsWithinDistInMap(m_creature->getVictim(), 5.0f))
+ if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE))
{
if (Wing_Clip_Timer < diff)
{
@@ -1004,8 +1016,18 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
if (Freezing_Trap_Timer < diff)
{
- DoCast(m_creature->getVictim(), SPELL_FREEZING_TRAP);
- Freezing_Trap_Timer = 30000;
+ //attempt find go summoned from spell (casted by m_creature)
+ GameObject* pGo = m_creature->GetGameObject(SPELL_FREEZING_TRAP);
+
+ //if we have a pGo, we need to wait (only one trap at a time)
+ if (pGo)
+ Freezing_Trap_Timer = 2500;
+ else
+ {
+ //if pGo does not exist, then we can cast
+ DoCast(m_creature->getVictim(), SPELL_FREEZING_TRAP);
+ Freezing_Trap_Timer = 15000;
+ }
}else Freezing_Trap_Timer -= diff;
DoMeleeAttackIfReady();
@@ -1039,30 +1061,26 @@ struct TRINITY_DLL_DECL boss_garaxxasAI : public boss_priestess_guestAI
}
};
-/*void mob_sliverAI::JustDied(Unit* killer)
+CreatureAI* GetAI_garaxxas(Creature* pCreature)
{
- if(Creature* Garaxxas = (Unit::GetCreature(*m_creature, GaraxxasGUID)))
- CAST_AI(boss_garaxxasAI, Garaxxas->AI())->SliverGUID = 0;
+ return new boss_garaxxasAI(pCreature);
}
-void mob_sliverAI::KilledUnit(Unit* victim)
+enum
{
- if(Creature* Garaxxas = (Unit::GetCreature(*m_creature, GaraxxasGUID)))
- CAST_AI(boss_garaxxasAI, Garaxxas->AI())->KilledUnit(victim);
-}*/
-
-#define SPELL_WINDFURY_TOTEM 27621
-#define SPELL_WAR_STOMP 46026
-#define SPELL_PURGE 27626
-#define SPELL_LESSER_HEALING_WAVE 44256
-#define SPELL_FROST_SHOCK 21401
-#define SPELL_FIRE_NOVA_TOTEM 44257
-#define SPELL_EARTHBIND_TOTEM 15786
-
-struct TRINITY_DLL_DECL boss_apokoAI : public boss_priestess_guestAI
+ SPELL_WINDFURY_TOTEM = 27621,
+ SPELL_WAR_STOMP = 46026,
+ SPELL_PURGE = 27626,
+ SPELL_LESSER_HEALING_WAVE = 44256,
+ SPELL_FROST_SHOCK = 21401,
+ SPELL_FIRE_NOVA_TOTEM = 44257,
+ SPELL_EARTHBIND_TOTEM = 15786
+};
+
+struct TRINITY_DLL_DECL boss_apokoAI : public boss_priestess_lackey_commonAI
{
//Shaman
- boss_apokoAI(Creature *c) : boss_priestess_guestAI(c) {}
+ boss_apokoAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
uint32 Totem_Timer;
uint8 Totem_Amount;
@@ -1080,7 +1098,7 @@ struct TRINITY_DLL_DECL boss_apokoAI : public boss_priestess_guestAI
Healing_Wave_Timer = 5000;
Frost_Shock_Timer = 7000;
- boss_priestess_guestAI::Reset();
+ boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(const uint32 diff)
@@ -1088,7 +1106,7 @@ struct TRINITY_DLL_DECL boss_apokoAI : public boss_priestess_guestAI
if (!UpdateVictim())
return;
- boss_priestess_guestAI::UpdateAI(diff);
+ boss_priestess_lackey_commonAI::UpdateAI(diff);
if (Totem_Timer < diff)
{
@@ -1141,19 +1159,25 @@ struct TRINITY_DLL_DECL boss_apokoAI : public boss_priestess_guestAI
}
};
-#define SPELL_GOBLIN_DRAGON_GUN 44272
-#define SPELL_ROCKET_LAUNCH 44137
-#define SPELL_RECOMBOBULATE 44274
-#define SPELL_HIGH_EXPLOSIVE_SHEEP 44276
-#define SPELL_FEL_IRON_BOMB 46024
-#define SPELL_SHEEP_EXPLOSION 44279
-
-#define CREATURE_EXPLOSIVE_SHEEP 24715
+CreatureAI* GetAI_apoko(Creature* pCreature)
+{
+ return new boss_apokoAI(pCreature);
+}
+
+enum
+{
+ SPELL_GOBLIN_DRAGON_GUN = 44272,
+ SPELL_ROCKET_LAUNCH = 44137,
+ SPELL_RECOMBOBULATE = 44274,
+ SPELL_HIGH_EXPLOSIVE_SHEEP = 44276,
+ SPELL_FEL_IRON_BOMB = 46024,
+ SPELL_SHEEP_EXPLOSION = 44279
+};
-struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_guestAI
+struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_lackey_commonAI
{
//Engineer
- boss_zelfanAI(Creature *c) : boss_priestess_guestAI(c) {}
+ boss_zelfanAI(Creature *c) : boss_priestess_lackey_commonAI(c) {}
uint32 Goblin_Dragon_Gun_Timer;
uint32 Rocket_Launch_Timer;
@@ -1169,7 +1193,7 @@ struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_guestAI
High_Explosive_Sheep_Timer = 10000;
Fel_Iron_Bomb_Timer = 15000;
- boss_priestess_guestAI::Reset();
+ boss_priestess_lackey_commonAI::Reset();
}
void UpdateAI(const uint32 diff)
@@ -1177,7 +1201,7 @@ struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_guestAI
if (!UpdateVictim())
return;
- boss_priestess_guestAI::UpdateAI(diff);
+ boss_priestess_lackey_commonAI::UpdateAI(diff);
if (Goblin_Dragon_Gun_Timer < diff)
{
@@ -1223,6 +1247,11 @@ struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_guestAI
}
};
+CreatureAI* GetAI_zelfan(Creature* pCreature)
+{
+ return new boss_zelfanAI(pCreature);
+}
+
//struct TRINITY_DLL_DECL mob_high_explosive_sheepAI : public ScriptedAI
//{
// mob_high_explosive_sheepAI(Creature *c) : ScriptedAI(c) {}
@@ -1248,66 +1277,11 @@ struct TRINITY_DLL_DECL boss_zelfanAI : public boss_priestess_guestAI
// }
//};
-/*CreatureAI* GetAI_mob_sliver(Creature *_Creature)
-{
- return new mob_sliverAI (_Creature);
-};*/
-
//CreatureAI* GetAI_mob_high_explosive_sheep(Creature *_Creature)
//{
// return new mob_high_explosive_sheepAI (_Creature);
//};
-/*CreatureAI* GetAI_mob_fizzle(Creature *_Creature)
-{
- return new mob_fizzleAI (_Creature);
-};*/
-
-CreatureAI* GetAI_boss_priestess_delrissa(Creature *_Creature)
-{
- return new boss_priestess_delrissaAI (_Creature);
-}
-
-CreatureAI* GetAI_boss_kagani_nightstrike(Creature *_Creature)
-{
- return new boss_kagani_nightstrikeAI (_Creature);
-}
-
-CreatureAI* GetAI_ellris_duskhallow(Creature *_Creature)
-{
- return new boss_ellris_duskhallowAI (_Creature);
-}
-
-CreatureAI* GetAI_eramas_brightblaze(Creature *_Creature)
-{
- return new boss_eramas_brightblazeAI (_Creature);
-}
-
-CreatureAI* GetAI_yazzai(Creature *_Creature)
-{
- return new boss_yazzaiAI (_Creature);
-}
-
-CreatureAI* GetAI_warlord_salaris(Creature *_Creature)
-{
- return new boss_warlord_salarisAI (_Creature);
-}
-
-CreatureAI* GetAI_garaxxas(Creature *_Creature)
-{
- return new boss_garaxxasAI (_Creature);
-}
-
-CreatureAI* GetAI_apoko(Creature *_Creature)
-{
- return new boss_apokoAI (_Creature);
-}
-
-CreatureAI* GetAI_zelfan(Creature *_Creature)
-{
- return new boss_zelfanAI (_Creature);
-}
-
void AddSC_boss_priestess_delrissa()
{
Script *newscript;
@@ -1361,15 +1335,5 @@ void AddSC_boss_priestess_delrissa()
newscript->Name = "mob_high_explosive_sheep";
newscript->GetAI = &GetAI_mob_high_explosive_sheep;
newscript->RegisterSelf();*/
-
- /*newscript = new Script;
- newscript->Name = "mob_fizzle";
- newscript->GetAI = &GetAI_mob_fizzle;
- newscript->RegisterSelf();*/
-
- /*newscript = new Script;
- newscript->Name = "mob_sliver";
- newscript->GetAI = &GetAI_mob_sliver;
- newscript->RegisterSelf();*/
}
diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
index 2465ce91e72..352b8563732 100644
--- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
+++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
@@ -24,30 +24,36 @@ EndScriptData */
#include "precompiled.h"
#include "def_magisters_terrace.h"
-#define SAY_AGGRO -1585007
-#define SAY_ENERGY -1585008
-#define SAY_OVERLOAD -1585009
-#define SAY_KILL -1585010
-#define EMOTE_DISCHARGE_ENERGY -1585011
+enum
+{
+ SAY_AGGRO = -1585007,
+ SAY_ENERGY = -1585008,
+ SAY_OVERLOAD = -1585009,
+ SAY_KILL = -1585010,
+ EMOTE_DISCHARGE_ENERGY = -1585011,
+
+ //is this text for real?
+ //#define SAY_DEATH "What...happen...ed."
-//is this text for real?
-//#define SAY_DEATH "What...happen...ed."
+ //Pure energy spell info
+ SPELL_ENERGY_BOLT = 46156,
+ SPELL_ENERGY_FEEDBACK = 44335,
-//Pure energy spell info
-#define SPELL_ENERGY_BOLT 46156
-#define SPELL_ENERGY_FEEDBACK 44335
+ //Vexallus spell info
+ SPELL_CHAIN_LIGHTNING = 44318,
+ SPELL_OVERLOAD = 44353,
+ SPELL_ARCANE_SHOCK = 44319,
-//Vexallus spell info
-#define SPELL_CHAIN_LIGHTNING 44318
-#define SPELL_OVERLOAD 44353
-#define SPELL_ARCANE_SHOCK 44319
+ SPELL_SUMMON_PURE_ENERGY = 44322, //mod scale -10
+ H_SPELL_SUMMON_PURE_ENERGY1 = 46154, //mod scale -5
+ H_SPELL_SUMMON_PURE_ENERGY2 = 46159, //mod scale -5
-#define SPELL_SUMMON_PURE_ENERGY 44322 //mod scale -10
-#define H_SPELL_SUMMON_PURE_ENERGY1 46154 //mod scale -5
-#define H_SPELL_SUMMON_PURE_ENERGY2 46159 //mod scale -5
+ //Creatures
+ NPC_PURE_ENERGY = 24745,
-//Creatures
-#define CREATURE_PURE_ENERGY 24745
+ INTERVAL_MODIFIER = 15,
+ INTERVAL_SWITCH = 6
+};
struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
{
@@ -63,8 +69,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
uint32 ChainLightningTimer;
uint32 ArcaneShockTimer;
uint32 OverloadTimer;
- uint32 SpawnAddInterval;
- uint32 AlreadySpawnedAmount;
+ uint32 IntervalHealthAmount;
bool Enraged;
void Reset()
@@ -72,8 +77,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
ChainLightningTimer = 10000;
ArcaneShockTimer = 8000;
OverloadTimer = 2200;
- SpawnAddInterval = 15;
- AlreadySpawnedAmount = 0;
+ IntervalHealthAmount = 1;
Enraged = false;
if (pInstance)
@@ -88,12 +92,7 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
void JustDied(Unit *victim)
{
if (pInstance)
- {
pInstance->SetData(DATA_VEXALLUS_EVENT, DONE);
-
- if (GameObject* Door = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_VEXALLUS_DOOR)))
- Door->SetGoState(GO_STATE_ACTIVE);
- }
}
void EnterCombat(Unit *who)
@@ -118,16 +117,20 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
if (!UpdateVictim() )
return;
- if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 10)
- {
- Enraged = true;
- }
-
if (!Enraged)
{
//used for check, when Vexallus cast adds 85%, 70%, 55%, 40%, 25%
- if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(SpawnAddInterval*(AlreadySpawnedAmount+1))))
+ if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) <= (100-(INTERVAL_MODIFIER*IntervalHealthAmount)))
{
+ //increase amount, unless we're at 10%, then we switch and return
+ if (IntervalHealthAmount == INTERVAL_SWITCH)
+ {
+ Enraged = true;
+ return;
+ }
+ else
+ ++IntervalHealthAmount;
+
DoScriptText(SAY_ENERGY, m_creature);
DoScriptText(EMOTE_DISCHARGE_ENERGY, m_creature);
@@ -140,12 +143,10 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false);
//below are workaround summons, remove when summoning spells w/implicitTarget 73 implemented in Mangos
- DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ DoSpawnCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Heroic)
- DoSpawnCreature(CREATURE_PURE_ENERGY, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
-
- ++AlreadySpawnedAmount;
+ DoSpawnCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
}
if (ChainLightningTimer < diff)
diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp
index 952bd4fc0b1..f7146fa0364 100644
--- a/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp
+++ b/src/bindings/scripts/scripts/zone/magisters_terrace/instance_magisters_terrace.cpp
@@ -103,13 +103,26 @@ struct TRINITY_DLL_DECL instance_magisters_terrace : public ScriptedInstance
switch(identifier)
{
case DATA_SELIN_EVENT: Encounters[0] = data; break;
- case DATA_VEXALLUS_EVENT: Encounters[1] = data; break;
- case DATA_DELRISSA_EVENT: Encounters[2] = data; break;
+ case DATA_VEXALLUS_EVENT:
+ if (data == DONE)
+ DoUseDoorOrButton(VexallusDoorGUID);
+ Encounters[1] = data;
+ break;
+ case DATA_DELRISSA_EVENT:
+ if (data == DONE)
+ DoUseDoorOrButton(DelrissaDoorGUID);
+ if (data == IN_PROGRESS)
+ DelrissaDeathCount = 0;
+ Encounters[2] = data;
+ break;
case DATA_KAELTHAS_EVENT: Encounters[3] = data; break;
case DATA_DELRISSA_DEATH_COUNT:
- if(data) ++DelrissaDeathCount;
- else DelrissaDeathCount = 0;
+ if (data == SPECIAL)
+ ++DelrissaDeathCount;
+ else
+ DelrissaDeathCount = 0;
+ break;
}
}
diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
index de8da72593d..aa7c55330a2 100644
--- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
+++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp
@@ -624,10 +624,25 @@ bool GossipSelect_npc_oronok_tornheart(Player *player, Creature *_Creature, uint
# npc_karynaku
####*/
+enum
+{
+ QUEST_ALLY_OF_NETHER = 10870,
+
+ TAXI_NODE_START = 161, // From Karynaku
+ TAXI_NODE_END = 162 // To Mordenai
+};
+
bool QuestAccept_npc_karynaku(Player* player, Creature* creature, Quest const* quest)
{
- if(quest->GetQuestId() == 10870) // Ally of the Netherwing
- player->ActivateTaxiPathTo(649);
+ if(quest->GetQuestId() == QUEST_ALLY_OF_NETHER)
+ {
+ std::vector<uint32> nodes;
+
+ nodes.resize(2);
+ nodes[0] = TAXI_NODE_START;
+ nodes[1] = TAXI_NODE_END;
+ player->ActivateTaxiPathTo(nodes); //player->ActivateTaxiPathTo(649);
+ }
return true;
}