void Aggro(Unit *pWho) { if(!pInstance) return; if (pWho->GetTypeId() != TYPEID_PLAYER) return; Creature* pBlightTarget = m_creature->GetMap()->GetCreature(blightTargetGUID); pInstance->SetData(TYPE_FESTERGUT, IN_PROGRESS); DoScriptText(-1631203,m_creature,pWho); if (pBlightTarget && !pBlightTarget->isAlive()) pBlightTarget->Respawn(); if (pBlightTarget) { pBlightTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); pBlightTarget->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); doRemove(SPELL_BLIGHT_VISUAL_1,pBlightTarget); doRemove(SPELL_BLIGHT_VISUAL_2,pBlightTarget); doRemove(SPELL_BLIGHT_VISUAL_3,pBlightTarget); doCast(SPELL_BLIGHT_VISUAL_1,pBlightTarget); } doCast(SPELL_GASEOUS_BLIGHT_1); doRemoveFromAll(SPELL_BLIGHT_VISUAL_3); doRemoveFromAll(SPELL_BLIGHT_VISUAL_2); doRemoveFromAll(SPELL_BLIGHT_VISUAL_1); /* for(uint8 i = 0; i < 3; ++i) if (pPuddleStalkerGUID[i]) doCast(SPELL_GASEOUS_SPIGOT, m_creature->GetMap()->GetCreature(pPuddleStalkerGUID[i])); */ }
void JustDied(Unit *killer) { if(pInstance) pInstance->SetData(TYPE_FESTERGUT, DONE); pInstance->SetData(TYPE_EVENT, 550); doRemove(SPELL_PUNGENT_BLIGHT); doRemove(SPELL_PUNGENT_BLIGHT_1); doRemove(SPELL_PUNGENT_BLIGHT_2); DoScriptText(-1631206,m_creature); }
int main(int argc, char *argv[]) { progName = argv[0]; if (argc == 1) { fprintf(stderr, "USAGE:\t%s [-rf] names...\n", argv[0]); fprintf(stderr, "\tDelete files or directories. If some of the names refer to\n"); fprintf(stderr, "\tdirectories, and -r is not passed, the directories must be empty.\n"); fprintf(stderr, "\n\t-r\n"); fprintf(stderr, "\t\tRemove recursively - directories and their contents are deleted.\n"); fprintf(stderr, "\n\t-f\n"); fprintf(stderr, "\t\tIf an given name does not exit, ignore silently, still returning success.\n"); return 1; }; int i; for (i=1; i<argc; i++) { if (argv[i][0] == '-') { processSwitches(argv[i]); } else { doRemove(argv[i]); }; }; return 0; };
void OSInterface::doRemove(std::string &src){ std::wstring oldf; std::stringstream ss; oldf.assign(src.begin(), src.end()); ss << "Remove " << src << std::endl; if(isDir(src)){ std::string warn = src + "\n is a directory. Remove anyvway? \n"; if(QMessageBox::question(nullptr, "Remove directory", QString::fromStdString(warn), QMessageBox::Yes|QMessageBox::Default, QMessageBox::No|QMessageBox::Escape) == QMessageBox::No) throw std::exception(); OSInterface os; os.getDirInfo(src, "*"); for(auto &a : os.dirs){ std::string nsrc; nsrc = src; nsrc.push_back(dir_sep); nsrc.append(a->name); doRemove(nsrc); } if(!RemoveDirectory(oldf.c_str())) throw new OSException(ss.str(), strerror(errno)); }else{ if(!DeleteFile(oldf.c_str())) throw new OSException(ss.str(), strerror(errno)); } }
Status SessionsCollectionRS::removeRecords(OperationContext* opCtx, const LogicalSessionIdSet& sessions) { return dispatch(NamespaceString::kLogicalSessionsNamespace, opCtx, [&] { DBDirectClient client(opCtx); return doRemove(NamespaceString::kLogicalSessionsNamespace, sessions, makeSendFnForBatchWrite( NamespaceString::kLogicalSessionsNamespace, &client)); }, [&](DBClientBase* client) { return doRemove(NamespaceString::kLogicalSessionsNamespace, sessions, makeSendFnForBatchWrite( NamespaceString::kLogicalSessionsNamespace, client)); }); }
void UpdateAI(const uint32 uiDiff) { if ((m_pInstance && m_pInstance->GetData(TYPE_SINDRAGOSA) != IN_PROGRESS) || (victimGUID && !m_creature->GetMap()->GetPlayer(victimGUID)->HasAura(SPELL_ICY_TOMB))) { if (Player* pVictim = m_creature->GetMap()->GetPlayer(victimGUID)) doRemove(SPELL_ICY_TOMB,pVictim); m_creature->ForcedDespawn(); } }
SubTabController::SubTabController(SubTabView* subTabView) : OSQObjectController(), m_subTabView(subTabView) { addQObject(subTabView); bool isConnected = false; isConnected = connect(subTabView, SIGNAL(itemSelected(OSItem*)), this, SLOT(selectItem(OSItem*))); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(itemRemoveClicked(OSItem*)), this, SLOT(removeItem(OSItem*))); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(itemReplacementDropped(OSItem*, const OSItemId&)), this, SLOT(replaceItem(OSItem*, const OSItemId&))); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(selectionCleared()), this, SLOT(clearSelection())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(itemDropped(const OSItemId&)), this, SLOT(handleDrop(const OSItemId&))); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(addClicked()), this, SLOT(doAdd())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(copyClicked()), this, SLOT(doCopy())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(removeClicked()), this, SLOT(doRemove())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(purgeClicked()), this, SLOT(doPurge())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(openBclDlgClicked()), this, SIGNAL(openBclDlgClicked())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(openLibDlgClicked()), this, SIGNAL(openLibDlgClicked())); BOOST_ASSERT(isConnected); isConnected = connect(subTabView, SIGNAL(dropZoneItemClicked(OSItem*)), this, SLOT(inspectItem(OSItem*))); BOOST_ASSERT(isConnected); }
void signal_shutdown(int signum) { // catch a ctrl c etc printf("Caught signal %d\n",signum); // Cleanup and close up stuff here close_register(); if (toShareOrNotToShare) { fprintf(stderr,"Please wait while unregistering ...\n"); doRemove(); } // Terminate program exit(signum); }
void MainWindow::removeFiles(QString path, QStringList removeList) { int i; qDebug()<<"removeFiles"; for(i=0;i<removeList.size();i++) rmList << removeList.at(i); currentPath = path; if(rmList.size()) doRemove(); }
void JustDied(Unit *killer) { if (!pInstance) return; pInstance->SetData(TYPE_SAURFANG, DONE); DoScriptText(-1631106,m_creature); Map::PlayerList const &pList = m_creature->GetMap()->GetPlayers(); if (pList.isEmpty()) return; for (Map::PlayerList::const_iterator i = pList.begin(); i != pList.end(); ++i) if (Player* pPlayer = i->getSource()) if (pPlayer && pPlayer->isAlive()) if (pPlayer->HasAura(SPELL_MARK)) doRemove(SPELL_MARK,pPlayer); }
Status SessionsCollectionRS::removeTransactionRecords(OperationContext* opCtx, const LogicalSessionIdSet& sessions) { return dispatch( NamespaceString::kSessionTransactionsTableNamespace, opCtx, [&] { DBDirectClient client(opCtx); return doRemove(NamespaceString::kSessionTransactionsTableNamespace, sessions, makeSendFnForBatchWrite( NamespaceString::kSessionTransactionsTableNamespace, &client)); }, [](DBClientBase*) { return Status(ErrorCodes::NotMaster, "Not eligible to remove transaction records"); }); }
Status SessionsCollectionSharded::removeRecords(OperationContext* opCtx, const LogicalSessionIdSet& sessions) { auto send = [&](BSONObj toSend) { auto opMsg = OpMsgRequest::fromDBAndBody(NamespaceString::kLogicalSessionsNamespace.db(), toSend); auto request = BatchedCommandRequest::parseDelete(opMsg); BatchedCommandResponse response; BatchWriteExecStats stats; ClusterWriter::write(opCtx, request, &stats, &response); return response.toStatus(); }; return doRemove(NamespaceString::kLogicalSessionsNamespace, sessions, send); }
void UpdateAI(const uint32 uiDiff) { if (!m_pInstance) return; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; if (hasAura(SPELL_INVOCATION_OF_BLOOD_V)) { if (!invocated) { DoScriptText(-1631307,m_creature); m_creature->SetHealth(m_health); invocated = true; } if (timedQuery(SPELL_INVOCATION_OF_BLOOD_V, uiDiff)) { if (doCast(urand(0,1) ? SPELL_INVOCATION_OF_BLOOD_K : SPELL_INVOCATION_OF_BLOOD_T) == CAST_OK) { doRemove(SPELL_INVOCATION_OF_BLOOD_V); invocated = false; m_health = m_creature->GetHealth(); m_creature->SetHealth(1); } } timedCast(SPELL_KINETIC_BOMB, uiDiff); timedCast(SPELL_SHOCK_VORTEX_2, uiDiff); } else { timedCast(SPELL_KINETIC_BOMB, uiDiff); timedCast(SPELL_SHOCK_VORTEX, uiDiff); } if (timedQuery(SPELL_BERSERK, uiDiff)) { doCast(SPELL_BERSERK); DoScriptText(-1631305,m_creature); }; DoMeleeAttackIfReady(); }
void OSInterface::doRemove(std::string &src){ std::stringstream ss; if(isDir(src)){ OSInterface os; os.getDirInfo(src, "*"); for(auto &a : os.dirs){ std::string nsrc; nsrc = src; nsrc.push_back(dir_sep); nsrc.append(a->name); doRemove(nsrc); } if(rmdir(src.c_str()) == -1) throw new OSException(src, strerror(errno)); }else{ ss << "Remove " << src << std::endl; if((unlink(src.c_str())) == -1) throw new OSException(ss.str(), strerror(errno)); } }
Status SessionsCollectionSharded::removeRecords(OperationContext* opCtx, const LogicalSessionIdSet& sessions) { auto send = [&](BSONObj toSend) { auto opMsg = OpMsgRequest::fromDBAndBody(SessionsCollection::kSessionsDb, toSend); auto request = BatchedCommandRequest::parseDelete(opMsg); BatchedCommandResponse response; BatchWriteExecStats stats; ClusterWriter::write(opCtx, request, &stats, &response); if (response.getOk()) { return Status::OK(); } auto error = response.isErrCodeSet() ? ErrorCodes::fromInt(response.getErrCode()) : ErrorCodes::UnknownError; return Status(error, response.getErrMessage()); }; return doRemove(sessions, send); }
void OSInterface::remove(cmd_info_T &ci){ for(auto src : ci.source_files){ try{ if(isDir(src)){ std::string warn = src + "\n is a directory. Remove anyvway? \n"; if(QMessageBox::question(nullptr, "Remove directory", QString::fromStdString(warn), QMessageBox::Yes|QMessageBox::Default, QMessageBox::No|QMessageBox::Escape) == QMessageBox::No) throw std::exception(); } doRemove(src); std::stringstream ss; ss << "Remove " << src << std::endl; ss << "Success!"; std::string str = ss.str(); // MyDialog::MsgBox(str); }catch(OSException *e){ e->process(); } catch(std::exception e) {} //nepotvrzeni smazani adresare } }
void doRemoveRecur(const char *name) { DIR *dp = opendir(name); if (dp == NULL) { if ((errno != ENOENT) || (!force)) { perror(name); exit(1); } else { return; }; }; struct dirent *ent; while ((ent = readdir(dp)) != NULL) { if (strcmp(ent->d_name, ".") == 0) { continue; }; if (strcmp(ent->d_name, "..") == 0) { continue; }; char fullpath[256]; strcpy(fullpath, name); if (fullpath[strlen(fullpath)-1] != '/') strcat(fullpath, "/"); strcat(fullpath, ent->d_name); doRemove(fullpath); }; closedir(dp); };
void UpdateAI(const uint32 diff) { if(!pInstance) return; if (!pet) { if (Creature* pGuard = pInstance->GetSingleCreatureFromStorage(NPC_STINKY)) if (!pGuard->isAlive()) { pet = true; if (pInstance->GetData(TYPE_STINKY) == NOT_STARTED) { DoScriptText(-1631209,m_creature); pInstance->SetData(TYPE_STINKY,DONE); } } } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; Creature* pBlightTarget = m_creature->GetMap()->GetCreature(blightTargetGUID); switch(getStage()) { case 0: if (timedQuery(SPELL_GASEOUS_BLIGHT_2, diff)) setStage(1); break; case 1: switch (urand(0,2)) { case 0: DoScriptText(-1631210,m_creature); break; case 1: DoScriptText(-1631211,m_creature); break; case 2: DoScriptText(-1631212,m_creature); break; } doCast(SPELL_INHALE_BLIGHT); setStage(2); break; case 2: if (m_creature->IsNonMeleeSpellCasted(false)) return; if (pBlightTarget) { doRemove(SPELL_GASEOUS_BLIGHT_1); doRemove(SPELL_BLIGHT_VISUAL_1,pBlightTarget); doRemove(SPELL_BLIGHT_VISUAL_1,m_creature); doCast(SPELL_GASEOUS_BLIGHT_2); doRemoveFromAll(SPELL_BLIGHT_VISUAL_3); doRemoveFromAll(SPELL_BLIGHT_VISUAL_2); doRemoveFromAll(SPELL_BLIGHT_VISUAL_1); } setStage(3); break; case 3: if (timedQuery(SPELL_GASEOUS_BLIGHT_3, diff)) setStage(4); break; case 4: switch (urand(0,2)) { case 0: DoScriptText(-1631210,m_creature); break; case 1: DoScriptText(-1631211,m_creature); break; case 2: DoScriptText(-1631212,m_creature); break; } doCast(SPELL_INHALE_BLIGHT); setStage(5); break; case 5: if (m_creature->IsNonMeleeSpellCasted(false)) return; if (pBlightTarget) { doRemove(SPELL_GASEOUS_BLIGHT_2); doRemove(SPELL_BLIGHT_VISUAL_2,pBlightTarget); doRemove(SPELL_BLIGHT_VISUAL_2,m_creature); doCast(SPELL_GASEOUS_BLIGHT_3); doRemoveFromAll(SPELL_BLIGHT_VISUAL_3); doRemoveFromAll(SPELL_BLIGHT_VISUAL_2); doRemoveFromAll(SPELL_BLIGHT_VISUAL_1); } setStage(6); break; case 6: if (timedQuery(SPELL_GASEOUS_BLIGHT_3, diff)) setStage(7); break; case 7: switch (urand(0,2)) { case 0: DoScriptText(-1631210,m_creature); break; case 1: DoScriptText(-1631211,m_creature); break; case 2: DoScriptText(-1631212,m_creature); break; } doCast(SPELL_INHALE_BLIGHT); setStage(8); break; case 8: if (m_creature->IsNonMeleeSpellCasted(false)) return; if (pBlightTarget) { doRemove(SPELL_GASEOUS_BLIGHT_3); doRemove(SPELL_BLIGHT_VISUAL_3,pBlightTarget); doRemove(SPELL_BLIGHT_VISUAL_3,m_creature); doRemoveFromAll(SPELL_BLIGHT_VISUAL_3); doRemoveFromAll(SPELL_BLIGHT_VISUAL_2); doRemoveFromAll(SPELL_BLIGHT_VISUAL_1); } setStage(9); break; case 9: if (timedQuery(SPELL_PUNGENT_BLIGHT, diff)) { DoScriptText(-1631208,m_creature); doCast(SPELL_PUNGENT_BLIGHT); setStage(10); } break; case 10: if (m_creature->IsNonMeleeSpellCasted(false)) return; if (pBlightTarget) { doCast(SPELL_BLIGHT_VISUAL_1,pBlightTarget); doRemoveFromAll(SPELL_BLIGHT_VISUAL_3); doRemoveFromAll(SPELL_BLIGHT_VISUAL_2); doRemoveFromAll(SPELL_BLIGHT_VISUAL_1); } m_creature->RemoveAurasDueToSpell(SPELL_INHALED_BLIGHT); setStage(0); break; } timedCast(SPELL_GAS_SPORE, diff); timedCast(SPELL_GASTRIC_BLOAT, diff); if (timedQuery(SPELL_VILE_GAS, diff)) { float fPosX, fPosY, fPosZ; m_creature->GetPosition(fPosX, fPosY, fPosZ); m_creature->GetRandomPoint(fPosX, fPosY, fPosZ, 30.0f, fPosX, fPosY, fPosZ); if (Unit* pTemp = doSummon(NPC_VILE_GAS_STALKER,fPosX, fPosY, fPosZ)) doCast(SPELL_VILE_GAS, pTemp); DoScriptText(-1631213,m_creature); }; if (timedQuery(SPELL_BERSERK, diff)) { doCast(SPELL_BERSERK); DoScriptText(-1631207,m_creature); }; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; switch(stage) { case 0: { timedCast(SPELL_POUND, uiDiff); timedCast(SPELL_COLD, uiDiff); if (timedQuery(SUMMON_BORROWER, uiDiff)) { doCast(SUMMON_BORROWER); DoScriptText(-1713556,m_creature); }; if (timedQuery(SPELL_SUBMERGE_0, uiDiff)) stage = 1; break;} case 1: { doCast(SPELL_SUBMERGE_0); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); stage = 2; DoScriptText(-1713557,m_creature); break;} case 2: { if (timedQuery(SPELL_SPIKE_CALL, uiDiff)) { pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); // doCast(SPELL_SPIKE_CALL); // This summon not supported in database. Temporary override. Unit* spike = doSummon(NPC_SPIKE,TEMPSUMMON_TIMED_DESPAWN,60000); if (spike) { spike->AddThreat(pTarget, 1000.0f); DoScriptText(-1713558,m_creature,pTarget); doCast(SPELL_MARK,pTarget); spike->GetMotionMaster()->MoveChase(pTarget); } }; if (timedQuery(SPELL_SUMMON_BEATLES, uiDiff)) { doCast(SPELL_SUMMON_BEATLES); doCast(SUMMON_SCARAB); DoScriptText(-1713560,m_creature); }; if (timedQuery(SPELL_SUBMERGE_0, uiDiff)) stage = 3; break;} case 3: { stage = 0; DoScriptText(-1713559,m_creature); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); doRemove(SPELL_SUBMERGE_0,m_creature); break;} case 4: { doCast(SPELL_LEECHING_SWARM); DoScriptText(-1713561,m_creature); stage = 5; break;} case 5: { timedCast(SPELL_POUND, uiDiff); timedCast(SPELL_COLD, uiDiff); break;} } timedCast(SUMMON_FROSTSPHERE, uiDiff); timedCast(SPELL_BERSERK, uiDiff); if (m_creature->GetHealthPercent() < 30.0f && stage == 0) stage = 4; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!pInstance) return; if (pInstance->GetData(TYPE_EVENT_NPC) == NPC_LICH_KING) { UpdateTimer = pInstance->GetData(TYPE_EVENT_TIMER); if (UpdateTimer <= diff) { debug_log("EventMGR: creature %u received signal %u ",m_creature->GetEntry(),pInstance->GetData(TYPE_EVENT)); switch (pInstance->GetData(TYPE_EVENT)) { case 12000: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STAND); m_creature->SetStandState(UNIT_STAND_STATE_STAND); StartMovement(0,12020); break; case 12020: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); DoScriptText(-1631501, m_creature); UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,12030); break; case 12040: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_READY2H); DoScriptText(-1631503, m_creature); UpdateTimer = 8000; pInstance->SetData(TYPE_EVENT,12041); break; case 12041: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_LAUGH); UpdateTimer = 3000; pInstance->SetData(TYPE_EVENT,12042); break; case 12042: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_ONESHOT_POINT_NOSHEATHE); UpdateTimer = 2000; pInstance->SetData(TYPE_EVENT,12043); break; case 12043: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_ONESHOT_NONE); UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,12050); break; case 12060: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); DoScriptText(-1631505, m_creature); UpdateTimer = 10000; pInstance->SetData(TYPE_EVENT,12080); break; case 12080: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_STATE_READY2H); UpdateTimer = 2000; pInstance->SetData(TYPE_EVENT,12100); break; case 12100: m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,EMOTE_ONESHOT_NONE); UpdateTimer = 6000; pInstance->SetData(TYPE_EVENT,12120); break; case 12120: m_creature->GetMotionMaster()->Clear(); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); SetCombatMovement(true); m_creature->SetInCombatWithZone(); battlestarted = true; pInstance->SetData(TYPE_EVENT,12200); UpdateTimer = 10000; break; case 12200: DoScriptText(-1631506, m_creature); UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,12220); break; case 13000: m_creature->SetOrientation(3.1146f); DoScriptText(-1631507, m_creature); UpdateTimer = 12000; finalphase = true; doCast(SPELL_FURY_OF_FROSTMOURNE); pInstance->SetData(TYPE_EVENT,13020); if (pTirion = pInstance->GetSingleCreatureFromStorage(NPC_TIRION)) { m_creature->SetInCombatWith(pTirion); pTirion->AddThreat(m_creature, 1000.0f); } m_creature->SetInCombatWithZone(); break; case 13020: DoScriptText(-1631508, m_creature); UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,13060); break; case 13060: DoScriptText(-1631509, m_creature); UpdateTimer = 15000; pInstance->SetData(TYPE_EVENT,13100); break; case 13100: DoScriptText(-1631510, m_creature); UpdateTimer = 15000; pInstance->SetData(TYPE_EVENT,13110); doCast(SPELL_CHANNEL_KING); break; case 13120: DoScriptText(-1631511, m_creature); UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,13130); break; case 13140: UpdateTimer = 6000; doRemove(SPELL_CHANNEL_KING); pInstance->SetData(TYPE_EVENT,13150); m_creature->CastSpell(m_creature, SPELL_SUMMON_BROKEN_FROSTMOURNE, false); break; case 13160: UpdateTimer = 6000; pInstance->SetData(TYPE_EVENT,13170); m_creature->CastSpell(m_creature, SPELL_SUMMON_BROKEN_FROSTMOURNE_2, false); break; case 13180: UpdateTimer = 12000; pInstance->SetData(TYPE_EVENT,13190); if (pFrostmourne = m_creature->SummonCreature(NPC_FROSTMOURNE_HOLDER, SpawnLoc[7].x, SpawnLoc[7].y, SpawnLoc[7].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 5000)) { pFrostmourne->CastSpell(pFrostmourne, SPELL_BROKEN_FROSTMOURNE, false); pFrostmourne->CastSpell(pFrostmourne, SPELL_FROSTMOURNE_TRIGGER, false); pFrostmourne->GetMotionMaster()->MoveChase(m_creature); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISARMED); } break; case 13200: DoScriptText(-1631512, m_creature); m_creature->RemoveAurasDueToSpell(SPELL_SUMMON_BROKEN_FROSTMOURNE); m_creature->RemoveAllAuras(); pFrostmourne->RemoveAurasDueToSpell(SPELL_FROSTMOURNE_TRIGGER); UpdateTimer = 5000; pInstance->SetData(TYPE_EVENT,13210); break; case 13280: UpdateTimer = 2000; pInstance->SetData(TYPE_EVENT,13290); stage = 13; if (pFrostmourne) pFrostmourne->ForcedDespawn(); if (Creature* pTemp = pInstance->GetSingleCreatureFromStorage(NPC_FROSTMOURNE_TRIGGER)) pTemp->ForcedDespawn(); if (Creature* pTemp = pInstance->GetSingleCreatureFromStorage(NPC_FROSTMOURNE_HOLDER)) pTemp->ForcedDespawn(); SetCombatMovement(true); battlestarted = true; break; default: break; } } else UpdateTimer -= diff; pInstance->SetData(TYPE_EVENT_TIMER, UpdateTimer); } if (battlestarted && !m_creature->SelectHostileTarget() && !finalphase) { battlestarted = false; pInstance->SetData(TYPE_LICH_KING, FAIL); pInstance->SetData(TYPE_EVENT,0); EnterEvadeMode(); return; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; switch(stage) { case 0: // Phase 1 // timedCast(SPELL_SHOCKWAVE, diff); timedCast(SPELL_INFEST, diff); timedCast(SPELL_SUMMON_DRUDGE_GHOULS, diff); timedCast(SPELL_PLAGUE_SIPHON, diff); timedCast(SPELL_SUMMON_SHAMBLING_HORROR, diff); timedCast(SPELL_NECROTIC_PLAGUE, diff); DoMeleeAttackIfReady(); if (timedQuery(SPELL_BERSERK, diff)) { doCast(SPELL_BERSERK); DoScriptText(-1631518,m_creature); }; if (m_creature->GetHealthPercent() < 70.0f) { stage = 1; DoScriptText(-1631515,m_creature); } break; case 1: // Go in transition phase m_creature->AttackStop(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); SetCombatMovement(false); StartMovement(1,0); stage = 2; break; case 2: if (movementstarted) return; doCast(SPELL_REMORSELESS_WINTER); stage = 3; break; case 3: timedCast(SPELL_SUMMON_RAGING_SPIRIT, diff); timedCast(SPELL_SUMMON_ICE_SPHERE, diff); timedCast(SPELL_PAIN_AND_SUFFERING, diff); if (timedQuery(SPELL_BERSERK, diff)) { doCast(SPELL_BERSERK); DoScriptText(-1631518,m_creature); }; if (timedQuery(SPELL_REMORSELESS_WINTER, diff)) { doCast(SPELL_QUAKE); stage = 4; DoScriptText(-1631524, m_creature); pInstance->DoOpenDoor(pInstance->GetData64(GO_SNOW_EDGE)); }; break; case 4: // Platform destruct if (timedQuery(SPELL_QUAKE, diff)) { pInstance->DoOpenDoor(pInstance->GetData64(GO_ICESHARD_1)); pInstance->DoOpenDoor(pInstance->GetData64(GO_ICESHARD_2)); pInstance->DoOpenDoor(pInstance->GetData64(GO_ICESHARD_3)); pInstance->DoOpenDoor(pInstance->GetData64(GO_ICESHARD_4)); if (GameObject* pGoFloor = pInstance->GetSingleGameObjectFromStorage(GO_ARTHAS_PLATFORM)) { pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN); oldflag = pGoFloor->GetUInt32Value(GAMEOBJECT_BYTES_1); pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); } pInstance->DoCloseDoor(pInstance->GetData64(GO_FROSTY_WIND)); pInstance->DoCloseDoor(pInstance->GetData64(GO_SNOW_EDGE)); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); SetCombatMovement(true); stage = 5; } break; case 5: // Phase 2 if (timedQuery(SPELL_SPAWN_DEFILE, diff)) { doCast(SPELL_SPAWN_DEFILE); DoScriptText(-1631531,m_creature); } if (timedQuery(SPELL_SUMMON_VALKYR, diff)) { doCast(SPELL_SUMMON_VALKYR); DoScriptText(-1631527,m_creature); } timedCast(SPELL_SOUL_REAPER, diff); timedCast(SPELL_INFEST, diff); DoMeleeAttackIfReady(); if (timedQuery(SPELL_BERSERK, diff)) { doCast(SPELL_BERSERK); DoScriptText(-1631518,m_creature); }; if (m_creature->GetHealthPercent() < 40.0f) { stage = 6; DoScriptText(-1631523,m_creature); } break; case 6: // Go in transition phase m_creature->AttackStop(); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); SetCombatMovement(false); StartMovement(1,0); stage = 7; break; case 7: // Platform restore if (movementstarted) return; if (GameObject* pGoFloor = pInstance->GetSingleGameObjectFromStorage(GO_ARTHAS_PLATFORM)) { pGoFloor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN); pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,oldflag); } pInstance->DoOpenDoor(pInstance->GetData64(GO_FROSTY_WIND)); doCast(SPELL_REMORSELESS_WINTER); stage = 8; break; case 8: timedCast(SPELL_SUMMON_RAGING_SPIRIT, diff); timedCast(SPELL_SUMMON_ICE_SPHERE, diff); timedCast(SPELL_PAIN_AND_SUFFERING, diff); if (timedQuery(SPELL_BERSERK, diff)) { doCast(SPELL_BERSERK); DoScriptText(-1631518,m_creature); }; if (timedQuery(SPELL_REMORSELESS_WINTER, diff)) { DoScriptText(-1631524, m_creature); doCast(SPELL_SUMMON_VILE_SPIRITS); for (uint8 i = 0; i < getSpellData(SPELL_SUMMON_VILE_SPIRITS); ++i) doCast(NPC_VILE_SPIRIT); doCast(SPELL_QUAKE); stage = 9; pInstance->DoOpenDoor(pInstance->GetData64(GO_SNOW_EDGE)); }; break; case 9: // Platform destruct if (timedQuery(SPELL_QUAKE, diff)) { if (GameObject* pGoFloor = pInstance->GetSingleGameObjectFromStorage(GO_ARTHAS_PLATFORM)) { pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN); oldflag = pGoFloor->GetUInt32Value(GAMEOBJECT_BYTES_1); pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); } pInstance->DoCloseDoor(pInstance->GetData64(GO_SNOW_EDGE)); pInstance->DoCloseDoor(pInstance->GetData64(GO_FROSTY_WIND)); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); SetCombatMovement(true); stage = 10; } break; case 10: // Phase 3 if (timedQuery(SPELL_SPAWN_DEFILE, diff)) { doCast(SPELL_SPAWN_DEFILE); // DoScriptText(-1631527,m_creature); } timedCast(SPELL_SOUL_REAPER, diff); if (timedQuery(SPELL_HARVEST_SOUL, diff)) { doCast(SPELL_HARVEST_SOUL); DoScriptText(-1631520,m_creature); } timedCast(SPELL_SOUL_REAPER, diff); timedCast(SPELL_INFEST, diff); DoMeleeAttackIfReady(); if (m_creature->GetHealthPercent() < 10.0f) { stage = 11; DoScriptText(-1631513,m_creature); } break; case 11: // Ending Phase start m_creature->AttackStop(); SetCombatMovement(false); StartMovement(6,13000); stage = 12; battlestarted = false; break; case 12: break; case 13: DoMeleeAttackIfReady(); break; } }
void MainWindow::ftpCommandFinished(int, bool error) { if (ftp->currentCommand() == QFtp::ConnectToHost) { if (error) { QMessageBox::information(this, tr("FTP"), tr("Unable to connect to the FTP server " "at %1. Please check that the host " "name is correct.")); //connectOrDisconnect(); return; } qDebug()<<"Connected.."; //connected but not logined return; } if (ftp->currentCommand() == QFtp::Login) { if(error) { QMessageBox::information(this, tr("FTP"),tr("Can't log in. Please check that the id or password is correct.")); return; } ftp->list(); //get all list currentDirectory = ""; login->hide(); show(); return; } if (ftp->currentCommand() == QFtp::List) //Recrusive { if(unparsedDirectory.size()) { ftp->list(unparsedDirectory.at(0)); currentDirectory = unparsedDirectory.at(0); unparsedDirectory.removeFirst(); } else { fullFilesList.sort(); #if 0 int i; for(i=0;i<fullFilesList.size();i++) qDebug()<<"[ " + fullFilesList.at(i) + " ]"; #endif getPlaylist(); } } if (ftp->currentCommand() == QFtp::Get) { if (error) { // statusLabel->setText(tr("Canceled download of %1.") // .arg(file->fileName())); file->close(); file->remove(); } else { // statusLabel->setText(tr("Downloaded %1 to current directory.") // .arg(file->fileName())); file->close(); } delete file; // enableDownloadButton(); // progressDialog->hide(); //TODO Check if(playlist downloading?) getPlaylist(); } if(ftp->currentCommand() == QFtp::Put) { qDebug()<<"PUT END"; file->close(); delete file; if(upList.size()) { doUpload(); } else { refreshTable(); //FIXME upload->close(); } } if(ftp->currentCommand() == QFtp::Remove) { qDebug()<<"DELETE END"; if(rmList.size()) doRemove(); } }
void DatabaseImpl::remove(const IDeleteBatch& deleteBatch) { checkBatchArgumentFor(deleteBatch); doRemove(deleteBatch); }
/*this is the main routine*/ void doshell() { char line[80]; /*run forever - the shell shouldn't end*/ while(1==1) { /*read in a line*/ printstring("SHELL>\0"); readstring(line); /*match it against each possible command*/ /*if the user presses return, ignore it*/ if (line[0]==0xd) continue; else if (iscommand(line,"CLS\0")==1) doclear(); else if (iscommand(line,"cls\0")==1) doclear(); else if (iscommand(line,"COPY\0")==1) docopy(); else if (iscommand(line,"copy\0")==1) docopy(); else if (iscommand(line,"CREATE \0")==1) docreate(line); else if (iscommand(line,"create \0")==1) docreate(line); else if (iscommand(line,"DELETE \0")==1) dodelete(line); else if (iscommand(line,"delete \0")==1) dodelete(line); else if (iscommand(line,"DIR\0")==1) dodir(); else if (iscommand(line,"dir\0")==1) dodir(); else if (iscommand(line,"EXEC \0")==1) doexecute(line,1); else if (iscommand(line,"exec \0")==1) doexecute(line,1); else if (iscommand(line,"EXECBACK \0")==1) doexecute(line,0); else if (iscommand(line,"execback \0")==1) doexecute(line,0); else if (iscommand(line,"HELP\0")==1) dohelp(); else if (iscommand(line,"help\0")==1) dohelp(); else if (line[0]=='?') dohelp(); else if (iscommand(line,"TYPE \0")==1) dotype(line); else if (iscommand(line,"type \0")==1) dotype(line); else if (iscommand(line,"KILL \0")==1) dokill(line); else if (iscommand(line,"kill \0")==1) dokill(line); else if (iscommand(line,"mkdir \0")==1) domkdir(line); else if (iscommand(line,"MKDIR\0")==1) domkdir(line); else if (iscommand(line,"FORMAT\0")==1) doFormat(); else if (iscommand(line,"format\0")==1) doFormat(); else if (iscommand(line,"remove\0")==1) doRemove(line); else if (iscommand(line,"REMOVE\0")==1) doRemove(line); else if (iscommand(line,"list\0")==1) doList(); else if (iscommand(line,"LIST\0")==1) doList(); else if (iscommand(line,"count\0")==1) doCount(line); else if (iscommand(line,"WRITE\0")==1) doCreateFile(line); else if (iscommand(line,"write\0")==1) doCreateFile(line); else if (iscommand(line,"READ\0")==1) doEcho(line); else if (iscommand(line,"read\0")==1) doEcho(line); else printstring("Command not found\r\n\0"); printstring("\r\n\0"); } }
//----------------------------------------------------------------------------- void KMFolderDialog::doAssocSelected(int) { doRemove(); }
//----------------------------------------------------------------------------- KMFolderDialog::KMFolderDialog(KMFolder* aFolder, QWidget *parent, const char *name) : KMFolderDialogInherited(parent, name, TRUE) { KMAccount* acct; QLabel *label; QString type; folder = (KMAcctFolder*)aFolder; label = new QLabel(this); label->setGeometry(20,20,60,25); label->setText(i18n("Name:")); label->setAlignment(290); nameEdit = new QLineEdit(this); nameEdit->setGeometry(90,20,320,25); nameEdit->setFocus(); nameEdit->setText(folder ? folder->name().data() : i18n("unnamed")); if (folder) { type = folder->type(); if (!type.isEmpty() && type!="plain") nameEdit->setEnabled(false); } label = new QLabel(this); label->setText(i18n("Associated with")); label->adjustSize(); label->move(20,74); assocList = new QListBox(this); assocList->setGeometry(20,95,160,140); connect(assocList,SIGNAL(highlighted(int)),this,SLOT(doAssocHighlighted(int))); connect(assocList,SIGNAL(selected(int)),this,SLOT(doAssocSelected(int))); label = new QLabel(this); label->setText(i18n("Unassociated Accounts")); label->adjustSize(); label->move(250,74); accountList = new QListBox(this); accountList->setGeometry(250,95,160,140); connect(accountList,SIGNAL(highlighted(int)),this,SLOT(doAccountHighlighted(int))); connect(accountList,SIGNAL(selected(int)),this,SLOT(doAccountSelected(int))); addButton = new QPushButton(this); addButton->setGeometry(190,115,50,40); addButton->setText("<<"); addButton->setEnabled(FALSE); connect(addButton,SIGNAL(clicked()),this,SLOT(doAdd())); removeButton = new QPushButton(this); removeButton->setGeometry(190,175,50,40); removeButton->setText(">>"); removeButton->setEnabled(FALSE); connect(removeButton,SIGNAL(clicked()),this,SLOT(doRemove())); QPushButton *button = new QPushButton(this); button->setGeometry(190,260,100,30); button->setText(i18n("OK")); connect(button,SIGNAL(clicked()),this,SLOT(doAccept())); if (type=="Out" || type=="St") button->setEnabled(false); button = new QPushButton(this); button->setGeometry(310,260,100,30); button->setText(i18n("Cancel")); connect(button,SIGNAL(clicked()),this,SLOT(reject())); resize(430,340); setFixedSize(430,340); if (folder) { // Grab the list of accounts associated with the given folder. for (acct=folder->account(); acct; acct=folder->nextAccount()) { assocList->inSort(acct->name()); } } // insert list of available accounts that are not associated with // any account for (acct=acctMgr->first(); acct; acct=acctMgr->next()) { if (!acct->folder()) accountList->inSort(acct->name()); } }
void DatabaseImpl::remove(const boost::string_ref& key, partNum_t partNum) { checkSimpleArgumentFor(key, partNum); SingleDelete singleDelete(key, partNum); doRemove(singleDelete); }
void DatabaseImpl::remove(const boost::string_ref& key) { checkSimpleArgumentFor(key, 0); SingleDelete singleDelete(key, ALL_PARTS); doRemove(singleDelete); }
void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; switch(m_uiStage) { case 0: timedCast(SPELL_POUND, uiDiff); timedCast(SPELL_COLD, uiDiff); if (m_uiBurrowTimer < uiDiff) { m_uiBurrowTimer = 60000; m_uiStage = 1; } else m_uiBurrowTimer -= uiDiff; break; case 1: doCast(SPELL_SUBMERGE_0); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_uiStage = 2; DoScriptText(-1713557, m_creature); break; case 2: if (!m_bSpikeCalled) { if (m_uiSpikeCallTimer < uiDiff) { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { // doCast(SPELL_SPIKE_CALL); // This summon not supported in database. Temporary override. if(m_pSpike = DoSpawnCreature(NPC_SPIKE, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 15000)) { m_pSpike->SetInCombatWith(pTarget); m_pSpike->AddThreat(pTarget, 100000.0f); DoScriptText(-1713558, m_creature, pTarget); doCast(SPELL_MARK, pTarget); m_pSpike->GetMotionMaster()->MoveChase(pTarget); m_bSpikeCalled = true; m_uiSpikeCallTimer = 3000; } } } else m_uiSpikeCallTimer -= uiDiff; } if (timedQuery(SPELL_SUMMON_BEATLES, uiDiff)) { doCast(SPELL_SUMMON_BEATLES); doCast(SUMMON_SCARAB); DoScriptText(-1713560, m_creature); } if (m_uiBurrowTimer < uiDiff) { m_uiBurrowTimer = 90000; m_uiStage = 3; m_bSpikeCalled = false; } else m_uiBurrowTimer -= uiDiff; break; case 3: m_uiStage = 0; DoScriptText(-1713559, m_creature); if (m_pSpike) { m_pSpike->ForcedDespawn(); m_pSpike = NULL; } m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); doRemove(SPELL_SUBMERGE_0, m_creature); break; case 4: doCast(SPELL_LEECHING_SWARM); DoScriptText(-1713561, m_creature); m_uiStage = 5; break; case 5: timedCast(SPELL_POUND, uiDiff); timedCast(SPELL_COLD, uiDiff); break; } if (m_uiBurrowerSummonTimer < uiDiff) { if (currentDifficulty >= RAID_DIFFICULTY_10MAN_HEROIC) SummonBurrower(); else { if (m_uiStage != 5) { SummonBurrower(); } } DoScriptText(-1713556, m_creature); m_uiBurrowerSummonTimer = 65000; } else m_uiBurrowerSummonTimer -= uiDiff; if (m_uiBerserkTimer < uiDiff) { m_uiBerserkTimer = 600000; doCast(SPELL_BERSERK); } else m_uiBerserkTimer -= uiDiff; if (m_creature->GetHealthPercent() < 30.0f && m_uiStage == 0) m_uiStage = 4; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 uiDiff) { if (!pInstance) return; if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; switch (getStage()) { case 0: //PHASE 1 PHYSICAL REALM timedCast(SPELL_FLAME_BREATH, uiDiff); timedCast(SPELL_FIERY_COMBUSTION, uiDiff); timedCast(SPELL_METEOR, uiDiff); if (m_creature->GetHealthPercent() < 75.0f) setStage(1); break; case 1: // Switch to phase 2 m_creature->AttackStop(); m_creature->InterruptNonMeleeSpells(true); DoScriptText(-1666108,m_creature); pInstance->SetData(TYPE_HALION_EVENT, NOT_STARTED); SetCombatMovement(false); StartMovement(0); { Creature* pControl = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_HALION_CONTROL)); if (!pControl) pControl = m_creature->SummonCreature(NPC_HALION_CONTROL, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 1000); else if (!pControl->isAlive()) pControl->Respawn(); pControl->SetActiveObjectState(true); pControl->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetInCombatWith(pControl); pControl->SetInCombatWith(m_creature); } setStage(2); break; case 2: if (MovementStarted) return; doCast(SPELL_SUMMON_TWILIGHT_PORTAL); setStage(3); if (GameObject* pGoPortal = pInstance->instance->GetGameObject(pInstance->GetData64(GO_HALION_PORTAL_1))) pGoPortal->SetPhaseMask(31,true); if (GameObject* pGoRing = pInstance->instance->GetGameObject(pInstance->GetData64(GO_FLAME_RING))) pGoRing->SetPhaseMask(65535,true); break; case 3: if (m_creature->IsNonMeleeSpellCasted(false)) return; m_creature->SetActiveObjectState(true); doCast(SPELL_START_PHASE2); setStage(4); break; case 4: if (!m_creature->IsNonMeleeSpellCasted(false)) { if (Creature* pControl = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_HALION_CONTROL))) { m_creature->SetInCombatWith(pControl); pControl->SetInCombatWith(m_creature); } Creature* pTwilight = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_HALION_TWILIGHT)); if (!pTwilight) pTwilight = m_creature->SummonCreature(NPC_HALION_TWILIGHT, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z, 0, TEMPSUMMON_MANUAL_DESPAWN, 1000); else if (!pTwilight->isAlive()) pTwilight->Respawn(); pTwilight->SetCreatorGUID(0); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); setStage(5); } break; case 5: // HALION awaiting end battle in TWILIGHT REALM if (pInstance->GetData(TYPE_HALION_EVENT) == IN_PROGRESS) { // pInstance->SetData(TYPE_HALION_EVENT, SPECIAL); doRemove(SPELL_START_PHASE2); if (Creature* pControl = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_HALION_CONTROL))) { m_creature->SetInCombatWith(pControl); pControl->SetInCombatWith(m_creature); } m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetHealth(m_creature->GetMaxHealth()/2); m_creature->SetInCombatWithZone(); setStage(6); } return; case 6: // Switch to phase 3 // doCast(SPELL_TWILIGHT_DIVISION); DoScriptText(-1666109,m_creature); pInstance->SetData(TYPE_HALION_EVENT, SPECIAL); setStage(7); break; case 7: if (m_creature->IsNonMeleeSpellCasted(false)) return; if (m_creature->getVictim()->GetTypeId() != TYPEID_PLAYER) return; SetCombatMovement(true); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); setStage(8); break; case 8: //PHASE 3 BOTH REALMS timedCast(SPELL_FLAME_BREATH, uiDiff); timedCast(SPELL_FIERY_COMBUSTION, uiDiff); timedCast(SPELL_METEOR, uiDiff); break; default: break; } timedCast(SPELL_BERSERK, uiDiff); DoMeleeAttackIfReady(); }
int main(int argc, char *argv[]) { int ret = EXIT_SUCCESS; /* return value */ /* check parameter */ if (argc < 2) { fprintf(stderr, "ERROR: You need to give some command.\n"); showHelp(); return (EXIT_FAILURE); } initSystem(); if (gSystem == SYSTEM_ERROR) { fprintf(stderr, "ERROR: No package-system found (yum, apt).\n"); exit(EXIT_FAILURE); } initCommand(argv[1]); initList(argc - 2, (char **)argv + 2); switch (gCommand) { case COMMAND_HELP: showHelp(); break; case COMMAND_VERSION: showVersion(); break; case COMMAND_INSTALL: if (gList == NULL) { fprintf(stderr, "Error: Need to pass a list of pkgs to install.\n"); showHelp(); ret = EXIT_FAILURE; break; } doInstall(); break; case COMMAND_REMOVE: if (gList == NULL) { fprintf(stderr, "Error: Need to pass a list of pkgs to remove.\n"); showHelp(); ret = EXIT_FAILURE; break; } doRemove(); break; case COMMAND_SEARCH: if (gList == NULL) { fprintf(stderr, "Error: Need to pass a list of pkgs to search.\n"); showHelp(); ret = EXIT_FAILURE; break; } doSearch(); break; case COMMAND_LIST: if (gList == NULL) { fprintf(stderr, "Error: Need to pass a list of pkgs to lisst.\n"); showHelp(); ret = EXIT_FAILURE; break; } doList(); break; case COMMAND_UPDATE: if (gList == NULL) { fprintf(stderr, "Error: Need to pass a list of pkgs to update.\n"); showHelp(); ret = EXIT_FAILURE; break; } doUpdate(); break; default: fprintf(stderr, "ERROR: No such command '%s'. Please use '%s --help'.\n", argv[1], PRG_NAME); ret = EXIT_FAILURE; } destroy(); return (ret); }