本文整理汇总了C++中instance_ahnkahet::SelectJedogaSacrificeControllerGuid方法的典型用法代码示例。如果您正苦于以下问题:C++ instance_ahnkahet::SelectJedogaSacrificeControllerGuid方法的具体用法?C++ instance_ahnkahet::SelectJedogaSacrificeControllerGuid怎么用?C++ instance_ahnkahet::SelectJedogaSacrificeControllerGuid使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类instance_ahnkahet
的用法示例。
在下文中一共展示了instance_ahnkahet::SelectJedogaSacrificeControllerGuid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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;
}
}
示例2: 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]);
}
}