diff options
Diffstat (limited to 'src/server/scripts')
10 files changed, 19 insertions, 21 deletions
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index f6c0b021367..5aa36785018 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -142,7 +142,7 @@ public: handler->SendSysMessage("========================"); } std::string const& name = itr->second->GetName(); - uint8 size = name.size(); + uint8 size = uint8(name.size()); uint8 security = itrSec; uint8 max = ((16 - size) / 2); uint8 max2 = max; diff --git a/src/server/scripts/Commands/cs_list.cpp b/src/server/scripts/Commands/cs_list.cpp index 6c5fb2f70c9..89c21c324c6 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -244,7 +244,7 @@ public: if (count > resultCount) count -= resultCount; - else if (count) + else count = 0; } @@ -291,7 +291,7 @@ public: if (count > resultCount) count -= resultCount; - else if (count) + else count = 0; } @@ -366,7 +366,7 @@ public: if (count > resultCount) count -= resultCount; - else if (count) + else count = 0; } diff --git a/src/server/scripts/Commands/cs_misc.cpp b/src/server/scripts/Commands/cs_misc.cpp index 13df3bdcc2c..c9594eb29d5 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1491,7 +1491,7 @@ public: // the max level of the new profession. uint16 max = maxPureSkill ? atoul(maxPureSkill) : targetHasSkill ? target->GetPureMaxSkillValue(skill) : uint16(level); - if (level <= 0 || level > max || max <= 0) + if (level <= 0 || level > max) return false; // If the player has the skill, we get the current skill step. If they don't have the skill, we diff --git a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp index 499f0dcd7a4..7c784876068 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -329,7 +329,6 @@ public: if (RaidWiped) { - RaidWiped = true; EnterEvadeMode(); return; } diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 0362c6423d4..f6e8d40e03f 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -306,7 +306,7 @@ struct npc_head : public ScriptedAI ReturnToBody(true); break; case PHASE_HEAD_3: - if (!_die && damage >= me->GetHealth()) + if (damage >= me->GetHealth()) { _die = true; damage = 0; diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp index 5b6b7544f10..8c00f10a77f 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp @@ -289,7 +289,6 @@ class boss_nalorakk : public CreatureScript case 6: ++MovePhase; waitTimer = 1; - inMove = true; return; case 5: me->SetOrientation(3.1415f*0.5f); diff --git a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp index 591f54d4b1a..c966229064b 100644 --- a/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp +++ b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp @@ -234,7 +234,7 @@ class spell_koralon_meteor_fists_damage : public SpellScriptLoader private: void FilterTargets(std::list<WorldObject*>& targets) { - _chainTargets = targets.size(); + _chainTargets = uint8(targets.size()); } void CalculateSplitDamage() diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp index 423cc04bdb2..080bb6f432b 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -681,8 +681,7 @@ public: while (unit == nullptr || !unit->IsAlive()) unit = selectAdvisorUnit(); - if (unit && unit->IsAlive()) - DoCast(unit, SPELL_HEAL); + DoCast(unit, SPELL_HEAL); Heal_Timer = 60000; } else diff --git a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp index d073f59e0f1..0e9d24c9cd5 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp @@ -222,7 +222,7 @@ public: { //Teleport 4 players under the waterfalls GuidSet targets; - GuidSet::const_iterator itr; + GuidSet::const_iterator itr = targets.begin(); for (uint8 i = 0; i < 4; ++i) { counter = 0; @@ -260,7 +260,7 @@ public: if (WateryGlobules_Timer <= diff) { GuidSet globules; - GuidSet::const_iterator itr; + GuidSet::const_iterator itr = globules.begin(); for (uint8 g = 0; g < 4; g++) //one unit can't cast more than one spell per update, so some players have to cast for us XD { counter = 0; @@ -274,6 +274,7 @@ public: break; ++counter; } while (itr != globules.end()); + if (pGlobuleTarget) { globules.insert(pGlobuleTarget->GetGUID()); diff --git a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp index d39cd1efdf1..1890a137aec 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -183,19 +183,19 @@ class instance_blood_furnace : public InstanceMapScript void ResetPrisons() { ResetPrisoners(PrisonersCell5); - PrisonerCounter5 = PrisonersCell5.size(); + PrisonerCounter5 = uint8(PrisonersCell5.size()); HandleGameObject(PrisonCellGUIDs[DATA_PRISON_CELL5 - DATA_PRISON_CELL1], false); ResetPrisoners(PrisonersCell6); - PrisonerCounter6 = PrisonersCell6.size(); + PrisonerCounter6 = uint8(PrisonersCell6.size()); HandleGameObject(PrisonCellGUIDs[DATA_PRISON_CELL6 - DATA_PRISON_CELL1], false); ResetPrisoners(PrisonersCell7); - PrisonerCounter7 = PrisonersCell7.size(); + PrisonerCounter7 = uint8(PrisonersCell7.size()); HandleGameObject(PrisonCellGUIDs[DATA_PRISON_CELL7 - DATA_PRISON_CELL1], false); ResetPrisoners(PrisonersCell8); - PrisonerCounter8 = PrisonersCell8.size(); + PrisonerCounter8 = uint8(PrisonersCell8.size()); HandleGameObject(PrisonCellGUIDs[DATA_PRISON_CELL8 - DATA_PRISON_CELL1], false); } @@ -235,12 +235,12 @@ class instance_blood_furnace : public InstanceMapScript if (posX >= 405.0f && posX <= 423.0f && posZ <= 17) { - if (posY >= 106.0f && posY <= 123.0f && posZ <= 17) + if (posY >= 106.0f && posY <= 123.0f) { PrisonersCell5.insert(creature->GetGUID()); ++PrisonerCounter5; } - else if (posY >= 76.0f && posY <= 91.0f && posZ <= 17) + else if (posY >= 76.0f && posY <= 91.0f) { PrisonersCell6.insert(creature->GetGUID()); ++PrisonerCounter6; @@ -249,12 +249,12 @@ class instance_blood_furnace : public InstanceMapScript } else if (posX >= 490.0f && posX <= 506.0f && posZ <= 17) { - if (posY >= 106.0f && posY <= 123.0f && posZ <= 17) + if (posY >= 106.0f && posY <= 123.0f) { PrisonersCell7.insert(creature->GetGUID()); ++PrisonerCounter7; } - else if (posY >= 76.0f && posY <= 91.0f && posZ <= 17) + else if (posY >= 76.0f && posY <= 91.0f) { PrisonersCell8.insert(creature->GetGUID()); ++PrisonerCounter8; |
