Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.
p3lim edited this page Aug 8, 2012 · 5 revisions

oUF_Friendship displays the player’s current standing with the target npc as a statusbar.

Optional sub-elements

Tags

A few basic tags are included:

  • [curfriendship] – Current reputation with npc
  • [currawfriendship] – Raw (full) reputation with npc
  • [perfriendship] – Percentage of current reputation with npc
  • [perfullfriendship] – Percentage of full reputation with npc
  • [friendshipstanding] – Current friendship standing with npc

Tooltip

A simple but detailed tooltip to show more information about your standing with each NPC.

Supported callbacks/hooks

  • Friendship.Override(self, event)
  • Friendship.PostUpdate(Friendship, currentStanding)

Notes

- Remember to set the plug-in as an optional dependency for the layout

Example

-- Position and size
local Friendship = CreateFrame('StatusBar', nil, self)
Friendship:SetPoint('BOTTOM', 0, -50)
Friendship:SetHeight(20)
Friendship:SetWidth(200)

-- Enable the tooltip
Friendship.Tooltip = true

-- Text display
local Value = Reputation:CreateFontString(nil, 'OVERLAY')
Value:SetAllPoints(Friendship)
Value:SetFontObject(GameFontHighlight)
self:Tag(Value, '[friendshipstanding] - [curfriendship] / 8400')

-- Add a background
local bg = Friendship:CreateTexture(nil, 'BACKGROUND')
bg:SetAllPoints(Friendship)
bg:SetTexture[[Interface\ChatFrame\ChatFrameBackground]]

-- Register it with oUF
self.Friendship = Friendship
Clone this wiki locally