本文整理汇总了C++中instance_naxxramas::SetSpecialAchievementCriteria方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_naxxramas::SetSpecialAchievementCriteria方法的具体用法?C++ instance_naxxramas::SetSpecialAchievementCriteria怎么用?C++ instance_naxxramas::SetSpecialAchievementCriteria使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_naxxramas
的用法示例。
在下文中一共展示了instance_naxxramas::SetSpecialAchievementCriteria方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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));
}
}
示例2: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
switch (pSummoned->GetEntry())
{
case NPC_GUARDIAN:
case NPC_SOLDIER_FROZEN:
case NPC_SOUL_WEAVER:
m_lAddsSet.erase(pSummoned->GetObjectGuid());
break;
case NPC_UNSTOPPABLE_ABOM:
m_lAddsSet.erase(pSummoned->GetObjectGuid());
++m_uiKilledAbomination;
if (m_uiKilledAbomination >= ACHIEV_REQ_KILLED_ABOMINATIONS)
m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_GET_ENOUGH, true);
break;
}
}
示例3: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_SPORE && m_pInstance)
m_pInstance->SetSpecialAchievementCriteria(TYPE_ACHIEV_SPORE_LOSER, false);
}