Thread: Addon system bug reports My Addons: Easy Mail | Noshei's Gadget Templates | Gadget's: Stats | Gadget's: Currency Bar | Random Title
Have found a new problem/issue/question.
I want to detect when the player moves to a new zone, and this looks like it should do the trick:
However, it doesnt seem to work:Code:Event.Unit.Detail.Zone Event documentation: Signals a change in the unit's zone. Event.Unit.Detail.Zone(units) Parameters: units: Table of the units changed. Key is the unit ID, value is the new value, or "false" in place of nil.
This doesn't seem to fire - should it update for the player changing zone?Code:function RX.ZoneChange(t) print("ZoneChange") for k,v in pairs(t) do print(string.format("%s : %s", k, tostring(v))) end end table.insert(Event.Unit.Detail.Zone, { RX.ZoneChange, addon.identifier, "Event.Unit.Detail.Zone" })
Logged in - no sign of it
/reloadui - no sign of it
Take the portal from Sanctum to Argent Glade - no sign of it
Take the portal from Argent Glade to Zareph's Return - no sign of it
I can achieve what I want to with frequent checking of Inspect.Unit.Detail("player").zone, but in the interest of efficiency, only doing some checks etc when needed would be preferable.
From my quick tests it will only fire when the player actually changes zones through their own movement (the game moves you when you take a port).
This shouldn't really be an issue since you can do the inspect on Event.Unit.Availability.Full to get the updated information when the player takes a port.
My Addons: Easy Mail | Noshei's Gadget Templates | Gadget's: Stats | Gadget's: Currency Bar | Random Title
Ahh. I see... I can work w/ using those two - will do some testing - thanks!
Wish there was some consistency to when/which events get fired...
Taking a portal - no event on zone change
Taking a portal - get updates on 100s of achievements, many of which are complete years ago...
#395 There is, it's just a little obscure
Events fire when the thing they're referring to changes. In *most* cases, this includes "when the thing they're referring to loads". The Event.Unit.Detail.* events are a little different because if they fired when their target loads, they'd be spamming with potentially hundreds of events per frame in PvP situations as various units go in and out of scope. In those cases, they don't fire when the unit comes in and out of scope, they fire only when a unit in-scope has the element change.
Unfortunately, you'll never see that happen when using a porticulum. The reason is that the porticulum process goes like this:
* Unload the player from the client and inform the client that it should load a new zone, causing the client to go into Loadscreen mode
* Move the player
* Give the client all applicable information on units at its new location (including the player)
* Allow the client to leave its loading screen once everything is loaded
The result is that the player's position is moved *only when the client does not have information available about the player*. The further result is that the client doesn't have the ability to easily detect achievement changes, for example, mid-porticulum.
You'll notice that the player availability drops to "partial" during a porticulum transport, and when it comes back, the Achievement events fire and the player is in a new location. That's all fallout from the fact that the client simply does not have information on the player during that time.
tl;dr: if you want to use Event.Unit.Detail.*, you probably need to use Event.Unit.Availability.* as well.
Inspect.Zone.Detail(Inspect.Unit.Detail("player"). zone
This gives the zone ID for the zone -- which seems to be fine in most cases, except where the zone has multiple uses.
- Being in a Sliver, you get the zoneID of the zone holding the sliver (Droughtlands f/ex)
- Conquest: Stillmoor, you get the zoneID of the Stillmoor
- Chronicles, you get the zoneID of the main zone
Interestingly, Library of the Runemasters, shows Library, not HK.
The RiftTextField does not handle typing with keyboards other than ones using the Latin alphabet.
When I set Windows to use a Russian keyboard layout, I will type in the appropriate character set in for example the chat window (in the English client they will show up as square boxes, but that's a font issue).
However, when the focus is on any RiftTextField, I will be typing "normal" latin character set. Not a big issue for me personally, but this also happens on the Russian client. The only way you can enter Cyrillic characters in a RiftTextField is to paste something from the clipboard.
Another bug (or an oversight, bug Zorba already mentioned it should be working):
When using "HTML" text together with the link functionality, there is no way to include string constants in the Lua code to execute. I've tried using single quotes, but it gives me an error message.
Example HTML text:
Error message:Code:<a lua="Inspect.Addon.Detail('kAlert').data.someFunction(1,1)">Some Text</a>
I had already changed the parameters of the function I'm calling to numbers for this very reason, but now that I've refactored to use as few global variables as possible, this is becoming a problem again.Error: [string "Inspect.Addon.Detail("]:1: unexpected symbol near '<eof>'
In kAlert
stack traceback:
[C]: in function 'error'
For now I'll have to reintroduce a global variable for this function, but hopefully this rather severe limitation can be addressed.
#399 We'll have a fix for this in the next major patch.
Double-quotes ought to work, however, with the HTML property enclosed in single quotes:
Code:Command.Console.Display("general", false, "<a lua='Inspect.Addon.Detail(\"kAlert\").data.someFunction(1,1)'>Some Text</a>", true)
If a player is mid-resurrection sequence, they don't always receive Unit.Death events. (I believe from past research of seeing it happen in YouTube videos, it'll be the duration of the new "Partial" availability for .Player)
Is this avoidable?
If not, I'll think of yet another workaround. But currently it can throw out phase tracking. Obviously rare, but still annoying for some.
Rank 72 Guardian Mage
RotP 4/4 - DH 4/4 - GP 4/4 - GSB 5/5 - RoS 5/5 - HK 11/11 - ID 8/8
Several addon authors have noticed a gradual slowdown of the RIFT client while developing their software, all the while happily /reloadui'ing repeatedly.
You asked for a reproduction case; I think I've narrowed it down enough for the bug to be located.
I've created a simple addon that creates 1000 text frames and measures the time taken. It stores the result in SavedVariables. Next time you run it (after a /reloadui), you will see an increase.
Some comments with additional observations in the main.lua file of the addon (download)
Last edited by Thorarin; 07-27-2012 at 11:59 AM.
I noticed today that in some cases, text frames arent being created wide enough to hold the text.
The text is being populated with:
UIElements.rep.target:SetText(string.format("TARGE T: %s [%s]", d.tn, d.rn))
The textframe_normal image, is what this looks like in game. Notice the trailing square bracket is missing.
If I make the frame wider (note, prior to this there has been no SetWidth() performed on the frame, and its only SetPoint() is to pin its TOPLEFT to another frames BOTTOMLEFT.)
UIElements.rep.target:SetWidth(UIElements.rep.targ et:GetWidth()+128)
The textframe_extrawidth image shows what this looks like - the square bracket is visible.
If I follow this up with a
UIElements.rep.target:ClearWidth()
The results are in textframe_clearwidth - the square bracket is once again missing.
Event.Cursor is not passing any parameters when it is triggering even though it should have 2 parameters.
Code:Event.Cursor Event documentation: Signals that the cursor has changed. Event.Cursor(type, held) Parameters: type: The current cursor type. Valid values include "ability", "item", and "itemtype". held: The blob describing the new element held. Generally, some kind of identifier used in another part of the addon system.
My Addons: Easy Mail | Noshei's Gadget Templates | Gadget's: Stats | Gadget's: Currency Bar | Random Title
#404 My Addons: Easy Mail | Noshei's Gadget Templates | Gadget's: Stats | Gadget's: Currency Bar | Random Title
Bookmarks