Mercurial > wow > mylilpony
comparison libMyLilPony/libMyLilPony_miscFunctions.lua @ 60:81145a681a59
Fixed for legion xpack (patch 7.0) API changes
author | syzler |
---|---|
date | Sat, 13 Aug 2016 15:29:39 -0400 |
parents | 64e8f8e5fa41 |
children |
comparison
equal
deleted
inserted
replaced
59:12b9c632919d | 60:81145a681a59 |
---|---|
77 -- @param slotID The slot ID of the mount to be called. | 77 -- @param slotID The slot ID of the mount to be called. |
78 -- @param condition An optional Boolean condition. | 78 -- @param condition An optional Boolean condition. |
79 -- @returns True if a mount was summoned, or False otherwise. | 79 -- @returns True if a mount was summoned, or False otherwise. |
80 function MyLilPony.CallMount(slotID, condition) | 80 function MyLilPony.CallMount(slotID, condition) |
81 if condition == nil or condition then | 81 if condition == nil or condition then |
82 C_MountJournal.Summon(slotID); | 82 C_MountJournal.SummonByID(slotID); |
83 return true; | 83 return true; |
84 end | 84 end |
85 return false; | 85 return false; |
86 end | 86 end |
87 | 87 |
98 function MyLilPony.EnumerateKnownMountSlotIDs() | 98 function MyLilPony.EnumerateKnownMountSlotIDs() |
99 local countMounts = C_MountJournal.GetNumMounts(); | 99 local countMounts = C_MountJournal.GetNumMounts(); |
100 local x = 1; | 100 local x = 1; |
101 return function() | 101 return function() |
102 for i = x, countMounts do | 102 for i = x, countMounts do |
103 local _, _, _, _, _, _, _, _, _, hidden, known = C_MountJournal.GetMountInfo(i); | 103 local _, _, _, _, _, _, _, _, _, hidden, known = C_MountJournal.GetMountInfoByID(i); |
104 if known and not hidden then | 104 if known and not hidden then |
105 x = i + 1; | 105 x = i + 1; |
106 return i; | 106 return i; |
107 end | 107 end |
108 end | 108 end |