Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Tukui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
9
Issues
9
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tukz
Tukui
Commits
1997e5c1
Commit
1997e5c1
authored
Sep 24, 2019
by
Azilroka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Friends DataText for 8.2.5 Changes
parent
a0cb86d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
37 deletions
+32
-37
Tukui/Modules/DataTexts/Elements/Friends.lua
Tukui/Modules/DataTexts/Elements/Friends.lua
+32
-37
No files found.
Tukui/Modules/DataTexts/Elements/Friends.lua
View file @
1997e5c1
...
...
@@ -112,10 +112,9 @@ local function BuildBNTable(total)
wipe
(
BNTable
)
for
i
=
1
,
total
do
local
presenceID
,
presenceName
,
battleTag
,
isBattleTagPresence
,
toonName
,
toonID
,
client
,
isOnline
,
lastOnline
,
isAFK
,
isDND
,
messageText
,
noteText
,
isRIDFriend
,
messageTime
,
canSoR
=
BNGetFriendInfo
(
i
)
if
(
toonID
or
presenceID
)
then
local
hasFocus
,
_
,
_
,
realmName
,
realmID
,
faction
,
race
,
class
,
guild
,
zoneName
,
level
,
gameText
=
BNGetGameAccountInfo
(
toonID
or
presenceID
)
local
accountInfo
=
C_BattleNet
.
GetFriendAccountInfo
(
i
)
if
accountInfo
then
local
class
=
accountInfo
.
gameAccountInfo
.
className
for
k
,
v
in
pairs
(
LOCALIZED_CLASS_NAMES_MALE
)
do
if
class
==
v
then
...
...
@@ -123,9 +122,9 @@ local function BuildBNTable(total)
end
end
BNTable
[
i
]
=
{
presenceID
,
presenceName
,
battleTag
,
toonName
,
toonID
,
client
,
isOnline
,
isAFK
,
isDND
,
noteText
,
realmName
,
faction
,
race
,
class
,
zoneName
,
l
evel
}
BNTable
[
i
]
=
{
accountInfo
.
bnetAccountID
,
accountInfo
.
accountName
,
accountInfo
.
battleTag
,
accountInfo
.
gameAccountInfo
.
characterName
,
accountInfo
.
gameAccountInfo
.
gameAccountID
,
accountInfo
.
gameAccountInfo
.
clientProgram
,
accountInfo
.
gameAccountInfo
.
isOnline
,
accountInfo
.
isAFK
,
accountInfo
.
isDND
,
accountInfo
.
note
,
accountInfo
.
gameAccountInfo
.
realmName
,
accountInfo
.
gameAccountInfo
.
factionName
,
accountInfo
.
gameAccountInfo
.
raceName
,
class
,
accountInfo
.
gameAccountInfo
.
areaName
,
accountInfo
.
gameAccountInfo
.
characterL
evel
}
if
isOnline
then
if
accountInfo
.
gameAccountInfo
.
isOnline
then
BNTotalOnline
=
BNTotalOnline
+
1
end
end
...
...
@@ -136,20 +135,11 @@ local function UpdateBNTable(total)
BNTotalOnline
=
0
for
i
=
1
,
#
BNTable
do
-- get guild roster information
local
presenceID
,
presenceName
,
battleTag
,
isBattleTagPresence
,
toonName
,
toonID
,
client
,
isOnline
,
lastOnline
,
isAFK
,
isDND
,
messageText
,
noteText
,
isRIDFriend
,
messageTime
,
canSoR
=
BNGetFriendInfo
(
i
)
if
(
toonID
or
presenceID
)
then
local
hasFocus
,
_
,
_
,
realmName
,
realmID
,
faction
,
race
,
class
,
guild
,
zoneName
,
level
,
gameText
=
BNGetGameAccountInfo
(
toonID
or
presenceID
)
for
k
,
v
in
pairs
(
LOCALIZED_CLASS_NAMES_MALE
)
do
if
class
==
v
then
class
=
k
end
end
local
accountInfo
=
C_BattleNet
.
GetFriendAccountInfo
(
i
)
if
accountInfo
then
-- get the correct index in our table
local
index
=
GetTableIndex
(
BNTable
,
1
,
presenceID
)
local
index
=
GetTableIndex
(
BNTable
,
1
,
accountInfo
.
bnetAccountID
)
local
class
=
accountInfo
.
gameAccountInfo
.
className
-- we cannot find a BN member in our table, so rebuild it
if
index
==
-
1
then
...
...
@@ -157,26 +147,32 @@ local function UpdateBNTable(total)
return
end
for
k
,
v
in
pairs
(
LOCALIZED_CLASS_NAMES_MALE
)
do
if
class
==
v
then
class
=
k
end
end
-- update on-line status for all members
BNTable
[
index
][
7
]
=
isOnline
BNTable
[
index
][
7
]
=
accountInfo
.
gameAccountInfo
.
isOnline
-- update information only for on-line members
if
isOnline
then
BNTable
[
index
][
2
]
=
presence
Name
BNTable
[
index
][
3
]
=
battleTag
BNTable
[
index
][
4
]
=
toon
Name
BNTable
[
index
][
5
]
=
toon
ID
BNTable
[
index
][
6
]
=
client
BNTable
[
index
][
8
]
=
isAFK
BNTable
[
index
][
9
]
=
isDND
BNTable
[
index
][
10
]
=
noteText
BNTable
[
index
][
11
]
=
realmName
BNTable
[
index
][
12
]
=
faction
BNTable
[
index
][
13
]
=
rac
e
if
accountInfo
.
gameAccountInfo
.
isOnline
then
BNTable
[
index
][
2
]
=
accountInfo
.
account
Name
BNTable
[
index
][
3
]
=
accountInfo
.
battleTag
BNTable
[
index
][
4
]
=
accountInfo
.
gameAccountInfo
.
character
Name
BNTable
[
index
][
5
]
=
accountInfo
.
gameAccountInfo
.
gameAccount
ID
BNTable
[
index
][
6
]
=
accountInfo
.
gameAccountInfo
.
clientProgram
BNTable
[
index
][
8
]
=
accountInfo
.
isAFK
BNTable
[
index
][
9
]
=
accountInfo
.
isDND
BNTable
[
index
][
10
]
=
accountInfo
.
note
BNTable
[
index
][
11
]
=
accountInfo
.
gameAccountInfo
.
realmName
BNTable
[
index
][
12
]
=
accountInfo
.
gameAccountInfo
.
factionName
BNTable
[
index
][
13
]
=
accountInfo
.
gameAccountInfo
.
raceNam
e
BNTable
[
index
][
14
]
=
class
BNTable
[
index
][
15
]
=
zone
Name
BNTable
[
index
][
16
]
=
l
evel
BNTable
[
index
][
17
]
=
isBattleTagPresence
BNTable
[
index
][
15
]
=
accountInfo
.
gameAccountInfo
.
area
Name
BNTable
[
index
][
16
]
=
accountInfo
.
gameAccountInfo
.
characterL
evel
BNTable
[
index
][
17
]
=
accountInfo
.
isBattleTagFriend
BNTotalOnline
=
BNTotalOnline
+
1
end
...
...
@@ -395,7 +391,6 @@ local Enable = function(self)
self
:
RegisterEvent
(
"BN_DISCONNECTED"
)
self
:
RegisterEvent
(
"BN_INFO_CHANGED"
)
self
:
RegisterEvent
(
"BATTLETAG_INVITE_SHOW"
)
self
:
RegisterEvent
(
"PARTY_REFER_A_FRIEND_UPDATED"
)
self
:
SetScript
(
"OnMouseDown"
,
OnMouseDown
)
self
:
SetScript
(
"OnMouseUp"
,
OnMouseUp
)
...
...
@@ -416,4 +411,4 @@ local Disable = function(self)
self
:
SetScript
(
"OnEvent"
,
nil
)
end
DataText
:
Register
(
L
.
DataText
.
Friends
,
Enable
,
Disable
,
Update
)
\ No newline at end of file
DataText
:
Register
(
L
.
DataText
.
Friends
,
Enable
,
Disable
,
Update
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment