Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function emote_handler(emote)
- if emote == "BITE"
- race, _ = UnitRace("target")
- sex = UnitSex("target")
- name = UnitName("target")
- count,_,_,_ = unpack(BiteDatabase[name] or {0,nil,nil,nil})
- count = count + 1
- BiteDatabase[name] = {count, name, race, sex}
- end
- end
- hooksecurefunc("DoEmote", emote_handler)
- local f = CreateFrame("Frame")
- f:RegisterEvent("ADDON_LOADED")
- f:RegisterEvent("PLAYER_ENTERING_WORLD")
- f:SetScript("OnEvent", function(self, event, ...)
- self[event](self, ...)
- end)
- function f:ADDON_LOADED(name)
- if name == addon then
- BITER_DB = BITER_DB or {}
- DB = BITER_DB
- end
- end
- function f:PLAYER_ENTERING_WORLD()
- PlayerName = UnitName("player")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement