Download
(19Kb)
Download
Updated: 09-18-09 04:20 PM
Pictures
File Info
Updated:09-18-09 04:20 PM
Created:04-28-09 11:42 PM
Downloads:4,709
Favorites:54
MD5:

AddFriend

Version: 3.27
by: fyrye, Gorilivann

AddFriend is a simple extension of the default context menu for players that will add "Add/Remove Friend" and "Guild Invite/Guild Remove".

How it works:
It checks to see if the player you right click on is currently in your friends list, and displays the proper option to add or remove them.
If you are in a guild and have permissions to invite new members it will also check to see if that player is in your guild and display the proper options to invite or remove them.

It will work on Unit frames, such as Raid/Party/Target as well as any text based context menu, such as the chat frame, who window, guild window, and friends list.

This is the finalized version for WoW 3.2x no new features are planned at this time. And will only be updated as needed for newer versions of WoW, or be removed when WoW integrates it into their own UI.

Release 3.27 | fyrye | 9/18/2009 5:19pm CST | 4 lines
Changed paths:
M /trunk/.pkgmeta
M /trunk/AddFriend.lua
M /trunk/AddFriend.toc
M /trunk/embeds.xml

AddFriend: Release 3.27
Removed LibFriend and LibGuild dependencies
Added local checks for isGuildee and isFriend
Further optimized syntax and local scope
------------------------------------------------------------------------

3.26 | fyrye | 9/17/2009 5:40pm CST
Changed paths:
M /trunk/AddFriend.lua
M /trunk/AddFriend.toc

AddFriend:
Added self awareness to non-unit frames
Condensed code to 66 lines from 100
Removed comments
Fixed scope on local functions
Removed unneeded variables and functions
------------------------------------------------------------------------

3.25r | fyrye | 8/27/2009 | 9:26pm CST
Changed paths:
M /trunk/AddFriend.lua
M /trunk/AddFriend.toc

AddFriend:
Reverted back to ShowMenu hook
*Fixes Set Focus issue
*Breaks Ordering
*Still does Player and Hostility Check
*Still works with Pitbull4 Unit Frames
Added Coloring for Add/Remove options
Added Newbie tooltips
______________________________________________

3.23b - 8/27/2009 | 5:54pm CST

Added CallbackHandler-1.0
Removed AceEvents-3.0
Optimized OnDisable
Updated pkgmeta, toc, embeds
Added a hack to disable SET_FOCUS
Added Fix for "unit" on button click

______________________________________________
3.21b - 8/27/2009 | 2:12pm CST

Optimized Button Creation
Fix non-player unit frame checking (chat/friends/who and other textual menus)
______________________________________________
3.2b - 08/26/2009 | 10:26pm CST

Completely changed hook methodology
*Now Creates UnitPopUp Buttons
*SecureHooks UnitPopup_HideButtons()
*SecureHooks UnitPopUp_OnClick(self)
Added hostility check ala bliz
Added support for Pitbull4 Unit Frames
Buttons now checks for current player
Buttons are now sorted by Index
Optimized dependencies
Added embeds.xml
______________________________________________
3.0a - 4/29/2009 | 7:30pm CST
Guild Support
InGuild Detection
CanInvite Detection
CanUnInvite Detection
Guild Invite and Guild Remove
______________________________________________
Push via SVN
Updating 3.0a with guild invite/remove tonight
______________________________________________
2.0a
Support friend detection
Support unit name detection
______________________________________________
1.0a Initial Commit
Optional Files (0)


Post A Reply Comment Options
Unread 08-28-09, 04:25 AM  
Banur
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 7
File comments: 137
Uploads: 5
*thumbs*
Report comment to moderator  
Reply With Quote
Unread 08-27-09, 08:43 PM  
fyrye
A Chromatic Dragonspawn
 
fyrye's Avatar
AddOn Author - Click to view AddOns

Forum posts: 188
File comments: 31
Uploads: 2
3.25r Released
Reverted to hook ShowMenu since it doesnt require the firing of UnitPopupMenus_OnClick

Added Coloring (Green for Adds, Red for Removes)
Added Newbie Tooltips
Still works with Pitbull 4
Still has Hostility Checking for players of the opposing faction.

Updated images to reflect current release.
__________________
Always
Report comment to moderator  
Reply With Quote
Unread 08-27-09, 07:08 PM  
xtoq
An Aku'mai Servant
 
xtoq's Avatar
AddOn Author - Click to view AddOns

Forum posts: 32
File comments: 642
Uploads: 4
For the set focus issue, you can simply bind a keybinding in the default Blizzard keybinding menu. If you use the key when you don't have a target, it will clear your focus. Just a helpful hint for people to know; I personally use shift+. (period) because it isn't used for anything else.
__________________
There is absolutely no evidence to support the theory that life is serious.
Report comment to moderator  
Reply With Quote
Unread 08-27-09, 05:11 PM  
fyrye
A Chromatic Dragonspawn
 
fyrye's Avatar
AddOn Author - Click to view AddOns

Forum posts: 188
File comments: 31
Uploads: 2
Updated.
For now I'm hiding the original Set Focus button, since it is a protected function by Blizzard.
It's the only way to not throw an error since it hooks the ButtonOnclick function.

Sorry AlicanC,
Next release (3.25r) I will be reverting it back to the original way "After Cancel" later tonight or tomorrow, since it was less obtrusive, and still allows for Set Focus to work.
__________________
Always
Last edited by fyrye : 08-27-09 at 05:14 PM.
Report comment to moderator  
Reply With Quote
Unread 08-27-09, 04:40 PM  
fyrye
A Chromatic Dragonspawn
 
fyrye's Avatar
AddOn Author - Click to view AddOns

Forum posts: 188
File comments: 31
Uploads: 2
Originally posted by the_agent_1
Message: ...\AddOns\AddFriend\libs\AceEvent-3.0\AceEvent-3.0.lua:18: Cannot find a library instance of "CallbackHandler-1.0".
Time: 08/28/09 00:01:32
Count: 1
Stack: [C]: ?
[C]: in function `error'
Interface\AddOns\AddFriend\libs\LibStub\LibStub.lua:23: in function `GetLibrary'
...\AddOns\AddFriend\libs\AceEvent-3.0\AceEvent-3.0.lua:18: in main chunk

Locals: self = <table> {
NewLibrary = <function> defined @Interface\AddOns\AddFriend\libs\LibStub\LibStub.lua:11
minors = <table> {
}
minor = 2
IterateLibraries = <function> defined @Interface\AddOns\AddFriend\libs\LibStub\LibStub.lua:28
GetLibrary = <function> defined @Interface\AddOns\AddFriend\libs\LibStub\LibStub.lua:21
libs = <table> {
}
}
major = "CallbackHandler-1.0"
silent = nil

Thanks, I have a working version of it now to bypass that, will upload soon.

I have 2 options at this point, Set Focus is protected.
So with AddFriend enabled, and you click Set Focus, WoW Blocks it because I'm hooking UnitPopup_OnClick
Which when you click Set Focus, it calls UnitPopup_OnClick then my function is called, which checks to see which button you pressed.
When WoW discovers that you pressed Set Focus an error is thrown.
So I can do away with the ordering to provide that functionality, or Hide the Set Focus/Clear Focus buttons.
__________________
Always
Last edited by fyrye : 08-27-09 at 04:40 PM.
Report comment to moderator  
Reply With Quote
Unread 08-27-09, 04:03 PM  
the_agent_1
A Murloc Raider

Forum posts: 4
File comments: 28
Uploads: 0
Message: ...\AddOns\AddFriend\libs\AceEvent-3.0\AceEvent-3.0.lua:18: Cannot find a library instance of "CallbackHandler-1.0".
Time: 08/28/09 00:01:32
Count: 1
Stack: [C]: ?
[C]: in function `error'
Interface\AddOns\AddFriend\libs\LibStub\LibStub.lua:23: in function `GetLibrary'
...\AddOns\AddFriend\libs\AceEvent-3.0\AceEvent-3.0.lua:18: in main chunk

Locals: self = <table> {
NewLibrary = <function> defined @Interface\AddOns\AddFriend\libs\LibStub\LibStub.lua:11
minors = <table> {
}
minor = 2
IterateLibraries = <function> defined @Interface\AddOns\AddFriend\libs\LibStub\LibStub.lua:28
GetLibrary = <function> defined @Interface\AddOns\AddFriend\libs\LibStub\LibStub.lua:21
libs = <table> {
}
}
major = "CallbackHandler-1.0"
silent = nil


list of addons:
ActionBarSaver: enabled
AddFriend: enabled
AfterCast: enabled
AlphaMap: enabled
AltClickToAddItem: enabled
AuctionLite: enabled
Auto-Bag: enabled
AutoRes: enabled
AvgItemLevel: enabled
bc_ActionBarDrag: enabled
BearCatTreeOwl: enabled
BigWigs_Extras: enabled
BigWigs_Naxxramas: enabled
BigWigs_Northrend: enabled
BigWigs_Plugins: enabled
BigWigs_Coliseum: enabled
BigWigs_Ulduar: enabled
BigWigs: enabled
CancelAuc: enabled
cError: enabled
nochatframe: enabled
CleanHotKey: enabled
Clique: enabled
CowTip: enabled
Crossdresser: enabled
CT_BottomBar: enabled
CT_Core: enabled
CT_PartyBuffs: enabled
CT_UnitFrames: enabled
DamnAchievementSpam: enabled
DamnAchievements: enabled
!DamnBlizzardErrorFrame: enabled
DamnQuestIcons: enabled
DamnWintergraspSpam: enabled
DamnZoneText: enabled
DemocraticReadyCheck: enabled
DruidTrackDisable: enabled
DualSpeccer: enabled
eCastingBar: enabled
EquipSetUpdater: enabled
Examiner: enabled
Fizzle: enabled
FizzleInventory: enabled
GFW_Linkerator: enabled
FriendColor: enabled
GreedBeacon: enabled
HideLooted: enabled
linkicon: enabled
LittleWigs_Coldarra: enabled
LittleWigs_Dalaran: enabled
LittleWigs_Dragonblight: enabled
LittleWigs_Howling_Fjord: enabled
LittleWigs_Stratholme: enabled
LittleWigs_Storm_Peaks: enabled
LittleWigs_Zul'Drak: enabled
LittleWigs: enabled
MagicTargets: enabled
MozzFullWorldMap: enabled
Nameplates: enabled
NugEnergy: enabled
OhNoesQueues: enabled
OmniCC: enabled
OmniCC_Options: enabled
Overachiever: enabled
Overachiever_Tabs: enabled
PartySpotter: enabled
!!PatchFix: enabled
PerfectRaid: enabled
PerfectRaid_IncHeal: enabled
PerfectRaid_QuickHealth: enabled
PerfectRaid_Resurrection: enabled
PhanxChat: enabled
Portfolio: enabled
RaidTracker: enabled
RangeColors: enabled
RatingBuster: enabled
RepairGear: enabled
RoguePowerBars: enabled
SellJunk: enabled
Shake: enabled
SimpleMarker: enabled
SimpleDruidBar: disabled
Skada: enabled
SkadaDamage: enabled
SkadaDispels: enabled
SkadaHealing: enabled
SkadaThreat: enabled
SpamageMeters: enabled
!StopTheSpam: enabled
SuperDuperMacro: enabled
TCCheck: enabled
teksLoot: enabled
TTell: enabled
TweakWoW: enabled
UnitFrameBuffs: enabled
WrongButtonGoAway: enabled
XLootMaster: enabled
XLoot: enabled
leafLFG: enabled
Report comment to moderator  
Reply With Quote
Unread 08-27-09, 12:55 PM  
fyrye
A Chromatic Dragonspawn
 
fyrye's Avatar
AddOn Author - Click to view AddOns

Forum posts: 188
File comments: 31
Uploads: 2
Originally posted by the_agent_1
whatever you've done since releasing the latest version... since then AddFriend crashes nearly everything :P by which I mean a lot of other addons put out errors too... if I disable AddFriend everything works as intended =(
Which addons do you use?
What type of errors are you receiving.
When exactly do you get the errors?
What Language is your client?
I run 314 different addons with AddFriend with out issues.

All AddFriend does..
StartUP - Creates Buttons for use for each frame
Securely hooks the HideButtons and button onclick event on the Popups from bliz. (secure hook means the process is run prior to anything I do whcih avoids taints and corruption of the default WoW actions)
Then inserts them to each of the frames already existing tables.
On Menu popup decides if those buttons are hidden or not.
Then on button click determines which you click and runs the appropriate command for the unit.

It uses the same methods as Bliz.

The only issues it may have is if you use a custom unit frames that arent supported in which case the buttons wouldn't show.
Sounds more like you may be using outdated addons or library files where mine are using the latest Ace3 Libraries, which could break any Ace3 reliant addons.

I optimized the code a bit, which shouldn't have any major impact, fixed the checking for the textual menu entries.
Give 3.21b a shot and let me know
__________________
Always
Last edited by fyrye : 08-27-09 at 01:20 PM.
Report comment to moderator  
Reply With Quote
Unread 08-27-09, 08:37 AM  
the_agent_1
A Murloc Raider

Forum posts: 4
File comments: 28
Uploads: 0
whatever you've done since releasing the latest version... since then AddFriend crashes nearly everything :P by which I mean a lot of other addons put out errors too... if I disable AddFriend everything works as intended =(
Report comment to moderator  
Reply With Quote
Unread 08-26-09, 06:01 PM  
fyrye
A Chromatic Dragonspawn
 
fyrye's Avatar
AddOn Author - Click to view AddOns

Forum posts: 188
File comments: 31
Uploads: 2
Originally posted by AlicanC
It shows "Add Friend" and "Guild Invite" options for Alliance players in Argent Tournament Grounds, because they are not actually "hostile" and are not attackable there. Maybe checking if the "Whisper" option available would be a better idea since all "whisperable" players will also be invitable and can be added to friends list.

I also want to suggest a new order of the items like this:
Whisper
Add to Friends List / Remove from Friends List
Inspect
Invite
Invite to Guild / Remove from Guild (Hidden if no permissions to invite/kick)
This order and naming seemed more official-like to me.
I've added Hostile checking using UnitCanCooperate which is also how blizzard determines if you can whisper a player or not

As well added the items as you described,

PlayerName
Whisper
Add Friend / Remove Friend
Inspect
Invite
Guild Invite / Guild Remove (If you're in a guild and have the ability to invite/remove)

As well I added support for Pitbull4 Unit frames.
Still testing out Raid Window/Party Window.
Should have 3.2b released sometime tonight
__________________
Always
Report comment to moderator  
Reply With Quote
Unread 08-15-09, 01:28 PM  
AlicanC
A Kobold Labourer

Forum posts: 0
File comments: 21
Uploads: 0
It shows "Add Friend" and "Guild Invite" options for Alliance players in Argent Tournament Grounds, because they are not actually "hostile" and are not attackable there. Maybe checking if the "Whisper" option available would be a better idea since all "whisperable" players will also be invitable and can be added to friends list.

I also want to suggest a new order of the items like this:
Whisper
Add to Friends List / Remove from Friends List
Inspect
Invite
Invite to Guild / Remove from Guild (Hidden if no permissions to invite/kick)
This order and naming seemed more official-like to me.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: