aboutsummaryrefslogtreecommitdiff
path: root/src/bindings/scripts
diff options
context:
space:
mode:
authormaximius <none@none>2009-10-09 20:48:55 -0700
committermaximius <none@none>2009-10-09 20:48:55 -0700
commitb4c7a2514d9844fccc46fc78aee0b34d1b26161e (patch)
tree6721c91c521fc3aa86dd6786877b1742b77b0e2c /src/bindings/scripts
parent3ccc348b099467441bb954147cd997fb42861951 (diff)
*Blackfathom Deeps - Event: Aku'mai, by Tartalo
*Split Personality Achivement, by Destalker *Halls of Lightning Fixes, by Destalker Volkhan fixes + Achievement Ionar Fix - without this he resets each time he is invisible, spamming sparks Arcing Burn - should be a debuff (and stackable, stackable part NYI :/) *Naxxramas - Thaddius - the aura shall affect only the character without the proper aura, by Trazom *Naxxramas - Kelthuzad - some timer adjustments (may need verification or tweaking) by Cass *Merges by Stryker, thanks to all authors and testers. [8458] Re-implement SPELL_AURA_MOD_TARGET_ARMOR_PCT in more porper way for weapon dependent cases. Author: VladimirMangos [8459] Avoid mutiply apply weapon dependent armor penetration bonus for each weapon. Author: VladimirMangos [8529] check rune cost only if spell has PowerType == POWER_RUNE. Patch provided by yavi. Author: Ambal [8532] Fixed situation where some items like 42947 were not giving spell power bonus. By: Ambal [8533] Not remove timed quest and correctly fail when time runs out. Add function to remove timed quest instead of direct access to set. Author: NoFantasy [8536] Fixed spell 62776. By: Ambal [8539] Check pet aura range at area aura update. By: Ambal [8546] Implement battleground bonusweekends call to arms. Also fix typo in auctionmgr. Author: balrok [8547] Implemented scriptcall: CorpseRemoved(uint32 & /*respawnDelay*/) it will be called when the corpse of the scripted creature get's removed, it's possible to adjust the next respawn inside the script. Author: balrok [8561] Replace another auras code call by explicit code [8566] avoid singleton-lock when accessing BattleGroundMGR::isBGWeekend() Proposed by vladimir. Comitter: balrok --HG-- branch : trunk
Diffstat (limited to 'src/bindings/scripts')
-rw-r--r--src/bindings/scripts/scripts/kalimdor/blackfathom_depths/instance_blackfathom_deeps.cpp30
-rw-r--r--src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp49
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp11
-rw-r--r--src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp58
4 files changed, 113 insertions, 35 deletions
diff --git a/src/bindings/scripts/scripts/kalimdor/blackfathom_depths/instance_blackfathom_deeps.cpp b/src/bindings/scripts/scripts/kalimdor/blackfathom_depths/instance_blackfathom_deeps.cpp
index b2664932461..cab14e26de8 100644
--- a/src/bindings/scripts/scripts/kalimdor/blackfathom_depths/instance_blackfathom_deeps.cpp
+++ b/src/bindings/scripts/scripts/kalimdor/blackfathom_depths/instance_blackfathom_deeps.cpp
@@ -128,6 +128,19 @@ struct TRINITY_DLL_DECL instance_blackfathom_deeps : public ScriptedInstance
return 0;
}
+
+ void CheckFires()
+ {
+ GameObject *pShrine1 = instance->GetGameObject(m_uiShrine1GUID);
+ GameObject *pShrine2 = instance->GetGameObject(m_uiShrine2GUID);
+ GameObject *pShrine3 = instance->GetGameObject(m_uiShrine3GUID);
+ GameObject *pShrine4 = instance->GetGameObject(m_uiShrine4GUID);
+ if (pShrine1 && pShrine1->GetGoState() == GO_STATE_ACTIVE &&
+ pShrine2 && pShrine2->GetGoState() == GO_STATE_ACTIVE &&
+ pShrine3 && pShrine3->GetGoState() == GO_STATE_ACTIVE &&
+ pShrine4 && pShrine4->GetGoState() == GO_STATE_ACTIVE)
+ HandleGameObject(m_uiMainDoorGUID,true);
+ }
};
InstanceData* GetInstanceData_instance_blackfathom_deeps(Map* pMap)
@@ -135,6 +148,18 @@ InstanceData* GetInstanceData_instance_blackfathom_deeps(Map* pMap)
return new instance_blackfathom_deeps(pMap);
}
+bool GoHello_fire(Player *pPlayer, GameObject* pGo)
+{
+ ScriptedInstance *pInstance = pGo->GetInstanceData();
+
+ if (pInstance)
+ {
+ pGo->SetGoState(GO_STATE_ACTIVE);
+ ((instance_blackfathom_deeps*)pInstance)->CheckFires();
+ }
+ return false;
+}
+
void AddSC_instance_blackfathom_deeps()
{
Script *newscript;
@@ -142,4 +167,9 @@ void AddSC_instance_blackfathom_deeps()
newscript->Name = "instance_blackfathom_deeps";
newscript->GetInstanceData = &GetInstanceData_instance_blackfathom_deeps;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name = "go_blackfathom_fire";
+ newscript->pGOHello = &GoHello_fire;
+ newscript->RegisterSelf();
}
diff --git a/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp b/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp
index 3c0bc5150ae..946750a42a0 100644
--- a/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp
+++ b/src/bindings/scripts/scripts/northrend/nexus/nexus/boss_magus_telestra.cpp
@@ -49,7 +49,11 @@ enum
SAY_DEATH = -1576002,
SAY_MERGE = -1576003,
SAY_SPLIT_1 = -1576004,
- SAY_SPLIT_2 = -1576005
+ SAY_SPLIT_2 = -1576005,
+
+//Achievement
+ ACHIEV_SPLIT_PERSONALITY = 2150,
+ ACHIEV_TIMER = 5 * 1000
};
float CenterOfRoom[1][4] =
@@ -85,6 +89,10 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
uint32 SPELL_GRAVITY_WELL_Timer;
uint32 Cooldown;
+ bool AchievementTimerRunning;
+ uint8 AchievementProgress;
+ uint32 AchievementTimer;
+
void Reset()
{
Phase = 0;
@@ -98,6 +106,10 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
FrostMagusGUID = 0;
ArcaneMagusGUID = 0;
+ AchievementProgress = 0;
+ AchievementTimer = 0;
+ AchievementTimerRunning = false;
+
AppearDelay = false;
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
@@ -119,6 +131,21 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
{
DoScriptText(SAY_DEATH, m_creature);
+ if (HeroicMode && AchievementProgress == 2)
+ {
+ AchievementEntry const *AchievSplitPersonality = GetAchievementStore()->LookupEntry(ACHIEV_SPLIT_PERSONALITY);
+ if (AchievSplitPersonality)
+ {
+ Map* pMap = m_creature->GetMap();
+ if (pMap && pMap->IsDungeon())
+ {
+ Map::PlayerList const &players = pMap->GetPlayers();
+ for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ itr->getSource()->CompletedAchievement(AchievSplitPersonality);
+ }
+ }
+ }
+
if (pInstance)
pInstance->SetData(DATA_MAGUS_TELESTRA_EVENT, DONE);
}
@@ -191,13 +218,29 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
if (ArcaneMagusGUID)
ArcaneMagus = Unit::GetUnit((*m_creature), ArcaneMagusGUID);
if (FireMagus && FireMagus->isDead())
+ {
FireMagusDead = true;
+ if (!AchievementTimerRunning)
+ AchievementTimerRunning = true;
+ }
if (FrostMagus && FrostMagus->isDead())
+ {
FrostMagusDead = true;
+ if (!AchievementTimerRunning)
+ AchievementTimerRunning = true;
+ }
if (ArcaneMagus && ArcaneMagus->isDead())
+ {
ArcaneMagusDead = true;
+ if (!AchievementTimerRunning)
+ AchievementTimerRunning = true;
+ }
+ if (AchievementTimerRunning)
+ AchievementTimer += diff;
if (FireMagusDead && FrostMagusDead && ArcaneMagusDead)
{
+ if (AchievementTimer <= ACHIEV_TIMER)
+ AchievementProgress +=1;
m_creature->GetMotionMaster()->Clear();
m_creature->GetMap()->CreatureRelocation(m_creature, CenterOfRoom[0][0], CenterOfRoom[0][1], CenterOfRoom[0][2], CenterOfRoom[0][3]);
DoCast(m_creature, SPELL_TELESTRA_BACK);
@@ -212,6 +255,8 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
AppearDelay = true;
AppearDelay_Timer = 4000;
DoScriptText(SAY_MERGE, m_creature);
+ AchievementTimerRunning = false;
+ AchievementTimer = 0;
}else
return;
}
@@ -220,6 +265,7 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
{
Phase = 1;
m_creature->CastStop();
+ m_creature->RemoveAllAuras();
m_creature->SetVisibility(VISIBILITY_OFF);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
FireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
@@ -240,6 +286,7 @@ struct TRINITY_DLL_DECL boss_magus_telestraAI : public ScriptedAI
{
Phase = 3;
m_creature->CastStop();
+ m_creature->RemoveAllAuras();
m_creature->SetVisibility(VISIBILITY_OFF);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
FireMagusGUID = SplitPersonality(MOB_FIRE_MAGUS);
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp
index 2f81e6975b8..4d1c810f618 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp
@@ -219,11 +219,11 @@ struct TRINITY_DLL_DECL boss_ionarAI : public ScriptedAI
// Splitted
if (m_creature->GetVisibility() == VISIBILITY_OFF)
{
- if (!m_creature->getVictim())
+ /*if (!m_creature->getVictim())
{
Reset();
return;
- }
+ }*/
if (m_uiSplit_Timer < uiDiff)
{
@@ -316,14 +316,9 @@ bool EffectDummyCreature_boss_ionar(Unit* pCaster, uint32 uiSpellId, uint32 uiEf
if (pCreatureTarget->GetEntry() != NPC_IONAR)
return true;
- for(uint8 i = 0; i < MAX_SPARKS; ++i)
- {
+ for (uint8 i = 0; i < MAX_SPARKS; ++i)
pCreatureTarget->CastSpell(pCreatureTarget, SPELL_SUMMON_SPARK, true);
- //TODO: remove this line of hack when summon implemented
- pCreatureTarget->SummonCreature(NPC_SPARK_OF_IONAR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
- }
-
pCreatureTarget->AttackStop();
pCreatureTarget->SetVisibility(VISIBILITY_OFF);
diff --git a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp
index 368b6370a0f..79e6e6881ac 100644
--- a/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp
+++ b/src/bindings/scripts/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp
@@ -63,7 +63,9 @@ enum
NPC_BRITTLE_GOLEM = 28681,
POINT_ID_ANVIL = 0,
- MAX_GOLEM = 2
+ MAX_GOLEM = 2,
+
+ ACHIEVEMENT_SHATTER_RESISTANT = 2042
};
/*######
@@ -87,6 +89,7 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
bool m_bIsStriking;
bool m_bCanShatterGolem;
+ uint8 GolemsShattered;
uint32 m_uiPause_Timer;
uint32 m_uiShatteringStomp_Timer;
uint32 m_uiShatter_Timer;
@@ -102,6 +105,7 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
m_uiPause_Timer = 3500;
m_uiShatteringStomp_Timer = 0;
m_uiShatter_Timer = 5000;
+ GolemsShattered = 0;
m_uiHealthAmountModifier = 1;
@@ -112,7 +116,7 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
m_pInstance->SetData(TYPE_VOLKHAN, NOT_STARTED);
}
- void Aggro(Unit* pWho)
+ void EnterCombat(Unit* pWho)
{
DoScriptText(SAY_AGGRO, m_creature);
@@ -140,6 +144,21 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
if (m_pInstance)
m_pInstance->SetData(TYPE_VOLKHAN, DONE);
+
+ if (HeroicMode && GolemsShattered < 5)
+ {
+ AchievementEntry const *AchievShatterResistant = GetAchievementStore()->LookupEntry(ACHIEVEMENT_SHATTER_RESISTANT);
+ if (AchievShatterResistant)
+ {
+ Map* pMap = m_creature->GetMap();
+ if (pMap && pMap->IsDungeon())
+ {
+ Map::PlayerList const &players = pMap->GetPlayers();
+ for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
+ itr->getSource()->CompletedAchievement(AchievShatterResistant);
+ }
+ }
+ }
}
void KilledUnit(Unit* pVictim)
@@ -178,9 +197,12 @@ struct TRINITY_DLL_DECL boss_volkhanAI : public ScriptedAI
{
if (Creature* pTemp = Unit::GetCreature(*m_creature, *itr))
{
- // only shatter brittle golems
+ // only shatter brittle golems
if (pTemp->isAlive() && pTemp->GetEntry() == NPC_BRITTLE_GOLEM)
+ {
pTemp->CastSpell(pTemp, m_bIsHeroic ? SPELL_SHATTER_H : SPELL_SHATTER_N, false);
+ GolemsShattered += 1;
+ }
}
}
}
@@ -307,11 +329,6 @@ bool EffectDummyCreature_boss_volkhan(Unit* pCaster, uint32 uiSpellId, uint32 ui
for(uint8 i = 0; i < MAX_GOLEM; ++i)
{
pCreatureTarget->CastSpell(pCaster, SPELL_SUMMON_MOLTEN_GOLEM, true);
-
- //TODO: remove this line of hack when summon effect implemented
- pCreatureTarget->SummonCreature(NPC_MOLTEN_GOLEM,
- pCaster->GetPositionX(), pCaster->GetPositionY(), pCaster->GetPositionZ(), 0.0f,
- TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
}
//always return true when we are handling this spell and effect
@@ -399,30 +416,19 @@ struct TRINITY_DLL_DECL mob_molten_golemAI : public ScriptedAI
void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
{
- if (m_bIsFrozen)
- {
- //workaround for now, brittled should be immune to any kind of attacks
- uiDamage = 0;
- return;
- }
-
if (uiDamage > m_creature->GetHealth())
{
- m_bIsFrozen = true;
-
- if (m_creature->IsNonMeleeSpellCasted(false))
- m_creature->InterruptNonMeleeSpells(false);
-
+ m_creature->UpdateEntry(NPC_BRITTLE_GOLEM);
+ m_creature->SetHealth(1);
+ uiDamage = 0;
m_creature->RemoveAllAuras();
m_creature->AttackStop();
-
+ m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
+ if (m_creature->IsNonMeleeSpellCasted(false))
+ m_creature->InterruptNonMeleeSpells(false);
if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == TARGETED_MOTION_TYPE)
m_creature->GetMotionMaster()->MovementExpired();
-
- uiDamage = m_creature->GetHealth()-1;
-
- m_creature->UpdateEntry(NPC_BRITTLE_GOLEM);
- m_creature->SetHealth(1);
+ m_bIsFrozen = true;
}
}