aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/authserver/Server/AuthSession.cpp2
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp13
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.h6
-rw-r--r--src/server/game/Conditions/ConditionMgr.cpp3
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp2
-rw-r--r--src/server/game/Entities/Object/Object.cpp2
-rw-r--r--src/server/game/Entities/Player/Player.cpp12
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp6
-rw-r--r--src/server/game/Handlers/MiscHandler.cpp4
-rw-r--r--src/server/game/Handlers/PetitionsHandler.cpp2
-rw-r--r--src/server/game/Spells/SpellHistory.cpp2
-rw-r--r--src/server/game/Spells/SpellMgr.cpp15
-rw-r--r--src/server/scripts/Commands/cs_gm.cpp2
-rw-r--r--src/server/scripts/Commands/cs_list.cpp6
-rw-r--r--src/server/scripts/Commands/cs_misc.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/Karazhan/karazhan.cpp1
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_nalorakk.cpp1
-rw-r--r--src/server/scripts/Northrend/VaultOfArchavon/boss_koralon.cpp2
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_fathomlord_karathress.cpp3
-rw-r--r--src/server/scripts/Outland/CoilfangReservoir/SerpentShrine/boss_morogrim_tidewalker.cpp5
-rw-r--r--src/server/scripts/Outland/HellfireCitadel/BloodFurnace/instance_blood_furnace.cpp16
-rw-r--r--src/tools/map_extractor/System.cpp2
23 files changed, 49 insertions, 62 deletions
diff --git a/src/server/authserver/Server/AuthSession.cpp b/src/server/authserver/Server/AuthSession.cpp
index 0c803798074..9260558c613 100644
--- a/src/server/authserver/Server/AuthSession.cpp
+++ b/src/server/authserver/Server/AuthSession.cpp
@@ -389,7 +389,7 @@ void AuthSession::LogonChallengeCallback(PreparedQueryResult result)
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to ip", _accountInfo.Login.c_str());
if (_accountInfo.LockCountry.empty() || _accountInfo.LockCountry == "00")
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is not locked to country", _accountInfo.Login.c_str());
- else if (!_accountInfo.LockCountry.empty() && !_ipCountry.empty())
+ else if (!_ipCountry.empty())
{
TC_LOG_DEBUG("server.authserver", "[AuthChallenge] Account '%s' is locked to country: '%s' Player country is '%s'", _accountInfo.Login.c_str(), _accountInfo.LockCountry.c_str(), _ipCountry.c_str());
if (_ipCountry != _accountInfo.LockCountry)
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 4bf828aef11..e7c7d337b1d 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -63,9 +63,7 @@ SmartScript::~SmartScript()
{
}
-// @todo this is an utter clusterfuck in terms of design - why in the world does this thing side effect?
-// seriously, WHO WRITES THIS SHIT
-bool SmartScript::IsSmart(Creature* c, bool silent)
+bool SmartScript::IsSmart(Creature* c, bool silent) const
{
if (!c)
return false;
@@ -75,13 +73,12 @@ bool SmartScript::IsSmart(Creature* c, bool silent)
smart = false;
if (!smart && !silent)
- TC_LOG_ERROR("sql.sql", "SmartScript: Action target Creature (GUID: %u Entry: %u) is not using SmartAI, action called by Creature (GUID: %u Entry: %u) skipped to prevent crash.", c ? c->GetSpawnId() : 0, c ? c->GetEntry() : 0, me ? me->GetSpawnId() : 0, me ? me->GetEntry() : 0);
+ TC_LOG_ERROR("sql.sql", "SmartScript: Action target Creature (GUID: %u Entry: %u) is not using SmartAI, action called by Creature (GUID: %u Entry: %u) skipped to prevent crash.", c->GetSpawnId(), c->GetEntry(), me ? me->GetSpawnId() : 0, me ? me->GetEntry() : 0);
return smart;
}
-// @todo this, too
-bool SmartScript::IsSmart(GameObject* g, bool silent)
+bool SmartScript::IsSmart(GameObject* g, bool silent) const
{
if (!g)
return false;
@@ -91,12 +88,12 @@ bool SmartScript::IsSmart(GameObject* g, bool silent)
smart = false;
if (!smart && !silent)
- TC_LOG_ERROR("sql.sql", "SmartScript: Action target GameObject (GUID: %u Entry: %u) is not using SmartGameObjectAI, action called by GameObject (GUID: %u Entry: %u) skipped to prevent crash.", g ? g->GetSpawnId() : 0, g ? g->GetEntry() : 0, go ? go->GetSpawnId() : 0, go ? go->GetEntry() : 0);
+ TC_LOG_ERROR("sql.sql", "SmartScript: Action target GameObject (GUID: %u Entry: %u) is not using SmartGameObjectAI, action called by GameObject (GUID: %u Entry: %u) skipped to prevent crash.", g->GetSpawnId(), g->GetEntry(), go ? go->GetSpawnId() : 0, go ? go->GetEntry() : 0);
return smart;
}
-bool SmartScript::IsSmart(bool silent)
+bool SmartScript::IsSmart(bool silent) const
{
if (me)
return IsSmart(me, silent);
diff --git a/src/server/game/AI/SmartScripts/SmartScript.h b/src/server/game/AI/SmartScripts/SmartScript.h
index abf2033a1f9..7a533d689db 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.h
+++ b/src/server/game/AI/SmartScripts/SmartScript.h
@@ -70,9 +70,9 @@ class TC_GAME_API SmartScript
void DoFindFriendlyMissingBuff(std::vector<Creature*>& creatures, float range, uint32 spellid) const;
Unit* DoFindClosestFriendlyInRange(float range, bool playerOnly) const;
- bool IsSmart(Creature* c, bool silent = false);
- bool IsSmart(GameObject* g, bool silent = false);
- bool IsSmart(bool silent = false);
+ bool IsSmart(Creature* c, bool silent = false) const;
+ bool IsSmart(GameObject* g, bool silent = false) const;
+ bool IsSmart(bool silent = false) const;
void StoreTargetList(ObjectVector const& targets, uint32 id);
ObjectVector const* GetStoredTargetVector(uint32 id, WorldObject const& ref) const;
diff --git a/src/server/game/Conditions/ConditionMgr.cpp b/src/server/game/Conditions/ConditionMgr.cpp
index b3f3b6dbeb8..5a5b66b9b30 100644
--- a/src/server/game/Conditions/ConditionMgr.cpp
+++ b/src/server/game/Conditions/ConditionMgr.cpp
@@ -1456,7 +1456,10 @@ bool ConditionMgr::addToSpellImplicitTargetConditions(Condition* cond) const
}
if (!assigned)
+ {
delete sharedList;
+ return false;
+ }
}
sharedList->push_back(cond);
break;
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index 36a96c44046..8acf7cbbd14 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -1867,7 +1867,7 @@ bool Creature::CanStartAttack(Unit const* who, bool force) const
if (!_IsTargetAcceptable(who))
return false;
- if (!force && (IsNeutralToAll() || !IsWithinDistInMap(who, GetAttackDistance(who) + m_CombatDistance)))
+ if (IsNeutralToAll() || !IsWithinDistInMap(who, GetAttackDistance(who) + m_CombatDistance))
return false;
}
diff --git a/src/server/game/Entities/Object/Object.cpp b/src/server/game/Entities/Object/Object.cpp
index a85c17a2aaf..ada272ac370 100644
--- a/src/server/game/Entities/Object/Object.cpp
+++ b/src/server/game/Entities/Object/Object.cpp
@@ -3059,7 +3059,7 @@ bool WorldObject::IsValidAssistTarget(WorldObject const* target, SpellInfo const
// can't assist player out of sanctuary from sanctuary if has pvp enabled
if (unitTarget->IsPvP())
- if (unit && unit->IsInSanctuary() && !unitTarget->IsInSanctuary())
+ if (unit->IsInSanctuary() && !unitTarget->IsInSanctuary())
return false;
}
}
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index 3ccd5a4bba7..aaf028a7355 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -14663,13 +14663,7 @@ void Player::SendPreparedQuest(ObjectGuid guid)
{
uint32 textid = GetGossipTextId(creature);
GossipText const* gossiptext = sObjectMgr->GetGossipText(textid);
- if (!gossiptext)
- {
- qe._Delay = 0; //TEXTEMOTE_MESSAGE; //zyg: player emote
- qe._Emote = 0; //TEXTEMOTE_HELLO; //zyg: NPC emote
- title.clear();
- }
- else
+ if (gossiptext)
{
qe = gossiptext->Options[0].Emotes[0];
@@ -20597,7 +20591,7 @@ void Player::UpdatePvPFlag(time_t currTime)
if (!pvpInfo.EndTimer || (currTime < pvpInfo.EndTimer +300) || pvpInfo.IsHostile)
return;
- if (pvpInfo.EndTimer && pvpInfo.EndTimer <= currTime)
+ if (pvpInfo.EndTimer <= currTime)
{
pvpInfo.EndTimer = 0;
RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_PVP_TIMER);
@@ -23317,7 +23311,7 @@ bool Player::InBattlegroundQueue(bool ignoreArena) const
{
for (uint8 i = 0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; ++i)
if (m_bgBattlegroundQueueID[i].bgQueueTypeId != BATTLEGROUND_QUEUE_NONE && (!ignoreArena ||
- (ignoreArena && m_bgBattlegroundQueueID[i].bgQueueTypeId != BATTLEGROUND_QUEUE_2v2 &&
+ (m_bgBattlegroundQueueID[i].bgQueueTypeId != BATTLEGROUND_QUEUE_2v2 &&
m_bgBattlegroundQueueID[i].bgQueueTypeId != BATTLEGROUND_QUEUE_3v3 &&
m_bgBattlegroundQueueID[i].bgQueueTypeId != BATTLEGROUND_QUEUE_5v5)))
return true;
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 856756e67cf..9b5f9ed0238 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -10612,7 +10612,7 @@ uint32 Unit::GetCastingTimeForBonus(SpellInfo const* spellProto, DamageEffectTyp
}
// Combined Spells with Both Over Time and Direct Damage
- if (overTime > 0 && CastingTime > 0 && DirectDamage)
+ if (overTime > 0 && DirectDamage)
{
// mainly for DoTs which are 3500 here otherwise
uint32 OriginalCastTime = spellProto->CalcCastTime();
@@ -11577,7 +11577,7 @@ void Unit::RemoveCharmedBy(Unit* charmer)
CharmType type;
if (HasUnitState(UNIT_STATE_POSSESSED))
type = CHARM_TYPE_POSSESS;
- else if (charmer && charmer->IsOnVehicle(this))
+ else if (charmer->IsOnVehicle(this))
type = CHARM_TYPE_VEHICLE;
else
type = CHARM_TYPE_CHARM;
@@ -12409,7 +12409,7 @@ void Unit::HandleSpellClick(Unit* clicker, int8 seatId /*= -1*/)
{
uint8 i = 0;
bool valid = false;
- while (i < MAX_SPELL_EFFECTS && !valid)
+ while (i < MAX_SPELL_EFFECTS)
{
if (spellEntry->Effects[i].ApplyAuraName == SPELL_AURA_CONTROL_VEHICLE)
{
diff --git a/src/server/game/Handlers/MiscHandler.cpp b/src/server/game/Handlers/MiscHandler.cpp
index d3c14538c58..3e6636e0ecd 100644
--- a/src/server/game/Handlers/MiscHandler.cpp
+++ b/src/server/game/Handlers/MiscHandler.cpp
@@ -1247,7 +1247,7 @@ void WorldSession::HandleSetDungeonDifficultyOpcode(WorldPacket& recvData)
if (!groupGuy)
continue;
- if (!groupGuy->IsInMap(groupGuy))
+ if (!groupGuy->IsInWorld())
return;
if (groupGuy->GetMap()->IsNonRaidDungeon())
@@ -1305,7 +1305,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recvData)
if (!groupGuy)
continue;
- if (!groupGuy->IsInMap(groupGuy))
+ if (!groupGuy->IsInWorld())
return;
if (groupGuy->GetMap()->IsRaid())
diff --git a/src/server/game/Handlers/PetitionsHandler.cpp b/src/server/game/Handlers/PetitionsHandler.cpp
index 6f64c620392..e0e926741e6 100644
--- a/src/server/game/Handlers/PetitionsHandler.cpp
+++ b/src/server/game/Handlers/PetitionsHandler.cpp
@@ -398,7 +398,7 @@ void WorldSession::HandleSignPetition(WorldPacket& recvData)
ObjectGuid ownerGuid = petition->OwnerGuid;
CharterTypes type = petition->PetitionType;
- uint8 signs = petition->Signatures.size();
+ uint8 signs = uint8(petition->Signatures.size());
ObjectGuid playerGuid = _player->GetGUID();
if (ownerGuid == playerGuid)
diff --git a/src/server/game/Spells/SpellHistory.cpp b/src/server/game/Spells/SpellHistory.cpp
index af4c127947a..eed69844d2c 100644
--- a/src/server/game/Spells/SpellHistory.cpp
+++ b/src/server/game/Spells/SpellHistory.cpp
@@ -204,7 +204,7 @@ void SpellHistory::WritePacket<Pet>(WorldPacket& packet) const
{
Clock::time_point now = GameTime::GetSystemTime();
- uint8 cooldownsCount = _spellCooldowns.size();
+ uint8 cooldownsCount = uint8(_spellCooldowns.size());
packet << uint8(cooldownsCount);
for (auto const& spellCooldown : _spellCooldowns)
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 0813d663de5..708c9ab0c70 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -4213,8 +4213,7 @@ void SpellMgr::LoadSpellInfoCorrections()
72452 // Defiling Horror
}, [](SpellInfo* spellInfo)
{
- spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_60_YARDS); // 60yd
- spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_60_YARDS); // 60yd
+ spellInfo->Effects[EFFECT_0].RadiusEntry = spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_60_YARDS); // 60yd
});
// Achievement Check
@@ -4298,8 +4297,7 @@ void SpellMgr::LoadSpellInfoCorrections()
72769 // Scent of Blood (Deathbringer Saurfang)
}, [](SpellInfo* spellInfo)
{
- spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
- spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
+ spellInfo->Effects[EFFECT_0].RadiusEntry = spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS);
});
// Scent of Blood (Deathbringer Saurfang)
@@ -4468,15 +4466,13 @@ void SpellMgr::LoadSpellInfoCorrections()
// Defile
ApplySpellFix({ 72754, 73708, 73709, 73710 }, [](SpellInfo* spellInfo)
{
- spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
- spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
+ spellInfo->Effects[EFFECT_0].RadiusEntry = spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
});
// Val'kyr Target Search
ApplySpellFix({ 69030 }, [](SpellInfo* spellInfo)
{
- spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
- spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
+ spellInfo->Effects[EFFECT_0].RadiusEntry = spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_200_YARDS); // 200yd
spellInfo->Attributes |= SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY;
});
@@ -4559,8 +4555,7 @@ void SpellMgr::LoadSpellInfoCorrections()
// Fury of Frostmourne
ApplySpellFix({ 72350 }, [](SpellInfo* spellInfo)
{
- spellInfo->Effects[EFFECT_0].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
- spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
+ spellInfo->Effects[EFFECT_0].RadiusEntry = spellInfo->Effects[EFFECT_1].RadiusEntry = sSpellRadiusStore.LookupEntry(EFFECT_RADIUS_50000_YARDS); // 50000yd
});
ApplySpellFix(
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;
diff --git a/src/tools/map_extractor/System.cpp b/src/tools/map_extractor/System.cpp
index 1d16e05809c..3698caead75 100644
--- a/src/tools/map_extractor/System.cpp
+++ b/src/tools/map_extractor/System.cpp
@@ -100,7 +100,7 @@ void CreateDir(boost::filesystem::path const& path)
return;
if (!fs::create_directory(path))
- throw new std::runtime_error("Unable to create directory" + path.string());
+ throw std::runtime_error("Unable to create directory" + path.string());
}
void Usage(char* prg)