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

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

51自学网 2021-06-01 20:29:05
  C++
这篇教程C++ DoScriptText函数代码示例写得很实用,希望能帮到您。

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

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

示例1: SpellHit

 void SpellHit(Unit *source, const SpellEntry *spell) {     if (spell->Mechanic == MECHANIC_DISARM)         DoScriptText(SAY_DISARMED, m_creature); }
开发者ID:Ickybad,项目名称:diamondcore2,代码行数:5,


示例2: EndingPhase

 void EndingPhase() {     if( m_uiEndingTimer )     {         switch(m_uiEndingPhase)         {         case 1:              me->GetMotionMaster()->MoveIdle();             me->SetReactState(REACT_PASSIVE);             me->AttackStop();             me->CastStop();             DoResetThreat();             DoScriptText(SAY_10_PROZENT, me);             DoCastAOE(SPELL_FURY_OF_FROSTMOURNE);             KingEnding(5000);             break;         case 2:             KingEnding(10000);             break;         case 3:              DoScriptText(SAY_ENDING_1_KING, me);             KingEnding(24000);             break;         case 4:              DoScriptText(SAY_ENDING_2_KING, me);             KingEnding(25000);             break;         case 5:             me->GetMotionMaster()->MovePoint(0, MoveEndingPosition);             KingEnding(4000);             break;         case 6:              DoCastAOE(SPELL_CHANNEL_KING);             DoScriptText(SAY_ENDING_3_KING, me);             KingEnding(26000);             break;         case 7:              DoScriptText(SAY_ENDING_4_KING, me);             KingEnding(9000);             break;         case 8:              DoScriptText(SAY_ENDING_5_TIRION, pTirion);             KingEnding(9000);             break;         case 9:             DoCast(pTirion, SPELL_TIRION_LIGHT);             KingEnding(5000);             break;         case 10:             pTirion->RemoveAurasDueToSpell(SPELL_ICEBLOCK_TRIGGER);             KingEnding(2000);             break;         case 11:             pTirion->GetMotionMaster()->MovePoint(0, MoveTirionFrostmourne);             KingEnding(1000);             break;         case 12:             pTirion->GetMotionMaster()->MoveJump(517.482910, -2124.905762, 1040.861328, 10.0f, 15.0f); //pTirion->JumpTo(pFrostmourne, 15.0f);             pTirion->SetUInt32Value(UNIT_NPC_EMOTESTATE, 375);             KingEnding(1000);             break;         case 13:             me->RemoveAura(SPELL_CHANNEL_KING);             me->CastSpell(me, SPELL_BOOM_VISUAL, false);             KingEnding(300);             break;         case 14:             me->CastSpell(me, SPELL_SUMMON_BROKEN_FROSTMOURNE, false);             KingEnding(3000);             break;         case 15:             me->CastSpell(me, 73017, false);             KingEnding(1000);             break;         case 16:             DoScriptText(SAY_ENDING_6_KING, me);             KingEnding(3000);             break;         case 17:             pFrostmourne = me->SummonCreature(27880, me->GetPositionX()+2, me->GetPositionY()+2, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 99999999);             pFrostmourne->CastSpell(pFrostmourne, SPELL_BROKEN_FROSTMOURNE, false);             pFrostmourne->CastSpell(pFrostmourne, SPELL_FROSTMOURNE_TRIGGER, false);             pFrostmourne->GetMotionMaster()->MoveChase(me);             me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED);             //pTirion->CastSpell(pTirion, SPELL_DISENGAGE, false);             KingEnding(2000);             break;         case 18:             me->RemoveAllAuras();             me->RemoveAura(SPELL_SUMMON_BROKEN_FROSTMOURNE);             DoScriptText(SAY_ENDING_7_KING, me);             me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 473);             KingEnding(5000);             break;         case 19:             DoScriptText(SAY_ENDING_8_TIRION, pTirion);             KingEnding(6000);             break;         case 20:             pFather = me->SummonCreature(CREAUTRE_MENETHIL, me->GetPositionX()+5, me->GetPositionY()+5, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 9999999);//.........这里部分代码省略.........
开发者ID:VenT,项目名称:wow,代码行数:101,


示例3: UpdateAI

    void UpdateAI(const uint32 uiDiff)    {        if (!UpdateVictim())            return;        switch (stage)         {        case 0: {                 bsw->timedCast(SPELL_FEROCIOUS_BUTT, uiDiff);                 bsw->timedCast(SPELL_ARCTIC_BREATH, uiDiff);                 bsw->timedCast(SPELL_WHIRL, uiDiff);                if (bsw->timedQuery(SPELL_MASSIVE_CRASH, uiDiff)) stage = 1;                bsw->timedCast(SPELL_FROTHING_RAGE, uiDiff);                DoMeleeAttackIfReady();                break;                }        case 1: {                         if (bsw->doCast(SPELL_MASSIVE_CRASH) == CAST_OK)                             stage = 2;                 break;                }        case 2: {                        if (pTarget = bsw->SelectUnit()) {                        TrampleCasted = false;                        me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);                        stage = 3;                        bsw->resetTimer(SPELL_TRAMPLE);                        DoScriptText(-1713506,me,pTarget);                        SetCombatMovement(false);                        me->GetMotionMaster()->MoveIdle();                        }                 break;                }        case 3: {                if (bsw->timedQuery(SPELL_TRAMPLE,uiDiff)) {                                    pTarget->GetPosition(fPosX, fPosY, fPosZ);                                    TrampleCasted = false;                                    MovementStarted = true;                                    me->GetMotionMaster()->MovePoint(1, fPosX, fPosY, fPosZ);                                    DoScriptText(-1713508,me);                                    bsw->doCast(SPELL_ADRENALINE);                                    stage = 4;                                    }                break;                }        case 4: {                if (MovementStarted)                    {                    Map* pMap = me->GetMap();                    Map::PlayerList const &lPlayers = pMap->GetPlayers();                    for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr)                    {                        Unit* pPlayer = itr->getSource();                        if (!pPlayer) continue;                        if (pPlayer->isAlive() && pPlayer->IsWithinDistInMap(me, 5.0f)) {                                bsw->doCast(SPELL_TRAMPLE, pPlayer);                                TrampleCasted = true;                                MovementStarted = false;                                me->GetMotionMaster()->MovementExpired();                                me->GetMotionMaster()->MoveChase(me->getVictim());                            }                    }                    } else stage = 5;                    if (TrampleCasted) stage = 5;                break;                }        case 5: {                if (!TrampleCasted) {                                    bsw->doCast(SPELL_STAGGERED_DAZE);                                    DoScriptText(-1713507,me);                                    }                MovementStarted = false;                me->GetMotionMaster()->MovementExpired();                me->GetMotionMaster()->MoveChase(me->getVictim());                SetCombatMovement(true);                me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);                stage = 0;                break;                }        }    }
