void AIUpdate() { if(GetPhase() == 1 && GetHealthPercent() <= (mPhaseRepeat * 25)) { switch(rand() % 2) { case 0: Emote("I'll give you more than you can handle.", Text_Yell, 13321); break; case 1: Emote("There's plenty of me to go around.", Text_Yell, 13322); break; } SetPhase(2); SetCanMove(false); SetAllowRanged(false); SetAllowSpell(false); SetAllowTargeting(false); ApplyAura(60191); for(int i = 0; i < 3; ++i) { mAddArray[i] = _unit->GetMapMgr()->GetInterface()->SpawnCreature(CN_TELESTRA_FIRE + i, FormSpawns[i].x, FormSpawns[i].y, FormSpawns[i].z, FormSpawns[i].o, true, true, 0, 0); if(mAddArray[i] != NULL) ++mAddCount; } }; if(GetPhase() == 2) { for(int i = 0; i < 3; ++i) { if(mAddArray[i] != NULL) { mAddArray[i]->Despawn(1000, 0); mAddArray[i] = NULL; --mAddCount; } } if(mAddCount != 0) return; Emote("Now to finish the job!", Text_Yell, 13323); RemoveAura(60191); SetCanMove(true); mPhaseRepeat = 1; SetPhase(mHeroic ? 1 : 3); //3 disables p2 }; ParentClass::AIUpdate(); };
EnslavedNetherwingDrakeAI(Creature* pCreature) : MoonScriptCreatureAI(pCreature) { Movement::LocationWithFlag WayPoint = { _unit->GetPositionX(), _unit->GetPositionY() + 30, _unit->GetPositionZ() + 100, _unit->GetOrientation(), Movement::WP_MOVE_TYPE_FLY }; SetCanMove(false); _unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_FEIGN_DEATH | UNIT_FLAG_NOT_ATTACKABLE_2); AddWaypoint(CreateWaypoint(1, 0, WayPoint)); }
void OnCombatStart(Unit* mTarget) { SetAllowMelee(false); SetCanMove(false); //doors ParentClass::OnCombatStart(mTarget); }
void AIUpdate() { SetAllowMelee(false); SetCanMove(false); timmer++; if (summoningst == true && (timmer == 20 || timmer == 60 || timmer == 100)) { SpawnCreature(CN_SHADOWSWORD_BERSERKER, 1871, 650, 71, 0, false); SpawnCreature(CN_SHADOWSWORD_FURY_MAGE, 1871, 650, 71, 0, false); SpawnCreature(CN_SHADOWSWORD_FURY_MAGE, 1748, 700, 71, 0, false); SpawnCreature(CN_SHADOWSWORD_BERSERKER, 1748, 700, 71, 0, false); } if (timmer == 120) { timmer = 0; summoningst = true; switch (spawnplace) { case 1: { SpawnCreature(CN_VOID_SENTINEL, 1800, 652, 71, 0, false); ++spawnplace; }break; case 2: { SpawnCreature(CN_VOID_SENTINEL, 1798, 605, 71, 0, false); ++spawnplace; }break; case 3: { SpawnCreature(CN_VOID_SENTINEL, 1826, 650, 71, 0, false); ++spawnplace; }break; case 4: { SpawnCreature(CN_VOID_SENTINEL, 1783, 625, 71, 0, false); ++spawnplace; }break; case 5: { SpawnCreature(CN_VOID_SENTINEL, 1816, 595, 71, 0, false); ++spawnplace; }break; case 6: { SpawnCreature(CN_VOID_SENTINEL, 1844, 641, 71, 0, false); spawnplace = 1; }break; } } if (GetHealthPercent() <= 35) { SpawnCreature(CN_ENTROPIUS, true); Despawn(100,0); } ParentClass::AIUpdate(); }
SeaforiumDepthCharge(Creature* pCreature) : MoonScriptCreatureAI(pCreature) { SetCanMove( false ); SetCanEnterCombat( false ); _unit->SetFaction(21); RegisterAIUpdateEvent(3000); }
void OnLoad() { _unit->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, 1771); SetFlyMode(true); SetCanMove(false); ParentClass::OnLoad(); }
void OnCombatStart(Unit* mTarget) { SetAllowMelee(false); SetCanMove(false); dtimmer = 1; ParentClass::OnCombatStart(mTarget); }
EnslavedNetherwingDrakeAI(Creature* pCreature) : MoonScriptCreatureAI(pCreature) { LocationExtra WayPoint = { _unit->GetPositionX(), _unit->GetPositionY() + 30, _unit->GetPositionZ() + 100, _unit->GetOrientation(), Flag_Fly }; SetCanMove(false); _unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_FEIGN_DEATH | UNIT_FLAG_NOT_ATTACKABLE_2); AddWaypoint(CreateWaypoint(1, 0, Flag_Fly, WayPoint)); }
VoidZoneARC(Creature* pCreature) : MoonScriptCreatureAI(pCreature) { StopMovement(); SetCanMove(false); SetCanEnterCombat(false); RegisterAIUpdateEvent(1000); }
SeaforiumDepthCharge(Creature* pCreature) : MoonScriptCreatureAI(pCreature) { SetCanMove( false ); SetCanEnterCombat( false ); _unit->SetFaction(21); p_timer = 3000; }
void OnCombatStart(Unit* pTarget) { SetDisplayWeapon(true, true); ParentClass::OnCombatStart(pTarget); mAliveAdds = 0; mLastYell = -1; for (int i = 0; i < 4; ++i) { Unit* pAdd = ForceCreatureFind(Adds[i]); if (pAdd != NULL && pAdd->isAlive()) { Unit* pTarget = GetBestPlayerTarget(); if (pTarget != NULL) { pAdd->GetAIInterface()->AttackReaction(pTarget, 200); } ++mAliveAdds; } } if (mAliveAdds > 1) { SetCanEnterCombat(false); SetBehavior(Behavior_Spell); SetCanMove(false); } }
void OnAddDied() { if (mAliveAdds > 0) { --mAliveAdds; if (mAliveAdds > 1) { uint32 RandomText = RandomUInt(1); while (RandomText == mLastYell) { RandomText = RandomUInt(1); } switch (RandomText) { case 0: Emote("You not kill next one so easy!", Text_Yell, 11369); break; case 1: Emote("Does not prove anything!", Text_Yell, 11370); break; } mLastYell = RandomText; } else if (mAliveAdds == 1) { Emote("Good, now you fight me!", Text_Yell, 0); SetCanEnterCombat(true); SetBehavior(Behavior_Default); SetCanMove(true); } } }
void AIUpdate() { if(IsTimerFinished(mStompTimer)) { CastSpellNowNoScheduling( mStomp ); SetCanMove( false ); ResetTimer( mStompTimer, ( STOMP_TIMER + SHATTER_TIMER )); mShatterTimer = AddTimer( SHATTER_TIMER ); } if(IsTimerFinished(mShatterTimer)) { CastSpellNowNoScheduling( mShatter ); SetCanMove( true ); RemoveTimer( mShatterTimer ); } }
void GameManager::GiveTurn(int playerID) { //player sprite에 화살표 주기 주기 auto nowTurnPlayer = m_PlayerList.find(playerID); nowTurnPlayer->second->SetMyTurn(true); auto tank = nowTurnPlayer->second->GetTank(); tank->SetCanMove(true); }
void OnLoad() { spawnplace = 1; summoningst = false; timmer = 0; SetAllowMelee(false); SetCanMove(false); ParentClass::OnLoad(); }
void AIUpdate() { if(GetHealthPercent() <= 50 && GetPhase() == 1) { const char * Text = ""; uint32 pSoundID = 0; uint32 Random = rand()%2; switch (Random) { case 0: Text = "I'll give you more than you can handle."; pSoundID = 13321; break; case 1: Text = "There's plenty of me to go around."; pSoundID = 13322; break; } Emote(Text, Text_Yell, pSoundID); SetPhase(2); SetCanMove(false); ApplyAura(60191); pFire = _unit->GetMapMgr()->GetInterface()->SpawnCreature( CN_TELESTRA_FIRE, 494.726990f, 89.128799f, -15.941300f, 6.021390f, true, true, NULL, NULL ); pFrost = _unit->GetMapMgr()->GetInterface()->SpawnCreature( CN_TELESTRA_FROST, 495.006012f, 89.328102f, -16.124609f, 0.027486f, true, true, NULL, NULL ); pArcane = _unit->GetMapMgr()->GetInterface()->SpawnCreature( CN_TELESTRA_ARCANE, 504.798431f, 102.248375f, -16.124609f, 4.629921f, true, true, NULL, NULL ); }; if( GetPhase() == 2 ) { if( ( pFrost != NULL && pFrost->isAlive() ) || ( pFire != NULL && pFire->isAlive() ) || ( pArcane != NULL && pArcane->isAlive() ) ) return; Emote("Now to finish the job!", Text_Yell, 13323); RemoveAura(60191); SetCanMove(true); SetPhase(3); }; ParentClass::AIUpdate(); };
void MoonScriptCreatureAI::OnCombatStop(Unit *pTarget) { CancelAllSpells(); CancelAllTimers(); RemoveAllAuras(); SetCanMove(true); SetBehavior(Behavior_Default); if( mDespawnWhenInactive ) Despawn(DEFAULT_DESPAWN_TIMER); }
void OnCombatStart(Unit* pTarget) { ParentClass::OnCombatStart(pTarget); if (GetRangeToUnit(pTarget) <= 40.0f) { SetBehavior(Behavior_Spell); SetCanMove(false); } }
void MoonScriptCreatureAI::OnCombatStop(Unit* pTarget) { CancelAllSpells(); CancelAllTimers(); RemoveAllAuras(); SetCanMove(true); SetBehavior(Behavior_Default); //_unit->GetAIInterface()->SetAIState(STATE_IDLE); // Fix for stucking mobs that don't regen RemoveAIUpdateEvent(); if( mDespawnWhenInactive ) Despawn(DEFAULT_DESPAWN_TIMER); }
void Reset_Event() { SetCanMove(true); SetAllowMelee(true); SetAllowSpell(true); _unit->SetEmoteState(8); // to be replaced for the standstate if (shield) shield->SetState(GAMEOBJECT_STATE_OPEN); if (orb1) orb1->SetState(GAMEOBJECT_STATE_CLOSED); if (orb2) orb2->SetState(GAMEOBJECT_STATE_CLOSED); if (orb3) orb3->SetState(GAMEOBJECT_STATE_CLOSED); if (orb4) orb4->SetState(GAMEOBJECT_STATE_CLOSED); if (NPC_orb1) { NPC_orb1->Despawn(0); NPC_orb1 = NULL; } if (NPC_orb2) { NPC_orb2->Despawn(0); NPC_orb2 = NULL; } if (NPC_orb3) { NPC_orb3->Despawn(0); NPC_orb3 = NULL; } if (NPC_orb4) { NPC_orb4->Despawn(0); NPC_orb4 = NULL; } if (NPC_orb5) { NPC_orb5->Despawn(0); NPC_orb5 = NULL; } }
void ChargeRift() { SummonRift(true); Announce("Anomalus shields himself and diverts his power to the rifts!"); Emote("Indestructible.", Text_Yell, 13189); ApplyAura(47748); // me immune SetCanMove(false); mRift = true; mSummon += 1; };
void OnLoad() { SetCanEnterCombat(false); SetCanMove(false); _unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Despawn(4500, 0); RegisterAIUpdateEvent(500); m_part = 0; ParentClass::OnLoad(); };
void MoonScriptCreatureAI::ForceWaypointMove(uint32 pWaypointId) { if (GetCanEnterCombat()) _unit->GetAIInterface()->SetAllowedToEnterCombat(false); if (!GetCanMove()) SetCanMove(true); StopMovement(); _unit->GetAIInterface()->SetAIState(STATE_SCRIPTMOVE); SetMoveType(Move_WantedWP); SetWaypointToMove(pWaypointId); }
void OnLoad() { RegisterAIUpdateEvent(1000); SetCanMove(false); SetCanEnterCombat(false); _unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); _unit->CastSpell(_unit, dbcSpell.LookupEntry(CYCLON_SPELL), true); _unit->CastSpell(_unit, dbcSpell.LookupEntry(CYCLON_AURA), true); ParentClass::OnLoad(); };
void ArcScriptCreatureAI::PushRunToTargetCache(Unit* pTarget, SpellDesc* pSpell) { if( mRunToTargetCache != pTarget ) { mRunToTargetCache = pTarget; mRunToTargetSpellCache = pSpell; SetCanMove(true); SetAllowMelee(false); SetAllowRanged(false); SetAllowSpell(false); } if( mRunToTargetCache ) MoveTo(mRunToTargetCache); }
void AMech_RPGCharacter::SetupWithLoadout() { SetMaxHealth(startingLoadout.maxHealth); SetHealth(GetMaxHealth()); SetDefenceModifier(startingLoadout.defenceModifier); SetHealthChangeModifier(startingLoadout.damageModifier); SetCanMove(startingLoadout.canMove); SetCanAttack(startingLoadout.canAttack); SetCanBeDamaged(startingLoadout.canBeDamaged); SetHealthRegen(startingLoadout.healthRegen); SetTeam(startingLoadout.team); SetSpeedModifier(startingLoadout.movementModifier); SetSpeed(startingLoadout.speed); }
CCommonWnd::CCommonWnd() { m_pParent = m_pChild = m_pNext = m_pPrev = NULL; m_pVideoDriver = NULL; m_pBackTexture = NULL; m_nDisplayLeft = m_nDisplayTop = 0; m_nWidth = m_nHeight = m_nLeft = m_nTop = 0; m_nDragStatus = Drag_Status_None; SetIsContainer(false); SetCanMove(true); SetCanDrag(true); m_nAlpha = 0xffffffff; }
void AIUpdate() { ParentClass::AIUpdate(); Unit* pTarget = _unit->GetAIInterface()->GetNextTarget(); if (pTarget != NULL) { if (GetRangeToUnit(pTarget) <= 40.0f) { SetBehavior(Behavior_Spell); SetCanMove(false); } } }
cBlizzard::cBlizzard(cGameObject* _pOwner,const float& _distance) { SetDistance(_distance); SetOwner(_pOwner); m_pOwnerStatus = &_pOwner->GetStatus(); m_ownerID = _pOwner->GetID(); size_t tagId = _pOwner->GetTag(); if (tagId == g_pGameManager->FindObjectType("player")) { m_vecTargetTag.push_back(g_pGameManager->FindObjectType("monster")); } else if (tagId == g_pGameManager->FindObjectType("combatnpc")) { m_vecTargetTag.push_back(g_pGameManager->FindObjectType("monster")); } else if (tagId == g_pGameManager->FindObjectType("monster")) { m_vecTargetTag.push_back(g_pGameManager->FindObjectType("combatnpc")); m_vecTargetTag.push_back(g_pGameManager->FindObjectType("player")); } m_fCoolDownTime = 20.0f; SetSkillType(skilltype::continuous); m_skillRange.vCenter = D3DXVECTOR3(0, 0, 0); m_skillRange.fRadius = 2* _pOwner->GetVScale().x; m_pParticleEffect = new cParticleEffect; SetCanMove(true); m_pParticleEffect->SetSize(0.5f); cRandom::SRand(); for (int i = 0; i < 50; ++i) { m_pParticleEffect->AddParticle( new cThrownObject(m_skillRange.fRadius, 3.0f, -3.0f, 1.5f, true, D3DCOLOR_XRGB(75, 75, 255))); } for (int i = 0; i < 15; ++i) { m_pParticleEffect->AddParticle(new cRecursiveParticle(m_skillRange.vCenter, m_skillRange.fRadius, 3.0f, (float)i*(360 / 15.0f), m_fRunTime, D3DCOLOR_XRGB(75, 75, 255))); } for (int i = 0; i < 10; ++i) { m_pParticleEffect->AddParticle(new cRecursiveParticle(m_skillRange.vCenter, m_skillRange.fRadius - 0.5f, 3.0f, (float)i*(360 / 10.0f), m_fRunTime, D3DCOLOR_XRGB(75, 75, 255))); } }
KilJaedenAI(Creature* pCreature) : MoonScriptBossAI(pCreature) { SetCanEnterCombat( false ); DelayNextAttack( 11600 ); SetAllowMelee( false ); SetAllowSpell( false ); SetAllowTargeting( false ); SetCanMove( false ); TriggerCooldownOnAllSpells(); SetCanMove( false ); Emote( "The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!", Text_Yell, 12500 ); mStarted = false; RegisterAIUpdateEvent( 100 ); pKJDummy = static_cast<KJDummyAI*>( GetNearestCreature( CN_KIL_JADEN_DUMMY ) ); if( pKJDummy ) pKJDummy->AddEncounterCreature( _unit ); AddPhaseSpell( 1, AddSpell( SOUL_FLAY, Target_Current, 50, 0, 6 ) ); AddPhaseSpell( 1, AddSpell( LEGION_LIGHTNING, Target_RandomPlayer, 25, 2.0f, 8 ) ); AddPhaseSpell( 1, AddSpell( FIRE_BLOOM, Target_RandomPlayer, 20, 0, 10 ) ); };