-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #260 from Bestride/icc
Update for Phase 4
- Loading branch information
Showing
4 changed files
with
64 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,55 @@ | ||
function BeStride:BuildMasterMountTable() | ||
local num = GetNumCompanions("MOUNT") | ||
--print("Start mount table") | ||
for i=1, GetNumCompanions("MOUNT") do | ||
local mountID,name,spellID,icon,isSummoned = GetCompanionInfo("MOUNT", i) | ||
if mountTable["master"][spellID] == nil then | ||
BeStride:AddNewMount(i) | ||
for key,value in pairs(C_MountJournal.GetMountIDs()) do | ||
local name,spellID,icon,isActive,isUsable,sourceType,isFavorite,isFactionSpecific,faction,shouldHideOnChar,isCollected,mountID,isForDragonriding = C_MountJournal.GetMountInfoByID(value) | ||
--print("" .. name .. ":" .. mountID .. ":" .. spellID ) | ||
if isCollected then | ||
BeStride:AddNewMount(value) | ||
end | ||
end | ||
--print("End mount table") | ||
end | ||
|
||
|
||
|
||
function BeStride:AddNewMount(mountId) | ||
local mountID,name,spellID,icon,isSummoned = GetCompanionInfo("MOUNT", mountId) | ||
if not BeStride_MountDB[spellID] then | ||
print("Mount not in DB:") | ||
print("\tMount Number:" .. mountId) | ||
print("\tSpell ID:" .. spellID) | ||
print("\tMount ID:" .. mountID) | ||
if name then | ||
print("\tName: " .. name) | ||
end | ||
return | ||
end | ||
local name,spellID,icon,isActive,isUsable,sourceType,isFavorite,isFactionSpecific,faction,shouldHideOnChar,isCollected,mountID,isForDragonriding = C_MountJournal.GetMountInfoByID(mountId) | ||
local creatureDisplayInfoID,description,source,isSelfMount,mountTypeID,uiModelSceneID = C_MountJournal.GetMountInfoExtraByID(mountId) | ||
|
||
if BeStride_MountDB[spellID].attributes.flying == true then | ||
mountType = "flying" | ||
elseif BeStride_MountDB[spellID].attributes.ground == true then | ||
mountType = "ground" | ||
else | ||
mountType = "unknown" | ||
if BeStride_Constants.Mount.Types[mountTypeID] == nil then | ||
print("" .. name .. ":" .. mountID .. ":" .. spellID .. ":" .. mountTypeID) | ||
--elseif mountId == 678 then | ||
-- print("" .. name .. ":" .. mountID .. ":" .. spellID .. ":" .. mountTypeID) | ||
end | ||
|
||
if not name and BeStride_MountDB[spellID].name then | ||
name = BeStride_MountDB[spellID].name | ||
|
||
if isFactionSpecific then | ||
faction = faction | ||
else | ||
faction = nil | ||
end | ||
|
||
mountTable["master"][mountID] = { | ||
mountTable["master"][mountId] = { | ||
["name"] = name, | ||
["spellID"] = spellID, | ||
["mountID"] = mountID, | ||
["isActive"] = isSummoned, | ||
["faction"] = nil, | ||
["factionLocked"] = isFactionSpecific, | ||
["faction"] = faction, | ||
["description"] = description, | ||
["isActive"] = isActive, | ||
["isUsable"] = isUsable, | ||
["isCollected"] = isCollected, | ||
["icon"] = icon, | ||
["source"] = BeStride_MountDB[spellID].source, | ||
["type"] = mountType, | ||
["source"] = source, | ||
["sourceType"] = sourceType, | ||
["type"] = BeStride_Constants.Mount.Types[mountTypeID], | ||
} | ||
end | ||
|
||
function BeStride:PrintAllMounts() | ||
for key,value in pairs(C_MountJournal.GetMountIDs()) do | ||
local name,spellID,icon,isActive,isUsable,sourceType,isFavorite,isFactionSpecific,faction,shouldHideOnChar,isCollected,mountID,isForDragonriding = C_MountJournal.GetMountInfoByID(value) | ||
local creatureDisplayInfoID,description,source,isSelfMount,mountTypeID,uiModelSceneID = C_MountJournal.GetMountInfoExtraByID(mountId) | ||
if isCollected then | ||
print("" + mountID + ":" + name + ":" + spellID + ":" + icon + ":" + isSummoned + ":" + mountTypeID+"") | ||
end | ||
end | ||
end |