SHARE
TWEET

Untitled

Vudak Mar 21st, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function(event, ...)
  2.     -- Player is not in listed dungeons
  3.     if not aura_env.npcTable[aura_env.instanceInfo] then if aura_env.config.debug then print("|cFFFF0000DEBUG : |r|cFFFFFFFFPLAYER NOT IN BFA INSTANCE|r") end return end
  4.     if event == "UPDATE_MOUSEOVER_UNIT" then
  5.         -- Unit is player
  6.         if UnitIsPlayer("mouseover") then if aura_env.config.debug then print("|cFFFF0000DEBUG : |r|cFFFFFFFFMOUSEOVER IS A PLAYER|r") end return end
  7.         -- Unit is marked
  8.         if GetRaidTargetIndex("mouseover") ~= nil then if aura_env.config.debug then print("|cFFFF0000DEBUG : |r|cFFFFFFFFUNIT HAS MARK|r") end return end
  9.         -- Grabbing some variables
  10.         local guid, npcID = UnitGUID("mouseover"), tonumber((select(6, strsplit("-", UnitGUID("mouseover")))))
  11.         local markID
  12.         -- Does the npcID exist in our table?
  13.         if aura_env.npcTable[aura_env.instanceInfo][npcID] then
  14.             if aura_env.npcTable[aura_env.instanceInfo][npcID].force ~= nil then
  15.                 markID = aura_env.npcTable[aura_env.instanceInfo][npcID].force
  16.             else
  17.                 for i = 1, 8, 1 do
  18.                     if not aura_env.marks[i].active then
  19.                         markID = i
  20.                         break
  21.                     end
  22.                 end
  23.             end
  24.             if not markID then return end
  25.             -- Sets active to TRUE
  26.             aura_env.marks[markID].active = true
  27.             -- Sets guid to marked mobs guid
  28.             aura_env.marks[markID].guid = guid
  29.             -- Set lastupdate to this time
  30.             aura_env.marks[markID].lastupdate = GetTime()
  31.             local msg = ("SET_MARK:"..markID..":"..guid)
  32.             SetRaidTarget("mouseover", markID)
  33.             -- Send a CHAT_MSG_ADDON EVENT
  34.             C_ChatInfo.SendAddonMessage("MPAM_EVENT", msg, "PARTY")
  35.             -- SETMARK : X : ICON : ACTIVE_TRUE : [NPCID]
  36.             if aura_env.config.debug then print("|cFFFF0000SETMARK :|cFFFFFFFF "..markID.. " : "..ICON_LIST[markID].."0:|t : ACTIVE_"..tostring(aura_env.marks[markID].active).." : ["..npcID.."]") end
  37.         else
  38.             if aura_env.config.debug then print("|cFFFF0000DEBUG : |r["..UnitName("mouseover").."] : ["..npcID.."]|cFFFFFFFF : NOT IN NPCTABLE|r") end return
  39.         end
  40.     end
  41.     if event == "PLAYER_ENTERING_WORLD" or event == "WORLD_MAP_UPDATE" then
  42.         local _, _, _, _, _, _, _, instanceID = GetInstanceInfo()
  43.         aura_env.instanceInfo = instanceID
  44.         if aura_env.conf
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top