本文整理汇总了C++中instance_ahnkahet类的典型用法代码示例。如果您正苦于以下问题:C++ instance_ahnkahet类的具体用法?C++ instance_ahnkahet怎么用?C++ instance_ahnkahet使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了instance_ahnkahet类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: JustDied
void JustDied(Unit* /*pKiller*/) override
{
DoScriptText(SAY_DEATH, m_creature);
if (m_pInstance)
m_pInstance->SetData(TYPE_JEDOGA, DONE);
}
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:7,代码来源:boss_jedoga.cpp
示例2: JustDied
void JustDied(Unit* pKiller)
{
DoScriptText(SAY_DEATH, m_creature);
if (m_pInstance)
m_pInstance->SetData(TYPE_NADOX, DONE);
}
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:7,代码来源:boss_nadox.cpp
示例3: Aggro
void Aggro(Unit* pWho)
{
DoScriptText(SAY_AGGRO, m_creature);
if (m_pInstance)
m_pInstance->SetData(TYPE_NADOX, IN_PROGRESS);
}
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:7,代码来源:boss_nadox.cpp
示例4: MovementInform
void MovementInform(uint32 uiMoveType, uint32 uiPointId) override
{
if (uiMoveType != POINT_MOTION_TYPE)
return;
switch (uiPointId)
{
// Prepare for combat
case POINT_ID_PREPARE:
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->RemoveAurasDueToSpell(SPELL_LIGHTNING_VISUAL);
m_creature->RemoveAurasDueToSpell(SPELL_SPHERE_VISUAL);
m_creature->SetLevitate(false);
break;
// Prepare for sacrifice lift off
case POINT_ID_SACRIFICE:
DoCastSpellIfCan(m_creature, SPELL_HOVER_FALL);
m_creature->SetLevitate(true);
m_creature->GetMotionMaster()->MovePoint(POINT_ID_LEVITATE, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ() + 10.0f);
break;
// Call a volunteer to sacrifice
case POINT_ID_LEVITATE:
if (Creature* pVolunteer = m_creature->GetMap()->GetCreature(SelectRandomVolunteer()))
{
DoScriptText(urand(0, 1) ? SAY_CALL_SACRIFICE1 : SAY_CALL_SACRIFICE2, m_creature);
DoScriptText(SAY_VOLUNTEER_CHOOSEN, pVolunteer);
pVolunteer->RemoveAurasDueToSpell(SPELL_VOLUNTEER_SPHERE);
pVolunteer->SetStandState(UNIT_STAND_STATE_STAND);
pVolunteer->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
pVolunteer->CastSpell(pVolunteer, SPELL_PILLAR_LIGHTNING, false);
pVolunteer->SetWalk(true);
pVolunteer->GetMotionMaster()->MovePoint(POINT_ID_SACRIFICE, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]);
}
// Set visual aura
if (m_pInstance)
{
if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_pInstance->SelectJedogaSacrificeControllerGuid()))
pTemp->CastSpell(pTemp, SPELL_SACRIFICE_VISUAL, false);
}
break;
// Resume combat
case POINT_ID_COMBAT:
m_creature->RemoveAurasDueToSpell(SPELL_HOVER_FALL);
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_bIsSacrificing = false;
SetCombatMovement(true);
m_creature->SetLevitate(false);
if (m_creature->getVictim())
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
break;
}
}
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:59,代码来源:boss_jedoga.cpp
示例5: Aggro
void Aggro(Unit* /*pWho*/) override
{
DoScriptText(SAY_AGGRO, m_creature);
DoCallVolunteers();
if (m_pInstance)
m_pInstance->SetData(TYPE_JEDOGA, IN_PROGRESS);
}
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:8,代码来源:boss_jedoga.cpp
示例6: SummonedCreatureJustDied
void SummonedCreatureJustDied(Creature* pSummoned) override
{
if (pSummoned->GetEntry() == NPC_TWILIGHT_VOLUNTEER)
{
m_lVolunteerGuidList.remove(pSummoned->GetObjectGuid());
if (m_pInstance)
{
if (Creature* pTemp = m_creature->GetMap()->GetCreature(m_pInstance->SelectJedogaSacrificeControllerGuid()))
pTemp->RemoveAurasDueToSpell(SPELL_SACRIFICE_VISUAL);
}
m_creature->GetMotionMaster()->MovePoint(POINT_ID_COMBAT, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]);
}
}
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:15,代码来源:boss_jedoga.cpp
示例7: UpdateAI
void UpdateAI(const uint32 uiDiff) override
{
if (m_uiVisualTimer)
{
if (m_uiVisualTimer <= uiDiff)
{
GuidList lControllersList;
if (m_pInstance)
m_pInstance->GetJedogaEventControllersList(lControllersList);
for (GuidList::const_iterator itr = lControllersList.begin(); itr != lControllersList.end(); ++itr)
{
if (Creature* pTemp = m_creature->GetMap()->GetCreature(*itr))
pTemp->CastSpell(m_creature, SPELL_BEAM_VISUAL, false);
}
if (DoCastSpellIfCan(m_creature, SPELL_LIGHTNING_VISUAL) == CAST_OK)
m_uiVisualTimer = 0;
}
else
m_uiVisualTimer -= uiDiff;
}
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
// Don't use abilities while sacrificing
if (m_bIsSacrificing)
return;
// Note: this was changed in 3.3.2 and now it does this only once
if (m_creature->GetHealthPercent() < 50.0f && !m_bSacrifice)
{
SetCombatMovement(false);
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
m_creature->GetMotionMaster()->MovePoint(POINT_ID_SACRIFICE, aJedogaLandingLoc[0], aJedogaLandingLoc[1], aJedogaLandingLoc[2]);
m_bSacrifice = true;
m_bIsSacrificing = true;
}
if (m_uiThundershockTimer < uiDiff)
{
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_THUNDERSHOCK : SPELL_THUNDERSHOCK_H);
m_uiThundershockTimer = 40000;
}
else
m_uiThundershockTimer -= uiDiff;
if (m_uiLightningBoltTimer < uiDiff)
{
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_LIGHTNING_BOLT : SPELL_LIGHTNING_BOLT_H);
m_uiLightningBoltTimer = 7000;
}
else
m_uiLightningBoltTimer -= uiDiff;
if (m_uiCycloneStrikeTimer < uiDiff)
{
DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_CYCLONE_STRIKE : SPELL_CYCLONE_STRIKE_H);
m_uiCycloneStrikeTimer = 15000;
}
else
m_uiCycloneStrikeTimer -= uiDiff;
DoMeleeAttackIfReady();
}
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:70,代码来源:boss_jedoga.cpp
示例8: JustReachedHome
void JustReachedHome() override
{
if (m_pInstance)
m_pInstance->SetData(TYPE_JEDOGA, FAIL);
}
开发者ID:jviljoen82,项目名称:ScriptDev3,代码行数:5,代码来源:boss_jedoga.cpp
示例9: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
return;
if (!m_bGuardianSummoned && m_creature->GetHealthPercent() < 50.0f)
{
// guardian is summoned at 50% of boss HP
if (m_pInstance)
{
if (Creature* pGuardianEgg = m_creature->GetMap()->GetCreature(m_pInstance->SelectRandomGuardianEggGuid()))
pGuardianEgg->CastSpell(pGuardianEgg, SPELL_SUMMON_SWARM_GUARDIAN, false);
m_bGuardianSummoned = true;
}
}
if (m_uiSummonTimer < uiDiff)
{
if (roll_chance_i(50))
DoScriptText(urand(0, 1) ? SAY_SUMMON_EGG_1 : SAY_SUMMON_EGG_2, m_creature);
if (m_pInstance)
{
// There are 2 Swarmers summoned at a timer
if (Creature* pSwarmerEgg = m_creature->GetMap()->GetCreature(m_pInstance->SelectRandomSwarmerEggGuid()))
{
for (uint8 i = 0; i < 2; ++i)
pSwarmerEgg->CastSpell(pSwarmerEgg, SPELL_SUMMON_SWARMERS, false);
}
}
m_uiSummonTimer = urand(5000, 10000);
}
else
m_uiSummonTimer -= uiDiff;
if (m_uiBroodPlagueTimer < uiDiff)
{
if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))
DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_BROOD_PLAGUE : SPELL_BROOD_PLAGUE_H);
m_uiBroodPlagueTimer = 20000;
}
else
m_uiBroodPlagueTimer -= uiDiff;
if (!m_bIsRegularMode)
{
if (m_uiBroodRageTimer < uiDiff)
{
if (DoCastSpellIfCan(m_creature, SPELL_BROOD_RAGE) == CAST_OK)
m_uiBroodRageTimer = 20000;
}
else
m_uiBroodRageTimer -= uiDiff;
}
if (!m_bBerserk && m_creature->GetPositionZ() < 24.0)
{
if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK)
m_bBerserk = true;
}
DoMeleeAttackIfReady();
}
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:66,代码来源:boss_nadox.cpp
示例10: JustReachedHome
void JustReachedHome()
{
if (m_pInstance)
m_pInstance->SetData(TYPE_NADOX, FAIL);
}
开发者ID:Bootz,项目名称:StrawberryCore,代码行数:5,代码来源:boss_nadox.cpp
注:本文中的instance_ahnkahet类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论