Mercurial > wow > crossrealmassist
comparison CrossRealmAssist.lua @ 19:f7f4ac669077 beta-0.62
Patch 6.2.0 and minor bug fix
| author | ShadowTheAge |
|---|---|
| date | Fri, 26 Jun 2015 21:25:53 +0300 |
| parents | edb74cf488c4 |
| children | 1edc9cc7f43a |
comparison
equal
deleted
inserted
replaced
| 18:2de6ed94effb | 19:f7f4ac669077 |
|---|---|
| 677 | 677 |
| 678 function addon:GetRealmStat(realms) | 678 function addon:GetRealmStat(realms) |
| 679 local rcount = 0; | 679 local rcount = 0; |
| 680 local stat = {}; | 680 local stat = {}; |
| 681 local pcount = 0; | 681 local pcount = 0; |
| 682 for realm,count in pairs(realms) do | 682 if realms then |
| 683 table.insert(stat,{realm=realm,count=count}) | 683 for realm,count in pairs(realms) do |
| 684 rcount = rcount + 1; | 684 table.insert(stat,{realm=realm,count=count}) |
| 685 pcount = pcount + count; | 685 rcount = rcount + 1; |
| 686 pcount = pcount + count; | |
| 687 end | |
| 686 end | 688 end |
| 687 if rcount > 1 then | 689 if rcount > 1 then |
| 688 table.sort(stat, function(a,b) return a.count > b.count end) | 690 table.sort(stat, function(a,b) return a.count > b.count end) |
| 689 stat.max = stat[1].count | 691 stat.max = stat[1].count |
| 690 else stat.max = 0 end | 692 else stat.max = 0 end |
| 857 end | 859 end |
| 858 | 860 |
| 859 function addon:UpdateAutoButtonStatus() | 861 function addon:UpdateAutoButtonStatus() |
| 860 if not btQuick then return end | 862 if not btQuick then return end |
| 861 btQuick:Enable() | 863 btQuick:Enable() |
| 862 if not hintShown and db.global.quickJoinHint then | 864 if IsInGroup() then |
| 863 action = ShowQuickHint; | |
| 864 elseif IsInGroup() then | |
| 865 action = LeaveGroup; | 865 action = LeaveGroup; |
| 866 elseif C_LFGList.GetNumApplications() > 0 then | 866 elseif C_LFGList.GetNumApplications() > 0 then |
| 867 action = CancelJoin; | 867 action = CancelJoin; |
| 868 elseif lfgScanInProgress then | 868 elseif lfgScanInProgress then |
| 869 action = Wait | 869 action = Wait |
| 870 elseif not hintShown and db.global.quickJoinHint then | |
| 871 action = ShowQuickHint; | |
| 870 else | 872 else |
| 871 local group = QuickJoin.findGroup(); | 873 local group = QuickJoin.findGroup(); |
| 872 if group then | 874 if group then |
| 873 action = QuickJoin; | 875 action = QuickJoin; |
| 874 QuickJoin.groupToJoin = group | 876 QuickJoin.groupToJoin = group |
