-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtils.lua
More file actions
33 lines (28 loc) · 798 Bytes
/
Copy pathUtils.lua
File metadata and controls
33 lines (28 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
----------------------
-- Log functions
----------------------
function GlobalPlayed_Log(message)
print("[GlobalPlayed] " .. message)
end
function GlobalPlayed_LogCharactersPlayed()
for k, v in ipairs(GlobalPlayed_Characters) do
iChar = GlobalPlayed_FindCharacter(v.name, v.realm)
if iChar ~= nil then
GlobalPlayed_Log(GlobalPlayed_Character_GetNameRealmColored(iChar) .. ": " .. GlobalPlayed_Character_GetPlayedWithTotal(iChar))
end
end
end
----------------------
-- GlobalPlayed_Characters search functions
----------------------
function GlobalPlayed_FindCharacter(p_name, p_realm)
if GlobalPlayed_Characters == nil then
return nil
end
for k, v in ipairs(GlobalPlayed_Characters) do
if v.name == p_name and v.realm == p_realm then
return v
end
end
return nil
end