Recent Topics

Ads

Detaunt Helper - Lack of targeting functionality

Here you can post addons, or anything related to addons.
Forum rules
Before posting on this forum, be sure to read the Terms of Use
agarantia
Posts: 2

Detaunt Helper - Lack of targeting functionality

Post#1 » Thu May 12, 2016 8:41 pm

So, did anyone managed to get the "click on the list to target" functionality to work? IIRC, you could click on the top name of the list to target.

I'm extremely rusty in my coding skills, but looking at the mod's code, it seems that functionality is not actually there.

You can macro DetauntHelper.TargetTop():

Code: Select all

function DetauntHelper.TargetTop()
    local LL = DetauntHelper.GetTargetList();
    if #LL>0 then
        local target_name = LL[1].name;
        DTHCommon.Print(DHLang.GetString(DHStrings.TARGET_MSG)..StringToWString(target_name));
        DetauntHelper.TargetPlayer(target_name);
    end
end
Nothing weird there, get the list, get the first name on the list and a call for another function - DetauntHelper.TargetPlayer(target_name).

Code: Select all

function DetauntHelper.TargetPlayer(playerName)
  DetauntHelper.DetauntTargetName = playerName;
  if DetauntHelper.CurrentTargetName == DetauntHelper.DetauntTargetName then
      if DHSLocal["SoundOn"] then
         PlaySound(DHSLocal["TargetAcquiredSound"]);
      end
  end
  SystemData.UserInput.ChatText = towstring("/target "..playerName)
  BroadcastEvent(SystemData.Events.SEND_CHAT_TEXT)
end
It takes the first name on the list from .TargetTop() as an argument, assign the value at DetauntHelper.DetauntTargetName and does a conditional which if positive means the current target is the same as the one at the top of the list. Ok, I'd imagine it should also have a false result, an else, that switches the target to the one you clicked or the one a the top.


Again, i'm very rusty so most likely I must have missed something.

Ads
User avatar
sullemunk
Addon Developer
Posts: 1213

Re: Detaunt Helper - Lack of targeting functionality

Post#2 » Thu May 12, 2016 8:47 pm

it tries to utilize the /target command wich is not implemented yet..
Image
Image Ethreal   Image Corque   Image Urgiz   Image Loxley   Image Chilli   Image Maduza

agarantia
Posts: 2

Re: Detaunt Helper - Lack of targeting functionality

Post#3 » Sun May 15, 2016 6:11 am

Well, that explains it...

Perhaps it is possible to do something with WindowSetGameActionData. Need to find some documentation of the API, if that even existed. Thanks for the info.

User avatar
wargrimnir
Head Game Master
Posts: 8282
Contact:

Re: Detaunt Helper - Lack of targeting functionality

Post#4 » Sun May 15, 2016 6:27 am

/target was actually removed by Mythic a long time ago because of addons like this. I wouldn't expect it to be enabled on our server either.
Image
[email protected] for exploits and cheaters.
grimnir.me Some old WAR blog

Who is online

Users browsing this forum: No registered users and 32 guests