开发者ID:SergeySV,项目名称:PhantomCore,代码行数:89,


示例4: KilledUnit

 void KilledUnit(Unit *victim) {     if(!m_bIsDeathPhase)         DoScriptText(RAND(SAY_KILL_1,SAY_KILL_2), me); }
开发者ID:VenT,项目名称:wow,代码行数:5,


示例5: JustDied

 void JustDied(Unit* /*Killer*/) {     if (!IsImage)         DoScriptText(SAY_DEATH, me); }
开发者ID:Exodius,项目名称:Atlantiss,代码行数:5,


示例6: DoSplit

        void DoSplit(int atPercent /* 75 50 25 */)        {            DoScriptText(SAY_SPLIT, me);            ov_mycoordinates *place1 = new ov_mycoordinates(-8340.782227f, 2083.814453f, 125.648788f, 0);            ov_mycoordinates *place2 = new ov_mycoordinates(-8341.546875f, 2118.504639f, 133.058151f, 0);            ov_mycoordinates *place3 = new ov_mycoordinates(-8318.822266f, 2058.231201f, 133.058151f, 0);            ov_mycoordinates *bossc=place1, *i1=place2, *i2=place3;            switch (urand(0, 2))            {                case 0:                    bossc=place1;                    i1=place2;                    i2=place3;                    break;                case 1:                    bossc=place2;                    i1=place1;                    i2=place3;                    break;                case 2:                    bossc=place3;                    i1=place1;                    i2=place2;                    break;            }            for (uint16 i = 0; i < 41; ++i)            {                if (Player* target = CAST_PLR(SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)))                {                    if (Group* pGrp = target->GetGroup())                        for (uint8 ico = 0; ico < TARGETICONCOUNT; ++ico)                        {                            //if (grp->m_targetIcons[ico] == me->GetGUID()) -- private member :(                            pGrp->SetTargetIcon(ico, 0, 0);                        }                    break;                }            }            me->RemoveAllAuras();            me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);            me->SetVisible(false);            me->SetPosition(bossc->x, bossc->y, bossc->z, bossc->r);            Invisible = true;            DoResetThreat();            DoStopAttack();            switch (atPercent)            {                case 75: Images75 = true; break;                case 50: Images50 = true; break;                case 25: Images25 = true; break;            }            Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0);            Creature* Image1 = me->SummonCreature(15263, i1->x, i1->y, i1->z, i1->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);            if (Image1)            {                Image1->SetMaxHealth(me->GetMaxHealth() / 5);                Image1->SetHealth(me->GetHealth() / 5);                if (target)                    Image1->AI()->AttackStart(target);                CAST_AI(boss_skeram::boss_skeramAI, Image1->AI())->IsImage = true;            }            Creature* Image2 = me->SummonCreature(15263, i2->x, i2->y, i2->z, i2->r, TEMPSUMMON_CORPSE_DESPAWN, 30000);            if (Image2)            {                Image2->SetMaxHealth(me->GetMaxHealth() / 5);                Image2->SetHealth(me->GetHealth() / 5);                if (target)                    Image2->AI()->AttackStart(target);                CAST_AI(boss_skeram::boss_skeramAI, Image2->AI())->IsImage = true;            }            Invisible = true;            delete place1;            delete place2;            delete place3;        }
开发者ID:Exodius,项目名称:Atlantiss,代码行数:85,


示例7: KilledUnit

		void KilledUnit(Unit* /*Victim*/) {			DoScriptText(SAY_KILL, me);		}
开发者ID:FrenchCORE,项目名称:OLD_FrenchCORE,代码行数:3,


示例8: UpdateAI

    void UpdateAI(const uint32 diff)    {        if (!UpdateVictim())        {            if(UnsummonCheck < diff && m_creature->isAlive())            {                m_creature->SetLootRecipient(NULL);                m_creature->SetVisibility(VISIBILITY_OFF);                m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);                m_creature->RemoveCorpse();            }else UnsummonCheck -= diff;            return;        }        if(Fireball_Timer < diff)        {            if(Unit *victim = SelectUnit(SELECT_TARGET_RANDOM,0))                DoCast(victim, SPELL_FIREBALL,true);            Fireball_Timer = 4000+rand()%3000;        }else Fireball_Timer -= diff;        if(flight) // phase 1 - the flight        {            Creature *Vazruden = Unit::GetCreature(*m_creature,VazrudenGUID);            if(Fly_Timer < diff || !(Vazruden && Vazruden->isAlive() && (Vazruden->GetHealth()*5 > Vazruden->GetMaxHealth())))            {                flight = false;                BellowingRoar_Timer = 6000;                ConeOfFire_Timer = 12000;                m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT + MOVEMENTFLAG_LEVITATING);                m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);                m_creature->GetMotionMaster()->Clear();                if(Unit *victim = SelectUnit(SELECT_TARGET_NEAREST,0))                    m_creature->AI()->AttackStart(victim);                DoStartMovement(m_creature->getVictim());                DoScriptText(EMOTE, m_creature);                return;            }else Fly_Timer -= diff;            if(Turn_Timer < diff)            {                uint32 waypoint = (Fly_Timer/10000)%2;                if(m_creature->GetDistance(VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]) > 5)                    m_creature->GetMotionMaster()->MovePoint(0,VazrudenRing[waypoint][0],VazrudenRing[waypoint][1],VazrudenRing[waypoint][2]);                Turn_Timer = 10000;            }else Turn_Timer -= diff;        }        else // phase 2 - land fight        {            if(ConeOfFire_Timer < diff)            {                DoCast(m_creature, SPELL_CONE_OF_FIRE);                ConeOfFire_Timer = 12000;                Fireball_Timer = 4000;            }else ConeOfFire_Timer -= diff;            if(HeroicMode && BellowingRoar_Timer < diff)            {                DoCast(m_creature, SPELL_BELLOWING_ROAR);                BellowingRoar_Timer = 45000;            }else BellowingRoar_Timer -= diff;            DoMeleeAttackIfReady();        }    }
开发者ID:Denominator13,项目名称:NeoCore,代码行数:65,


示例9: EnterCombat

		void EnterCombat(Unit* /*who*/) {			DoScriptText(SAY_AGGRO, me);			if (instance)				instance->SetData(DATA_CYANIGOSA_EVENT, IN_PROGRESS);		}
开发者ID:dsstest,项目名称:ArkCORE,代码行数:6,


示例10: EnterCombat

		void EnterCombat(Unit * /*who*/) {			DoScriptText(SAY_AGGRO, me);		}
开发者ID:FrenchCORE,项目名称:OLD_FrenchCORE,代码行数:3,


示例11: KilledUnit

		void KilledUnit(Unit * victim) {			if (victim == me)				return;			DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me);		}
开发者ID:dsstest,项目名称:ArkCORE,代码行数:5,


示例12: UpdateAI

    void UpdateAI(const uint32 uiDiff)    {        if(m_uiBirthState == 1)            if(m_uiBirthTimer < uiDiff)            {                m_creature->SetVisibility(VISIBILITY_ON);                m_creature->setFaction(21);                m_uiBirthState = 2;            }            else                m_uiBirthTimer -= uiDiff;        if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())            return;        if (m_uiBeserkTimer < uiDiff)        {            if (DoCastSpellIfCan(m_creature, SPELL_BESERK) == CAST_OK)            {                m_uiBeserkTimer = 300000;                DoScriptText(EMOTE_ENRAGE, m_creature);            }        }        else            m_uiBeserkTimer -= uiDiff;        if (m_uiPhase == 1)        {            if (m_uiLifeDrainTimer < uiDiff)            {                if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))                {                    if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_LIFE_DRAIN : H_SPELL_LIFE_DRAIN) == CAST_OK)                        m_uiLifeDrainTimer = 24000;                }            }            else                m_uiLifeDrainTimer -= uiDiff;            if (m_uiBlizzardTimer < uiDiff)            {                if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))                {                    if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_BLIZZARD : H_SPELL_BLIZZARD) == CAST_OK)                        m_uiBlizzardTimer = urand(17,20)*IN_MILLISECONDS;                }            }            else                m_uiBlizzardTimer -= uiDiff;            if (m_uiCleaveTimer < uiDiff)            {                if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK)                    m_uiCleaveTimer = urand(7000, 10000);            }            else                m_uiCleaveTimer -= uiDiff;            if (m_uiTailSweepTimer < uiDiff)            {                if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_TAIL_SWEEP : H_SPELL_TAIL_SWEEP) == CAST_OK)                    m_uiTailSweepTimer = urand(10000, 15000);            }            else                m_uiTailSweepTimer -= uiDiff;            if (m_creature->GetHealthPercent() > 10.0f)            {                if (m_uiFlyTimer < uiDiff)                {                    m_uiPhase = 2;                    m_creature->InterruptNonMeleeSpells(false);                    m_creature->HandleEmote(EMOTE_ONESHOT_LIFTOFF);                    m_creature->GetMotionMaster()->Clear(false);                    m_creature->GetMotionMaster()->MoveIdle();                    DoCastSpellIfCan(m_creature,11010);                    m_creature->SetHover(true);                    DoCastSpellIfCan(m_creature,18430);                    m_uiIceboltTimer = 4000;                    m_uiIceboltCount = 0;                    m_bLandoff = false;                    DoScriptText(EMOTE_FLY, m_creature);                }                else                    m_uiFlyTimer -= uiDiff;            }            DoMeleeAttackIfReady();        }        else // Phase 2        {            if (m_uiIceboltCount < m_uiIceboltCountMax)            {                if (m_uiIceboltTimer < uiDiff)                {                    if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0))                    {                        if(DoCastSpellIfCan(pTarget,SPELL_ICEBOLT) == CAST_OK)                        {                              targetGUIDs.push_back(pTarget->GetGUID());//.........这里部分代码省略.........
开发者ID:leecher228,项目名称:scriptdev2,代码行数:101,


示例13: UpdateAI

    void UpdateAI(const uint32 diff)    {        if (!m_creature->SelectHostilTarget() || !m_creature->getVictim())            return;        //Check for Frost Bolt        if (FrostBolt_Timer < diff)        {            DoCast(m_creature->getVictim(),SPELL_FROST_BOLT);            FrostBolt_Timer = (rand()%60)*1000;        }else FrostBolt_Timer -= diff;        //Check for Frost Bolt Nova        if (FrostBoltNova_Timer < diff)        {            DoCast(m_creature->getVictim(),SPELL_FROST_BOLT_NOVA);            FrostBoltNova_Timer = 15000;        }else FrostBoltNova_Timer -= diff;        //Check for Chains Of Kelthuzad        if (ChainsOfKelthuzad_Timer < diff)        {            //DoCast(m_creature->getVictim(),SPELL_CHAINS_OF_KELTHUZAD);            //if (rand()%2)                //DoScriptText(SAY_CHAIN1, m_creature);            //else                //DoScriptText(SAY_CHAIN2, m_creature);            ChainsOfKelthuzad_Timer = (rand()%30+30)*1000;        }else ChainsOfKelthuzad_Timer -= diff;        //Check for Mana Detonation        if (ManaDetonation_Timer < diff)        {            DoCast(m_creature->getVictim(),SPELL_MANA_DETONATION);            if (rand()%2)                DoScriptText(SAY_SPECIAL1_MANA_DET, m_creature);            ManaDetonation_Timer = 20000;        }else ManaDetonation_Timer -= diff;        //Check for Shadow Fissure        if (ShadowFisure_Timer < diff)        {            DoCast(m_creature->getVictim(),SPELL_SHADOW_FISURE);            if (rand()%2)                DoScriptText(SAY_SPECIAL3_MANA_DET, m_creature);            ShadowFisure_Timer = 25000;        }else ShadowFisure_Timer -= diff;        //Check for Frost Blast        if (FrostBlast_Timer < diff)        {            DoCast(m_creature->getVictim(),SPELL_FROST_BLAST);            if (rand()%2)                DoScriptText(SAY_FROST_BLAST, m_creature);            FrostBlast_Timer = (rand()%30+30)*1000;        }else FrostBlast_Timer -= diff;        //start phase 3 when we are 40% health        if (!Phase3 && (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 40)        {            Phase3 = true;            DoScriptText(SAY_REQUEST_AID, m_creature);            //here Lich King should respond to KelThuzad but I don't know which creature to make talk            //so for now just make Kelthuzad says it.            DoScriptText(SAY_ANSWER_REQUEST, m_creature);        }        if (Phase3 && (GuardiansOfIcecrown_Count < 5))        {            if (GuardiansOfIcecrown_Timer < diff)            {                //Summon a Guardian of Icecrown in a random alcove (Creature # 16441)                //uint32 TimeToWalk;                Creature* pUnit = NULL;                float Walk_Pos_X;                float Walk_Pos_Y;                float Walk_Pos_Z;                switch(rand()%6)                {                    case 0:                        pUnit = m_creature->SummonCreature(16441,ADDX_LEFT_FAR,ADDY_LEFT_FAR,ADDZ_LEFT_FAR,ADDO_LEFT_FAR,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);                        //Setting walk position                        Walk_Pos_X = WALKX_LEFT_FAR;                        Walk_Pos_Y = WALKY_LEFT_FAR;                        Walk_Pos_Z = WALKZ_LEFT_FAR;                        break;                    case 1:                        pUnit = m_creature->SummonCreature(16441,ADDX_LEFT_MIDDLE,ADDY_LEFT_MIDDLE,ADDZ_LEFT_MIDDLE,ADDO_LEFT_MIDDLE,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,1000);                        //Start moving guardian towards the center of the room                        Walk_Pos_X = WALKX_LEFT_MIDDLE;//.........这里部分代码省略.........
开发者ID:wk23,项目名称:tst,代码行数:101,


示例14: KilledUnit

 void KilledUnit(Unit* pVictim) {     DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); }
开发者ID:Iov,项目名称:scriptdev2,代码行数:4,


示例15: KilledUnit

 void KilledUnit(Unit* Victim) {     if(!(rand()%5))         DoScriptText(SAY_SLAY, me); }
开发者ID:adan830,项目名称:QuaDCore,代码行数:5,


示例16: KilledUnit

 void KilledUnit(Unit* /*victim*/) {     DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me); }
开发者ID:Exodius,项目名称:Atlantiss,代码行数:4,


示例17: JustDied

 void JustDied(Unit* Killer) {     DoScriptText(SAY_DEATH, me);     instance->SetBossState(BOSS_HEIGAN, DONE); }
开发者ID:adan830,项目名称:QuaDCore,代码行数:5,


示例18: EnterCombat

 void EnterCombat(Unit* /*who*/) {     if (IsImage || Images75)         return;     DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me); }
开发者ID:Exodius,项目名称:Atlantiss,代码行数:6,


示例19: EventSharkkisDeath

 void EventSharkkisDeath() {     DoScriptText(SAY_GAIN_ABILITY1, me);     DoCast(me, SPELL_POWER_OF_SHARKKIS); }
开发者ID:1024wow,项目名称:TrinityCore,代码行数:5,


示例20: EventTidalvessDeath

 void EventTidalvessDeath() {     DoScriptText(SAY_GAIN_ABILITY2, me);     DoCast(me, SPELL_POWER_OF_TIDALVESS); }
