aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AI/SmartScripts/SmartScript.cpp4
-rw-r--r--src/server/game/Scripting/ScriptMgr.cpp3
-rw-r--r--src/server/game/Server/Packets/TicketPackets.cpp5
-rw-r--r--src/server/game/Spells/Spell.cpp2
4 files changed, 6 insertions, 8 deletions
diff --git a/src/server/game/AI/SmartScripts/SmartScript.cpp b/src/server/game/AI/SmartScripts/SmartScript.cpp
index 108e5cedd09..b80e861c4df 100644
--- a/src/server/game/AI/SmartScripts/SmartScript.cpp
+++ b/src/server/game/AI/SmartScripts/SmartScript.cpp
@@ -3199,7 +3199,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
std::list<Creature*> list;
me->GetCreatureListWithEntryInGrid(list, e.event.distance.entry, (float)e.event.distance.dist);
- if (list.size() > 0)
+ if (!list.empty())
creature = list.front();
}
@@ -3230,7 +3230,7 @@ void SmartScript::ProcessEvent(SmartScriptHolder& e, Unit* unit, uint32 var0, ui
std::list<GameObject*> list;
me->GetGameObjectListWithEntryInGrid(list, e.event.distance.entry, (float)e.event.distance.dist);
- if (list.size() > 0)
+ if (!list.empty())
gameobject = list.front();
}
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index 735328a0f1f..dd996ee0f50 100644
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -182,9 +182,8 @@ struct TSpellSummary
uint8 Effects; // set of enum SelectEffect
} *SpellSummary;
-ScriptMgr::ScriptMgr() : _scriptCount(0)
+ScriptMgr::ScriptMgr() : _scriptCount(0), _scheduledScripts(0)
{
- _scheduledScripts = 0;
}
ScriptMgr::~ScriptMgr() { }
diff --git a/src/server/game/Server/Packets/TicketPackets.cpp b/src/server/game/Server/Packets/TicketPackets.cpp
index 1a4d4d00c0a..f3cbd3121f2 100644
--- a/src/server/game/Server/Packets/TicketPackets.cpp
+++ b/src/server/game/Server/Packets/TicketPackets.cpp
@@ -203,10 +203,9 @@ WorldPackets::Ticket::SupportTicketSubmitComplaint::SupportTicketChatLine::Suppo
Text = data.ReadString(textLength);
}
-WorldPackets::Ticket::SupportTicketSubmitComplaint::SupportTicketChatLine::SupportTicketChatLine(uint32 timestamp, std::string const& text)
+WorldPackets::Ticket::SupportTicketSubmitComplaint::SupportTicketChatLine::SupportTicketChatLine(uint32 timestamp, std::string const& text) :
+ Timestamp(timestamp), Text(text)
{
- Timestamp = timestamp;
- Text = text;
}
ByteBuffer& operator>>(ByteBuffer& data, WorldPackets::Ticket::SupportTicketSubmitComplaint::SupportTicketChatLine& line)
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index a307b60f76b..919f11a5db4 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -7229,7 +7229,7 @@ void Spell::CallScriptDestinationTargetSelectHandlers(SpellDestination& target,
bool Spell::CheckScriptEffectImplicitTargets(uint32 effIndex, uint32 effIndexToCheck)
{
// Skip if there are not any script
- if (!m_loadedScripts.size())
+ if (m_loadedScripts.empty())
return true;
for (std::list<SpellScript*>::iterator itr = m_loadedScripts.begin(); itr != m_loadedScripts.end(); ++itr)