Violet Hold: Portal timer adjustments & fixes
Zuramat the Obliberator script, by Manuel --HG-- branch : trunk
This commit is contained in:
@@ -1,14 +1,10 @@
|
|||||||
/* Script Data Start
|
/* Script Data Start
|
||||||
SDName: Boss zuramat
|
SDName: Boss zuramat
|
||||||
SDAuthor: LordVanMartin
|
|
||||||
SD%Complete:
|
SD%Complete:
|
||||||
SDComment:
|
SDComment: The phasemask for the voids dosen't work.
|
||||||
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 "violet_hold.h"
|
#include "violet_hold.h"
|
||||||
|
|
||||||
@@ -18,7 +14,11 @@ enum Spells
|
|||||||
H_SPELL_SHROUD_OF_DARKNESS = 59745,
|
H_SPELL_SHROUD_OF_DARKNESS = 59745,
|
||||||
SPELL_SUMMON_VOID_SENTRY = 54369,
|
SPELL_SUMMON_VOID_SENTRY = 54369,
|
||||||
SPELL_VOID_SHIFT = 54361,
|
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
|
enum Creatures
|
||||||
@@ -46,9 +46,15 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
|
|||||||
pInstance = c->GetInstanceData();
|
pInstance = c->GetInstanceData();
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 void_shift;
|
|
||||||
|
|
||||||
ScriptedInstance* pInstance;
|
ScriptedInstance* pInstance;
|
||||||
|
Unit* Shifted;
|
||||||
|
|
||||||
|
uint32 SpellVoidShiftTimer;
|
||||||
|
uint32 SpellSummonVoidTimer;
|
||||||
|
uint32 SpellShroudOfDarknessTimer;
|
||||||
|
uint32 SpellVoidShiftedTimer;
|
||||||
|
|
||||||
|
bool shiftcast;
|
||||||
|
|
||||||
void Reset()
|
void Reset()
|
||||||
{
|
{
|
||||||
@@ -59,6 +65,12 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
|
|||||||
else if (pInstance->GetData(DATA_WAVE_COUNT) == 12)
|
else if (pInstance->GetData(DATA_WAVE_COUNT) == 12)
|
||||||
pInstance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED);
|
pInstance->SetData(DATA_2ND_BOSS_EVENT, NOT_STARTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SpellShroudOfDarknessTimer = 22000;
|
||||||
|
SpellVoidShiftTimer = 15000;
|
||||||
|
SpellSummonVoidTimer = 12000;
|
||||||
|
|
||||||
|
shiftcast = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* who)
|
void EnterCombat(Unit* who)
|
||||||
@@ -81,8 +93,40 @@ struct TRINITY_DLL_DECL boss_zuramatAI : public ScriptedAI
|
|||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
return;
|
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();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
void JustDied(Unit* killer)
|
void JustDied(Unit* killer)
|
||||||
{
|
{
|
||||||
DoScriptText(SAY_DEATH, m_creature);
|
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);
|
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)
|
CreatureAI* GetAI_boss_zuramat(Creature* pCreature)
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ struct TRINITY_DLL_DECL instance_violet_hold : public ScriptedInstance
|
|||||||
Creature *pSinclari = instance->GetCreature(uiSinclari);
|
Creature *pSinclari = instance->GetCreature(uiSinclari);
|
||||||
if (pSinclari)
|
if (pSinclari)
|
||||||
pSinclari->SummonCreature(CREATURE_CYANIGOSA,PortalLocation[0].x,PortalLocation[0].y,
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ struct TRINITY_DLL_DECL npc_teleportation_portalAI : public ScriptedAI
|
|||||||
void reset()
|
void reset()
|
||||||
{
|
{
|
||||||
uiDespawnTimer = NEXT_WAVE_TIME;
|
uiDespawnTimer = NEXT_WAVE_TIME;
|
||||||
uiSpawnTimer = 500;
|
uiSpawnTimer = 3000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit *who) {}
|
void EnterCombat(Unit *who) {}
|
||||||
|
|||||||
@@ -263,11 +263,7 @@ bool MapManager::CanPlayerEnter(uint32 mapid, Player* player)
|
|||||||
int8 maxPlayers = (player->GetDifficulty() == DIFFICULTY_HEROIC) ? instance->maxPlayersHeroic : instance->maxPlayers;
|
int8 maxPlayers = (player->GetDifficulty() == DIFFICULTY_HEROIC) ? instance->maxPlayersHeroic : instance->maxPlayers;
|
||||||
if (maxPlayers != -1) //-1: unlimited access
|
if (maxPlayers != -1) //-1: unlimited access
|
||||||
{
|
{
|
||||||
Map::PlayerList const &players = boundedMap->GetPlayers();
|
if (boundedMap->GetPlayers().getSize() >= maxPlayers)
|
||||||
uint8 count = 0;
|
|
||||||
for (Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr)
|
|
||||||
++count;
|
|
||||||
if (count >= maxPlayers)
|
|
||||||
{
|
{
|
||||||
sLog.outDebug("MAP: Player '%s' can't enter instance '%s' because it's full.", player->GetName(), mapName);
|
sLog.outDebug("MAP: Player '%s' can't enter instance '%s' because it's full.", player->GetName(), mapName);
|
||||||
player->SendTransferAborted(mapid, TRANSFER_ABORT_MAX_PLAYERS);
|
player->SendTransferAborted(mapid, TRANSFER_ABORT_MAX_PLAYERS);
|
||||||
|
|||||||
Reference in New Issue
Block a user