Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function(event, ...)
- -- Player is not in listed dungeons
- 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
- if event == "UPDATE_MOUSEOVER_UNIT" then
- -- Unit is player
- if UnitIsPlayer("mouseover") then if aura_env.config.debug then print("|cFFFF0000DEBUG : |r|cFFFFFFFFMOUSEOVER IS A PLAYER|r") end return end
- -- Unit is marked
- if GetRaidTargetIndex("mouseover") ~= nil then if aura_env.config.debug then print("|cFFFF0000DEBUG : |r|cFFFFFFFFUNIT HAS MARK|r") end return end
- -- Grabbing some variables
- local guid, npcID = UnitGUID("mouseover"), tonumber((select(6, strsplit("-", UnitGUID("mouseover")))))
- local markID
- -- Does the npcID exist in our table?
- if aura_env.npcTable[aura_env.instanceInfo][npcID] then
- if aura_env.npcTable[aura_env.instanceInfo][npcID].force ~= nil then
- markID = aura_env.npcTable[aura_env.instanceInfo][npcID].force
- else
- for i = 1, 8, 1 do
- if not aura_env.marks[i].active then
- markID = i
- break
- end
- end
- end
- if not markID then return end
- -- Sets active to TRUE
- aura_env.marks[markID].active = true
- -- Sets guid to marked mobs guid
- aura_env.marks[markID].guid = guid
- -- Set lastupdate to this time
- aura_env.marks[markID].lastupdate = GetTime()
- local msg = ("SET_MARK:"..markID..":"..guid)
- SetRaidTarget("mouseover", markID)
- -- Send a CHAT_MSG_ADDON EVENT
- C_ChatInfo.SendAddonMessage("MPAM_EVENT", msg, "PARTY")
- -- SETMARK : X : ICON : ACTIVE_TRUE : [NPCID]
- if aura_env.config.debug then print("|cFFFF0000SETMARK :|cFFFFFFFF "..markID.. " : "..ICON_LIST[markID].."0:|t : ACTIVE_"..tostring(aura_env.marks[markID].active).." : ["..npcID.."]") end
- else
- if aura_env.config.debug then print("|cFFFF0000DEBUG : |r["..UnitName("mouseover").."] : ["..npcID.."]|cFFFFFFFF : NOT IN NPCTABLE|r") end return
- end
- end
- if event == "PLAYER_ENTERING_WORLD" or event == "WORLD_MAP_UPDATE" then
- local _, _, _, _, _, _, _, instanceID = GetInstanceInfo()
- aura_env.instanceInfo = instanceID
- if aura_env.conf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement