diff options
| author | Yehonal <yehonal.azeroth@gmail.com> | 2017-09-21 17:04:43 +0200 |
|---|---|---|
| committer | Yehonal <yehonal.azeroth@gmail.com> | 2017-09-21 17:04:43 +0200 |
| commit | ce6b9de51a7fcf5f0bb4423be4fd273446546792 (patch) | |
| tree | ac2ebc18f55c6e7ecacd2e7d3f2782a069f30017 /src/scripts | |
| parent | afebf1a1ca925b9d4e7dce7ebed0e560b192ecb1 (diff) | |
| parent | a738fb3e4d6641ce67c8faad12b423d38ec25fc3 (diff) | |
Merge branch 'master' of https://github.com/azerothcore/azerothcore-wotlk
Diffstat (limited to 'src/scripts')
14 files changed, 52 insertions, 45 deletions
diff --git a/src/scripts/Commands/cs_misc.cpp b/src/scripts/Commands/cs_misc.cpp index edf4851914..058290c9e3 100644 --- a/src/scripts/Commands/cs_misc.cpp +++ b/src/scripts/Commands/cs_misc.cpp @@ -191,7 +191,7 @@ public: return false; } - if (tokens.size() != count+2) + if (tokens.size() != uint16(count+2)) { handler->PSendSysMessage("Invalid number of nicknames for this bracket."); handler->SetSentErrorMessage(true); diff --git a/src/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 5b69fa46e2..690e514eb3 100644 --- a/src/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -5,6 +5,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SpellInfo.h" +#include "SpellScript.h" #include "karazhan.h" enum eSay diff --git a/src/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp b/src/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp index c9e56804a0..c294d00893 100644 --- a/src/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp +++ b/src/scripts/EasternKingdoms/Karazhan/boss_moroes.cpp @@ -5,6 +5,7 @@ #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "karazhan.h" +#include "SpellScript.h" enum Yells { diff --git a/src/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp b/src/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp index 19b6e2c66f..f6a76e367a 100644 --- a/src/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp +++ b/src/scripts/EasternKingdoms/Karazhan/instance_karazhan.cpp @@ -2,6 +2,8 @@ #include "ScriptMgr.h" #include "InstanceScript.h" #include "karazhan.h" +#include "SpellScript.h" +#include "SpellAuraEffects.h" const Position OptionalSpawn[] = { diff --git a/src/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp b/src/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp index 5253da6a2b..c23ae52662 100644 --- a/src/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp +++ b/src/scripts/EasternKingdoms/ScarletMonastery/instance_scarlet_monastery.cpp @@ -7,6 +7,7 @@ REWRITTEN BY XINEF #include "ScriptMgr.h" #include "ScriptedCreature.h" #include "SmartAI.h" +#include "ScriptedGossip.h" enum AshbringerEventMisc { diff --git a/src/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp b/src/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp index f2104c2452..6771f6c42c 100644 --- a/src/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp +++ b/src/scripts/EasternKingdoms/Scholomance/instance_scholomance.cpp @@ -327,7 +327,7 @@ class spell_scholomance_shadow_portal : public SpellScriptLoader } else { - room = (++room)%ROOM_MAX; + room = (room+1)%ROOM_MAX; ++attempts; } } diff --git a/src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp b/src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp index 40fe9eebcc..02f15f8726 100644 --- a/src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp +++ b/src/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_twin_valkyr.cpp @@ -564,37 +564,37 @@ public: { uint32 essenceId = 0; uint32 effect2Id = 0; - uint32 empoweredId = 0; + //uint32 empoweredId = 0; uint32 touchId1 = 0; - uint32 touchId2 = 0; + //uint32 touchId2 = 0; switch( creature->GetMap()->GetDifficulty() ) { case 0: essenceId = 65684; - empoweredId = 65724; + //empoweredId = 65724; touchId1 = 65950; - touchId2 = 66001; + //touchId2 = 66001; effect2Id = 65827; break; case 1: essenceId = 67176; - empoweredId = 67213; + //empoweredId = 67213; touchId1 = 67296; - touchId2 = 67281; + //touchId2 = 67281; effect2Id = 67179; break; case 2: essenceId = 67177; - empoweredId = 67214; + //empoweredId = 67214; touchId1 = 67297; - touchId2 = 67282; + //touchId2 = 67282; effect2Id = 67180; break; case 3: essenceId = 67178; - empoweredId = 67215; + //empoweredId = 67215; touchId1 = 67298; - touchId2 = 67283; + //touchId2 = 67283; effect2Id = 67181; break; } @@ -610,36 +610,36 @@ public: { uint32 essenceId = 0; uint32 effect2Id = 0; - uint32 empoweredId = 0; - uint32 touchId1 = 0; + //uint32 empoweredId = 0; + //uint32 touchId1 = 0; uint32 touchId2 = 0; switch( creature->GetMap()->GetDifficulty() ) { case 0: essenceId = 65686; - empoweredId = 65748; - touchId1 = 65950; + //empoweredId = 65748; + //touchId1 = 65950; touchId2 = 66001; effect2Id = 65811; break; case 1: essenceId = 67222; - empoweredId = 67216; - touchId1 = 67296; + //empoweredId = 67216; + //touchId1 = 67296; touchId2 = 67281; effect2Id = 67511; break; case 2: essenceId = 67223; - empoweredId = 67217; - touchId1 = 67297; + //empoweredId = 67217; + //touchId1 = 67297; touchId2 = 67282; effect2Id = 67512; break; case 3: essenceId = 67224; - empoweredId = 67218; - touchId1 = 67298; + //empoweredId = 67218; + //touchId1 = 67298; touchId2 = 67283; effect2Id = 67513; break; diff --git a/src/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp b/src/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp index 079da1aff9..dc91f42d8b 100644 --- a/src/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp +++ b/src/scripts/Northrend/IcecrownCitadel/boss_deathbringer_saurfang.cpp @@ -653,7 +653,7 @@ class npc_high_overlord_saurfang_icc : public CreatureScript void UpdateAI(uint32 diff) { _events.Update(diff); - switch (uint32 eventId = _events.ExecuteEvent()) + switch (_events.ExecuteEvent()) { case 0: break; @@ -894,7 +894,7 @@ class npc_muradin_bronzebeard_icc : public CreatureScript void UpdateAI(uint32 diff) { _events.Update(diff); - switch (uint32 eventId = _events.ExecuteEvent()) + switch (_events.ExecuteEvent()) { case 0: break; @@ -1057,9 +1057,9 @@ class spell_deathbringer_blood_link_aura : public SpellScriptLoader Unit* victim = eventInfo.GetActionTarget(); SpellInfo const* procSpell = eventInfo.GetDamageInfo()->GetSpellInfo(); - uint32 markCount = 0; - if (Creature* saurfang = eventInfo.GetActor()->ToCreature()) - markCount = saurfang->IsAIEnabled ? saurfang->AI()->GetData(123456 /*FALLEN_CHAMPION_CAST_COUNT*/) : 0; + //uint32 markCount = 0; + //if (Creature* saurfang = eventInfo.GetActor()->ToCreature()) + //markCount = saurfang->IsAIEnabled ? saurfang->AI()->GetData(123456 /*FALLEN_CHAMPION_CAST_COUNT*/) : 0; int32 basepoints = int32(1.0f /*+ 0.5f + 0.5f*markCount*/); switch (procSpell->Id) // some spells give more Blood Power { @@ -1106,13 +1106,15 @@ class spell_deathbringer_blood_link_blood_beast_aura : public SpellScriptLoader { PreventDefaultAction(); + /* uint32 markCount = 0; if (Map* map = eventInfo.GetActor()->FindMap()) if (InstanceMap* imap = map->ToInstanceMap()) if (InstanceScript* isc = imap->GetInstanceScript()) - if (uint64 sguid = isc->GetData64(3 /*DATA_DEATHBRINGER_SAURFANG*/)) + if (uint64 sguid = isc->GetData64(3) //DATA_DEATHBRINGER_SAURFANG if (Creature* saurfang = ObjectAccessor::GetCreature(*eventInfo.GetActor(), sguid)) - markCount = saurfang->IsAIEnabled ? saurfang->AI()->GetData(123456 /*FALLEN_CHAMPION_CAST_COUNT*/) : 0; + markCount = saurfang->IsAIEnabled ? saurfang->AI()->GetData(123456) : 0; //FALLEN_CHAMPION_CAST_COUNT + */ int32 basepoints = int32(3.0f /*+ 0.5f + 0.5f*markCount*/); eventInfo.GetActor()->CastCustomSpell(SPELL_BLOOD_LINK_DUMMY, SPELLVALUE_BASE_POINT0, basepoints, eventInfo.GetActionTarget(), true); diff --git a/src/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 72d5446b0a..e33efd3fa5 100644 --- a/src/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -956,7 +956,7 @@ class boss_the_lich_king : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING) && !((1 << _phase) & PHASE_MASK_NO_CAST_CHECK)) return; - switch (uint32 eventId = events.ExecuteEvent()) + switch (events.ExecuteEvent()) { case EVENT_BERSERK: Talk(SAY_LK_BERSERK); @@ -1342,7 +1342,7 @@ class npc_tirion_fordring_tft : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; - switch (uint32 eventId = _events.ExecuteEvent()) + switch (_events.ExecuteEvent()) { case EVENT_INTRO_LK_MOVE: if (Creature* theLichKing = ObjectAccessor::GetCreature(*me, _instance->GetData64(DATA_THE_LICH_KING))) @@ -1799,7 +1799,7 @@ class npc_shambling_horror_icc : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; - switch (uint32 eventId = _events.ExecuteEvent()) + switch (_events.ExecuteEvent()) { case EVENT_SHOCKWAVE: me->CastSpell(me->GetVictim(), SPELL_SHOCKWAVE, false); @@ -2329,7 +2329,7 @@ class npc_raging_spirit : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; - switch (uint32 eventId = _events.ExecuteEvent()) + switch (_events.ExecuteEvent()) { case EVENT_RAGING_SPIRIT_UNROOT: { @@ -2581,10 +2581,10 @@ class npc_valkyr_shadowguard : public CreatureScript } dropped = true; _events.Reset(); - Player* p = NULL; + /*Player* p = NULL; if (Vehicle* v = me->GetVehicleKit()) if (Unit* passenger = v->GetPassenger(0)) - p = passenger->ToPlayer(); + p = passenger->ToPlayer();*/ me->CastSpell((Unit*)NULL, SPELL_EJECT_ALL_PASSENGERS, false); if (IsHeroic()) @@ -2619,7 +2619,7 @@ class npc_valkyr_shadowguard : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING | UNIT_STATE_STUNNED)) return; - switch (uint32 eventId = _events.ExecuteEvent()) + switch (_events.ExecuteEvent()) { case EVENT_GRAB_PLAYER: if (!_grabbedPlayer) @@ -3154,7 +3154,7 @@ class npc_strangulate_vehicle : public CreatureScript { _events.Update(diff); - switch (uint32 eventId = _events.ExecuteEvent()) + switch (_events.ExecuteEvent()) { case EVENT_TELEPORT: me->GetMotionMaster()->Clear(false); @@ -3281,7 +3281,7 @@ class npc_terenas_menethil : public CreatureScript _events.Update(diff); - switch (uint32 eventId = _events.ExecuteEvent()) + switch (_events.ExecuteEvent()) { case EVENT_FROSTMOURNE_TALK_1: me->SetControlled(false, UNIT_STATE_ROOT); diff --git a/src/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp b/src/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp index e15b946512..ce57e00534 100644 --- a/src/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp +++ b/src/scripts/Northrend/Ulduar/Ulduar/boss_thorim.cpp @@ -132,7 +132,7 @@ enum ThorimSpells #define SPELL_RUNIC_SHIELD RAID_MODE(SPELL_RUNIC_SHIELD_10, SPELL_RUNIC_SHIELD_25) #define SPELL_CHAIN_LIGHTNING RAID_MODE(SPELL_CHAIN_LIGHTNING_10, SPELL_CHAIN_LIGHTNING_25) -enum ThormNPCandGOs +enum ThormNPCandGOs : uint32 { // ARENA INIT NPC_DARK_RUNE_ACOLYTE_I = 32886, diff --git a/src/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp b/src/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp index 7b7e77bdbe..04d3d59125 100644 --- a/src/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp +++ b/src/scripts/Northrend/Ulduar/Ulduar/boss_yoggsaron.cpp @@ -537,9 +537,9 @@ public: summons.DoAction(_currentIllusion, pred); if (_isIllusionReversed) - _currentIllusion = _currentIllusion == 3 ? 1 : ++_currentIllusion; + _currentIllusion = _currentIllusion == 3 ? 1 : (_currentIllusion+1); else - _currentIllusion = _currentIllusion == 1 ? 3 : --_currentIllusion; + _currentIllusion = _currentIllusion == 1 ? 3 : (_currentIllusion-1); } void SpellSounds() diff --git a/src/scripts/Northrend/VioletHold/violet_hold.cpp b/src/scripts/Northrend/VioletHold/violet_hold.cpp index 7ac9e42d96..1490012da8 100644 --- a/src/scripts/Northrend/VioletHold/violet_hold.cpp +++ b/src/scripts/Northrend/VioletHold/violet_hold.cpp @@ -283,7 +283,7 @@ struct violet_hold_trashAI : public npc_escortAI void WaypointReached(uint32 id) { if (PLoc<6) - if (id == PLocWPCount[PLoc] -1 -(bAlt ? 1 : 0)) + if (id == uint16(PLocWPCount[PLoc] -1 -(bAlt ? 1 : 0))) CreatureStartAttackDoor(); } diff --git a/src/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/scripts/Outland/BlackTemple/boss_illidan.cpp index fe7936321e..3e4c0d7b2a 100644 --- a/src/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -459,7 +459,7 @@ class boss_illidan_stormrage : public CreatureScript if (me->HasUnitState(UNIT_STATE_CASTING)) return; - switch (uint32 eventId = events.ExecuteEvent()) + switch (events.ExecuteEvent()) { case EVENT_SUMMON_MINIONS: if (me->HealthBelowPct(90)) @@ -579,7 +579,7 @@ class boss_illidan_stormrage : public CreatureScript me->CastSpell(me, SPELL_THROW_GLAIVE2, false); break; case EVENT_PHASE_2_CHANGE_POS: - beamPosId = (++beamPosId)%MAX_EYE_BEAM_POS; + beamPosId = (beamPosId+1)%MAX_EYE_BEAM_POS; events.ScheduleEvent(EVENT_SPELL_FIREBALL, 8000, GROUP_PHASE_2_ABILITY); events.ScheduleEvent(EVENT_SPELL_DARK_BARRAGE, 18000, GROUP_PHASE_2_ABILITY); events.ScheduleEvent(EVENT_PHASE_2_EYE_BEAM, urand(25000, 50000), GROUP_PHASE_2_ABILITY); diff --git a/src/scripts/Outland/TempestKeep/Eye/boss_alar.cpp b/src/scripts/Outland/TempestKeep/Eye/boss_alar.cpp index 8c4b10ab38..4ef3f64cb4 100644 --- a/src/scripts/Outland/TempestKeep/Eye/boss_alar.cpp +++ b/src/scripts/Outland/TempestKeep/Eye/boss_alar.cpp @@ -221,7 +221,7 @@ class boss_alar : public CreatureScript me->SummonCreature(NPC_EMBER_OF_ALAR, *me, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 6000); } me->GetMotionMaster()->MovePoint(POINT_PLATFORM, alarPoints[platform], false, true); - platform = (++platform)%4; + platform = (platform+1)%4; events.ScheduleEvent(EVENT_SWITCH_PLATFORM, 30000); } me->setAttackTimer(BASE_ATTACK, 20000); |
