本文整理汇总了C++中instance_naxxramas类的典型用法代码示例。如果您正苦于以下问题:C++ instance_naxxramas类的具体用法?C++ instance_naxxramas怎么用?C++ instance_naxxramas使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了instance_naxxramas类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetOtherAdd
Creature* GetOtherAdd() // For Stalagg returns pFeugen, for Feugen returns pStalagg
{
switch (m_creature->GetEntry())
{
case NPC_FEUGEN: return m_pInstance->GetSingleCreatureFromStorage(NPC_STALAGG);
case NPC_STALAGG: return m_pInstance->GetSingleCreatureFromStorage(NPC_FEUGEN);
default:
return NULL;
}
}
示例2: Aggro
void Aggro(Unit* /*pWho*/)
{
if (!m_pInstance)
return;
m_pInstance->SetData(TYPE_GOTHIK, IN_PROGRESS);
// Make immune
m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_ALL, true);
m_pInstance->SetGothTriggers();
PrepareSummonPlaces();
}
示例3: Aggro
void Aggro(Unit* pWho)
{
m_creature->SetInCombatWithZone();
DoScriptText(SAY_SPEECH_1, m_creature);
if (!m_pInstance)
return;
m_pInstance->SetData(TYPE_GOTHIK, IN_PROGRESS);
m_pInstance->SetGothTriggers();
}
示例4: SpellHit
// Widow's Embrace prevents frenzy and poison bolt, if it removes frenzy, next frenzy is sceduled in 60s
// It is likely that this _should_ be handled with some dummy aura(s) - but couldn't find any
void SpellHit(Unit* /*pCaster*/, const SpellEntry* pSpellEntry) override
{
// Check if we hit with Widow's Embrave
if (pSpellEntry->Id == SPELL_WIDOWS_EMBRACE || pSpellEntry->Id == SPELL_WIDOWS_EMBRACE_H)
{
bool bIsFrenzyRemove = false;
// If we remove the Frenzy, the Enrage Timer is reseted to 60s
if (m_creature->HasAura(m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H))
{
m_uiEnrageTimer = 60000;
m_creature->RemoveAurasDueToSpell(m_bIsRegularMode ? SPELL_ENRAGE : SPELL_ENRAGE_H);
bIsFrenzyRemove = true;
}
// Achievement 'Momma said Knock you out': If we removed OR delayed the frenzy, the criteria is failed
if ((bIsFrenzyRemove || m_uiEnrageTimer < 30000) && m_pInstance)
m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_KNOCK_YOU_OUT, false);
// In any case we prevent Frenzy and Poison Bolt Volley for Widow's Embrace Duration (30s)
// We do this be setting the timers to at least bigger than 30s
m_uiEnrageTimer = std::max(m_uiEnrageTimer, (uint32)30000);
m_uiPoisonBoltVolleyTimer = std::max(m_uiPoisonBoltVolleyTimer, urand(33000, 38000));
}
}
示例5: SummonIntroCreatures
void SummonIntroCreatures(uint32 packId)
{
if (!m_pInstance)
return;
float fAngle = GetLocationAngle(packId + 1);
float fX, fY, fZ;
m_pInstance->GetChamberCenterCoords(fX, fY, fZ);
fX += M_F_RANGE * cos(fAngle);
fY += M_F_RANGE * sin(fAngle);
fZ += M_F_HEIGHT;
MaNGOS::NormalizeMapCoord(fX);
MaNGOS::NormalizeMapCoord(fY);
uint32 uiNpcEntry = NPC_SOUL_WEAVER;
for (uint8 uiI = 0; uiI < 14; ++uiI)
{
if (uiI > 0)
{
if (uiI < 4)
uiNpcEntry = NPC_UNSTOPPABLE_ABOM;
else
uiNpcEntry = NPC_SOLDIER_FROZEN;
}
float fNewX, fNewY, fNewZ;
m_creature->GetRandomPoint(fX, fY, fZ, 12.0f, fNewX, fNewY, fNewZ);
m_creature->SummonCreature(uiNpcEntry, fNewX, fNewY, fNewZ, fAngle + M_PI_F, TEMPSPAWN_CORPSE_DESPAWN, 5000);
}
}
示例6: MoveInLineOfSight
void MoveInLineOfSight(Unit* pWho) override
{
if (m_pInstance && m_pInstance->GetData(TYPE_KELTHUZAD) != IN_PROGRESS)
return;
ScriptedAI::MoveInLineOfSight(pWho);
}
示例7: SummonAdds
void SummonAdds(bool bRightSide, uint32 uiSummonEntry)
{
std::list<Creature*> lSummonList;
m_pInstance->GetGothSummonPointCreatures(lSummonList, bRightSide);
if (lSummonList.empty())
return;
uint8 uiCount = 2;
switch(uiSummonEntry)
{
case NPC_UNREL_TRAINEE:
lSummonList.sort(ObjectDistanceOrder(m_creature));
break;
case NPC_UNREL_DEATH_KNIGHT:
case NPC_UNREL_RIDER:
uiCount = 1;
lSummonList.sort(ObjectDistanceOrderReversed(m_creature));
break;
}
for(std::list<Creature*>::iterator itr = lSummonList.begin(); itr != lSummonList.end(); ++itr)
{
if (uiCount == 0)
break;
m_creature->SummonCreature(uiSummonEntry, (*itr)->GetPositionX(), (*itr)->GetPositionY(), (*itr)->GetPositionZ(), (*itr)->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
--uiCount;
}
}
示例8: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_MAEXXNA, FAIL);
}
}
示例9: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
m_pInstance->SetData(TYPE_GLUTH, FAIL);
DoCastSpellIfCan(m_creature, SPELL_DOUBLE_ATTACK, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT);
}
示例10: JustDied
void JustDied(Unit* /*pKiller*/) override
{
DoScriptText(SAY_DEATH, m_creature);
if (m_pInstance)
m_pInstance->SetData(TYPE_FAERLINA, DONE);
}
示例11: JustDied
void JustDied(Unit* /*pKiller*/)
{
DoScriptText(SAY_DEATH, m_creature);
if (m_pInstance)
m_pInstance->SetData(TYPE_GOTHIK, DONE);
}
示例12: Aggro
void Aggro(Unit* /*pWho*/) override
{
DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_FROST_AURA : SPELL_FROST_AURA_H);
if (m_pInstance)
m_pInstance->SetData(TYPE_SAPPHIRON, IN_PROGRESS);
}
示例13: Aggro
void Aggro(Unit* /*pWho*/) override
{
DoScriptText(urand(0, 1) ? SAY_AGGRO1 : SAY_AGGRO2, m_creature);
if (m_pInstance)
m_pInstance->SetData(TYPE_PATCHWERK, IN_PROGRESS);
}
示例14: JustDied
void JustDied(Unit* /*pKiller*/) override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_MAEXXNA, DONE);
}
}
示例15: Aggro
void Aggro(Unit* /*pWho*/) override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_MAEXXNA, IN_PROGRESS);
}
}