Skip to content

Instantly share code, notes, and snippets.

@StinkyTwitch
Last active August 29, 2015 14:10
Show Gist options
  • Save StinkyTwitch/70d2284fa2e6b4aad0ae to your computer and use it in GitHub Desktop.
Save StinkyTwitch/70d2284fa2e6b4aad0ae to your computer and use it in GitHub Desktop.
PE r10 Update for "ground" and "mouseover.ground" issues
-- Current r10 starting at Line 103
function UnitID(target)
local guid = UnitGUID(target)
if guid then
local type, zero, server_id, instance_id, zone_uid, npc_id, spawn_uid = strsplit("-", guid)
if type == "Player" then return tonumber(ServerID) end
if npc_id then return tonumber(npc_id) end
end
return false
end
-- Change to the following at Line 103
function UnitID(target)
if not target then return false end
local guid = UnitGUID(target)
if guid then
local type, zero, server_id, instance_id, zone_uid, npc_id, spawn_uid = strsplit("-", guid)
if type == "Player" then return tonumber(ServerID) end
if npc_id then return tonumber(npc_id) end
end
return false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment