Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor Updates for Dragonflight #18

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Frame.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@
<Frame name="$parentSpark" parentKey="spark">
<Size x="9" y="24"/>
<Anchors>
<Anchor center="CENTER" relativePoint="TOPLEFT" relativeTo="$parent" x="500" y="16"/>
<!-- <Anchor center="CENTER" relativePoint="TOPLEFT" relativeTo="$parent" x="500" y="16"/> -->
<!-- <Anchor point="CENTER" relativePoint="TOPLEFT" relativeTo="$parent" x="500" y="16"/> -->
</Anchors>
<Layers>
<Layer level="ARTWORK">
Expand Down
2 changes: 1 addition & 1 deletion libs/LibSharedMedia-3.0/LibSharedMedia-3.0/lib.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/
..\FrameXML\UI.xsd">
<Script file="LibSharedMedia-3.0.lua" />
</Ui>
</Ui>
48 changes: 36 additions & 12 deletions modules/reputation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,18 @@ function module:GetText()
local rep_text = {};

local name, standing, minReputation, maxReputation, currentReputation, factionID = GetWatchedFactionInfo();
local friendLevel, friendThreshold, nextFriendThreshold = select(7, GetFriendshipReputation(factionID));
--local friendLevel, friendThreshold, nextFriendThreshold = select(7, GetFriendshipReputation(factionID));
local reputationInfo = C_GossipInfo.GetFriendshipReputation(factionID);
local friendLevel = reputationInfo.standing;
local friendThreshold = reputationInfo.reactionThreshold;
local nextFriendThreshold = reputationInfo.nextThreshold;

local standingText = "";
local isCapped = false;
local hasRewardPending = false;
local paragonLevel = 0;

if(friendLevel) then
if(friendLevel > 0) then
standingText = friendLevel;
if(not nextFriendThreshold) then
isCapped = true;
Expand All @@ -152,7 +156,7 @@ function module:GetText()
currentReputation = currentReputation % maxReputation;

if(paragonLevel == 1) then
standingText = module:GetStandingColorText(standing+1);
standingText = module:GetStandingColorText(standing+1);
elseif(paragonLevel > 1) then
standingText = string.format("%dx %s", paragonLevel, module:GetStandingColorText(standing+1));
end
Expand Down Expand Up @@ -200,14 +204,19 @@ end

function module:GetChatMessage()
local name, standing, minReputation, maxReputation, currentReputation, factionID = GetWatchedFactionInfo();
local friendLevel, friendThreshold, nextFriendThreshold = select(7, GetFriendshipReputation(factionID));
-- local friendLevel, friendThreshold, nextFriendThreshold = select(7, GetFriendshipReputation(factionID));
local reputationInfo = C_GossipInfo.GetFriendshipReputation(factionID);
local friendLevel = reputationInfo.standing;
local friendThreshold = reputationInfo.reactionThreshold;
local nextFriendThreshold = reputationInfo.nextThreshold;


local standingText = "";
local isCapped = false;
local hasRewardPending = false;
local paragonLevel = 0;

if(friendLevel) then
if(friendLevel > 0) then
standingText = friendLevel;
if(not nextFriendThreshold) then
isCapped = true;
Expand Down Expand Up @@ -268,14 +277,18 @@ function module:GetBarData()
local name, standing, minReputation, maxReputation, currentReputation, factionID = GetWatchedFactionInfo();
data.id = factionID;

local friendLevel, friendThreshold, nextFriendThreshold = select(7, GetFriendshipReputation(factionID));

-- local friendLevel, friendThreshold, nextFriendThreshold = select(7, GetFriendshipReputation(factionID));
local reputationInfo = C_GossipInfo.GetFriendshipReputation(factionID);
local friendLevel = reputationInfo.standing;
local friendThreshold = reputationInfo.reactionThreshold;
local nextFriendThreshold = reputationInfo.nextThreshold;

local standingText = "";
local isCapped = false;
local hasRewardPending = false;
local paragonLevel = 0;

if(friendLevel and not nextFriendThreshold) then
if(friendLevel ~= 0 and not nextFriendThreshold) then
isCapped = true;
elseif(standing == MAX_REPUTATION_REACTION) then
isCapped = true;
Expand Down Expand Up @@ -433,7 +446,10 @@ function module:GetRecentReputationsMenu()

local factionIndex = module:GetReputationID(name);
local _, _, standing, _, _, _, _, _, isHeader, isCollapsed, hasRep, isWatched, isChild, factionID = GetFactionInfo(factionIndex);
local friend_level = select(7, GetFriendshipReputation(factionID));
-- local friend_level = select(7, GetFriendshipReputation(factionID));
local friend_level = C_GossipInfo.GetFriendshipReputation(factionID).standing;


local standing_text = "";

if(not isHeader or hasRep) then
Expand Down Expand Up @@ -469,7 +485,12 @@ function module:GetReputationProgressByFactionID(factionID)
local isCapped = false;
local isParagon = false;

local friendLevel, friendThreshold, nextFriendThreshold = select(7, GetFriendshipReputation(factionID));
-- local friendLevel, friendThreshold, nextFriendThreshold = select(7, GetFriendshipReputation(factionID));
local reputationInfo = C_GossipInfo.GetFriendshipReputation(factionID)
local friendLevel = reputationInfo.standing
local friendThreshold = reputationInfo.reactionThreshold
local nextFriendThreshold = reputationInfo.nextThreshold

if(friendLevel) then
if(not nextFriendThreshold) then
isCapped = true;
Expand Down Expand Up @@ -504,10 +525,13 @@ function module:GetReputationsMenu()
local numFactions = GetNumFactions();
while factionIndex <= numFactions do
local name, _, standing, _, _, _, _, _, isHeader, isCollapsed, hasRep, isWatched, isChild, factionID = GetFactionInfo(factionIndex);
local friendLevel = nil;
local standingText = "";
if(name) then
local progressText = "";
if(factionID) then
local currentRep, nextThreshold, isCapped, isParagon = module:GetReputationProgressByFactionID(factionID);
friendLevel = C_GossipInfo.GetFriendshipReputation(factionID).standing
if(isParagon) then
standing = standing + 1;
end
Expand All @@ -517,8 +541,8 @@ function module:GetReputationsMenu()
end
end

local friendLevel = select(7, GetFriendshipReputation(factionID));
local standingText = "";
-- local friendLevel = select(7, GetFriendshipReputation(factionID));


if(not isHeader or hasRep) then
if(friendLevel) then
Expand Down