Skip to content

Commit

Permalink
Merge pull request #1564 from Selphius/master
Browse files Browse the repository at this point in the history
Implement Reset function to Event_Battlle_of_the_Crimson_Watch
  • Loading branch information
Selphius committed May 11, 2017
2 parents a490255 + e35d13e commit 3062a6a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/scripts/Outland/shadowmoon_valley.cpp
Expand Up @@ -1629,7 +1629,7 @@ struct npc_lord_illidan_stormrageAI : public Scripted_NoMovementAI
fLocZ = SpawnLocation[uiLocIndex + i].fLocZ;
fOrient = SpawnLocation[uiLocIndex + i].fOrient;

if (Creature* pSpawn = me->SummonCreature(WavesInfo[m_uiWaveCount].uiCreatureId, fLocX, fLocY, fLocZ, fOrient, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000))
if (Creature* pSpawn = me->SummonCreature(WavesInfo[m_uiWaveCount].uiCreatureId, fLocX, fLocY, fLocZ, fOrient, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000))
{

if (m_uiWaveCount) // only in first wave
Expand Down Expand Up @@ -1717,14 +1717,14 @@ struct npc_lord_illidan_stormrageAI : public Scripted_NoMovementAI
if (pMember->GetQuestStatus(QUEST_BATTLE_OF_THE_CRIMSON_WATCH) == QUEST_STATUS_FAILED)
{
++uiFailedMemberCount;
continue;
continue;
}

// we left event area fail quest
if (!pMember->IsWithinDistInMap(me, EVENT_AREA_RADIUS))
{
pMember->FailQuest(QUEST_BATTLE_OF_THE_CRIMSON_WATCH);
++uiFailedMemberCount;
++uiFailedMemberCount;
}
}
}
Expand Down Expand Up @@ -1803,9 +1803,11 @@ bool GOQuestAccept_GO_crystal_prison(Player* pPlayer, GameObject* /*pGo*/, Quest
if (pQuest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH )
if (Creature* pLordIllidan = GetClosestCreatureWithEntry(pPlayer, NPC_LORD_ILLIDAN, 50.0))
if (npc_lord_illidan_stormrageAI* pIllidanAI = dynamic_cast<npc_lord_illidan_stormrageAI*>(pLordIllidan->AI()))
if (!pIllidanAI->m_bEventStarted)
pIllidanAI->StartEvent(pPlayer);

if (!pIllidanAI->m_bEventStarted)
{
pIllidanAI->Reset();
pIllidanAI->StartEvent(pPlayer);
}
return true;
}

Expand Down

0 comments on commit 3062a6a

Please sign in to comment.