Culling of Stratholme: Cleanup + instance script + main bosses combat AI.
Prerequisite for event script merge --HG-- branch : trunk
This commit is contained in:
+75
-8
@@ -1,14 +1,30 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* Script Data Start
|
/* Script Data Start
|
||||||
SDName: Boss epoch
|
SDName: Boss epoch
|
||||||
SDAuthor: LordVanMartin
|
SDAuthor: Tartalo
|
||||||
SD%Complete:
|
SD%Complete: 80
|
||||||
SDComment:
|
SDComment: TODO: Intro, consecutive attacks to a random target durin time wrap, adjust timers
|
||||||
SDCategory:
|
SDCategory:
|
||||||
Script Data End */
|
Script Data End */
|
||||||
|
|
||||||
/*** SQL START ***
|
|
||||||
update creature_template set scriptname = '' where entry = '';
|
|
||||||
*** SQL END ***/
|
|
||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "culling_of_stratholme.h"
|
#include "culling_of_stratholme.h"
|
||||||
|
|
||||||
@@ -34,6 +50,11 @@ enum Yells
|
|||||||
SAY_SLAY_3 = -1595007, //"You were destined to fail. "
|
SAY_SLAY_3 = -1595007, //"You were destined to fail. "
|
||||||
SAY_DEATH = -1595008 //"*gurgles*"
|
SAY_DEATH = -1595008 //"*gurgles*"
|
||||||
};
|
};
|
||||||
|
enum CombatPhases
|
||||||
|
{
|
||||||
|
INTRO,
|
||||||
|
COMBAT
|
||||||
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_epochAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_epochAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
@@ -42,10 +63,27 @@ struct TRINITY_DLL_DECL boss_epochAI : public ScriptedAI
|
|||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uint8 uiStep;
|
||||||
|
|
||||||
|
uint32 uiStepTimer;
|
||||||
|
uint32 uiWoundingStrikeTimer;
|
||||||
|
uint32 uiTimeWarpTimer;
|
||||||
|
uint32 uiTimeStopTimer;
|
||||||
|
uint32 uiCurseOfExertionTimer;
|
||||||
|
|
||||||
|
CombatPhases Phase;
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
|
uiStep = 1;
|
||||||
|
uiStepTimer = 26000;
|
||||||
|
uiCurseOfExertionTimer = 9300;
|
||||||
|
uiTimeWarpTimer = 25300;
|
||||||
|
uiTimeStopTimer = 21300;
|
||||||
|
uiWoundingStrikeTimer = 5300;
|
||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_EPOCH_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_EPOCH_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
@@ -58,14 +96,43 @@ struct TRINITY_DLL_DECL boss_epochAI : public ScriptedAI
|
|||||||
pInstance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_EPOCH_EVENT, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* who) {}
|
|
||||||
void MoveInLineOfSight(Unit* who) {}
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
|
if (Phase == INTRO)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (uiCurseOfExertionTimer < diff)
|
||||||
|
{
|
||||||
|
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||||
|
DoCast(pTarget, SPELL_CURSE_OF_EXERTION);
|
||||||
|
uiCurseOfExertionTimer = 9300;
|
||||||
|
} else uiCurseOfExertionTimer -= diff;
|
||||||
|
|
||||||
|
if (uiWoundingStrikeTimer < diff)
|
||||||
|
{
|
||||||
|
DoCastVictim(HEROIC(SPELL_WOUNDING_STRIKE, H_SPELL_WOUNDING_STRIKE));
|
||||||
|
uiWoundingStrikeTimer = 5300;
|
||||||
|
} else uiWoundingStrikeTimer -= diff;
|
||||||
|
|
||||||
|
if (uiTimeStopTimer < diff)
|
||||||
|
{
|
||||||
|
DoCastAOE(SPELL_TIME_STOP);
|
||||||
|
uiTimeStopTimer = 21300;
|
||||||
|
} else uiTimeStopTimer -= diff;
|
||||||
|
|
||||||
|
if (uiTimeWarpTimer < diff)
|
||||||
|
{
|
||||||
|
DoScriptText(RAND(SAY_TIME_WARP_1,SAY_TIME_WARP_2,SAY_TIME_WARP_3), m_creature);
|
||||||
|
DoCastAOE(SPELL_TIME_WARP);
|
||||||
|
uiTimeWarpTimer = 25300;
|
||||||
|
} else uiTimeWarpTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+18
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "culling_of_stratholme.h"
|
#include "culling_of_stratholme.h"
|
||||||
|
|
||||||
|
|||||||
+99
-24
@@ -1,8 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
/* Script Data Start
|
/* Script Data Start
|
||||||
SDName: Boss mal_ganis
|
SDName: Boss mal_ganis
|
||||||
SDAuthor: LordVanMartin
|
SDAuthor: Tartalo
|
||||||
SD%Complete:
|
SD%Complete: 80
|
||||||
SDComment:
|
SDComment: TODO: Intro & outro
|
||||||
SDCategory:
|
SDCategory:
|
||||||
Script Data End */
|
Script Data End */
|
||||||
|
|
||||||
@@ -19,6 +37,7 @@ enum Spells
|
|||||||
SPELL_MIND_BLAST = 52722, //Inflicts 4163 to 4837 Shadow damage to an enemy.
|
SPELL_MIND_BLAST = 52722, //Inflicts 4163 to 4837 Shadow damage to an enemy.
|
||||||
H_SPELL_MIND_BLAST = 58850,
|
H_SPELL_MIND_BLAST = 58850,
|
||||||
SPELL_SLEEP = 52721, //Puts an enemy to sleep for up to 10 sec. Any damage caused will awaken the target.
|
SPELL_SLEEP = 52721, //Puts an enemy to sleep for up to 10 sec. Any damage caused will awaken the target.
|
||||||
|
H_SPELL_SLEEP = 58849,
|
||||||
SPELL_VAMPIRIC_TOUCH = 52723 //Heals the caster for half the damage dealt by a melee attack.
|
SPELL_VAMPIRIC_TOUCH = 52723 //Heals the caster for half the damage dealt by a melee attack.
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -44,6 +63,12 @@ enum Yells
|
|||||||
SAY_ESCAPE_SPEECH_2 = -1595025
|
SAY_ESCAPE_SPEECH_2 = -1595025
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum CombatPhases
|
||||||
|
{
|
||||||
|
COMBAT,
|
||||||
|
OUTRO
|
||||||
|
};
|
||||||
|
|
||||||
struct TRINITY_DLL_DECL boss_mal_ganisAI : public ScriptedAI
|
struct TRINITY_DLL_DECL boss_mal_ganisAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
boss_mal_ganisAI(Creature *c) : ScriptedAI(c)
|
boss_mal_ganisAI(Creature *c) : ScriptedAI(c)
|
||||||
@@ -51,17 +76,31 @@ struct TRINITY_DLL_DECL boss_mal_ganisAI : public ScriptedAI
|
|||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool yelled,
|
uint32 uiCarrionSwarmTimer;
|
||||||
yelled2,
|
uint32 uiMindBlastTimer;
|
||||||
yelled3;
|
uint32 uiVampiricTouchTimer;
|
||||||
|
uint32 uiSleepTimer;
|
||||||
|
|
||||||
|
uint8 uiOutroStep;
|
||||||
|
|
||||||
|
bool bYelled;
|
||||||
|
bool bYelled2;
|
||||||
|
|
||||||
|
Creature *pArthas;
|
||||||
|
CombatPhases Phase;
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
yelled = false;
|
bYelled = false;
|
||||||
yelled2 = false;
|
bYelled2 = false;
|
||||||
yelled3 = false;
|
pArthas = NULL;
|
||||||
|
Phase = COMBAT;
|
||||||
|
uiCarrionSwarmTimer = 6000;
|
||||||
|
uiMindBlastTimer = 11000;
|
||||||
|
uiVampiricTouchTimer = urand(10000,15000);
|
||||||
|
uiSleepTimer = urand(15000,20000);
|
||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED);
|
||||||
@@ -71,47 +110,83 @@ struct TRINITY_DLL_DECL boss_mal_ganisAI : public ScriptedAI
|
|||||||
{
|
{
|
||||||
DoScriptText(SAY_AGGRO, m_creature);
|
DoScriptText(SAY_AGGRO, m_creature);
|
||||||
|
|
||||||
|
pArthas = GetClosestCreatureWithEntry(m_creature, NPC_ARTHAS, 150.0f);
|
||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_MAL_GANIS_EVENT, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* who) {}
|
|
||||||
void MoveInLineOfSight(Unit* who) {}
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
|
switch(Phase)
|
||||||
|
{
|
||||||
|
case COMBAT:
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!yelled)
|
if (!bYelled && HealthBelowPct(30))
|
||||||
{
|
|
||||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 30)
|
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_30HEALTH, m_creature);
|
DoScriptText(SAY_30HEALTH, m_creature);
|
||||||
yelled = true;
|
bYelled = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!yelled2)
|
if (!bYelled2 && HealthBelowPct(15))
|
||||||
{
|
|
||||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 15)
|
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_15HEALTH, m_creature);
|
DoScriptText(SAY_15HEALTH, m_creature);
|
||||||
yelled2 = true;
|
bYelled2 = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 1)
|
if (HealthBelowPct(1))
|
||||||
{
|
{
|
||||||
//Handle Escape Event
|
//Handle Escape Event: Don't forget to add Player::RewardPlayerAndGroupAtEvent
|
||||||
|
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
uiOutroStep = 1;
|
||||||
|
Phase = OUTRO;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pArthas && pArthas->isDead())
|
||||||
|
{
|
||||||
|
EnterEvadeMode();
|
||||||
|
m_creature->DisappearAndDie();
|
||||||
|
if (pInstance)
|
||||||
|
pInstance->SetData(DATA_MAL_GANIS_EVENT, FAIL);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (uiCarrionSwarmTimer < diff)
|
||||||
|
{
|
||||||
|
DoCastVictim(HEROIC(SPELL_CARRION_SWARM,H_SPELL_CARRION_SWARM));
|
||||||
|
uiCarrionSwarmTimer = 7000;
|
||||||
|
} else uiCarrionSwarmTimer -= diff;
|
||||||
|
|
||||||
|
if (uiMindBlastTimer < diff)
|
||||||
|
{
|
||||||
|
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||||
|
DoCast(pTarget, HEROIC(SPELL_MIND_BLAST,H_SPELL_MIND_BLAST));
|
||||||
|
} else uiMindBlastTimer -= diff;
|
||||||
|
|
||||||
|
if (uiVampiricTouchTimer < diff)
|
||||||
|
{
|
||||||
|
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||||
|
DoCast(pTarget, SPELL_VAMPIRIC_TOUCH);
|
||||||
|
} else uiVampiricTouchTimer -= diff;
|
||||||
|
|
||||||
|
if (uiSleepTimer < diff)
|
||||||
|
{
|
||||||
|
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||||
|
DoCast(pTarget, HEROIC(SPELL_SLEEP,H_SPELL_SLEEP));
|
||||||
|
uiSleepTimer = urand(15000,20000);
|
||||||
|
} else uiSleepTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_MAL_GANIS_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_MAL_GANIS_EVENT, DONE);
|
||||||
}
|
}
|
||||||
void KilledUnit(Unit *victim)
|
void KilledUnit(Unit *victim)
|
||||||
{
|
{
|
||||||
|
|||||||
+31
-17
@@ -1,14 +1,29 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
/* Script Data Start
|
/* Script Data Start
|
||||||
SDName: Boss meathook
|
SDName: Boss meathook
|
||||||
SDAuthor: LordVanMartin
|
SDAuthor: Tartalo
|
||||||
SD%Complete:
|
SD%Complete: 100
|
||||||
SDComment:
|
SDComment: It may need timer adjustment
|
||||||
SDCategory:
|
SDCategory:
|
||||||
Script Data End */
|
Script Data End */
|
||||||
|
|
||||||
/*** SQL START ***
|
|
||||||
update creature_template set scriptname = 'boss_meathook' where entry = '';
|
|
||||||
*** SQL END ***/
|
|
||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "culling_of_stratholme.h"
|
#include "culling_of_stratholme.h"
|
||||||
|
|
||||||
@@ -36,6 +51,8 @@ struct TRINITY_DLL_DECL boss_meathookAI : public ScriptedAI
|
|||||||
boss_meathookAI(Creature *c) : ScriptedAI(c)
|
boss_meathookAI(Creature *c) : ScriptedAI(c)
|
||||||
{
|
{
|
||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
|
if (pInstance)
|
||||||
|
DoScriptText(SAY_SPAWN,m_creature);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 uiChainTimer;
|
uint32 uiChainTimer;
|
||||||
@@ -47,8 +64,8 @@ struct TRINITY_DLL_DECL boss_meathookAI : public ScriptedAI
|
|||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
uiChainTimer = urand(12000,17000); //seen on video 13, 17, 15, 12, 16
|
uiChainTimer = urand(12000,17000); //seen on video 13, 17, 15, 12, 16
|
||||||
uiDiseaseTimer = urand(2000,3000); //approx 3s
|
uiDiseaseTimer = urand(2000,4000); //approx 3s
|
||||||
uiFrenzyTimer = urand(20000,30000); //made it up
|
uiFrenzyTimer = urand(21000,26000); //made it up
|
||||||
|
|
||||||
if (pInstance)
|
if (pInstance)
|
||||||
pInstance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_MEATHOOK_EVENT, NOT_STARTED);
|
||||||
@@ -62,10 +79,6 @@ struct TRINITY_DLL_DECL boss_meathookAI : public ScriptedAI
|
|||||||
pInstance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
|
pInstance->SetData(DATA_MEATHOOK_EVENT, IN_PROGRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AttackStart(Unit* who) {}
|
|
||||||
|
|
||||||
void MoveInLineOfSight(Unit* who, const uint32 diff) {}
|
|
||||||
|
|
||||||
void UpdateAI(const uint32 diff)
|
void UpdateAI(const uint32 diff)
|
||||||
{
|
{
|
||||||
//Return since we have no target
|
//Return since we have no target
|
||||||
@@ -74,20 +87,21 @@ struct TRINITY_DLL_DECL boss_meathookAI : public ScriptedAI
|
|||||||
|
|
||||||
if (uiDiseaseTimer <= diff)
|
if (uiDiseaseTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), HEROIC(SPELL_DISEASE_EXPULSION,H_SPELL_DISEASE_EXPULSION));
|
DoCastAOE(HEROIC(SPELL_DISEASE_EXPULSION,H_SPELL_DISEASE_EXPULSION));
|
||||||
uiDiseaseTimer = urand(1500,4000);
|
uiDiseaseTimer = urand(1500,4000);
|
||||||
} else uiDiseaseTimer -= diff;
|
} else uiDiseaseTimer -= diff;
|
||||||
|
|
||||||
if (uiFrenzyTimer <= diff)
|
if (uiFrenzyTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(m_creature->getVictim(), SPELL_FRENZY);
|
DoCast(m_creature, SPELL_FRENZY);
|
||||||
uiFrenzyTimer = urand(20000,30000);
|
uiFrenzyTimer = urand(21000,26000);
|
||||||
} else uiFrenzyTimer -= diff;
|
} else uiFrenzyTimer -= diff;
|
||||||
|
|
||||||
if (uiChainTimer <= diff)
|
if (uiChainTimer <= diff)
|
||||||
{
|
{
|
||||||
DoCast(SelectUnit(SELECT_TARGET_RANDOM, 1), HEROIC(SPELL_CONSTRICTING_CHAINS,H_SPELL_CONSTRICTING_CHAINS)); //anyone but the tank
|
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
|
||||||
uiChainTimer = urand(2000,3000);
|
DoCast(pTarget, HEROIC(SPELL_CONSTRICTING_CHAINS,H_SPELL_CONSTRICTING_CHAINS)); //anyone but the tank
|
||||||
|
uiChainTimer = urand(2000,4000);
|
||||||
} else uiChainTimer -= diff;
|
} else uiChainTimer -= diff;
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
|
|||||||
+23
-5
@@ -1,8 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
/* Script Data Start
|
/* Script Data Start
|
||||||
SDName: Boss salramm
|
SDName: Boss salramm
|
||||||
SDAuthor: LordVanMartin
|
SDAuthor: Tartalo
|
||||||
SD%Complete:
|
SD%Complete: 80
|
||||||
SDComment:
|
SDComment: TODO: Intro
|
||||||
SDCategory:
|
SDCategory:
|
||||||
Script Data End */
|
Script Data End */
|
||||||
|
|
||||||
@@ -94,8 +112,8 @@ struct TRINITY_DLL_DECL boss_salrammAI : public ScriptedAI
|
|||||||
//Shadow bolt timer
|
//Shadow bolt timer
|
||||||
if (Shadow_bolt_Timer <= diff)
|
if (Shadow_bolt_Timer <= diff)
|
||||||
{
|
{
|
||||||
if (Unit* random_pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
|
||||||
DoCast(random_pTarget, HEROIC(SPELL_SHADOW_BOLT, H_SPELL_SHADOW_BOLT));
|
DoCast(pTarget, HEROIC(SPELL_SHADOW_BOLT, H_SPELL_SHADOW_BOLT));
|
||||||
Shadow_bolt_Timer = urand(8000,12000);
|
Shadow_bolt_Timer = urand(8000,12000);
|
||||||
} else Shadow_bolt_Timer -= diff;
|
} else Shadow_bolt_Timer -= diff;
|
||||||
|
|
||||||
|
|||||||
+38
-7
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
#ifndef DEF_CULLING_OF_STRATHOLME_H
|
#ifndef DEF_CULLING_OF_STRATHOLME_H
|
||||||
#define DEF_CULLING_OF_STRATHOLME_H
|
#define DEF_CULLING_OF_STRATHOLME_H
|
||||||
|
|
||||||
@@ -16,15 +34,28 @@ enum Data64
|
|||||||
DATA_SALRAMM,
|
DATA_SALRAMM,
|
||||||
DATA_EPOCH,
|
DATA_EPOCH,
|
||||||
DATA_MAL_GANIS,
|
DATA_MAL_GANIS,
|
||||||
DATA_INFINITE
|
DATA_INFINITE,
|
||||||
|
DATA_SHKAF_GATE,
|
||||||
|
DATA_MAL_GANIS_GATE_1,
|
||||||
|
DATA_MAL_GANIS_GATE_2,
|
||||||
|
DATA_MAL_GANIS_CHEST
|
||||||
};
|
};
|
||||||
|
|
||||||
enum Bosses
|
enum Creatures
|
||||||
{
|
{
|
||||||
CREATURE_MEATHOOK = 26529,
|
NPC_MEATHOOK = 26529,
|
||||||
CREATURE_SALRAMM = 26530,
|
NPC_SALRAMM = 26530,
|
||||||
CREATURE_EPOCH = 26532,
|
NPC_EPOCH = 26532,
|
||||||
CREATURE_MAL_GANIS = 26533,
|
NPC_MAL_GANIS = 26533,
|
||||||
CREATURE_INFINITE = 32273
|
NPC_INFINITE = 32273,
|
||||||
|
NPC_ARTHAS = 26499
|
||||||
|
};
|
||||||
|
|
||||||
|
enum GameObjects
|
||||||
|
{
|
||||||
|
GO_SHKAF_GATE = 188686,
|
||||||
|
GO_MALGANIS_GATE_1 = 187711,
|
||||||
|
GO_MALGANIS_GATE_2 = 187723,
|
||||||
|
GO_MALGANIS_CHEST = 190663
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+54
-5
@@ -1,3 +1,21 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "precompiled.h"
|
#include "precompiled.h"
|
||||||
#include "culling_of_stratholme.h"
|
#include "culling_of_stratholme.h"
|
||||||
|
|
||||||
@@ -21,6 +39,11 @@ struct TRINITY_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance
|
|||||||
uint64 uiMalGanis;
|
uint64 uiMalGanis;
|
||||||
uint64 uiInfinite;
|
uint64 uiInfinite;
|
||||||
|
|
||||||
|
uint64 uiShkafGate;
|
||||||
|
uint64 uiMalGanisGate1;
|
||||||
|
uint64 uiMalGanisGate2;
|
||||||
|
uint64 uiMalGanisChest;
|
||||||
|
|
||||||
uint8 m_auiEncounter[MAX_ENCOUNTER];
|
uint8 m_auiEncounter[MAX_ENCOUNTER];
|
||||||
std::string str_data;
|
std::string str_data;
|
||||||
|
|
||||||
@@ -36,24 +59,43 @@ struct TRINITY_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance
|
|||||||
{
|
{
|
||||||
switch(pCreature->GetEntry())
|
switch(pCreature->GetEntry())
|
||||||
{
|
{
|
||||||
case CREATURE_MEATHOOK:
|
case NPC_MEATHOOK:
|
||||||
uiMeathook = pCreature->GetGUID();
|
uiMeathook = pCreature->GetGUID();
|
||||||
break;
|
break;
|
||||||
case CREATURE_SALRAMM:
|
case NPC_SALRAMM:
|
||||||
uiSalramm = pCreature->GetGUID();
|
uiSalramm = pCreature->GetGUID();
|
||||||
break;
|
break;
|
||||||
case CREATURE_EPOCH:
|
case NPC_EPOCH:
|
||||||
uiEpoch = pCreature->GetGUID();
|
uiEpoch = pCreature->GetGUID();
|
||||||
break;
|
break;
|
||||||
case CREATURE_MAL_GANIS:
|
case NPC_MAL_GANIS:
|
||||||
uiMalGanis = pCreature->GetGUID();
|
uiMalGanis = pCreature->GetGUID();
|
||||||
break;
|
break;
|
||||||
case CREATURE_INFINITE:
|
case NPC_INFINITE:
|
||||||
uiInfinite = pCreature->GetGUID();
|
uiInfinite = pCreature->GetGUID();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OnGameObjectCreate(GameObject* pGo, bool add)
|
||||||
|
{
|
||||||
|
switch(pGo->GetEntry())
|
||||||
|
{
|
||||||
|
case GO_SHKAF_GATE:
|
||||||
|
uiShkafGate = pGo->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_MALGANIS_GATE_1:
|
||||||
|
uiMalGanisGate1 = pGo->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_MALGANIS_GATE_2:
|
||||||
|
uiMalGanisGate2 = pGo->GetGUID();
|
||||||
|
break;
|
||||||
|
case GO_MALGANIS_CHEST:
|
||||||
|
uiMalGanisChest = pGo->GetGUID();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SetData(uint32 type, uint32 data)
|
void SetData(uint32 type, uint32 data)
|
||||||
{
|
{
|
||||||
switch(type)
|
switch(type)
|
||||||
@@ -69,6 +111,9 @@ struct TRINITY_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance
|
|||||||
break;
|
break;
|
||||||
case DATA_MAL_GANIS_EVENT:
|
case DATA_MAL_GANIS_EVENT:
|
||||||
m_auiEncounter[3] = data;
|
m_auiEncounter[3] = data;
|
||||||
|
GameObject *pGate;
|
||||||
|
if (data == IN_PROGRESS && (pGate = instance->GetGameObject(uiMalGanisGate2)))
|
||||||
|
pGate->SetGoState(GO_STATE_READY);
|
||||||
break;
|
break;
|
||||||
case DATA_INFINITE_EVENT:
|
case DATA_INFINITE_EVENT:
|
||||||
m_auiEncounter[4] = data;
|
m_auiEncounter[4] = data;
|
||||||
@@ -99,7 +144,11 @@ struct TRINITY_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance
|
|||||||
case DATA_MEATHOOK: return uiMeathook;
|
case DATA_MEATHOOK: return uiMeathook;
|
||||||
case DATA_SALRAMM: return uiSalramm;
|
case DATA_SALRAMM: return uiSalramm;
|
||||||
case DATA_EPOCH: return uiEpoch;
|
case DATA_EPOCH: return uiEpoch;
|
||||||
|
case DATA_MAL_GANIS: return uiMalGanis;
|
||||||
case DATA_INFINITE: return uiInfinite;
|
case DATA_INFINITE: return uiInfinite;
|
||||||
|
case DATA_MAL_GANIS_GATE_1: return uiMalGanisGate1;
|
||||||
|
case DATA_MAL_GANIS_GATE_2: return uiMalGanisGate2;
|
||||||
|
case DATA_MAL_GANIS_CHEST: return uiMalGanisChest;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user