开发者ID:1024wow,项目名称:TrinityCore,代码行数:5,


示例21: EnterCombat

 void EnterCombat(Unit* pWho) {     DoScriptText(SAY_AGGRO_KING, me);     m_uiPhase = 1; }
开发者ID:VenT,项目名称:wow,代码行数:5,


示例22: EventCaribdisDeath

 void EventCaribdisDeath() {     DoScriptText(SAY_GAIN_ABILITY3, me);     DoCast(me, SPELL_POWER_OF_CARIBDIS); }
开发者ID:1024wow,项目名称:TrinityCore,代码行数:5,


示例23: UpdateAI

    void UpdateAI(const uint32 uiDiff)    {        if (m_uiTirionSpawnTimer < uiDiff && !m_bIsTirionSpawned)        {            me->SummonCreature(CREATURE_TIRION_ICC, 528.552002, -2124.620117, 1040.859985, 3.183670, TEMPSUMMON_CORPSE_DESPAWN, 5000);            m_bIsTirionSpawned = true;        } else m_uiTirionSpawnTimer -= uiDiff;        if(!UpdateVictim())            return;        if(!m_bIsDeathPhase)        {            if (m_uiRandomSpeechTimer < uiDiff)            {                DoScriptText(RAND(SAY_RANDOM_1,SAY_RANDOM_2), me);                m_uiRandomSpeechTimer = 33000;            } else m_uiRandomSpeechTimer -= uiDiff;        }        if (m_uiBerserkTimer < uiDiff && !m_bIsBerserk)        {            DoScriptText(SAY_BERSERK, me);            DoCast(me, SPELL_BERSERK);            m_bIsBerserk = true;        }        else m_uiBerserkTimer -= uiDiff;        if(m_uiPhase == 1)        {            if (m_uiInfestTimer < uiDiff)            {                DoCast(me, SPELL_INFEST);                m_uiInfestTimer = 30000;            } else m_uiInfestTimer -= uiDiff;            if (m_uiPlagueSiphonTimer < uiDiff)            {                DoCast(me, SPELL_PLAGUE_SIPHON);                m_uiPlagueSiphonTimer = 30000;            } else m_uiPlagueSiphonTimer -= uiDiff;            if (m_uiSummonDrudgeGhoulsTimer < uiDiff)            {                DoCast(me, SPELL_SUMMON_DRUDGE_GHOULS);                m_uiSummonDrudgeGhoulsTimer = 20000;            } else m_uiSummonDrudgeGhoulsTimer -= uiDiff;            if (m_uiSummonShamblingHorrorTimer < uiDiff)            {                DoCast(me, SPELL_SUMMON_SHAMBLING_HORROR);                m_uiSummonShamblingHorrorTimer = 60000;            } else m_uiSummonShamblingHorrorTimer -= uiDiff;            if (m_uiNecroticPlagueTimer < uiDiff)            {                Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);                DoCast(pTarget, SPELL_NECROTIC_PLAGUE);                m_uiNecroticPlagueTimer = 5000;            } else m_uiNecroticPlagueTimer -= uiDiff;        }        if(m_uiPhase == 2)        {            if (m_uiRemorselesWinterTimer < uiDiff)            {                DoScriptText(SAY_REMORSELESS_WINTER, me);                DoCast(me, SPELL_REMORSELES_WINTER);                m_uiRemorselesWinterTimer = 90000;            } else m_uiRemorselesWinterTimer -= uiDiff;            if (m_uiSummonSpiritTimer < uiDiff)            {                Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);                DoCast(pTarget, SPELL_SUMMON_RAGING_SPIRIT);                m_uiSummonSpiritTimer    = 16000;            } else m_uiSummonSpiritTimer -= uiDiff;            if (m_uiIcePulsSummonTimer < uiDiff)            {                DoCast(me, SPELL_SUMMON_ICE_SPEHERE);                m_uiIcePulsSummonTimer    = 15000;            } else m_uiIcePulsSummonTimer -= uiDiff;            if (m_uiPainandSufferingTimer < uiDiff)            {                Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0);                DoCast(pTarget, SPELL_PAIN_AND_SUFFERING);                m_uiPainandSufferingTimer = 2000;            } else m_uiPainandSufferingTimer -= uiDiff;            if (m_uiQuakeTimer < uiDiff)            {                DoScriptText(SAY_BROKEN_ARENA, me);                DoCast(me, SPELL_QUAKE);                me->SetReactState(REACT_AGGRESSIVE);                me->GetMotionMaster()->Clear();                me->GetMotionMaster()->MoveChase(me->getVictim());                m_uiPhase = 3;//.........这里部分代码省略.........
开发者ID:VenT,项目名称:wow,代码行数:101,


示例24: KilledUnit

 void KilledUnit(Unit* victim) {     if (victim->GetTypeId() == TYPEID_PLAYER)         DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me); }
