Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
→ WoW API
Returns true if the first unit can cooperate with the second, false otherwise.
- String unit1, String unit2
- unit1, unit2
- name of the units as string, also valid are "player" for the current player, "target" for the current target
- Boolean cancooperate
- true if the first unit can cooperate with the second, nil otherwise
if ( UnitCanCooperate("player", "target") ) then AddFriend(UnitName("target")); else StaticPopup_Show("ADD_FRIEND"); end
Adds the target to the friends list, if the target can be added to the friends list. Shows the add friend dialog otherwise.
- Returns true if the first unit can cooperate with the second, false otherwise.