diff options
Diffstat (limited to 'src/Bindings')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index 088b92a6d..3560b8660 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -476,11 +476,9 @@ bool cPluginManager::CallHookDisconnect(cClientHandle & a_Client, const AString bool cPluginManager::CallHookEntityAddEffect(cEntity & a_Entity, int a_EffectType, int a_EffectDurationTicks, int a_EffectIntensity, double a_DistanceModifier) { - HookMap::iterator Plugins = m_Hooks.find(HOOK_ENTITY_ADD_EFFECT); - if (Plugins == m_Hooks.end()) - { - return false; - } + FIND_HOOK(HOOK_ENTITY_ADD_EFFECT); + VERIFY_HOOK; + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) { if ((*itr)->OnEntityAddEffect(a_Entity, a_EffectType, a_EffectDurationTicks, a_EffectIntensity, a_DistanceModifier)) |