fixed bug when hook.Call calls a hook more than 1 time

This commit is contained in:
Mestima 2023-10-10 23:50:49 +03:00
parent bab2506cc7
commit 805257da76

View File

@ -21,7 +21,6 @@ void Hook::Call(String event, Array args = Array(), bool defer = false) {
}
}
for (int i = 0; i < table.size(); i++) {
Dictionary tmp = table.get(event, Dictionary());
if (!tmp.is_empty()) {
Array keys = tmp.keys();
@ -38,7 +37,6 @@ void Hook::Call(String event, Array args = Array(), bool defer = false) {
ERR_PRINT("Hook event '" + event + "' cannot be found or empty.");
}
}
}
void Hook::Remove(String event, String uid) {
Dictionary tmp = table.get(event, Dictionary());