WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   WoD Beta archived threads (https://www.wowinterface.com/forums/forumdisplay.php?f=151)
-   -   New API Usage (https://www.wowinterface.com/forums/showthread.php?t=49501)

p3lim 07-19-14 11:12 PM

New API Usage
 
Most likely incomplete, pulled from exe strings


Code:

<widget>:CGTooltip_SetCurrencyTokenByID(currencyID)
<widget>:EquipItem(itemID)
<widget>:SetAtlas("atlasName")
<widget>:SetAtlas("atlasName"[, useAtlasSize])
<widget>:SetBlingTexture(file, [r, g, b, a])
<widget>:SetCompareItem(shoppingTooltipTwo, primaryMouseover)
<widget>:SetCooldown(start, duration)
<widget>:SetCooldownDuration(duration)
<widget>:SetCooldownUNIX(start, duration)
<widget>:SetCreatureData(creatureID)
<widget>:SetEdgeTexture(file, [r, g, b, a])
<widget>:SetFacingLeft(isFacingLeft)
<widget>:SetFromAlpha(from)
<widget>:SetFromScale(x, y)
<widget>:SetHideCountdownNumbers(doHide)
<widget>:SetMask("maskName")
<widget>:SetPanDistance(scale)
<widget>:SetQuestBlobOutsideSelectedTexture("file")
<widget>:SetSwipeColor(r, g, b, [a])
<widget>:SetSwipeTexture(file, [r, g, b, a])
<widget>:SetTargetDistance(scale)
<widget>:SetToAlpha(change)
<widget>:SetToScale(x, y)
<widget>:SetToyByItemID(ID)
<widget>:SetVoidItem(tab, slot)
<widget>:StartPan(panType, timeInSeconds[, doFade, visualKitID])

AcceptInvite(resultID)
AddFollowerToMission(missionID, followerID)
AdjustFadeTimes(fadeIn, fadeOut)
ApplyToGroup(resultID, comment, tankOK, healerOK, damageOK)
AssignFollowerToBuilding(plotInstanceID, followerID)
BNSummonFriendByIndex(friendIndex)
BreakUpLargeNumbers(schoolMask)
C_LFGList.CreateListing(lfgID, "groupName", itemLevel, "voiceChat", "comment")
C_LFGList.UpdateListing(lfgID, "groupName", itemLevel, "voiceChat", "comment")
C_Questline.GetQuestlineInfoByIndex(index)
C_TaskQuest.GetQuestDataByQuestID(id)
C_TaskQuest.GetQuestObjectiveStrByQuestID(id)
C_TaskQuest.GetQuestsForPlayerByMapID(id)
C_Timer.After(seconds, func)
CancelApplication(resultID)
CancelConstruction(plotInstanceID)
CanOpenMissionChest(missionID)
CastSpellOnFollower(followerID)
ClosestGameObjectPosition(gameObjectID)
ClosestUnitPosition(creatureID)
CopyAccountCharacterFromLive(index)
DeclineApplicant(applicantID)
DeclineInvite(resultID)
GetAccountCharacterInfo(index)
GetActivityGroupInfo(groupID)
GetActivityInfo(activityID)
GetAddOnEnableState("character", index or "name")
GetApplicantData(applicantID)
GetApplicantMemberInfo(applicantID, memberIndex)
GetApplicantMemberStats(applicantID, memberIndex)
GetApplicationInfo(resultID)
GetAtlasInfo("atlasName")
GetAvailableActivityGroups(categoryID[, filter])
GetBagSlotFlag(index, flagIndex)
GetBankBagSlotFlag(index, flagIndex)
GetBasicMissionInfo(missionID)
GetBonusStepRewardQuestID(stepIndex
GetBuffedFollowersForMission(missionID)
GetBuildingInfo(buildingID)
GetBuildingsForPlot(plotInstanceID)
GetBuildingsForSize(uiCategoryID)
GetBuildingTimeRemaining(plotInstanceID)
GetBuildingTooltip(buildingID)
GetBuildingUpgradeInfo(buildingID)
GetCollectedFilterSetting(flag)
GetContinentName(continentIndex)
GetCriteriaInfo(criteriaIndex
GetCriteriaInfoByStep(stepIndex, criteriaIndex
GetCurrentLevelDraenorTalent(level)
GetEquipmentSetIgnoreSlots("setName" [, returnTable])
GetExtendedBuffedFollowersForMission(missionID)
GetFollowerAbilities(guid|id)
GetFollowerAbilityAtIndex(followerID, index)
GetFollowerAbilityAtIndexByID(garrFollowerID, index)
GetFollowerAbilityCounterMechanic(garrAbilityID)
GetFollowerAbilityDescription(garrAbilityID)
GetFollowerAbilityIcon(garrAbilityID)
GetFollowerAbilityIsTrait(garrAbilityID)
GetFollowerAbilityLink(abilityID)
GetFollowerAbilityName(garrAbilityID)
GetFollowerClassSpec(followerID)
GetFollowerClassSpecAtlas(garrSpecID)
GetFollowerClassSpecByID(garrFollowerID)
GetFollowerClassSpecName(garrFollowerID)
GetFollowerDisplayID(followerID)
GetFollowerDisplayIDByID(garrFollowerID)
GetFollowerInfo(guid|id)
GetFollowerItemLevelAverage(followerID)
GetFollowerItems(followerID)
GetFollowerLevel(followerID)
GetFollowerLevelXP(followerID)
GetFollowerLink(followerID)
GetFollowerLinkByID(garrFollowerID)
GetFollowerMissionCompleteInfo(followerID)
GetFollowerModelItems(followerID)
GetFollowerName(missionID, followerID)
GetFollowerNameByID(garrFollowerID)
GetFollowerPortraitIconIDByID(garrFollowerID)
GetFollowerQuality(followerID)
GetFollowerSourceText(garrFollowerID)
GetFollowerStatus(followerID)
GetFollowerTraitAtIndex(followerID, index)
GetFollowerTraitAtIndexByID(garrFollowerID, index)
GetFollowerXP(followerID)
GetFollowersTraitsForMission(missionID)
GetGuildChallengeInfo(index)
GetGuildRosterLastOnline(index)
GetInspectArenaData(armor, attackerLevel)
GetIsFavorite(index)
GetIsFavorite(itemID)
GetLandingPageShipmentInfo(buildingID)
GetLFDRoleLockInfo(dungeonID, roleID)
GetLFGInviteRoleRestrictions(role)
GetLooseMacroIcons([table])
GetLooseMacroItemIcons([table])
GetMapSubzones(mapID)
GetMissionChance(missionID)
GetMissionCompleteEncounters(missionID)
GetMissionInfo(missionID)
GetMissionLink(missionID)
GetMissionMaxFollowers(garrMissionID)
GetMissionName(garrMissionID)
GetMissionRewardInfo(garrMissionID)
GetMissionTimes(missionID)
GetMissionUncounteredMechanicsForEncounter(missionID)
GetOwnedBuildingInfo(plotInstanceID)
GetOwnedBuildingInfoAbbrev(plotInstanceID)
GetPartyBuffs(missionID)
GetPartyMissionInfo(missionID)
GetPendingShipmentInfo(index)
GetPetActionCooldown(index)
GetPetInfoByID(petGUID)
GetPlotsForBuilding(buildingID)
GetPossibleFollowersForBuilding(plotInstanceID)
GetProgressBarPercent(questID)
GetQuestFactionGroup(questID
GetQuestLogTaskInfo(index)
GetQuestObjectiveInfo(questID, index)
GetQuestPOIBlobCount(questID)
GetQuestPOIs([table])
GetQuestTag(questID)
GetQuestWatchInfo(index)
GetRealmInfo(category, index)
GetRecruitAbilities(index)
GetRecruiterAbilityList(traits)
GetSearchResultEncounterInfo(resultID)
GetSearchResultFriends(resultID)
GetSearchResultMemberCounts(resultID)
GetSearchResultMemberInfo(resultID, memberIdx)
GetSearchResultInfo(resultID)
GetSetBonusesForSpecializationByItemID(specID, itemID)
GetShipmentReagentInfo(reagentIndex)
GetShipmentReagentItemLink(reagentIndex)
GetSpecializationInfoByID(specID[, sex])
GetSpellsForCharacterUpgradeTier(tierIndex)
GetTabForPlot(plotInstanceID)
GetTalentInfoByID(talentID, groupIndex [, isInspect, inspectUnit])
GetTalentInfoBySpecialization(specIndex, tier, column)
GetTaskInfo(questID)
GetTaskPOIs([table])
GetTasksTable([table])
GetToyFromIndex(itemIndex)
GetToyInfo(itemID)
GetToyLink(itemID)
GetVoidStorageSlotPageIndex(slot)
GetWorldLocFromMapPos(x, y)
HasAction(slot)
HaveQuestData(questID
InviteApplicant(applicantID)
IsBagSlotFlagEnabledOnOtherBags(index, flagIndex)
IsBagSlotFlagEnabledOnOtherBankBags(index, flagIndex)
IsBreadcrumbQuest(questID)
IsFollowerCollected(garrFollowerID)
IsFollowerUnique(dbID)
IsLegacyDifficulty(difficultyID)
IsMapGarrisonMap(mapAreaID)
IsQuestComplete(questID
IsQuestHardWatched(index)
IsQuestSequenced(questID
IsQuestTask(questID)
IsSourceTypeFiltered(sourceIndex)
IsStoryQuest(questID)
IsUnitOnQuestByQuestID(questID, "unit")
JoinSkirmish(id, joinAsGroup)
MarkMissionComplete(missionID)
MissionBonusRoll(missionID)
MonumentChangeAppearanceToTrophyID(trophyID)
MonumentSaveSelection(trophyID)
PickupToyBoxItem(itemID)
PlaceBuilding(plotInstanceID, buildingID)
PlayerHasToy(itemID)
QuestHasPOIInfo(questID)
QuestPOIGetSecondaryLocations(questID, [table])
ReagentBankButtonIDToInvSlotID(buttonID)
RecruitFollower(dbID)
RecruitFollower(followerIndex)
RecruitFollower(followerIndex) where 0 <= followerIndex < %d
RemoveApplicant(applicantID)
RemoveFollowerFromMission(missionID, followerID)
ReportApplicant(applicantID, complaintType[, applicantMember])
ReportSearchResult(resultID, complaintType)
ResetView(viewModeIndex)
Script_GetSpecializationReadinessSpell(specIndex[, isInspect[, isPet]])
Search(categoryID, "query"[, filter[, preferredFilters]]
SearchForFollower(guid|id, searchString)
SetAnimOffset(offset)
SetApplicantMemberRole(applicantID, memberIdx, "ROLE")
SetBackpackAutosortDisabled(disable)
SetBagSlotFlag(index, flagIndex, checked)
SetBankAutosortDisabled(disable)
SetBankBagSlotFlag(index, flagIndex, checked)
SetBuildingActive(plotInstanceID)
SetCollectedFilterSetting(flag, value)
SetCurrentGraphicsSetting(setting{0=normal, 1=raid/BG})
SetFilterCollected(true|false)
SetFilterSourceType(sourceIndex, value)
SetFilterString(string)
SetFilterUncollected(true|false)
SetFollowerFavorite(followerID, true/false)
SetFollowerInactive(followerID, true/false)
SetHeightFactor(factor)
SetInsertItemsLeftToRight(disable)
SetIsFavorite(index, value)
SetIsFavorite(itemID, value)
SetJumpInfo(length, height)
SetLegacyRaidDifficultyID(difficultyID[, force])
SetMapZoom(continentIndex [,zoneIndex]) .. requested continent out of bounds
SetRecruitmentPreferences(mechanicTypeID, traitID)
SetSortBagsRightToLeft(disable)
SetSpellVisualKit(kitID)
SetUsingPartyGarrison(enabled)
SortRealms("type")
SpellIsAlwaysShown(spellID)
StartMission(missionID)
SwapBuildings(plotInstanceID1, plotInstanceID2)
UndeleteCharacter(guid)
UnitBonusArmor("unit")
UnitDistanceSquared("unit")
UnitPosition("unit")
UpgradeBuilding(plotInstanceID)
UseToy(itemID)
UseToyByName(toyName)

strcmputf8i(string1, string2)

hasLoot, canLoot = CanLootUnit(unitGUID)
value = GetDefaultVideoQualityOption("cvar", [, qualityLevel] [, defaultValue] [, isRaid])
tank, healer, dps = GetLFDRoleRestrictions(dungeonID)
unlocked, alert = GetLFGInviteRoleAvailability(role)


Ketho 07-20-14 10:01 AM

It's very useful that you share the information from Wowpedia here, and even info from the exe strings
This makes me think it's amazing that Blizzard still actively develops this game and user interface after almost 10 years

Keep up the good work p3lim =)

p3lim 08-04-14 11:43 PM

Changes from 18566 to 18663

Code:

<cooldown>:SetSwipeColor(r, g, b, [a])
GetBuffedFollowersForMission(missionID)
GetFollowerStatus(followerID)
GetFollowersTraitsForMission(missionID)
GetGuildChallengeInfo(index)
GetMissionUncounteredMechanicsForEncounter(missionID)
GetPartyMissionInfo(missionID)
SetCurrentGraphicsSetting(setting{0=normal, 1=raid/BG})
strcmputf8i(string1, string2)


StopSound(soundHandleID, [optional: fadeout time in ms])

GetExtendedBuffedFollowersForMission(missionID)
GetLandingPageShipmentInfo(index)
StopSound(soundHandleID)
UnitGetGuildLevel("unit")
UnitGetGuildXP("unit")


p3lim 08-07-14 03:20 AM

Changes in 18689:

Code:

GetFollowerName(missionID, followerID)
UnitDistanceSquared("unit")
UnitPosition("unit")

hasLoot, canLoot = CanLootUnit(unitGUID)


Cybeloras 08-07-14 04:01 AM

Unfortunately, UnitDistanceSquared only works on group members (party and raid). It does exactly what you would expect - returns the square of the distance to the unit in yards. Its second return is false if the unit cannot be checked.

UnitPosition has the same restrictions. It returns exact x, y, z, mapID coordinates for any group members (and yourself). For example, right now in Ashran I'm getting (4000.6, -4066.8, 1047687, 1191) as the return values.

These do have quite the interesting implications, even if they don't work on hostiles, pets, or ungrouped players.

Phanx 08-07-14 07:08 AM

Quote:

Originally Posted by Cybeloras (Post 294942)
Unfortunately, UnitDistanceSquared only works on group members (party and raid).

I'd be pretty surprised if it were any other way, as Blizzard has made it abundantly clear over the years that they don't want addons having access to the locations of mobs or enemy players. With an accurate distance, you could easily triangulate the position.

TOM_RUS 08-07-14 09:25 AM

z value returned by UnitPosition is bugged sometimes. I made a few steps around in horde garrison and value changed from 7000 to 13000.

There's what's going on internally: http://paste2.org/8jBAmI65



SDPhantom 08-07-14 10:19 AM

Quote:

Originally Posted by Cybeloras (Post 294942)
Unfortunately, UnitDistanceSquared only works on group members (party and raid) ... UnitPosition has the same restrictions.

Same restrictions as GetPlayerMapPosition() and real coordinates could've already been calculated with GetCurrentMapZone(). The only difference is we have access to the Z coordinate now.





Quote:

Originally Posted by TOM_RUS (Post 294958)
z value returned by UnitPosition is bugged sometimes. I made a few steps around in horde garrison and value changed from 7000 to 13000.

There's what's going on internally: http://paste2.org/8jBAmI65
Code:

y = (float)(signed int)sub_48AA75(pos2.Y * 10.0) * 0.1;
_z = 7 * ((signed int)ffloor(pos2.X) ^ ((signed int)ffloor(y) + 3));
pos2.Z = (float)(_z & 0xFFFFF);


Looks like the Z coordinate is still being worked on and they're throwing out a garbage value for now.

Resike 08-07-14 10:23 AM

Quote:

Originally Posted by SDPhantom (Post 294963)
Same restrictions as GetPlayerMapPosition() and real coordinates could've already been calculated with GetCurrentMapZone(). The only difference is we have access to the Z coordinate now.






Looks like the Z coordinate is still being worked on and they're throwing out a garbage value for now.

I have a feeling that Z coordinate is soo gonna get disabled for addons.

Anyway how did you get that C code?

SDPhantom 08-07-14 10:32 AM

It was linked to in the post I quoted. It looks like they ran it through a decompiler.

TOM_RUS 08-07-14 10:43 AM

Quote:

Originally Posted by SDPhantom (Post 294968)
It was linked to in the post I quoted. It looks like they ran it through a decompiler.

Yep, Hex-Rays. I was wondering why z value was wrong and decided to check that out.

p3lim 08-12-14 03:04 PM

Changes from 18689 to 18716:

Code:

GetBankBagSlotFlag(index, flagIndex)
IsBagSlotFlagEnabledOnOtherBankBags(index, flagIndex)
SetBankBagSlotFlag(index, flagIndex, checked)

GetBankBagSlotAutosortDisabled(index)
SetBankBagSlotAutosortDisabled(index, disable)


p3lim 08-18-14 06:59 PM

Changes from 18716 to 18738:

Code:

GetSearchResultMemberCounts(resultID)
IsUnitOnQuestByQuestID(questID, "unit")
ReportApplicant(applicantID, complaintType[, applicantMember])
ReportSearchResult(resultID, complaintType)


p3lim 09-03-14 03:20 AM

Changes from 18738 to 18816:

Code:

ClosestGameObjectPosition(gameObjectID)
ClosestUnitPosition(creatureID)
GetBuildingTooltip(buildingID)
GetEquipmentSetIgnoreSlots("setName" [, returnTable])
GetQuestPOIBlobCount(questID)
GetSearchResultMemberInfo(resultID, memberIdx)
GetToyFromIndex(itemIndex)
IsFollowerCollected(garrFollowerID)
IsMapGarrisonMap(mapAreaID)
UseToyByName(toyName)


GetBuildingSpecInfo(specID)
Script_GetToyFromIndex(itemIndex)
SetBuildingSpecialization(plotInstanceID, specID)


icyblade 09-03-14 04:56 AM

In 18816:
It seems that GetItemQualityColor(itemId) will return 1,1,1,ffffffff for everything
For example:
Code:

print(GetItemQualityColor(56104))
print(GetItemQualityColor(115744))

will return
Code:

1,1,1,ffffffff
1,1,1,ffffffff

So it's a bug or a new feature?

Phanx 09-03-14 05:03 AM

GetAddOnInfo is removed? How are we supposed to get information about addons? o_O

Stanzilla 09-03-14 05:08 AM

Quote:

Originally Posted by Phanx (Post 296214)
GetAddOnInfo is removed? How are we supposed to get information about addons? o_O

no, it just takes the index now instead of index and name.

Phanx 09-03-14 05:15 AM

Ah, okay, the color highlighting did not make that clear. That still seems like a bad change, though. Now if we want to check for the presence of an addon we have to loop over all addons to find it, instead of being able to query it by name...

p3lim 09-03-14 05:26 AM

This is usage documentation that is in the game (error reporting telling you how to use the api properly).

For removed/added api, see my other thread.

Lombra 09-06-14 05:45 AM

Quote:

Originally Posted by icyblade (Post 296213)
In 18816:
It seems that GetItemQualityColor(itemId) will return 1,1,1,ffffffff for everything
For example:
Code:

print(GetItemQualityColor(56104))
print(GetItemQualityColor(115744))

will return
Code:

1,1,1,ffffffff
1,1,1,ffffffff

So it's a bug or a new feature?

I'm pretty sure that was always meant to be used with a quality index rather than item ID. That's how I've always used it, anyway.


All times are GMT -6. The time now is 06:12 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI