aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Scripting/ScriptMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Scripting/ScriptMgr.cpp')
-rwxr-xr-xsrc/server/game/Scripting/ScriptMgr.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/server/game/Scripting/ScriptMgr.cpp b/src/server/game/Scripting/ScriptMgr.cpp
index d5e8f71e1fd..47751338d66 100755
--- a/src/server/game/Scripting/ScriptMgr.cpp
+++ b/src/server/game/Scripting/ScriptMgr.cpp
@@ -395,7 +395,7 @@ void ScriptMgr::CreateSpellScripts(uint32 spellId, std::list<SpellScript*>& scri
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -416,7 +416,7 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -433,12 +433,12 @@ void ScriptMgr::CreateAuraScripts(uint32 spellId, std::list<AuraScript*>& script
}
}
-void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsMap::iterator> >& scriptVector)
+void ScriptMgr::CreateSpellScriptLoaders(uint32 spellId, std::vector<std::pair<SpellScriptLoader*, SpellScriptsContainer::iterator> >& scriptVector)
{
SpellScriptsBounds bounds = sObjectMgr->GetSpellScriptsBounds(spellId);
scriptVector.reserve(std::distance(bounds.first, bounds.second));
- for (SpellScriptsMap::iterator itr = bounds.first; itr != bounds.second; ++itr)
+ for (SpellScriptsContainer::iterator itr = bounds.first; itr != bounds.second; ++itr)
{
SpellScriptLoader* tmpscript = ScriptRegistry<SpellScriptLoader>::GetScriptById(itr->second);
if (!tmpscript)
@@ -1036,14 +1036,12 @@ void ScriptMgr::OnAuctionExpire(AuctionHouseObject* ah, AuctionEntry* entry)
FOREACH_SCRIPT(AuctionHouseScript)->OnAuctionExpire(ah, entry);
}
-bool ScriptMgr::OnConditionCheck(Condition* condition, Player* player, Unit* invoker)
+bool ScriptMgr::OnConditionCheck(Condition* condition, ConditionSourceInfo& sourceInfo)
{
ASSERT(condition);
- ASSERT(player);
- // invoker can be NULL.
- GET_SCRIPT_RET(ConditionScript, condition->mScriptId, tmpscript, true);
- return tmpscript->OnConditionCheck(condition, player, invoker);
+ GET_SCRIPT_RET(ConditionScript, condition->ScriptId, tmpscript, true);
+ return tmpscript->OnConditionCheck(condition, sourceInfo);
}
void ScriptMgr::OnInstall(Vehicle* veh)