当前位置: 首页>>代码示例>>C++>>正文


C++ GetSister函数代码示例

本文整理汇总了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);
            }
开发者ID:GlassFace,项目名称:LegacyCore_6.x.x,代码行数:32,代码来源:boss_twin_valkyr.cpp

示例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
    }
开发者ID:ahuraa,项目名称:ServerMythCore,代码行数:25,代码来源:boss_twin_valkyr.cpp

示例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);
    }
开发者ID:janus18,项目名称:TrinityCore,代码行数:13,代码来源:boss_twin_valkyr.cpp

示例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);
    }
开发者ID:Bootz,项目名称:MyCore4Kata,代码行数:18,代码来源:boss_twin_valkyr.cpp

示例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));
    }
开发者ID:GlassFace,项目名称:LegacyCore_6.x.x,代码行数:18,代码来源:boss_twin_valkyr.cpp

示例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();
 }
开发者ID:GlassFace,项目名称:LegacyCore_6.x.x,代码行数:19,代码来源:boss_twin_valkyr.cpp

示例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;
     }
 }
开发者ID:GlassFace,项目名称:LegacyCore_6.x.x,代码行数:20,代码来源:boss_twin_valkyr.cpp

示例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);
    }
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:20,代码来源:boss_twin_valkyr.cpp

示例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();
 }
开发者ID:ElunaLuaEngine,项目名称:ElunaTrinityWotlk,代码行数:22,代码来源:boss_twin_valkyr.cpp

示例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();
    }
开发者ID:ahuraa,项目名称:ServerMythCore,代码行数:98,代码来源:boss_twin_valkyr.cpp

示例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();
    }
开发者ID:Fose,项目名称:TrinityCore,代码行数:75,代码来源:boss_twin_valkyr.cpp

示例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;
//.........这里部分代码省略.........
开发者ID:AwkwardDev,项目名称:MadboxpcWOW-core-,代码行数:101,代码来源:boss_twin_valkyr.cpp


注:本文中的GetSister函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。