當前位置: 首頁>>代碼示例>>C++>>正文


C++ GetOtherBoss函數代碼示例

本文整理匯總了C++中GetOtherBoss函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetOtherBoss函數的具體用法?C++ GetOtherBoss怎麽用?C++ GetOtherBoss使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了GetOtherBoss函數的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。

示例1: TryHealBrother

    void TryHealBrother(uint32 diff)
    {
        if (IAmVeklor())                                    // this spell heals caster and the other brother so let VN cast it
            return;

        if (Heal_Timer <= diff)
        {
            Unit* pOtherBoss = GetOtherBoss();
            if (pOtherBoss && pOtherBoss->IsWithinDist(me, 60))
            {
                DoCast(pOtherBoss, SPELL_HEAL_BROTHER);
                Heal_Timer = 1000;
            }
        } else Heal_Timer -= diff;
    }
開發者ID:madisodr,項目名稱:legacy-core,代碼行數:15,代碼來源:boss_twinemperors.cpp

示例2: TryHealBrother

    void TryHealBrother(uint32 diff)
    {
        if (IAmVeklor())                                    // this spell heals caster and the other brother so let VN cast it
            return;

        if (Heal_Timer <= diff)
        {
            Unit *pOtherBoss = GetOtherBoss();
            if (pOtherBoss && (pOtherBoss->GetDistance((const Creature *)me) <= 60))
            {
                DoCast(pOtherBoss, SPELL_HEAL_BROTHER);
                Heal_Timer = 1000;
            }
        } else Heal_Timer -= diff;
    }
開發者ID:AwkwardDev,項目名稱:Project-WoW,代碼行數:15,代碼來源:boss_twinemperors.cpp

示例3: DamageTaken

 void DamageTaken(Unit* /*done_by*/, uint32 &damage)
 {
     Unit* pOtherBoss = GetOtherBoss();
     if (pOtherBoss)
     {
         float dPercent = ((float)damage) / ((float)me->GetMaxHealth());
         int odmg = (int)(dPercent * ((float)pOtherBoss->GetMaxHealth()));
         int ohealth = pOtherBoss->GetHealth()-odmg;
         pOtherBoss->SetHealth(ohealth > 0 ? ohealth : 0);
         if (ohealth <= 0)
         {
             pOtherBoss->setDeathState(JUST_DIED);
             pOtherBoss->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
         }
     }
 }
開發者ID:Caydan,項目名稱:DeathCore,代碼行數:16,代碼來源:boss_twinemperors.cpp

示例4: Aggro

    void Aggro(Unit* pWho)
    {
        m_creature->SetInCombatWithZone();

        Creature *pOtherBoss = GetOtherBoss();
        if (pOtherBoss)
        {
            // TODO: we should activate the other boss location so he can start attackning even if nobody
            // is near I dont know how to do that
            if (!pOtherBoss->isInCombat())
            {
                DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_AGGRO : SOUND_VN_AGGRO);
                pOtherBoss->AI()->AttackStart(pWho);
            }
        }
    }
開發者ID:mangos-gameaction,項目名稱:scriptdev2,代碼行數:16,代碼來源:boss_twinemperors.cpp

示例5: EnterCombat

 void EnterCombat(Unit* who)
 {
     DoZoneInCombat();
     Creature* pOtherBoss = GetOtherBoss();
     if (pOtherBoss)
     {
         // TODO: we should activate the other boss location so he can start attackning even if nobody
         // is near I dont know how to do that
         ScriptedAI* otherAI = CAST_AI(ScriptedAI, pOtherBoss->AI());
         if (!pOtherBoss->isInCombat())
         {
             DoPlaySoundToSet(me, IAmVeklor() ? SOUND_VL_AGGRO : SOUND_VN_AGGRO);
             otherAI->AttackStart(who);
             otherAI->DoZoneInCombat();
         }
     }
 }
開發者ID:Caydan,項目名稱:DeathCore,代碼行數:17,代碼來源:boss_twinemperors.cpp

示例6: Aggro

    void Aggro(Unit* pWho)
    {
        Creature *pOtherBoss = GetOtherBoss();
        if (pOtherBoss)
        {
            // TODO: we should activate the other boss location so he can start attackning even if nobody
            // is near I dont know how to do that
            if (!pOtherBoss->isInCombat())
            {
                DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_AGGRO : SOUND_VN_AGGRO);
                pOtherBoss->AI()->AttackStart(pWho);
            }
        }

        if (m_pInstance)
            m_pInstance->SetData(TYPE_TWINS, IN_PROGRESS);
    }
開發者ID:Iov,項目名稱:scriptdev2,代碼行數:17,代碼來源:boss_twinemperors.cpp

示例7: JustDied

    void JustDied(Unit* Killer)
    {
        if (Creature* pOtherBoss = GetOtherBoss())
        {
            pOtherBoss->SetHealth(0);
            pOtherBoss->SetDeathState(JUST_DIED);
            pOtherBoss->SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);

            if (boss_twinemperorsAI* pOtherAI = dynamic_cast<boss_twinemperorsAI*>(pOtherBoss->AI()))
                pOtherAI->DontYellWhenDead = true;
        }

        if (!DontYellWhenDead)                              // I hope AI is not threaded
            DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_DEATH : SOUND_VN_DEATH);

        if (m_pInstance)
            m_pInstance->SetData(TYPE_TWINS, DONE);
    }
開發者ID:Iov,項目名稱:scriptdev2,代碼行數:18,代碼來源:boss_twinemperors.cpp

示例8: TeleportToMyBrother

    void TeleportToMyBrother()
    {
        Teleport_Timer = TELEPORTTIME;

        if (IAmVeklor())
            return;                                         // mechanics handled by veknilash so they teleport exactly at the same time and to correct coordinates

        Creature* pOtherBoss = GetOtherBoss();
        if (pOtherBoss)
        {
            //me->MonsterYell("Teleporting ...", LANG_UNIVERSAL, 0);
            Position thisPos;
            thisPos.Relocate(me);
            Position otherPos;
            otherPos.Relocate(pOtherBoss);
            pOtherBoss->SetPosition(thisPos);
            me->SetPosition(otherPos);

            SetAfterTeleport();
            CAST_AI(boss_twinemperorsAI,  pOtherBoss->AI())->SetAfterTeleport();
        }
    }
開發者ID:redlaine,項目名稱:InfinityCore-Ark,代碼行數:22,代碼來源:boss_twinemperors.cpp


注:本文中的GetOtherBoss函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。