Hello please i need help into fixing a script
hello i have a script for defensive stance aura for warrior using UNIT_AURA the script it was working before fine and also now but since blizzard change UNIT_AURA recently the script its load load load non stop alot of memory please help me
|
I can't see anything that would cause this code to continuously consume memory. The new table payload of UNIT_ARUA will cause a temporary increase until it is garbage collected.
Code:
stance:RegisterEvent("UNIT_AURA", "player") Code:
stance:RegisterUnitEvent("UNIT_AURA", "player") |
Quote:
|
frame:RegisterEvent will send the event for all units (it will ignore the "player" parameter).
If you want to register an event for a particular unit (or units) you need to use frame:RegisterUnitEvent Code:
local stance = CreateFrame("Frame") |
Quote:
|
The UNIT_AURA event can now come with table where it didn't before. The tables will take up memory until they are cleaned up by the garbage collector.
The more often UNIT_AURA fires, the more chance there will be more tables. |
My answer after lunch.
Try using GetPlayerAuraBySpellID instead.
Replacing: Lua Code:
Lua Code:
|
All times are GMT -6. The time now is 10:54 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI