| 996 | |
| 997 | |
| 998 | bool cPluginLua::OnPlayerUsingBlock(cPlayer & a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockFace, int a_CursorX, int a_CursorY, int a_CursorZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| 999 | { |
| 1000 | cCSLock Lock(m_CriticalSection); |
| 1001 | bool res = false; |
| 1002 | cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PLAYER_USING_BLOCK]; |
| 1003 | for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr) |
| 1004 | { |
| 1005 | m_LuaState.Call((int)(**itr), &a_Player, a_BlockX, a_BlockY, a_BlockZ, a_BlockFace, a_CursorX, a_CursorY, a_CursorZ, a_BlockType, a_BlockMeta, cLuaState::Return, res); |
| 1006 | if (res) |
| 1007 | { |
| 1008 | return true; |
| 1009 | } |
| 1010 | } |
| 1011 | return false; |
| 1012 | } |
| 1013 | |
| 1014 | |
| 1015 |
no test coverage detected