mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-07-27 09:44:44 +00:00
Port and adapt 6 main hotfixes to decoupled architecture + small function re-write HealBot_SetSkinColours to adhere to DRY principles
This commit is contained in:
+2
-2
@@ -32,11 +32,11 @@ function HealBot_Model:RegisterObserver(event, callback)
|
||||
table.insert(self.observers[event], callback)
|
||||
end
|
||||
|
||||
function HealBot_Model:NotifyObservers(event, unitID, ...)
|
||||
function HealBot_Model:NotifyObservers(event, unitID, arg1, arg2)
|
||||
if self.observers[event] then
|
||||
local len = table.getn(self.observers[event])
|
||||
for i = 1, len do
|
||||
self.observers[event][i](unitID, ...)
|
||||
self.observers[event][i](unitID, arg1, arg2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user