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


C++ Creature::ExitVehicle方法代码示例

本文整理汇总了C++中Creature::ExitVehicle方法的典型用法代码示例。如果您正苦于以下问题:C++ Creature::ExitVehicle方法的具体用法?C++ Creature::ExitVehicle怎么用?C++ Creature::ExitVehicle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Creature的用法示例。


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

示例1: HandleScript

        void HandleScript(SpellEffIndex /*effIndex*/)
        {
            Creature* target = GetHitUnit()->ToCreature();
            if (!target)
                return;

            target->ExitVehicle();
            DynamicObject* dynamicObject = GetCaster()->GetDynObject(SPELL_SEISMIC_SHARD_TARGETING);
            target->CastSpell(dynamicObject->GetPositionX(), dynamicObject->GetPositionY(), dynamicObject->GetPositionZ(), SPELL_SEISMIC_SHARD_MISSLE, true);
        }
开发者ID:DSlayerMan,项目名称:DraenorCore,代码行数:10,代码来源:boss_high_priestess_azil.cpp

示例2: WaypointReached

 void WaypointReached(uint32 i)
 {
     Player* pPlayer = GetPlayerForEscort();
     if (!pPlayer)
         return;
     switch (i)
     {
         case 9:
             Mrfloppy = GetClosestCreatureWithEntry(m_creature, NPC_MRFLOPPY, 100.0f);
             break;
         case 10:
             if (Mrfloppy)
             {
                 DoScriptText(SAY_WORGHAGGRO1, m_creature);
                 m_creature->SummonCreature(NPC_HUNGRY_WORG,m_creature->GetPositionX()+5,m_creature->GetPositionY()+2,m_creature->GetPositionZ()+1,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
             }
             break;
         case 11:
             Mrfloppy->GetMotionMaster()->MoveFollow(m_creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
             break;
         case 17:
             Mrfloppy->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ());
             DoScriptText(SAY_WORGRAGGRO3, m_creature);
             RWORG = m_creature->SummonCreature(NPC_RAVENOUS_WORG,m_creature->GetPositionX()+10,m_creature->GetPositionY()+8,m_creature->GetPositionZ()+2,3.229f,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,120000);
             RWORG->setFaction(35);
             break;
         case 18:
             if (Mrfloppy)
             {
                 RWORG->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
                 DoCast(Mrfloppy,SPELL_MRFLOPPY);
             }
             break;
         case 19:
             if (Mrfloppy->HasAura(SPELL_MRFLOPPY, 0))
                 Mrfloppy->EnterVehicle(RWORG);
             break;
         case 20:
             if (Mrfloppy)
                 RWORG->HandleEmoteCommand(34);
             break;
         case 21:
             if (Mrfloppy)
             {
                 RWORG->Kill(Mrfloppy);
                 Mrfloppy->ExitVehicle();
                 RWORG->setFaction(14);
                 RWORG->GetMotionMaster()->MovePoint(0, RWORG->GetPositionX()+10,RWORG->GetPositionY()+80,RWORG->GetPositionZ());
                 DoScriptText(SAY_VICTORY2, m_creature);
             }
             break;
         case 22:
             if (Mrfloppy && Mrfloppy->isDead())
             {
                 RWORG->DisappearAndDie();
                 m_creature->GetMotionMaster()->MovePoint(0, Mrfloppy->GetPositionX(), Mrfloppy->GetPositionY(), Mrfloppy->GetPositionZ());
                 Mrfloppy->setDeathState(ALIVE);
                 Mrfloppy->GetMotionMaster()->MoveFollow(m_creature, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
                 DoScriptText(SAY_VICTORY3, m_creature);
             }
             break;
         case 24:
             if (pPlayer)
             {
                 Completed = true;
                 pPlayer->GroupEventHappens(QUEST_PERILOUS_ADVENTURE, m_creature);
                 DoScriptText(SAY_QUEST_COMPLETE, m_creature, pPlayer);
             }
             m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
             break;
         case 25:
             DoScriptText(SAY_VICTORY4, m_creature);
             break;
         case 27:
             m_creature->DisappearAndDie();
             if (Mrfloppy)
                 Mrfloppy->DisappearAndDie();
             break;
     }
 }
开发者ID:Ickybad,项目名称:diamondcore2,代码行数:80,代码来源:grizzly_hills.cpp


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