本文整理汇总了C++中instance_ulduar::SetData方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_ulduar::SetData方法的具体用法?C++ instance_ulduar::SetData怎么用?C++ instance_ulduar::SetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_ulduar
的用法示例。
在下文中一共展示了instance_ulduar::SetData方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Aggro
void Aggro(Unit* /*pWho*/) override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_XT002, IN_PROGRESS);
m_pInstance->SetData(TYPE_XT002_HARD, NOT_STARTED);
}
DoScriptText(SAY_AGGRO, m_creature);
}
示例2: Aggro
void Aggro(Unit* /*pWho*/) override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_HODIR, IN_PROGRESS);
m_pInstance->SetData(TYPE_HODIR_HARD, DONE);
}
DoScriptText(SAY_AGGRO, m_creature);
DoCastSpellIfCan(m_creature, SPELL_BITTING_COLD, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, SPELL_ICICLE_AURA, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT);
DoCastSpellIfCan(m_creature, SPELL_SHATTER_CHEST, CAST_TRIGGERED | CAST_AURA_NOT_PRESENT);
}
示例3: Aggro
void Aggro(Unit* /*pWho*/) override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_THORIM, IN_PROGRESS);
m_pInstance->SetData(TYPE_THORIM_HARD, NOT_STARTED);
m_pInstance->GetThunderOrbsGuids(m_lUpperOrbsGuids);
m_pInstance->GetThorimBunniesGuids(m_lUpperBunniesGuids, true);
m_pInstance->GetThorimBunniesGuids(m_lLowerBunniesGuids, false);
}
StartNextDialogueText(SAY_AGGRO_1);
}
示例4: JustDied
void JustDied(Unit* /*pKiller*/) override
{
if (m_pInstance)
m_pInstance->SetData(TYPE_XT002, DONE);
DoScriptText(SAY_DEATH, m_creature);
}
示例5: JustReachedHome
void JustReachedHome() override
{
if (!m_pInstance)
return;
if (m_bEventFinished)
{
if (m_pInstance->GetData(TYPE_ALGALON) == DONE)
{
// complete the achiev and start outro dialogue
DoCastSpellIfCan(m_creature, SPELL_KILL_CREDIT, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, SPELL_SUPERMASSIVE_FAIL, CAST_TRIGGERED);
StartNextDialogueText(NPC_ALGALON);
}
else
StartNextDialogueText(SAY_DESPAWN_1);
}
else
m_pInstance->SetData(TYPE_ALGALON, FAIL);
// despawn everything
for (GuidList::const_iterator itr = m_lSummonedGuids.begin(); itr != m_lSummonedGuids.end(); ++itr)
{
if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr))
pSummoned->ForcedDespawn();
}
}
示例6: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
m_pInstance->SetData(TYPE_RAZORSCALE, FAIL);
m_creature->GetMotionMaster()->MoveRandomAroundPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 10.0f);
}
示例7: Aggro
void Aggro(Unit* /*pWho*/) override
{
if (m_pInstance)
m_pInstance->SetData(TYPE_KOLOGARN, IN_PROGRESS);
DoScriptText(SAY_AGGRO, m_creature);
}
示例8: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_FREYA, FAIL);
// reset elders
if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_BRIGHTLEAF))
{
if (pElder->isAlive())
{
pElder->AI()->EnterEvadeMode();
pElder->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
}
if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_IRONBRACH))
{
if (pElder->isAlive())
{
pElder->AI()->EnterEvadeMode();
pElder->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
}
if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_STONEBARK))
{
if (pElder->isAlive())
{
pElder->AI()->EnterEvadeMode();
pElder->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
}
}
}
}
示例9: Aggro
void Aggro(Unit* /*pWho*/) override
{
if (m_pInstance)
{
// start the counter at the first aggro
if (m_pInstance->GetData(TYPE_ALGALON) == SPECIAL)
{
m_pInstance->DoUpdateWorldState(WORLD_STATE_TIMER, 1);
m_pInstance->SetData(TYPE_ALGALON_TIMER, 60);
}
m_pInstance->SetData(TYPE_ALGALON, IN_PROGRESS);
}
DoCastSpellIfCan(m_creature, SPELL_SUPERMASSIVE_FAIL, CAST_TRIGGERED);
// Note: it's not clear wether these texts should be yelled on every aggro
StartNextDialogueText(SAY_AGGRO);
}
示例10: JustDied
void JustDied(Unit* /*pKiller*/) override
{
if (m_pInstance)
m_pInstance->SetData(TYPE_KOLOGARN, DONE);
DoScriptText(SAY_DEATH, m_creature);
DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED);
}
示例11: DamageTaken
void DamageTaken(Unit* /*pDoneBy*/, uint32& uiDamage) override
{
// switch to phase 2 as soon as it's hit by any damage
if (m_uiPhase == PHASE_ARENA && uiDamage > 0)
{
StartNextDialogueText(SAY_JUMP);
m_uiPhase = PHASE_TRANSITION;
// prepare the hard mode if necessary
if (m_pInstance && m_pInstance->GetData(TYPE_THORIM_HARD) != FAIL)
{
if (Creature* pSif = m_pInstance->GetSingleCreatureFromStorage(NPC_SIF))
pSif->InterruptNonMeleeSpells(false);
m_pInstance->SetData(TYPE_THORIM_HARD, DONE);
}
return;
}
// handle outro
if (uiDamage >= m_creature->GetHealth())
{
uiDamage = 0;
if (!m_bEventFinished)
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_THORIM, DONE);
// start a different outro version for hard mode
if (m_pInstance->GetData(TYPE_THORIM_HARD) == DONE)
StartNextDialogueText(SPELL_STORMHAMMER_OUTRO);
else
StartNextDialogueText(SAY_DEFEATED);
}
m_creature->CastSpell(m_creature, SPELL_THORIM_CREDIT, true);
m_creature->setFaction(FACTION_ID_FRIENDLY);
m_bEventFinished = true;
EnterEvadeMode();
}
}
}
示例12: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_XT002, FAIL);
// mount the Heart back at the right seat after wipe or respawn (respawn handled in DB)
m_uiMountTimer = 1000;
}
}
示例13: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
m_pInstance->SetData(TYPE_KOLOGARN, FAIL);
// kill both hands - will be respawned
m_creature->RemoveAllAuras();
DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED);
DoCastSpellIfCan(m_creature, SPELL_INSTAKILL_KOLOGARN_ARM, CAST_TRIGGERED);
}
示例14: Aggro
void Aggro(Unit* /*pWho*/) override
{
if (m_pInstance)
{
m_pInstance->SetData(TYPE_RAZORSCALE, IN_PROGRESS);
// load engineers and harpoon data
m_pInstance->GetEngineersGuids(m_lEngineersGuids);
m_pInstance->GetTrappersGuids(m_lTrappersGuids);
m_pInstance->GetHarpoonsGuids(m_vHarpoonsGuids);
}
}
示例15: FetchElders
// check for all elders alive
void FetchElders()
{
if (!m_pInstance)
return;
uint8 uiEldersAlive = 0;
if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_BRIGHTLEAF))
{
if (pElder->isAlive())
{
pElder->CastSpell(pElder, m_bIsRegularMode ? SPELL_BRIGHTLEAF_ESSENCE_CHANNEL : SPELL_BRIGHTLEAF_ESSENCE_CHANNEL_H, false, NULL, NULL, m_creature->GetObjectGuid());
pElder->CastSpell(pElder, SPELL_FULL_HEAL, true);
m_uiUnstableEnergyTimer = 25000;
++uiEldersAlive;
}
}
if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_IRONBRACH))
{
if (pElder->isAlive())
{
pElder->CastSpell(pElder, m_bIsRegularMode ? SPELL_IRONBRANCH_ESSENCE_CHANNEL : SPELL_IRONBRANCH_ESSENCE_CHANNEL_H, false, NULL, NULL, m_creature->GetObjectGuid());
pElder->CastSpell(pElder, SPELL_FULL_HEAL, true);
m_uiIronRootsTimer = 60000;
++uiEldersAlive;
}
}
if (Creature* pElder = m_pInstance->GetSingleCreatureFromStorage(NPC_ELDER_STONEBARK))
{
if (pElder->isAlive())
{
pElder->CastSpell(pElder, m_bIsRegularMode ? SPELL_STONEBARK_ESSEMCE_CHANNEL : SPELL_STONEBARK_ESSEMCE_CHANNEL_H, false, NULL, NULL, m_creature->GetObjectGuid());
pElder->CastSpell(pElder, SPELL_FULL_HEAL, true);
m_uiGroundTremorTimer = 10000;
++uiEldersAlive;
}
}
// store the info about the elders alive
m_pInstance->SetData(TYPE_FREYA_HARD, uiEldersAlive);
if (uiEldersAlive)
{
DoScriptText(SAY_AGGRO_HARD, m_creature);
m_uiDrainEldersTimer = 5000;
}
else
DoScriptText(SAY_AGGRO, m_creature);
}