您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetOtherBoss函数代码示例

51自学网 2021-06-01 21:12:03
  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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,


示例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,



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


C++ GetOtherTeamIndex函数代码示例
C++ GetOriginalCaster函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。