开发者ID:Zaffy,项目名称:OregonCore,代码行数:5,


示例25: Intro

 void Intro() {     if( m_uiIntroTimer )     {         switch( m_uiIntroPhase )         {         case 1:             if(m_pInstance)                 m_pInstance->SetData(DATA_LICH_KING_EVENT, IN_PROGRESS);             pLichKing->SetStandState(UNIT_STAND_STATE_STAND);             pLichKing->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);             pLichKing->SetSpeed(MOVE_WALK, 1.2f);             pLichKing->GetMotionMaster()->MovePoint(0, MovePosition);             me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 375);             KingIntro(3000);             break;         case 2:              pLichKing->SetUInt32Value(UNIT_NPC_EMOTESTATE, 1);             DoScriptText(SAY_INTRO_1_KING, pLichKing);             KingIntro(14000);             break;         case 3:             pLichKing->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);             DoScriptText(SAY_INTRO_2_TIRION, me);             KingIntro(9000);             break;         case 4:             DoScriptText(SAY_INTRO_3_KING, pLichKing);             pLichKing->SetUInt32Value(UNIT_NPC_EMOTESTATE, 392);             KingIntro(3000);             break;         case 5:             pLichKing->SetUInt32Value(UNIT_NPC_EMOTESTATE, 397);             KingIntro(2000);             break;         case 6:             pLichKing->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);             KingIntro(21000);             break;         case 7:             me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 397);             DoScriptText(SAY_INTRO_4_TIRION, me);             KingIntro(1000);             break;         case 8:             me->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);             me->GetMotionMaster()->MovePoint(0, MoveTirionAttack);             KingIntro(4000);             break;         case 9:             me->CastSpell(pLichKing, SPELL_ICEBLOCK_TRIGGER, false);             KingIntro(2000);             break;         case 10:             pLichKing->SetUInt32Value(UNIT_NPC_EMOTESTATE, 1);             DoScriptText(SAY_INTRO_5_KING, pLichKing);             KingIntro(12000);             break;         case 11:             pLichKing->SetUInt32Value(UNIT_NPC_EMOTESTATE, 0);             pLichKing->SetReactState(REACT_AGGRESSIVE);             KingIntro(6000);             break;         }     } }
