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


C++ DynamicObject::RemoveFromWorld方法代码示例

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


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

示例1: GOHello_go_orb_of_the_blue_flight

bool GOHello_go_orb_of_the_blue_flight(Player *plr, GameObject* go)
{
    if(go->GetUInt32Value(GAMEOBJECT_FACTION) == 35){
        ScriptedInstance* pInstance = (go->GetInstanceData());
        float x,y,z, dx,dy,dz;
        go->SummonCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, plr->GetPositionX(), plr->GetPositionY(), plr->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
        plr->CastSpell(plr, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, true);
        go->SetUInt32Value(GAMEOBJECT_FACTION, 0);
        Unit* Kalec = CAST_CRE(Unit::GetUnit(*plr, pInstance->GetData64(DATA_KALECGOS_KJ)));
        //Kalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
        go->GetPosition(x,y,z);
        for(uint8 i = 0; i < 4; ++i){
            DynamicObject* Dyn = Kalec->GetDynObject(SPELL_RING_OF_BLUE_FLAMES);
            if(Dyn){
                Dyn->GetPosition(dx,dy,dz);
                if(x == dx && dy == y && dz == z){
                    Dyn->RemoveFromWorld();
                    break;
                }
            }
        }
        go->Refresh();
    }
    return true;
}
开发者ID:MilchBuby,项目名称:riboncore,代码行数:25,代码来源:boss_kiljaeden.cpp

示例2: EmpowerOrb

    void EmpowerOrb(bool all)
    {
        if(!Orb[OrbsEmpowered])
            return;
        uint8 random = rand()%3;
        if(all) {
            m_creature->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
            for(uint8 i = 0; i < 4; ++i) {
                if(!Orb[i]) return;
                Orb[i]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
                Orb[i]->SetUInt32Value(GAMEOBJECT_FACTION, 35);
                Orb[i]->setActive(true);
                Orb[i]->Refresh();
            }
        } else {
            float x,y,z, dx,dy,dz;
            Orb[random]->GetPosition(x,y,z);
            for(uint8 i = 0; i < 4; ++i) {
                DynamicObject* Dyn = m_creature->GetDynObject(SPELL_RING_OF_BLUE_FLAMES);
                if(Dyn) {
                    Dyn->GetPosition(dx,dy,dz);
                    if(x == dx && dy == y && dz == z) {
                        Dyn->RemoveFromWorld();
                        break;
                    }
                }
            }
            Orb[random]->CastSpell(m_creature, SPELL_RING_OF_BLUE_FLAMES);
            Orb[random]->SetUInt32Value(GAMEOBJECT_FACTION, 35);
            Orb[random]->setActive(true);
            Orb[random]->Refresh();
            ++OrbsEmpowered;
        }
        ++EmpowerCount;

        switch(EmpowerCount) {
        case 1:
            DoScriptText(SAY_KALEC_ORB_READY1, m_creature);
            break;
        case 2:
            DoScriptText(SAY_KALEC_ORB_READY2, m_creature);
            break;
        case 3:
            DoScriptText(SAY_KALEC_ORB_READY3, m_creature);
            break;
        case 4:
            DoScriptText(SAY_KALEC_ORB_READY4, m_creature);
            break;
        }
    }
开发者ID:Bootz,项目名称:TC-One,代码行数:50,代码来源:boss_kiljaeden.cpp


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