View Single Post
03-17-21, 05:08 AM   #1
millanzarreta
A Deviate Faerie Dragon
 
millanzarreta's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2010
Posts: 11
Question Any easy way to detect that pvp talents are active?

Hi!

I thought it would be easy, but I can't find any way to detect if PvP talents are active or not, is there any way or function to detect this?

From what I have tested, the logic that PvP talents follow is:
- Always active in instantiated PvP zones (arena, BGs, brawls)
- Never active in instantiated PvE zones (dungeons, raids, scenarios, ...)
- Always active in Free for All PvP areas of the world (regardless of the selected war mode)
- Always active in the open world when you have War Mode On
- In the open world with War Mode Off, PvP talents are deactivated, but if you enter PvP combat they are activated, and they are deactivated again after a while

Based on the above, a certain logic can be built to detect if PvP talents are available or not. But the last point is the most problematic since even without War Mode you can activate PvP to enter combat with other players (it can be activated manually, or it also remains activated for 5 minutes when you deactivate WarMode in a city ).

I have tested the IsSpellKnown function to detect if an ability is known, but the result is always "false" even if you have selected it and with war mode on, and even if this is an active spell and not a passive spell. I have also tested the IsSpellUsable function, but the result is always "true".

The GetPvpTalentInfoByID(talentId) function gives information about whether you have the selected talent or not, but not whether it is active or not at a certain time. And something similar for the GetPvpTalentSlotInfo(slot) function.

The UnitIsPVP("player") function is the closest thing I know of, but it doesn't work either, since it only tells you if the player is marked for PvP, but this does not necessarily mean that they have active PvP talents. For example, you are flagged for PvP in hostile zones even if you have war mode off.

What do you think is the best way to detect that you have active PvP talents? Is there an easy way to detect it or do you have to check in which area you are and in some cases also check if you have the PvP Mode On or Off?

Last edited by millanzarreta : 03-17-21 at 05:10 AM.
  Reply With Quote