Core: Fixed compile warnings and errors
This commit is contained in:
@@ -4919,11 +4919,11 @@ void ObjectMgr::ValidateSpellScripts()
|
||||
for (SpellScriptsContainer::iterator itr = _spellScriptsStore.begin(); itr != _spellScriptsStore.end();)
|
||||
{
|
||||
SpellInfo const* spellEntry = sSpellMgr->GetSpellInfo(itr->first);
|
||||
std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::iterator> > SpellScriptLoaders;
|
||||
std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::const_iterator> > SpellScriptLoaders;
|
||||
sScriptMgr->CreateSpellScriptLoaders(itr->first, SpellScriptLoaders);
|
||||
itr = _spellScriptsStore.upper_bound(itr->first);
|
||||
|
||||
for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr)
|
||||
for (std::vector<std::pair<SpellScriptLoader *, SpellScriptsContainer::const_iterator> >::iterator sitr = SpellScriptLoaders.begin(); sitr != SpellScriptLoaders.end(); ++sitr)
|
||||
{
|
||||
SpellScript* spellScript = sitr->first->GetSpellScript();
|
||||
AuraScript* auraScript = sitr->first->GetAuraScript();
|
||||
|
||||
@@ -322,7 +322,7 @@ void ScriptMgr::CreateSpellScripts(uint32 spellId, std::list<SpellScript*>& scri
|
||||
{
|
||||
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
|
||||
|
||||
for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
|
||||
for (SpellScriptsContainer::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
|
||||
{
|
||||
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
|
||||
if (!tmpscript)
|
||||
@@ -343,7 +343,7 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
|
||||
{
|
||||
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
|
||||
|
||||
for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
|
||||
for (SpellScriptsContainer::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
|
||||
{
|
||||
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
|
||||
if (!tmpscript)
|
||||
@@ -360,12 +360,12 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
|
||||
}
|
||||
}
|
||||
|
||||
void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsContainer::iterator> >& scriptVector)
|
||||
void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsContainer::const_iterator> >& scriptVector)
|
||||
{
|
||||
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
|
||||
scriptVector.reserve(std::distance(bounds.first, bounds.second));
|
||||
|
||||
for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
|
||||
for (SpellScriptsContainer::const_iterator itr = bounds.first; itr != bounds.second; ++itr)
|
||||
{
|
||||
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
|
||||
if (!tmpscript)
|
||||
|
||||
@@ -861,7 +861,7 @@ class ScriptMgr
|
||||
|
||||
void CreateSpellScripts(uint32 spellId, std::list<SpellScript*>& scriptVector);
|
||||
void CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& scriptVector);
|
||||
void CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, std::multimap<uint32, uint32>::iterator> >& scriptVector);
|
||||
void CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, std::multimap<uint32, uint32>::const_iterator> >& scriptVector);
|
||||
|
||||
public: /* ServerScript */
|
||||
|
||||
|
||||
@@ -465,7 +465,8 @@ public:
|
||||
if (stormforgedEradictor)
|
||||
return false;
|
||||
|
||||
if ((stormforgedMonitor = player->SummonCreature(NPC_STORMFORGED_MONITOR, stormforgedMonitorPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000)))
|
||||
stormforgedMonitor = player->SummonCreature(NPC_STORMFORGED_MONITOR, stormforgedMonitorPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
|
||||
if (stormforgedMonitor)
|
||||
{
|
||||
stormforgedMonitorGUID = stormforgedMonitor->GetGUID();
|
||||
stormforgedMonitor->SetWalk(false);
|
||||
@@ -474,7 +475,8 @@ public:
|
||||
stormforgedMonitor->GetMotionMaster()->MovePath(NPC_STORMFORGED_MONITOR * 100, false);
|
||||
}
|
||||
|
||||
if ((stormforgedEradictor = player->SummonCreature(NPC_STORMFORGED_ERADICTOR, stormforgedEradictorPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000)))
|
||||
stormforgedEradictor = player->SummonCreature(NPC_STORMFORGED_ERADICTOR, stormforgedEradictorPosition, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
|
||||
if (stormforgedEradictor)
|
||||
{
|
||||
stormforgedEradictorGUID = stormforgedEradictor->GetGUID();
|
||||
stormforgedEradictor->GetMotionMaster()->MovePath(NPC_STORMFORGED_ERADICTOR * 100, false);
|
||||
|
||||
Reference in New Issue
Block a user