diff options
Diffstat (limited to 'source/cPluginManager.cpp')
-rw-r--r-- | source/cPluginManager.cpp | 45 |
1 files changed, 44 insertions, 1 deletions
diff --git a/source/cPluginManager.cpp b/source/cPluginManager.cpp index 7c0d49ed5..f152911e8 100644 --- a/source/cPluginManager.cpp +++ b/source/cPluginManager.cpp @@ -514,7 +514,7 @@ bool cPluginManager::CallHookBlockToPickup( bool cPluginManager::CallHookWeatherChanged(cWorld * a_World) { - HookMap::iterator Plugins = m_Hooks.find(HOOK_POST_CRAFTING); + HookMap::iterator Plugins = m_Hooks.find(HOOK_WEATHER_CHANGED); if (Plugins == m_Hooks.end()) { return false; @@ -533,6 +533,49 @@ bool cPluginManager::CallHookWeatherChanged(cWorld * a_World) +bool cPluginManager::CallHookUpdatingSign(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, AString & a_Line1, AString & a_Line2, AString & a_Line3, AString & a_Line4) +{ + HookMap::iterator Plugins = m_Hooks.find(HOOK_UPDATING_SIGN); + if (Plugins == m_Hooks.end()) + { + return false; + } + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnUpdatingSign(a_World, a_BlockX, a_BlockY, a_BlockZ, a_Line1, a_Line2, a_Line3, a_Line4)) + { + return true; + } + } + return false; +} + + + + + +bool cPluginManager::CallHookUpdatedSign(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4) +{ + HookMap::iterator Plugins = m_Hooks.find(HOOK_UPDATED_SIGN); + if (Plugins == m_Hooks.end()) + { + return false; + } + for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr) + { + if ((*itr)->OnUpdatedSign(a_World, a_BlockX, a_BlockY, a_BlockZ, a_Line1, a_Line2, a_Line3, a_Line4)) + { + return true; + } + } + return false; +} + + + + + + cPlugin* cPluginManager::GetPlugin( const char* a_Plugin ) const { for( PluginList::const_iterator itr = m_Plugins.begin(); itr != m_Plugins.end(); ++itr ) |