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

Commit

Permalink
colossus fixes und cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp.dallig committed Sep 27, 2011
1 parent 2f0ec5f commit 5fd7801
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 20 deletions.
4 changes: 3 additions & 1 deletion VC100/100ScriptDev2.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1843,7 +1843,6 @@
<ClCompile Include="..\scripts\outdoor_pvp\outdoor_pvp_northrend.cpp" />
<ClCompile Include="..\scripts\outdoor_pvp\outdoor_pvp_outland.cpp" />
<ClCompile Include="..\ScriptMgr.cpp" />
<ClCompile Include="..\scripts\battlegrounds\battlegroundSA.cpp" />
<ClCompile Include="..\scripts\world\pet_scripts.cpp" />
<ClCompile Include="..\scripts\northrend\ulduar\ulduar\boss_iron_council.cpp">
<Filter>scripts\northrend\ulduar\ulduar</Filter>
Expand All @@ -1857,6 +1856,9 @@
<ClCompile Include="..\scripts\custom\custom_cybernetic.cpp">
<Filter>scripts\custom</Filter>
</ClCompile>
<ClCompile Include="..\scripts\battlegrounds\battlegroundSA.cpp">
<Filter>scripts\battlegrounds</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\base\BSW_ai.h">
Expand Down
2 changes: 1 addition & 1 deletion scripts/custom/custom_cybernetic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ bool GossipSelect_custum_cybernetic_2(Player *pPlayer, Creature *pCreature, uint
bool GossipHello_custum_cybernetic_3(Player* pPlayer, Creature* pCreature)
{

pPlayer->PrepareGossipMenu(pCreature, pCreature->GetCreatureInfo()->GossipMenuId);
pPlayer->PrepareGossipMenu(pCreature, pCreature->GetCreatureInfo()->GossipMenuId);
pPlayer->SendPreparedGossip(pCreature);
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT,"Ich will meinen Super Tollen Ring haben.", GOSSIP_SENDER_MAIN, 555);
pPlayer->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE,pCreature->GetObjectGuid());
Expand Down
45 changes: 27 additions & 18 deletions scripts/northrend/gundrak/boss_colossus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ enum
SPELL_MIGHTY_BLOW = 54719,
SPELL_MORTAL_STRIKES = 54715,
SPELL_MORTAL_STRIKES_H = 59454,
SPELL_STUN = 54852,

// elemental's abilities
SPELL_MERGE = 54269,
Expand Down Expand Up @@ -74,17 +75,20 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI

uint32 m_uiMightyBlowTimer;
uint32 m_uiEmergeTimer;
uint32 m_uiElementarTimer;

void Reset()
{
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE | UNIT_FLAG_PASSIVE | UNIT_FLAG_UNK_6 | UNIT_FLAG_UNK_15);
SetCombatMovement(false);
m_uiPhase = PHASE_START;
m_uiEmergeTimer = 12000;
m_uiMightyBlowTimer = 3000;
m_creature->SetWalk(true);

m_uiMojoDieTimer = 4000;
m_bElementsHasMoved = false;
m_uiElementarTimer = 26000;
}

void Aggro(Unit* pWho)
Expand All @@ -103,7 +107,7 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI
{
if (m_pInstance)
m_pInstance->SetData(TYPE_COLOSSUS, DONE);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}

void KillElementals()
Expand All @@ -116,7 +120,9 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI
{
if (pMojo->isAlive())
{
m_creature->DealDamage(pMojo, pMojo->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
pMojo->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE | UNIT_FLAG_NON_ATTACKABLE);
m_creature->DealDamage(pMojo, pMojo->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
m_creature->RemoveAurasDueToSpell(16245);
}
}
}
Expand All @@ -127,9 +133,12 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI
{
if (pSpell->Id == SPELL_MERGE)
{
m_uiPhase = PHASE_NORMAL;
if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE))
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
SetCombatMovement(true);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
m_uiPhase = PHASE_NORMAL;
m_uiElementarTimer = 26000;
}
}

Expand Down Expand Up @@ -165,6 +174,7 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI
{
KillElementals();
SetCombatMovement(true);
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
m_uiPhase = PHASE_NORMAL;
}
else
Expand All @@ -187,8 +197,7 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI
{
if (DoCastSpellIfCan(m_creature, SPELL_EMERGE) == CAST_OK)
{
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
SetCombatMovement(false);
//SetCombatMovement(false);
m_uiPhase = PHASE_ELEMENTAR;
m_uiEmergeTimer = 15000;
return;
Expand All @@ -202,7 +211,16 @@ struct MANGOS_DLL_DECL boss_colossusAI : public ScriptedAI
}
case PHASE_ELEMENTAR:
{
// Do nothing

if (m_uiElementarTimer < uiDiff)
{
//SetCombatMovement(true);
//m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
m_uiPhase = PHASE_NORMAL;
m_uiElementarTimer = 26000;
}
else
m_uiElementarTimer -= uiDiff;
break;
}

Expand Down Expand Up @@ -247,16 +265,7 @@ struct MANGOS_DLL_DECL mob_colossus_elementalAI : public ScriptedAI
{
if (DoCastSpellIfCan(m_creature, SPELL_MERGE) == CAST_OK)
{
if (Creature * pColossus = m_pInstance->GetSingleCreatureFromStorage(NPC_COLOSSUS))
{
if (boss_colossusAI * pColossusAI = (boss_colossusAI*)pColossus->AI())
{
pColossusAI->m_uiPhase = PHASE_NORMAL;
pColossusAI->SetCombatMovement(true);
pColossus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
m_uiMergeTimer = 25000;
}
}
m_uiMergeTimer = 5000;
}
}
else
Expand Down

0 comments on commit 5fd7801

Please sign in to comment.