Skip to content
This repository has been archived by the owner on Mar 30, 2019. It is now read-only.

Commit

Permalink
endtüren in utgarde burg jetzt offen
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp.dallig committed Oct 28, 2011
1 parent e6cc0fc commit caa03c7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
18 changes: 14 additions & 4 deletions scripts/northrend/utgarde_keep/utgarde_keep/boss_ingvar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,12 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI
{
boss_ingvarAI(Creature* pCreature) : ScriptedAI(pCreature)
{
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
m_pInstance = (instance_utgarde_keep*)pCreature->GetInstanceData();
m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty();
Reset();
}

ScriptedInstance* m_pInstance;
instance_utgarde_keep* m_pInstance;
bool m_bIsRegularMode;

bool m_bIsResurrected;
Expand Down Expand Up @@ -131,9 +131,17 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI

void Aggro(Unit* pWho)
{
if (m_pInstance)
m_pInstance->SetData(TYPE_INGVAR, IN_PROGRESS);
DoScriptText(m_bIsResurrected ? SAY_AGGRO_SECOND : SAY_AGGRO_FIRST, m_creature);
}

void JustReachedHome()
{
if (m_pInstance)
m_pInstance->SetData(TYPE_INGVAR, FAIL);
}


void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
{
Expand Down Expand Up @@ -161,6 +169,8 @@ struct MANGOS_DLL_DECL boss_ingvarAI : public ScriptedAI

void JustDied(Unit* pKiller)
{
if (m_pInstance)
m_pInstance->SetData(TYPE_INGVAR, DONE);
DoScriptText(SAY_DEATH_SECOND, m_creature);
if (Player* pPlayerKiller = pKiller->GetCharmerOrOwnerPlayerOrPlayerItself())
pPlayerKiller->RewardPlayerAndGroupAtEvent(NPC_INGVAR_ACHIEVEMENT, m_creature);
Expand Down Expand Up @@ -315,12 +325,12 @@ struct MANGOS_DLL_DECL npc_annhyldeAI : public ScriptedAI
{
npc_annhyldeAI(Creature* pCreature) : ScriptedAI(pCreature)
{
m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData();
m_pInstance = (instance_utgarde_keep*)pCreature->GetInstanceData();
m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty();
Reset();
}

ScriptedInstance* m_pInstance;
instance_utgarde_keep* m_pInstance;
bool m_bIsRegularMode;

uint32 SpeakTimer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ void instance_utgarde_keep::OnObjectCreate(GameObject* pGo)
if (m_auiEncounter[TYPE_BELLOW_3] == DONE)
pGo->SetGoState(GO_STATE_ACTIVE);
break;

case GO_EXITDOOR_1:
case GO_EXITDOOR_2:
break;
default:
return;
}
Expand All @@ -100,6 +102,11 @@ void instance_utgarde_keep::SetData(uint32 uiType, uint32 uiData)
case TYPE_SKARVALD_DALRONN:
case TYPE_INGVAR:
m_auiEncounter[uiType] = uiData;
if (uiData == DONE)
{
DoUseDoorOrButton(GO_EXITDOOR_1);
DoUseDoorOrButton(GO_EXITDOOR_2);
}
break;
case TYPE_BELLOW_1:
m_auiEncounter[uiType] = uiData;
Expand Down
3 changes: 3 additions & 0 deletions scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ enum
GO_FORGEFIRE_2 = 186693,
GO_FORGEFIRE_3 = 186691,

GO_EXITDOOR_1 = 186756,
GO_EXITDOOR_2 = 186694,

ACHIEV_CRIT_ON_THE_ROCKS = 7231,
};

Expand Down

0 comments on commit caa03c7

Please sign in to comment.