开发者ID:VenT,项目名称:wow,代码行数:66,


示例26: EnterCombat

 void EnterCombat(Unit *who) {     DoScriptText(SAY_AGGRO, m_creature); }
开发者ID:Ickybad,项目名称:diamondcore2,代码行数:4,


示例27: UpdateAI

    void UpdateAI(const uint32 diff)    {        if (!UpdateVictim())            return;        if (!m_pInstance || m_pInstance->GetData(DATA_VALITHRIA_DREAMWALKER_EVENT) != IN_PROGRESS)            summons.DespawnAll();        if (Phase == 1)        {            DoStartNoMovement(me->getVictim());            me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);            m_uiEndTimer = 999999999;            if (m_uiSummonTimer <= diff)            {                if (getDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL || getDifficulty() == RAID_DIFFICULTY_10MAN_HEROIC)                {                    DoSummon(CREATURE_ZOMBIE, Pos[RAND(0,4)]);                    DoSummon(CREATURE_SKELETON, Pos[RAND(0,4)]);                    DoSummon(CREATURE_ARCHMAGE, Pos[RAND(0,4)]);                    DoSummon(CREATURE_SUPPRESSER, Pos[RAND(0,4)]);                    DoSummon(CREATURE_ABOMINATION, Pos[RAND(0,4)]);                }                if (getDifficulty() == RAID_DIFFICULTY_25MAN_NORMAL || getDifficulty() == RAID_DIFFICULTY_25MAN_HEROIC)                {                    DoSummon(CREATURE_ZOMBIE, Pos[RAND(0,1,2,3)]);                    DoSummon(CREATURE_SKELETON, Pos[RAND(0,1,2,3)]);                    DoSummon(CREATURE_ARCHMAGE, Pos[RAND(0,1,2,3)]);                    DoSummon(CREATURE_SUPPRESSER, Pos[RAND(0,1,2,3)]);                    DoSummon(CREATURE_ABOMINATION, Pos[RAND(0,1,2,3)]);                }                m_uiSummonTimer = 28000;            } else m_uiSummonTimer -= diff;            if (m_uiPortalTimer <= diff)            {                DoScriptText(SAY_OPEN_PORTAL, me);                me->SummonCreature(CREATURE_PORTAL, me->GetPositionX()+15, me->GetPositionY()+15, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 15000);                me->SummonCreature(CREATURE_PORTAL, me->GetPositionX()+10, me->GetPositionY()+25, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 15000);                me->SummonCreature(CREATURE_PORTAL, me->GetPositionX()+15, me->GetPositionY()-25, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 15000);                m_uiPortalTimer = 30000;            } else m_uiPortalTimer -= diff;            if (!ABOVEHP && (me->GetHealth()*100 / me->GetMaxHealth()) > 75)            {                DoScriptText(SAY_ABOVE_75, me);                ABOVEHP = true;            }            if (!BELOWHP && (me->GetHealth()*100 / me->GetMaxHealth()) < 25)            {                DoScriptText(SAY_BELOW_25, me);                BELOWHP = true;            }            if ((me->GetHealth()*100 / me->GetMaxHealth()) > 99)            {                Phase = 2;                me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE);                me->SetReactState(REACT_PASSIVE);                me->RemoveAurasDueToSpell(SPELL_CORRUPTION);                end = true;            }        }        if (Phase == 2)        {            Phase = 3;            m_uiEndTimer = 1000;            m_uiEnd2Timer = 6000;            DoScriptText(SAY_END, me);        }        if (Phase == 3)        {            if (m_uiEndTimer <= diff)            {                Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0);                if(pTarget && !pTarget->IsFriendlyTo(me))                {                    DoScriptText(SAY_BERSERK , me);                    DoCast(pTarget, SPELL_RAGE);                }                me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);                m_uiEndTimer = 50000;            } else m_uiEndTimer -= diff;            if (m_uiEnd2Timer <= diff)            {                combat_trigger->ForcedDespawn();                me->CastSpell(me, SPELL_DREAM_SLIP, true, 0, 0, 0);                m_uiEnd2Timer = 50000;            } else m_uiEnd2Timer -= diff;        }        if (me->HasAura(SPELL_DREAM_SLIP))//.........这里部分代码省略.........
