diff options
Diffstat (limited to 'src/server/scripts')
9 files changed, 19 insertions, 20 deletions
diff --git a/src/server/scripts/Commands/cs_gm.cpp b/src/server/scripts/Commands/cs_gm.cpp index 98b5eba4c8b..13f4f0ef788 100644 --- a/src/server/scripts/Commands/cs_gm.cpp +++ b/src/server/scripts/Commands/cs_gm.cpp @@ -145,7 +145,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 2e316c09e26..dafd9b78ade 100644 --- a/src/server/scripts/Commands/cs_list.cpp +++ b/src/server/scripts/Commands/cs_list.cpp @@ -248,7 +248,7 @@ public: if (count > resultCount) count -= resultCount; - else if (count) + else count = 0; } @@ -295,7 +295,7 @@ public: if (count > resultCount) count -= resultCount; - else if (count) + else count = 0; } @@ -370,7 +370,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 d8d24e4934a..293ffec3aa6 100644 --- a/src/server/scripts/Commands/cs_misc.cpp +++ b/src/server/scripts/Commands/cs_misc.cpp @@ -1569,7 +1569,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 3beff962458..a19a76c561c 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp @@ -325,7 +325,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 1e610d06073..841034035bf 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -305,7 +305,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/Northrend/VaultOfArchavon/boss_koralon.cpp b/src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp index 4cf85dd988e..497f39eec07 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 6fe4079daae..92e4e721113 100644 --- a/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp +++ b/src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp @@ -686,8 +686,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 aa4801a6909..5cd82f894db 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 fb70d79975f..39e94936bf0 100644 --- a/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp @@ -190,19 +190,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); } @@ -242,12 +242,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; @@ -256,12 +256,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; |
