本文整理汇总了C++中GetSister函数的典型用法代码示例。如果您正苦于以下问题:C++ GetSister函数的具体用法?C++ GetSister怎么用?C++ GetSister使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetSister函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ExecuteEvent
void ExecuteEvent(uint32 eventId) override
{
if (eventId == EVENT_SPECIAL_ABILITY)
{
if (CurrentStage == MAX_STAGES)
GenerateStageSequence();
switch (Stage[CurrentStage])
{
case STAGE_DARK_VORTEX:
if (Creature* sister = GetSister())
sister->AI()->DoAction(ACTION_VORTEX);
break;
case STAGE_DARK_PACT:
if (Creature* sister = GetSister())
sister->AI()->DoAction(ACTION_PACT);
break;
case STAGE_LIGHT_VORTEX:
DoAction(ACTION_VORTEX);
break;
case STAGE_LIGHT_PACT:
DoAction(ACTION_PACT);
break;
default:
break;
}
++CurrentStage;
events.ScheduleEvent(EVENT_SPECIAL_ABILITY, 45 * IN_MILLISECONDS);
}
else
boss_twin_baseAI::ExecuteEvent(eventId);
}
示例2: JustDied
void JustDied(Unit* /*pKiller*/)
{
DoScriptText(SAY_DEATH, me);
if(pInstance)
{
pInstance->SetData(DATA_HEALTH_TWIN_SHARED, 0);
if(Creature* pSister = GetSister())
{
if(!pSister->isAlive())
{
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
pInstance->SetData(TYPE_VALKIRIES, DONE);
Summons.DespawnAll();
} else {
pInstance->SetData(TYPE_VALKIRIES, SPECIAL);
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
}
}
}
Summons.DespawnAll();
if(fight_Timer <= 180000) //3 min
pInstance->DoCompleteAchievement(RAID_MODE(3799, 3815, 3799, 3815)); //Salt and Pepper
}
示例3: EnterCombat
void EnterCombat(Unit* /*who*/) override
{
me->SetInCombatWithZone();
if (Creature* pSister = GetSister())
{
me->AddAura(MyEmphatySpellId, pSister);
pSister->SetInCombatWithZone();
}
instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS);
Talk(SAY_AGGRO);
DoCast(me, SurgeSpellId);
}
示例4: EnterCombat
void EnterCombat(Unit* /*who*/)
{
me->SetInCombatWithZone();
if (m_pInstance)
{
if (Creature* pSister = GetSister())
me->AddAura(m_uiMyEmphatySpellId, pSister);
m_pInstance->SetData(TYPE_VALKIRIES, IN_PROGRESS);
}
if (me->isAlive())
{
me->SummonCreature(m_uiEssenceNpcId, EssenceLocation[0].GetPositionX(), EssenceLocation[0].GetPositionY(), EssenceLocation[0].GetPositionZ());
me->SummonCreature(m_uiEssenceNpcId, EssenceLocation[1].GetPositionX(), EssenceLocation[1].GetPositionY(), EssenceLocation[1].GetPositionZ());
}
DoScriptText(SAY_AGGRO, me);
DoCast(me, m_uiSurgeSpellId);
}
示例5: EnterCombat
void EnterCombat(Unit* /*who*/) override
{
me->SetInCombatWithZone();
if (Creature* pSister = GetSister())
{
me->AddAura(MyEmphatySpellId, pSister);
pSister->SetInCombatWithZone();
}
instance->SetBossState(BOSS_VALKIRIES, IN_PROGRESS);
Talk(SAY_AGGRO);
DoCast(me, SurgeSpellId);
events.ScheduleEvent(EVENT_TWIN_SPIKE, 20 * IN_MILLISECONDS);
events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6 * MINUTE*IN_MILLISECONDS : 10 * MINUTE*IN_MILLISECONDS);
if (IsHeroic())
events.ScheduleEvent(EVENT_TOUCH, urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS));
}
示例6: JustDied
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);
if (Creature* pSister = GetSister())
{
if (!pSister->IsAlive())
{
me->SetFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
pSister->SetFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
_JustDied();
}
else
{
me->RemoveFlag(OBJECT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
instance->SetBossState(BOSS_VALKIRIES, SPECIAL);
}
}
summons.DespawnAll();
}
示例7: DoAction
void DoAction(int32 action) override
{
switch (action)
{
case ACTION_VORTEX:
Talk(EMOTE_VORTEX);
DoCastAOE(VortexSpellId);
break;
case ACTION_PACT:
Talk(EMOTE_TWIN_PACT);
Talk(SAY_TWIN_PACT);
if (Creature* sister = GetSister())
sister->CastSpell(sister, SPELL_POWER_TWINS, false);
DoCast(me, ShieldSpellId);
DoCast(me, TwinPactSpellId);
break;
default:
break;
}
}
示例8: JustEngagedWith
void JustEngagedWith(Unit* /*who*/) override
{
DoZoneInCombat();
if (Creature* pSister = GetSister())
{
me->AddAura(MyEmphatySpellId, pSister);
DoZoneInCombat(pSister);
}
instance->SetBossState(DATA_TWIN_VALKIRIES, IN_PROGRESS);
Talk(SAY_AGGRO);
DoCast(me, SurgeSpellId);
me->SetCombatPulseDelay(5);
me->setActive(true);
events.ScheduleEvent(EVENT_TWIN_SPIKE, 20s);
events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6min : 8min);
if (IsHeroic())
events.ScheduleEvent(EVENT_TOUCH, 10s, 15s);
}
示例9: JustDied
void JustDied(Unit* /*killer*/) override
{
Talk(SAY_DEATH);
if (Creature* pSister = GetSister())
{
if (!pSister->IsAlive())
{
me->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
pSister->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
events.Reset();
summons.DespawnAll();
HandleRemoveAuras();
instance->SetBossState(DATA_TWIN_VALKIRIES, DONE);
}
else
{
me->RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
instance->SetBossState(DATA_TWIN_VALKIRIES, SPECIAL);
}
}
summons.DespawnAll();
}
示例10: UpdateAI
void UpdateAI(const uint32 diff)
{
if(me->isInCombat())
fight_Timer += diff;
if(!pInstance || !UpdateVictim())
return;
if(pInstance->GetData(DATA_HEALTH_TWIN_SHARED) != 0)
me->SetHealth(pInstance->GetData(DATA_HEALTH_TWIN_SHARED));
else
me->SetHealth(1);
switch(m_uiStage)
{
case 0:
break;
case 1: // Vortex
if(m_uiSpecialAbilityTimer <= diff)
{
if(Creature* pSister = GetSister())
pSister->AI()->DoAction(ACTION_VORTEX);
DoScriptText(m_uiVortexEmote, me);
DoScriptText(m_uiVortexSay, me);
DoCastAOE(m_uiVortexSpellId);
m_uiStage = 0;
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
}
else
m_uiSpecialAbilityTimer -= diff;
break;
case 2: // Shield+Pact
if(m_uiSpecialAbilityTimer <= diff)
{
if(Creature* pSister = GetSister())
pSister->AI()->DoAction(ACTION_PACT);
DoScriptText(EMOTE_SHIELD, me);
DoScriptText(SAY_SHIELD, me);
DoCast(me, m_uiShieldSpellId);
DoCast(me, m_uiTwinPactSpellId);
m_uiStage = 0;
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
}
else
m_uiSpecialAbilityTimer -= diff;
break;
default:
break;
}
if(m_uiSpikeTimer <= diff)
{
DoCastVictim(m_uiSpikeSpellId);
m_uiSpikeTimer = 20*IN_MILLISECONDS;
}
else
m_uiSpikeTimer -= diff;
if(IsHeroic() && m_uiTouchTimer <= diff)
{
if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true, m_uiOtherEssenceSpellId))
me->CastCustomSpell(m_uiTouchSpellId, SPELLVALUE_MAX_TARGETS, 1, target, false);
m_uiTouchTimer = urand(10, 15)*IN_MILLISECONDS;
}
else
m_uiTouchTimer -= diff;
if(m_uiColorballsTimer <= diff)
{
if(m_uiWaveCount >= 2)
{
SummonColorballs(12);
m_uiWaveCount = 0;
}
else
{
SummonColorballs(2);
m_uiWaveCount++;
}
m_uiColorballsTimer = 15*IN_MILLISECONDS;
}
else
m_uiColorballsTimer -= diff;
if(!m_bIsBerserk && m_uiBerserkTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
DoScriptText(SAY_BERSERK, me);
m_bIsBerserk = true;
}
else
m_uiBerserkTimer -= diff;
if(me->HasUnitState(UNIT_STAT_CASTING))
return;
DoMeleeAttackIfReady();
}
示例11: UpdateAI
void UpdateAI(uint32 diff)
{
if (!instance || !UpdateVictim())
return;
if (me->HasUnitState(UNIT_STATE_CASTING))
return;
switch (Stage)
{
case 0:
break;
case 1: // Vortex
if (SpecialAbilityTimer <= diff)
{
if (Creature* pSister = GetSister())
pSister->AI()->DoAction(ACTION_VORTEX);
Talk(VortexEmote);
DoCastAOE(VortexSpellId);
Stage = 0;
SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
}
else
SpecialAbilityTimer -= diff;
break;
case 2: // Shield + Pact
if (SpecialAbilityTimer <= diff)
{
Talk(EMOTE_TWINK_PACT);
Talk(SAY_TWINK_PACT);
if (Creature* pSister = GetSister())
{
pSister->AI()->DoAction(ACTION_PACT);
pSister->CastSpell(pSister, SPELL_POWER_TWINS, false);
}
DoCast(me, ShieldSpellId);
DoCast(me, TwinPactSpellId);
Stage = 0;
SpecialAbilityTimer = 1*MINUTE*IN_MILLISECONDS;
}
else
SpecialAbilityTimer -= diff;
break;
default:
break;
}
if (SpikeTimer <= diff)
{
DoCastVictim(SpikeSpellId);
SpikeTimer = 20*IN_MILLISECONDS;
}
else
SpikeTimer -= diff;
if (IsHeroic() && TouchTimer <= diff)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 200.0f, true, OtherEssenceSpellId))
me->CastCustomSpell(TouchSpellId, SPELLVALUE_MAX_TARGETS, 1, target, false);
TouchTimer = urand(10*IN_MILLISECONDS, 15*IN_MILLISECONDS);
}
else
TouchTimer -= diff;
if (!IsBerserk && BerserkTimer <= diff)
{
DoCast(me, SPELL_BERSERK);
Talk(SAY_BERSERK);
IsBerserk = true;
}
else
BerserkTimer -= diff;
DoMeleeAttackIfReady();
}
示例12: UpdateAI
void UpdateAI(const uint32 uiDiff)
{
if (!m_pInstance || !UpdateVictim())
return;
if (m_pInstance->GetData(DATA_HEALTH_TWIN_SHARED) != 0)
me->SetHealth(m_pInstance->GetData(DATA_HEALTH_TWIN_SHARED));
else
me->SetHealth(1);
switch (m_uiStage)
{
case 0:
break;
case 1: // Vortex
if (m_uiSpecialAbilityTimer <= uiDiff)
{
if (Creature* pSister = GetSister())
pSister->AI()->DoAction(ACTION_VORTEX);
DoScriptText(m_uiVortexEmote, me);
DoScriptText(m_uiVortexSay, me);
DoCastAOE(m_uiVortexSpellId);
m_uiStage = 0;
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
}
else
m_uiSpecialAbilityTimer -= uiDiff;
break;
case 2: // Shield+Pact
if (m_uiSpecialAbilityTimer <= uiDiff)
{
if (Creature* pSister = GetSister())
pSister->AI()->DoAction(ACTION_PACT);
DoScriptText(EMOTE_SHIELD, me);
DoScriptText(SAY_SHIELD, me);
DoCast(me, m_uiShieldSpellId);
DoCast(me, m_uiTwinPactSpellId);
m_uiStage = 0;
m_uiSpecialAbilityTimer = MINUTE*IN_MILLISECONDS;
}
else
m_uiSpecialAbilityTimer -= uiDiff;
break;
default:
break;
}
if (m_uiSpikeTimer <= uiDiff)
{
DoCastVictim(m_uiSpikeSpellId);
m_uiSpikeTimer = 20*IN_MILLISECONDS;
}
else
m_uiSpikeTimer -= uiDiff;
if (IsHeroic() && m_uiTouchTimer <= uiDiff)
{
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 200, true, m_uiOtherEssenceSpellId))
if (pTarget->isAlive())
{
me->AddAura(m_uiTouchSpellId,pTarget);
m_uiTouchTimer = 20*IN_MILLISECONDS;
}
else
m_uiTouchTimer = 0;
else
if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0,200,true))
if (pTarget->isAlive() && !pTarget->HasAura(m_uiMyEssenceSpellId))
{
me->AddAura(m_uiTouchSpellId,pTarget);
m_uiTouchTimer = 20*IN_MILLISECONDS;
}
else
m_uiTouchTimer = 0;
}
else
m_uiTouchTimer -= uiDiff;
if (m_uiColorballsTimer <= uiDiff)
{
if (m_uiWaveCount >= 2)
{
SummonColorballs(12);
m_uiWaveCount = 0;
}
else
{
SummonColorballs(2);
m_uiWaveCount++;
}
m_uiColorballsTimer = 15*IN_MILLISECONDS;
}
else
m_uiColorballsTimer -= uiDiff;
if (!m_bIsBerserk && m_uiBerserkTimer <= uiDiff)
{
DoCast(me, SPELL_BERSERK);
DoScriptText(SAY_BERSERK, me);
m_bIsBerserk = true;
//.........这里部分代码省略.........