开发者ID:Archives,项目名称:ro_core,代码行数:101,


示例28: UpdateAI

    void UpdateAI(const uint32 diff)    {        if (ResetTimer)        {            if (ResetTimer <= diff)            {                ResetTimer = 0;                Unit *pMidnight = Unit::GetUnit(*m_creature, Midnight);                if (pMidnight)                {                    pMidnight->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);                    pMidnight->SetVisibility(VISIBILITY_ON);                }                Midnight = 0;                m_creature->SetVisibility(VISIBILITY_OFF);                m_creature->Kill(m_creature);            }        } else ResetTimer -= diff;        //Return since we have no target        if (!UpdateVictim())            return;        if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE))            return;        if (CleaveTimer <= diff)        {            DoCast(m_creature->getVictim(), SPELL_SHADOWCLEAVE);            CleaveTimer = urand(10000,15000);        } else CleaveTimer -= diff;        if (CurseTimer <= diff)        {            DoCast(m_creature->getVictim(), SPELL_INTANGIBLE_PRESENCE);            CurseTimer = 30000;        } else CurseTimer -= diff;        if (RandomYellTimer <= diff)        {            DoScriptText(RAND(SAY_RANDOM1,SAY_RANDOM2), m_creature);            RandomYellTimer = urand(30000,60000);        } else RandomYellTimer -= diff;        if (m_creature->GetUInt32Value(UNIT_FIELD_DISPLAYID) == MOUNTED_DISPLAYID)        {            if (ChargeTimer <= diff)            {                Unit *pTarget;                std::list<HostileReference *> t_list = m_creature->getThreatManager().getThreatList();                std::vector<Unit *> target_list;                for (std::list<HostileReference *>::iterator itr = t_list.begin(); itr!= t_list.end(); ++itr)                {                    pTarget = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid());                    if (pTarget && !pTarget->IsWithinDist(m_creature, ATTACK_DISTANCE, false))                        target_list.push_back(pTarget);                    pTarget = NULL;                }                if (target_list.size())                    pTarget = *(target_list.begin()+rand()%target_list.size());                DoCast(pTarget, SPELL_BERSERKER_CHARGE);                ChargeTimer = 20000;            } else ChargeTimer -= diff;        }        else        {            if ((m_creature->GetHealth()*100)/m_creature->GetMaxHealth() < 25)            {                Creature *pMidnight = Unit::GetCreature(*m_creature, Midnight);                if (pMidnight && pMidnight->GetTypeId() == TYPEID_UNIT)                {                    CAST_AI(boss_midnightAI, (pMidnight->AI()))->Mount(m_creature);                    m_creature->SetHealth(pMidnight->GetHealth());                    DoResetThreat();                }            }        }        DoMeleeAttackIfReady();    }
开发者ID:Ickybad,项目名称:diamondcore2,代码行数:81,



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


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