• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ IAmVeklor函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中IAmVeklor函数的典型用法代码示例。如果您正苦于以下问题:C++ IAmVeklor函数的具体用法?C++ IAmVeklor怎么用?C++ IAmVeklor使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了IAmVeklor函数的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: TeleportToMyBrother

    void TeleportToMyBrother()
    {
        if (!m_pInstance)
            return;

        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)
        {
            //m_creature->MonsterYell("Teleporting ...", LANG_UNIVERSAL);
            float other_x = pOtherBoss->GetPositionX();
            float other_y = pOtherBoss->GetPositionY();
            float other_z = pOtherBoss->GetPositionZ();
            float other_o = pOtherBoss->GetOrientation();

            pOtherBoss->RelocateCreature(m_creature->GetPositionX(),
            m_creature->GetPositionY(),    m_creature->GetPositionZ(), m_creature->GetOrientation());
            pOtherBoss->GetMotionMaster()->MoveIdle();
            m_creature->RelocateCreature(other_x, other_y, other_z, other_o);
            m_creature->GetMotionMaster()->MoveIdle();

            SetAfterTeleport();

            if (boss_twinemperorsAI* pOtherAI = dynamic_cast<boss_twinemperorsAI*>(pOtherBoss->AI()))
                pOtherAI->SetAfterTeleport();
        }
    }
开发者ID:Phatcat,项目名称:mangos,代码行数:31,代码来源:boss_twinemperors.cpp


示例2: TeleportToMyBrother

    void TeleportToMyBrother()
    {
        if (!pInstance)
            return;

        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);
            float other_x = pOtherBoss->GetPositionX();
            float other_y = pOtherBoss->GetPositionY();
            float other_z = pOtherBoss->GetPositionZ();
            float other_o = pOtherBoss->GetOrientation();

            Map *thismap = me->GetMap();
            thismap->CreatureRelocation(pOtherBoss, me->GetPositionX(),
                me->GetPositionY(),    me->GetPositionZ(), me->GetOrientation());
            thismap->CreatureRelocation(me, other_x, other_y, other_z, other_o);

            SetAfterTeleport();
            CAST_AI(boss_twinemperorsAI,  pOtherBoss->AI())->SetAfterTeleport();
        }
    }
开发者ID:AwkwardDev,项目名称:CataOld,代码行数:28,代码来源:boss_twinemperors.cpp


示例3: GetOtherBoss

 Creature* GetOtherBoss()
 {
     if (instance)
         return Unit::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
     else
         return NULL;
 }
开发者ID:Caydan,项目名称:DeathCore,代码行数:7,代码来源:boss_twinemperors.cpp


