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


C++ SpellDestination类代码示例

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


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

示例1: SetDest

 void SetDest(SpellDestination& dest)
 {
     // Adjust effect summon position
     Position const offset = { frand(-7.0f, 7.0f), frand(-7.0f, 7.0f), 11.0f, 0.0f };
     dest.Relocate(*GetCaster());
     dest.RelocateOffset(offset);
 }
开发者ID:AzerothShard-Dev,项目名称:azerothcore,代码行数:7,代码来源:zone_terokkar_forest.cpp

示例2: ModDestHeight

 void ModDestHeight(SpellDestination& dest)
 {
     Unit* caster = GetCaster();
     Position pos = caster->GetPosition();
     pos.m_positionZ = caster->GetMap()->GetHeight(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), true, 100.0f);
     dest.Relocate(pos);
 }
开发者ID:GlassFace,项目名称:TrinityCore434,代码行数:7,代码来源:boss_slabhide.cpp

示例3: SetDest

 void SetDest(SpellDestination& dest)
 {
     std::list<Spell::TargetInfo> const* targetsInfo = GetSpell()->GetUniqueTargetInfo();
     for (std::list<Spell::TargetInfo>::const_iterator ihit = targetsInfo->begin(); ihit != targetsInfo->end(); ++ihit)
         if (Unit* target = ObjectAccessor::GetUnit(*GetCaster(), ihit->targetGUID))
         {
             dest.Relocate(*target);
             if (roll_chance_i(50))
                 break;
         }
 }
开发者ID:AzerothShard-Dev,项目名称:azerothcore,代码行数:11,代码来源:boss_mother_shahraz.cpp

示例4: SetDest

        void SetDest(SpellDestination& dest)
        {
            Creature* creature = GetCaster()->ToCreature();
            if (creature)
                return;
            
            // Side of the room: WEST > 366.781f (middle of the room) > EAST
            float ori = creature->GetPositionY() > 366.781f ? DegToRad(270) : DegToRad(90);

            // DB dest has no orientation field (always 0.0f).
            dest.RelocateOffset({ 0.0f, 0.0f, 0.0f, ori });

            creature->SetHomePosition(dest._position.GetPosition());
        }
开发者ID:Mihapro,项目名称:TrinityCore,代码行数:14,代码来源:boss_anraphet.cpp

示例5: SetDest

        void SetDest(SpellDestination& dest)
        {
            // Do our own calculations for the destination position.
            /// TODO: Remove this once we find a general rule for WorldObject::MovePosition (this spell shouldn't take the Z change into consideration)
            Unit* caster = GetCaster();
            float angle = float(rand_norm()) * static_cast<float>(2 * M_PI);
            uint32 dist = caster->GetObjectSize() + GetSpellInfo()->GetEffect(EFFECT_0)->CalcRadius(caster) * (float)rand_norm();

            float x = caster->GetPositionX() + dist * std::cos(angle);
            float y = caster->GetPositionY() + dist * std::sin(angle);
            float z = caster->GetMap()->GetHeight(caster->GetPhases(), x, y, caster->GetPositionZ());
            float o = dest._position.GetOrientation();

            dest.Relocate({ x, y, z, o });
        }
开发者ID:Lyill,项目名称:TrinityCore,代码行数:15,代码来源:boss_anraphet.cpp

示例6: SetDest

 void SetDest(SpellDestination& dest)
 {
     dest.RelocateOffset({ 0.0f, 0.0f, 30.0f, 0.0f });
 }
开发者ID:Declipe,项目名称:ElunaTrinityWotlk,代码行数:4,代码来源:boss_ingvar_the_plunderer.cpp

示例7: SetDest

 void SetDest(SpellDestination& dest)
 {
     dest.Relocate(TeleportPoint[urand(0, 6)]);
 }
开发者ID:090809,项目名称:TrinityCore,代码行数:4,代码来源:boss_mother_shahraz.cpp


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