Originally Posted by Masteroshi430
Show the code if you want some help then.
|
NiceT = {
}
NiceT.name = "NiceT"
function NiceT.Initialize()
d("Thanks for using NiceT!")
NiceT.ZN = GetUnitZone("player") --just trying
d(NiceT.ZN)
EVENT_MANAGER:RegisterForEvent(NiceT.name, EVENT_ZONE_CHANGED, NiceT.OnPlayerZoneChanged)
EVENT_MANAGER:RegisterForEvent(NiceT.name, EVENT_ZONE_UPDATE , NiceT.OnPlayerZoneU)
end
function NiceT.OnAddOnLoaded(event, addonName)
if addonName == NiceT.name then
NiceT.Initialize()
end
end
function NiceT.OnPlayerZoneChanged( eventCode, zoneName, subZoneName, newSubzone, zoneId, subZoneId)
d("HELLO2")
end
function NiceT.OnPlayerZoneU( eventCode, unitTag, newZoneName)
d("HELLO1")
end
EVENT_MANAGER:RegisterForEvent(NiceT.name, EVENT_ADD_ON_LOADED, NiceT.OnAddOnLoaded)