aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortartalo <none@none>2009-10-24 15:39:32 +0200
committertartalo <none@none>2009-10-24 15:39:32 +0200
commitcee745894c599e6860b3bb112ee85054aad00899 (patch)
tree918e077117f0847e73073d33ecdc8a6781bd08bd /src
parent431ddb79917ce50d576820007f0672e7b4c386d3 (diff)
Violet Hold: Portal timer adjustments & fixes
Zuramat the Obliberator script, by Manuel --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp67
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp2
-rw-r--r--src/bindings/scripts/scripts/northrend/violet_hold/violet_hold.cpp2
-rw-r--r--src/game/MapManager.cpp6
4 files changed, 62 insertions, 15 deletions
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp
index 446a74fad8e..1684a9dec17 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/boss_zuramat.cpp
@@ -1,14 +1,10 @@
/* Script Data Start
SDName: Boss zuramat
-SDAuthor: LordVanMartin
SD%Complete:
-SDComment:
+SDComment: The phasemask for the voids dosen't work.
SDCategory:
Script Data End */
-/*** SQL START ***
-update creature_template set scriptname = '' where entry = '';
-*** SQL END ***/
#include "precompiled.h"
#include "violet_hold.h"
@@ -18,7 +14,11 @@ enum Spells
H_SPELL_SHROUD_OF_DARKNESS = 59745,
SPELL_SUMMON_VOID_SENTRY = 54369,
SPELL_VOID_SHIFT = 54361,
- H_SPELL_VOID_SHIFT = 59743
+ H_SPELL_VOID_SHIFT = 59743,
+ SPELL_VOID_SHIFTED = 54343,
+
+ SPELL_ZUMARAT_ADD_2 = 59747,
+ H_SPELL_ZUMARAT_ADD_2 = 59747
};
enum Creatures
@@ -46,9 +46,15 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
pInstance = c->GetInstanceData();
}
- uint32 void_shift;
-
ScriptedInstance* pInstance;
+ Unit* Shifted;
+
+ uint32 SpellVoidShiftTimer;
+ uint32 SpellSummonVoidTimer;
+ uint32 SpellShroudOfDarknessTimer;
+ uint32 SpellVoidShiftedTimer;
+
+ bool shiftcast;
void Reset()
{
@@ -59,6 +65,12 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
else if (pInstance->GetData(DATA_WAVE_COUNT) == 12)
pInstance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED);
}
+
+ SpellShroudOfDarknessTimer = 22000;
+ SpellVoidShiftTimer = 15000;
+ SpellSummonVoidTimer = 12000;
+
+ shiftcast = false;
}
void EnterCombat(Unit* who)
@@ -81,8 +93,40 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
if (!UpdateVictim())
return;
+ if(SpellSummonVoidTimer < diff)
+ {
+ m_creature->CastSpell(m_creature->getVictim(),SPELL_SUMMON_VOID_SENTRY,false);
+ SpellSummonVoidTimer = 20000;
+ } else SpellSummonVoidTimer -=diff;
+
+ if(SpellVoidShiftedTimer < diff && shiftcast)
+ {
+ if (Shifted)
+ m_creature->CastSpell(Shifted,SPELL_VOID_SHIFTED,false);
+ shiftcast = false;
+ } else SpellVoidShiftedTimer -=diff;
+
+ if(SpellVoidShiftTimer < diff)
+ {
+ Shifted = SelectUnit(SELECT_TARGET_RANDOM, 0);
+ if (Shifted)
+ {
+ DoCast(Shifted, HEROIC(SPELL_VOID_SHIFT, H_SPELL_VOID_SHIFT));
+ shiftcast = true;
+ SpellVoidShiftTimer = 20000;
+ }
+ SpellVoidShiftedTimer = 5000;
+ } else SpellVoidShiftTimer -=diff;
+
+ if(SpellShroudOfDarknessTimer < diff)
+ {
+ DoCast(m_creature->getVictim(), HEROIC(SPELL_SHROUD_OF_DARKNESS, H_SPELL_SHROUD_OF_DARKNESS));
+ SpellShroudOfDarknessTimer = 20000;
+ } else SpellShroudOfDarknessTimer -=diff;
+
DoMeleeAttackIfReady();
}
+
void JustDied(Unit* killer)
{
DoScriptText(SAY_DEATH, m_creature);
@@ -109,6 +153,13 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), m_creature);
}
+
+ void JustSummoned(Creature* summon)
+ {
+ summon->AI()->AttackStart(m_creature->getVictim());
+ summon->AI()->DoCastAOE(HEROIC(SPELL_ZUMARAT_ADD_2, H_SPELL_ZUMARAT_ADD_2));
+ summon->SetPhaseMask(17,true);
+ }
};
CreatureAI* GetAI_boss_zuramat(Creature* pCreature)
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
index c160e68611d..39220b2903f 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/instance_violet_hold.cpp
@@ -246,7 +246,7 @@ struct TRINITY_DLL_DECL instance_violet_hold : public ScriptedInstance
Creature *pSinclari = instance->GetCreature(uiSinclari);
if (pSinclari)
pSinclari->SummonCreature(CREATURE_CYANIGOSA,PortalLocation[0].x,PortalLocation[0].y,
- PortalLocation[0].z,PortalLocation[0].orientation,TEMPSUMMON_CORPSE_DESPAWN,0);
+ PortalLocation[0].z,PortalLocation[0].orientation,TEMPSUMMON_CORPSE_DESPAWN,90000);
break;
}
case 1:
diff --git a/src/bindings/scripts/scripts/northrend/violet_hold/violet_hold.cpp b/src/bindings/scripts/scripts/northrend/violet_hold/violet_hold.cpp
index 7888d995ceb..d75c5179b2e 100644
--- a/src/bindings/scripts/scripts/northrend/violet_hold/violet_hold.cpp
+++ b/src/bindings/scripts/scripts/northrend/violet_hold/violet_hold.cpp
@@ -47,7 +47,7 @@ struct TRINITY_DLL_DECL npc_teleportation_portalAI : public ScriptedAI
void reset()
{
uiDespawnTimer = NEXT_WAVE_TIME;
- uiSpawnTimer = 500;
+ uiSpawnTimer = 3000;
}
void EnterCombat(Unit *who) {}
diff --git a/src/game/MapManager.cpp b/src/game/MapManager.cpp
index 5b1dc609d56..7947c8d0089 100644
--- a/src/game/MapManager.cpp
+++ b/src/game/MapManager.cpp
@@ -263,11 +263,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
int8 maxPlayers = (player->GetDifficulty() == DIFFICULTY_HEROIC) ? instance->maxPlayersHeroic : instance->maxPlayers;
if (maxPlayers != -1) //-1: unlimited access
{
- Map::PlayerList const &players = boundedMap->GetPlayers();
- uint8 count = 0;
- for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
- ++count;
- if (count >= maxPlayers)
+ if (boundedMap->GetPlayers().getSize() >= maxPlayers)
{
sLog.outDebug("MAP: Player '%s' can't enter instance '%s' because it's full.", player->GetName(), mapName);
player->SendTransferAborted(mapid, TRANSFER_ABORT_MAX_PLAYERS);