示例4: GetOtherBoss

 Creature* GetOtherBoss()
 {
     if (pInstance)
         return (Creature*)Unit::GetUnit((*me), pInstance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
     else
         return (Creature*)0;
 }
开发者ID:Phentora,项目名称:OregonCore,代码行数:7,代码来源:boss_twinemperors.cpp


示例5: GetCreature

 Creature *GetOtherBoss()
 {
     if (pInstance)
         return Unit::GetCreature(*me, pInstance->GetData64(IAmVeklor() ? BOSS_VEKNILASH : BOSS_VEKLOR));
     else
         return NULL;
 }
开发者ID:sk3tche,项目名称:TrinityCore,代码行数:7,代码来源:boss_twinemperors.cpp


示例6: TeleportToMyBrother

    void TeleportToMyBrother()
    {
        if (!instance)
            return;

        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:Caydan,项目名称:DeathCore,代码行数:25,代码来源:boss_twinemperors.cpp


示例7: GetOtherBoss

 Creature* GetOtherBoss()
 {
     if (m_pInstance)
     {
         return m_pInstance->GetSingleCreatureFromStorage(IAmVeklor() ? NPC_VEKNILASH : NPC_VEKLOR);
     }
     else
     {
         return NULL;
     }
 }
开发者ID:Phatcat,项目名称:mangos,代码行数:11,代码来源:boss_twinemperors.cpp


示例8: return

 Creature *GetOtherBoss()
 {
     if (m_pInstance)
     {
         return (Creature *)Unit::GetUnit((*m_creature), m_pInstance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
     }
     else
     {
         return (Creature *)0;
     }
 }
开发者ID:mangos-gameaction,项目名称:scriptdev2,代码行数:11,代码来源:boss_twinemperors.cpp


示例9: JustDied

	void JustDied(Unit* /*Killer*/) {
		Creature *pOtherBoss = GetOtherBoss();
		if (pOtherBoss) {
			pOtherBoss->SetHealth(0);
			pOtherBoss->setDeathState(JUST_DIED);
			pOtherBoss->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
			CAST_AI(boss_twinemperorsAI, pOtherBoss->AI())->DontYellWhenDead =
					true;
		}
		if (!DontYellWhenDead) // I hope AI is not threaded
			DoPlaySoundToSet(me, IAmVeklor() ? SOUND_VL_DEATH : SOUND_VN_DEATH);
	}
开发者ID:jsj2008,项目名称:StarGate-Plus-EMU,代码行数:12,代码来源:boss_twinemperors.cpp


示例10: 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:jsj2008,项目名称:StarGate-Plus-EMU,代码行数:13,代码来源:boss_twinemperors.cpp


示例11: 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:jsj2008,项目名称:StarGate-Plus-EMU,代码行数:15,代码来源:boss_twinemperors.cpp


示例12: 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 *)m_creature) <= 60))
            {
                DoCast(pOtherBoss, SPELL_HEAL_BROTHER);
                Heal_Timer = 1000;
            }
        } else Heal_Timer -= diff;
    }
开发者ID:megamage,项目名称:mangos,代码行数:15,代码来源:boss_twinemperors.cpp


示例13: 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


示例14: 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


示例15: 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


示例16: HandleBugs

    void HandleBugs(uint32 diff)
    {
        if (BugsTimer < diff || Abuse_Bug_Timer < diff)
        {
            Creature *c = RespawnNearbyBugsAndGetOne(IAmVeklor() ? 15316 : 15317);
            if (Abuse_Bug_Timer < diff)
            {
                if (c)
                {
                    CastSpellOnBug(c);

                    if (m_creature->getVictim())
                    {
                        c->Attack(m_creature->getVictim(), false);
                        c->GetMotionMaster()->MoveChase(m_creature->getVictim());
                    }

                    Abuse_Bug_Timer = urand(10000, 17000);
                }
                else
                {
                    Abuse_Bug_Timer = 1000;
                }
            }
            else
            {
                Abuse_Bug_Timer -= diff;
            }
            BugsTimer = 2000;
        }
        else
        {
            BugsTimer -= diff;
            Abuse_Bug_Timer -= diff;
        }
    }
开发者ID:Phatcat,项目名称:mangos,代码行数:36,代码来源:boss_twinemperors.cpp


示例17: KilledUnit

 void KilledUnit(Unit* /*victim*/)
 {
     DoPlaySoundToSet(me, IAmVeklor() ? SOUND_VL_KILL : SOUND_VN_KILL);
 }
开发者ID:Caydan,项目名称:DeathCore,代码行数:4,代码来源:boss_twinemperors.cpp


示例18: GetOtherBoss

 Creature* GetOtherBoss()
 {
     return ObjectAccessor::GetCreature(*me, instance->GetData64(IAmVeklor() ? DATA_VEKNILASH : DATA_VEKLOR));
 }
开发者ID:redlaine,项目名称:InfinityCore-Ark,代码行数:4,代码来源:boss_twinemperors.cpp


示例19: KilledUnit

 void KilledUnit(Unit* victim)
 {
     DoPlaySoundToSet(m_creature, IAmVeklor() ? SOUND_VL_KILL : SOUND_VN_KILL);
 }
开发者ID:mangos-gameaction,项目名称:scriptdev2,代码行数:4,代码来源:boss_twinemperors.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IAssert函数代码示例发布时间:2022-05-30
下一篇:
C++ IAlloc_Free函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap