Core/Scripts: Novos the Summoner should only summon 4 Crystal Handlers.

--HG--
branch : trunk
This commit is contained in:
_manuel_
2010-12-15 12:16:31 -03:00
parent ad13cd89b5
commit 6f551d853f
@@ -77,6 +77,7 @@ public:
uint32 uiTimer; uint32 uiTimer;
uint32 uiCrystalHandlerTimer; uint32 uiCrystalHandlerTimer;
uint8 crystalHandlerAmount;
bool bAchiev; bool bAchiev;
@@ -95,6 +96,7 @@ public:
bAchiev = true; bAchiev = true;
me->CastStop(); me->CastStop();
lSummons.DespawnAll(); lSummons.DespawnAll();
crystalHandlerAmount = 0;
if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE)) if (me->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE))
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
@@ -152,13 +154,16 @@ public:
//DoCast(me, SPELL_SUMMON_MINIONS); //DoCast(me, SPELL_SUMMON_MINIONS);
uiTimer = 3*IN_MILLISECONDS; uiTimer = 3*IN_MILLISECONDS;
} else uiTimer -= diff; } else uiTimer -= diff;
if (uiCrystalHandlerTimer <= diff) if (crystalHandlerAmount < 4)
{ {
DoScriptText(SAY_NECRO_ADD, me); if (uiCrystalHandlerTimer <= diff)
Creature *pCrystalHandler = me->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS); {
pCrystalHandler->GetMotionMaster()->MovePoint(0, AddDestinyPoint); DoScriptText(SAY_NECRO_ADD, me);
uiCrystalHandlerTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS); Creature *pCrystalHandler = me->SummonCreature(CREATURE_CRYSTAL_HANDLER, CrystalHandlerSpawnPoint, TEMPSUMMON_CORPSE_TIMED_DESPAWN,20*IN_MILLISECONDS);
} else uiCrystalHandlerTimer -= diff; pCrystalHandler->GetMotionMaster()->MovePoint(0, AddDestinyPoint);
uiCrystalHandlerTimer = urand(20*IN_MILLISECONDS,30*IN_MILLISECONDS);
} else uiCrystalHandlerTimer -= diff;
}
break; break;
case PHASE_2: case PHASE_2:
if (uiTimer <= diff) if (uiTimer <= diff)
@@ -195,6 +200,9 @@ public:
void JustSummoned(Creature *summon) void JustSummoned(Creature *summon)
{ {
if (summon->GetEntry() == CREATURE_CRYSTAL_HANDLER)
crystalHandlerAmount++;
lSummons.Summon(summon); lSummons.Summon(summon);
} }