diff options
Diffstat (limited to 'src')
19 files changed, 79 insertions, 146 deletions
diff --git a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp index b1e3d2a4735..54578462b5e 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockDepths/instance_blackrock_depths.cpp @@ -23,14 +23,6 @@ SDComment: SDCategory: Blackrock Depths EndScriptData */ -/* -update `creature_template` set `npcflag`='1',`ScriptName`='npc_dughal_stormwing' where `entry`='9022'; -update `creature_template` set `ScriptName`='npc_marshal_windsor' where `entry`='9023'; -update `creature_template` set `ScriptName`='npc_marshal_reginald_windsor' where `entry`='9682'; -update `creature_template` set `npcflag`='1',`ScriptName`='npc_tobias_seecher' where `entry`='9679'; -update `instance_template` set `script`='instance_blackrock_depths' where `map`='230'; -*/ - #include "ScriptPCH.h" #include "blackrock_depths.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp index 8d4831a2df7..be3b0e1dde7 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_mal_ganis.cpp @@ -23,9 +23,6 @@ SDComment: TODO: Intro & outro SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_mal_ganis' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #include "culling_of_stratholme.h" diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp index 2cfc1593192..08103c4eec1 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_salramm.cpp @@ -23,9 +23,6 @@ SDComment: TODO: Intro SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_salramm' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #include "culling_of_stratholme.h" diff --git a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp index e78f70590ec..8dbafb69b83 100644 --- a/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/AzjolNerub/boss_anubarak.cpp @@ -18,8 +18,6 @@ #include "ScriptPCH.h" #include "azjol_nerub.h" -//SQL: UPDATE creature_template SET mechanic_immune_mask = 1073741823 WHERE name like "anub'arak%"; - enum Spells { SPELL_CARRION_BEETLES = 53520, diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index f66584870c6..d95a51fd018 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -23,9 +23,6 @@ SDComment: SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = '' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" //Spells diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp index 8018ceaeb72..93610f80c07 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_kolurg.cpp @@ -23,9 +23,6 @@ SDComment: Only Alliance Heroic SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_commander_kolurg' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #define SPELL_BATTLE_SHOUT 31403 diff --git a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp index d603ca0df0c..e5554593f24 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/commander_stoutbeard.cpp @@ -23,9 +23,6 @@ SDComment: Only Horde Heroic SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_commander_stoutbeard' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #define SPELL_BATTLE_SHOUT 31403 diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp index 5f07758ad4d..769ca01aab3 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp @@ -23,9 +23,6 @@ SDComment: SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_krystallus' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #include "halls_of_stone.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp index 3e83181a7e1..a47adc803b4 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_maiden_of_grief.cpp @@ -23,9 +23,6 @@ SDComment: SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_maiden_of_grief' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #include "halls_of_stone.h" diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp index 1d9a009c4ab..55c71ec97ac 100644 --- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp +++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_sjonnir.cpp @@ -23,9 +23,6 @@ SDComment: SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_sjonnir' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #include "halls_of_stone.h" diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp index 26b204ddf32..d3fb081c610 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_palehoof.cpp @@ -23,9 +23,6 @@ SDComment: SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_palehoof' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #include "utgarde_pinnacle.h" @@ -120,11 +117,11 @@ public: me->GetMotionMaster()->MoveTargetedHome(); - for (uint32 i=0;i<4;i++) - DoneAdds[i]=false; - AddCount=0; + for (uint32 i = 0; i < 4; i++) + DoneAdds[i] = false; + AddCount = 0; - currentPhase=PHASE_NONE; + currentPhase = PHASE_NONE; if (pInstance) { @@ -181,6 +178,7 @@ public: { if (currentPhase != PHASE_GORTOK_PALEHOOF) return; + //Return since we have no target if (!UpdateVictim()) return; @@ -223,7 +221,7 @@ public: void KilledUnit(Unit * /*victim*/) { - DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2), me); + DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me); } void NextPhase() @@ -231,35 +229,37 @@ public: if (currentPhase == PHASE_NONE) { pInstance->SetData(DATA_GORTOK_PALEHOOF_EVENT, IN_PROGRESS); - me->SummonCreature(MOB_STASIS_CONTROLLER,moveLocs[5].x,moveLocs[5].y,moveLocs[5].z,0,TEMPSUMMON_CORPSE_DESPAWN); + me->SummonCreature(MOB_STASIS_CONTROLLER, moveLocs[5].x, moveLocs[5].y, moveLocs[5].z, 0, TEMPSUMMON_CORPSE_DESPAWN); } Phase move = PHASE_NONE; - if (AddCount >= DUNGEON_MODE(2,4)) + if (AddCount >= DUNGEON_MODE(2, 4)) move = PHASE_GORTOK_PALEHOOF; else { //select random not yet defeated add - uint8 next = urand(0,3); - for (uint8 i=0; i < 16; i++) + uint8 next = urand(0, 3); + for (uint8 i = 0; i < 16; i++) { - if (!DoneAdds[i%4] && next == 0) - { - move = (Phase)(i%4); - break; - } else if (!DoneAdds[i%4] && next > 0) - --next; + if (!DoneAdds[i % 4]) + if (next == 0) + { + move = (Phase)(i % 4); + break; + } + else if (next > 0) + --next; } ++AddCount; DoneAdds[move] = true; - move = (Phase)(move%4); + move = (Phase)(move % 4); } //send orb to summon spot Creature *pOrb = Unit::GetCreature((*me), pInstance ? pInstance->GetData64(DATA_MOB_ORB) : 0); if (pOrb && pOrb->isAlive()) { if (currentPhase == PHASE_NONE) - pOrb->CastSpell(me,SPELL_ORB_VISUAL,true); - pOrb->GetMotionMaster()->MovePoint(move,moveLocs[move].x,moveLocs[move].y,moveLocs[move].z); + pOrb->CastSpell(me, SPELL_ORB_VISUAL, true); + pOrb->GetMotionMaster()->MovePoint(move, moveLocs[move].x, moveLocs[move].y, moveLocs[move].z); } currentPhase = move; } @@ -333,19 +333,19 @@ public: if (uiChainLightingTimer <= diff) { DoCast(me->getVictim(), SPELL_CHAIN_LIGHTING); - uiChainLightingTimer = 5000 + rand()%5000; + uiChainLightingTimer = 5000 + rand() % 5000; } else uiChainLightingTimer -= diff; if (uiCrazedTimer <= diff) { DoCast(me, SPELL_CRAZED); - uiCrazedTimer = 8000 + rand()%4000; + uiCrazedTimer = 8000 + rand() % 4000; } else uiCrazedTimer -= diff; if (uiTerrifyingRoarTimer <= diff) { DoCast(me, SPELL_TERRIFYING_ROAR); - uiTerrifyingRoarTimer = 10000 + rand()%10000; + uiTerrifyingRoarTimer = 10000 + rand() % 10000; } else uiTerrifyingRoarTimer -= diff; DoMeleeAttackIfReady(); @@ -380,7 +380,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -447,7 +447,7 @@ public: if (uiMortalWoundTimer <= diff) { DoCast(me->getVictim(), SPELL_MORTAL_WOUND); - uiMortalWoundTimer = 3000 + rand()%4000; + uiMortalWoundTimer = 3000 + rand() % 4000; } else uiMortalWoundTimer -= diff; if (uiEnrage1Timer <= diff) @@ -496,7 +496,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -564,20 +564,20 @@ public: if (uiStompTimer <= diff) { DoCast(me->getVictim(), SPELL_STOMP); - uiStompTimer = 8000 + rand()%4000; + uiStompTimer = 8000 + rand() % 4000; } else uiStompTimer -= diff; if (uiGoreTimer <= diff) { DoCast(me->getVictim(), SPELL_GORE); - uiGoreTimer = 13000 + rand()%4000; + uiGoreTimer = 13000 + rand() % 4000; } else uiGoreTimer -= diff; if (uiGrievousWoundTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_GRIEVOUS_WOUND); - uiGrievousWoundTimer = 18000 + rand()%4000; + uiGrievousWoundTimer = 18000 + rand() % 4000; } else uiGrievousWoundTimer -= diff; DoMeleeAttackIfReady(); @@ -612,7 +612,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -686,20 +686,20 @@ public: { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_ACID_SPIT); - uiAcidSpitTimer = 2000 + rand()%2000; + uiAcidSpitTimer = 2000 + rand() % 2000; } else uiAcidSpitTimer -= diff; if (uiAcidSplatterTimer <= diff) { DoCast(me, SPELL_POISON_BREATH); - uiAcidSplatterTimer = 10000 + rand()%4000; + uiAcidSplatterTimer = 10000 + rand() % 4000; } else uiAcidSplatterTimer -= diff; if (uiPoisonBreathTimer <= diff) { if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) DoCast(pTarget, SPELL_POISON_BREATH); - uiPoisonBreathTimer = 8000 + rand()%4000; + uiPoisonBreathTimer = 8000 + rand() % 4000; } else uiPoisonBreathTimer -= diff; DoMeleeAttackIfReady(); @@ -734,7 +734,7 @@ public: void JustReachedHome() { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); me->SetStandState(UNIT_STAND_STATE_STAND); DoCast(me, SPELL_FREEZE); } @@ -765,11 +765,11 @@ public: void Reset() { - currentPhase=PHASE_NONE; - SummonTimer=5000; + currentPhase = PHASE_NONE; + SummonTimer = 5000; me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING); me->RemoveAurasDueToSpell(SPELL_ORB_VISUAL); - me->SetSpeed(MOVE_FLIGHT , 0.5f); + me->SetSpeed(MOVE_FLIGHT, 0.5f); } void UpdateAI(const uint32 diff) @@ -795,15 +795,15 @@ public: if (pNext) { pNext->RemoveAurasDueToSpell(SPELL_FREEZE); - pNext->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE|UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_ATTACKABLE_1|UNIT_FLAG_OOC_NOT_ATTACKABLE); + pNext->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_ATTACKABLE_1 | UNIT_FLAG_OOC_NOT_ATTACKABLE); pNext->SetStandState(UNIT_STAND_STATE_STAND); pNext->SetInCombatWithZone(); pNext->Attack(pNext->SelectNearestTarget(100),true); } - currentPhase=PHASE_NONE; + currentPhase = PHASE_NONE; } - } else SummonTimer-=diff; + } else SummonTimer -= diff; } void MovementInform(uint32 type, uint32 id) @@ -824,8 +824,8 @@ public: } if (pNext) DoCast(pNext, SPELL_ORB_CHANNEL, false); - currentPhase=(Phase)id; - SummonTimer=5000; + currentPhase = (Phase)id; + SummonTimer = 5000; } }; @@ -843,7 +843,6 @@ public: Creature *pPalehoof = Unit::GetCreature(*pGO, pInstance ? pInstance->GetData64(DATA_GORTOK_PALEHOOF) : 0); if (pPalehoof && pPalehoof->isAlive()) { - // maybe these are hacks :( pGO->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); pGO->SetGoState(GO_STATE_ACTIVE); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index b114fbc8360..9d2a3178bab 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -207,7 +207,7 @@ public: Summons.DespawnAll(); me->SetSpeed(MOVE_FLIGHT, 3.0f); if ((Unit::GetCreature((*me), m_uiGraufGUID) == NULL) && !me->IsMounted()) - me->SummonCreature(CREATURE_GRAUF,Location[0].GetPositionX(),Location[0].GetPositionY(),Location[0].GetPositionZ(),3.0f); + me->SummonCreature(CREATURE_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f); if (m_pInstance) { m_pInstance->SetData(DATA_SKADI_THE_RUTHLESS_EVENT, NOT_STARTED); @@ -221,7 +221,7 @@ public: me->Unmount(); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); if (Unit::GetCreature((*me), m_uiGraufGUID) == NULL) - me->SummonCreature(CREATURE_GRAUF,Location[0].GetPositionX(),Location[0].GetPositionY(),Location[0].GetPositionZ(),3.0f); + me->SummonCreature(CREATURE_GRAUF, Location[0].GetPositionX(), Location[0].GetPositionY(), Location[0].GetPositionZ(), 3.0f); } void EnterCombat(Unit* /*who*/) @@ -291,7 +291,6 @@ public: pGrauf->GetMotionMaster()->MoveFall(0); pGrauf->HandleEmoteCommand(EMOTE_ONESHOT_FLYDEATH); } - sLog.outBasic("[Skadi] Fly off"); me->GetMotionMaster()->MoveJump(Location[4].GetPositionX(), Location[4].GetPositionY(), Location[4].GetPositionZ(), 5.0f, 10.0f); me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_NON_ATTACKABLE); DoScriptText(SAY_DRAKE_DEATH, me); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp index 21639f2e668..ccb24a956ed 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_svala.cpp @@ -115,7 +115,7 @@ public: void Reset() { Phase = IDLE; - uiIntroTimer = 1*IN_MILLISECONDS; + uiIntroTimer = 1 * IN_MILLISECONDS; uiIntroPhase = 0; uiArthasGUID = 0; @@ -135,7 +135,7 @@ public: if (Creature *pArthas = me->SummonCreature(CREATURE_ARTHAS, ArthasPos, TEMPSUMMON_MANUAL_DESPAWN)) { - pArthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + pArthas->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); pArthas->SetFloatValue(OBJECT_FIELD_SCALE_X, 5); uiArthasGUID = pArthas->GetGUID(); } @@ -191,7 +191,7 @@ public: case 6: if (me->SummonCreature(CREATURE_SVALA_SORROWGRAVE, SvalaPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 60*IN_MILLISECONDS)) { - me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); + me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); me->SetDisplayId(DATA_SVALA_DISPLAY_ID); pArthas->ToTempSummon()->UnSummon(); uiArthasGUID = 0; @@ -278,10 +278,10 @@ public: void Reset() { - uiSinsterStrikeTimer = 7*IN_MILLISECONDS; - uiCallFlamesTimer = 10*IN_MILLISECONDS; - uiRitualOfSwordTimer = 20*IN_MILLISECONDS; - uiSacrificeTimer = 8*IN_MILLISECONDS; + uiSinsterStrikeTimer = 7 * IN_MILLISECONDS; + uiCallFlamesTimer = 10 * IN_MILLISECONDS; + uiRitualOfSwordTimer = 20 * IN_MILLISECONDS; + uiSacrificeTimer = 8 * IN_MILLISECONDS; bSacrificed = false; @@ -328,7 +328,7 @@ public: if (uiSinsterStrikeTimer <= diff) { DoCast(me->getVictim(), SPELL_SINSTER_STRIKE); - uiSinsterStrikeTimer = urand(5*IN_MILLISECONDS,9*IN_MILLISECONDS); + uiSinsterStrikeTimer = urand(5 * IN_MILLISECONDS, 9 * IN_MILLISECONDS); } else uiSinsterStrikeTimer -= diff; if (uiCallFlamesTimer <= diff) @@ -336,7 +336,7 @@ public: if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) { DoCast(pTarget, SPELL_CALL_FLAMES); - uiCallFlamesTimer = urand(8*IN_MILLISECONDS,12*IN_MILLISECONDS); + uiCallFlamesTimer = urand(8 * IN_MILLISECONDS, 12 * IN_MILLISECONDS); } } else uiCallFlamesTimer -= diff; @@ -346,7 +346,7 @@ public: { if (Unit* pSacrificeTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) { - DoScriptText(RAND(SAY_SACRIFICE_PLAYER_1,SAY_SACRIFICE_PLAYER_2,SAY_SACRIFICE_PLAYER_3,SAY_SACRIFICE_PLAYER_4,SAY_SACRIFICE_PLAYER_5),me); + DoScriptText(RAND(SAY_SACRIFICE_PLAYER_1, SAY_SACRIFICE_PLAYER_2, SAY_SACRIFICE_PLAYER_3, SAY_SACRIFICE_PLAYER_4, SAY_SACRIFICE_PLAYER_5), me); DoCast(pSacrificeTarget, SPELL_RITUAL_OF_THE_SWORD); //Spell doesn't teleport DoTeleportPlayer(pSacrificeTarget, 296.632f, -346.075f, 90.63f, 4.6f); @@ -384,7 +384,7 @@ public: if (Unit* pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true)) me->GetMotionMaster()->MoveChase(pTarget); - uiSacrificeTimer = 8*IN_MILLISECONDS; + uiSacrificeTimer = 8 * IN_MILLISECONDS; } else uiSacrificeTimer -= diff; } @@ -392,7 +392,7 @@ public: void KilledUnit(Unit* /*pVictim*/) { - DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3), me); + DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3), me); } void JustDied(Unit* pKiller) @@ -411,9 +411,6 @@ public: }; - - - void AddSC_boss_svala() { new boss_svala(); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp index 3358d67c62a..60a94de862f 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_ymiron.cpp @@ -23,9 +23,6 @@ SDComment: SDCategory: Script Data End */ -/*** SQL START *** -update creature_template set scriptname = 'boss_ymiron' where entry = ''; -*** SQL END ***/ #include "ScriptPCH.h" #include "utgarde_pinnacle.h" @@ -116,7 +113,7 @@ public: m_uiActiveOrder[i] = i; for (int i = 0; i < 3; ++i) { - int r = i + (rand()%(4-i)); + int r = i + (rand() % (4 - i)); int temp = m_uiActiveOrder[i]; m_uiActiveOrder[i] = m_uiActiveOrder[r]; m_uiActiveOrder[r] = temp; @@ -160,10 +157,10 @@ public: m_bIsActiveWithRANULF = false; m_bIsActiveWithTORGYN = false; - m_uiFetidRot_Timer = urand(8000,13000); - m_uiBane_Timer = urand(18000,23000); - m_uiDarkSlash_Timer = urand(28000,33000); - m_uiAncestors_Vengeance_Timer = DUNGEON_MODE(60000,45000); + m_uiFetidRot_Timer = urand(8000, 13000); + m_uiBane_Timer = urand(18000, 23000); + m_uiDarkSlash_Timer = urand(28000, 33000); + m_uiAncestors_Vengeance_Timer = DUNGEON_MODE(60000, 45000); m_uiPause_Timer = 0; m_uiAbility_BJORN_Timer = 0; @@ -173,7 +170,7 @@ public: m_uiActivedNumber = 0; m_uiHealthAmountModifier = 1; - m_uiHealthAmountMultipler = DUNGEON_MODE(20,25); + m_uiHealthAmountMultipler = DUNGEON_MODE(20, 25); DespawnBoatGhosts(m_uiActivedCreatureGUID); DespawnBoatGhosts(m_uiOrbGUID); @@ -202,8 +199,7 @@ public: { m_uiActivedCreatureGUID = pTemp->GetGUID(); pTemp->CastSpell(me, SPELL_CHANNEL_SPIRIT_TO_YMIRON, true); - pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); pTemp->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); switch(m_uiActiveOrder[m_uiActivedNumber]) { @@ -245,39 +241,37 @@ public: if (m_uiBane_Timer <= diff) { DoCast(me, SPELL_BANE); - m_uiBane_Timer = urand(20000,25000); + m_uiBane_Timer = urand(20000, 25000); } else m_uiBane_Timer -= diff; if (m_uiFetidRot_Timer <= diff) { DoCast(me->getVictim(), SPELL_FETID_ROT); - m_uiFetidRot_Timer = urand(10000,15000); + m_uiFetidRot_Timer = urand(10000, 15000); } else m_uiFetidRot_Timer -= diff; if (m_uiDarkSlash_Timer <= diff) { DoCast(me->getVictim(), SPELL_DARK_SLASH); - m_uiDarkSlash_Timer = urand(30000,35000); + m_uiDarkSlash_Timer = urand(30000, 35000); } else m_uiDarkSlash_Timer -= diff; if (m_uiAncestors_Vengeance_Timer <= diff) { DoCast(me, SPELL_ANCESTORS_VENGEANCE); - m_uiAncestors_Vengeance_Timer = DUNGEON_MODE(urand(60000,65000),urand(45000,50000)); + m_uiAncestors_Vengeance_Timer = DUNGEON_MODE(urand(60000, 65000), urand(45000, 50000)); } else m_uiAncestors_Vengeance_Timer -= diff; // Abilities ------------------------------------------------------------------------------ if (m_bIsActiveWithBJORN && m_uiAbility_BJORN_Timer <= diff) { //DoCast(me, SPELL_SUMMON_SPIRIT_FOUNT); // works fine, but using summon has better control - if (Creature* pTemp = me->SummonCreature(CREATURE_SPIRIT_FOUNT, 385.0f+rand()%10, -330.0f+rand()%10, 104.756f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 180000)) + if (Creature* pTemp = me->SummonCreature(CREATURE_SPIRIT_FOUNT, 385.0f + rand() % 10, -330.0f + rand() % 10, 104.756f, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 180000)) { pTemp->SetSpeed(MOVE_RUN, 0.4f); pTemp->CastSpell(pTemp, DUNGEON_MODE(SPELL_SPIRIT_FOUNT, H_SPELL_SPIRIT_FOUNT), true); - pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pTemp->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE); pTemp->SetDisplayId(11686); - //pTemp->GetMotionMaster()->MoveChase(me->getVictim()); m_uiOrbGUID = pTemp->GetGUID(); } m_bIsActiveWithBJORN = false; // only one orb @@ -304,7 +298,7 @@ public: for (uint8 i = 0; i < 4; ++i) { //DoCast(me, SPELL_SUMMON_AVENGING_SPIRIT); // works fine, but using summon has better control - if (Creature* pTemp = me->SummonCreature(CREATURE_AVENGING_SPIRIT, x+rand()%10, y+rand()%10, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + if (Creature* pTemp = me->SummonCreature(CREATURE_AVENGING_SPIRIT, x + rand() % 10, y + rand() % 10, z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) { if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) { @@ -319,8 +313,8 @@ public: // Health check ----------------------------------------------------------------------------- if (me->HealthBelowPct(100 - m_uiHealthAmountMultipler * m_uiHealthAmountModifier)) { - uint8 m_uiOrder = m_uiHealthAmountModifier - 1; - ++m_uiHealthAmountModifier; + uint8 m_uiOrder = m_uiHealthAmountModifier - 1; + ++m_uiHealthAmountModifier; me->InterruptNonMeleeSpells(true); DoCast(me, SPELL_SCREAMS_OF_THE_DEAD); @@ -364,7 +358,7 @@ public: void KilledUnit(Unit * /*victim*/) { - DoScriptText(RAND(SAY_SLAY_1,SAY_SLAY_2,SAY_SLAY_3,SAY_SLAY_4), me); + DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2, SAY_SLAY_3, SAY_SLAY_4), me); } void DespawnBoatGhosts(uint64& m_uiCreatureGUID) @@ -379,7 +373,6 @@ public: }; - void AddSC_boss_ymiron() { new boss_ymiron(); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp index dd476ff6937..c5ad6e7b7bf 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_pinnacle.cpp @@ -125,17 +125,17 @@ public: { case ENTRY_SKADI_THE_RUTHLESS_DOOR: uiSkadiTheRuthlessDoor = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE) HandleGameObject(NULL,true,pGo); + if (m_auiEncounter[2] == DONE) HandleGameObject(NULL, true, pGo); break; case ENTRY_KING_YMIRON_DOOR: uiKingYmironDoor = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE) HandleGameObject(NULL,true,pGo); + if (m_auiEncounter[3] == DONE) HandleGameObject(NULL, true, pGo); break; case ENTRY_GORK_PALEHOOF_SPHERE: uiGortokPalehoofSphere = pGo->GetGUID(); if (m_auiEncounter[1] == DONE) { - HandleGameObject(NULL,true,pGo); + HandleGameObject(NULL, true, pGo); pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_UNK1); } break; @@ -154,12 +154,12 @@ public: break; case DATA_SKADI_THE_RUTHLESS_EVENT: if (data == DONE) - HandleGameObject(uiSkadiTheRuthlessDoor,true); + HandleGameObject(uiSkadiTheRuthlessDoor, true); m_auiEncounter[2] = data; break; case DATA_KING_YMIRON_EVENT: if (data == DONE) - HandleGameObject(uiKingYmironDoor,true); + HandleGameObject(uiKingYmironDoor, true); m_auiEncounter[3] = data; break; } diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp index 00ee06cc75f..3155b8d0cb3 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_archavon.cpp @@ -15,11 +15,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/*** SQL START *** -UPDATE `creature_template` SET `ScriptName`='boss_archavon' WHERE `entry`='31125'; -UPDATE `creature_template` SET `ScriptName`='mob_archavon_warder' WHERE `entry`='32353'; -*** SQL END ***/ - #include "ScriptPCH.h" #include "vault_of_archavon.h" diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp index 8e4acee4b15..2f4e9daec61 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp @@ -15,11 +15,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/*** SQL START *** -UPDATE `creature_template` SET `ScriptName`='boss_koralon' WHERE `entry`='35013'; -UPDATE `creature_template` SET `ScriptName`='mob_flame_warder' WHERE `entry`='35143'; -*** SQL END ***/ - #include "ScriptPCH.h" #include "vault_of_archavon.h" diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp index 3ffafc93f15..73b75f5b622 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_toravon.cpp @@ -15,13 +15,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/*** SQL START *** -UPDATE `creature_template` SET `ScriptName`='boss_toravon' WHERE `entry`='38433'; -UPDATE `creature_template` SET `ScriptName`='mob_frost_warder' WHERE `entry`='38482'; -UPDATE `creature_template` SET `ScriptName`='mob_frozen_orb_stalker' WHERE `entry`='38461'; -UPDATE `creature_template` SET `ScriptName`='mob_frozen_orb' WHERE `entry`='38456'; -*** SQL END ***/ - #include "ScriptPCH.h" #include "vault_of_archavon.h" diff --git a/src/server/scripts/World/npc_professions.cpp b/src/server/scripts/World/npc_professions.cpp index 8866a77a3c2..7b19039e743 100644 --- a/src/server/scripts/World/npc_professions.cpp +++ b/src/server/scripts/World/npc_professions.cpp @@ -32,10 +32,6 @@ there is no difference here (except that default text is chosen with `gameobject - It's possible blacksmithing still require some tweaks and adjustments due to the way we _have_ to use reputation. */ -/* --- UPDATE `gameobject_template` SET `ScriptName` = 'go_soothsaying_for_dummies' WHERE `entry` = 177226; -*/ - /*### # to be removed from here (->ncp_text). This is data for database projects. ###*/ |