Quantcast
Download
(4 Kb)
Download
Updated: 04/24/20 07:47 AM
Pictures
File Info
Compatibility:
Harrowstorm (5.3.4)
Updated:04/24/20 07:47 AM
Created:03/08/20 07:16 PM
Monthly downloads:58
Total downloads:510
Favorites:1
MD5:
Forgetfulness Poison XI
Version: 1.1
by: ownedbynico [More]
Forgetfulness Poison XI

Reminds you to equip poisons or even automatically equips them for you.
If you encounter any bugs or want some specific features feel free to text me.
24.04.2020

- Performance changes
- Minor fixes
-----------
Optional Files (0)


Archived Files (1)
File Name
Version
Size
Uploader
Date
1.0
4kB
ownedbynico
03/08/20 07:16 PM


Post A Reply Comment Options
Unread 07/21/20, 12:26 PM  
sMuggle

Forum posts: 0
File comments: 44
Uploads: 0
Excellent addon, any way to set which bar to alert on? I only use poisons on back bar, but the alert sounds for both. Thanks!
Report comment to moderator  
Reply With Quote
Unread 04/24/20, 02:57 PM  
Shadowshire

Forum posts: 1
File comments: 321
Uploads: 0
Cool When to equip poison

From reading the discussion about whether the character is in combat, I am surprised that a poison can be equipped, and/or unequipped, during combat. Unless that has changed since, IIRC, when I attempted to equip a poison while combat was "in progress", the Host notified me that I could not do that.

Personally, I prefer to equip a poison only:
  1. When at least one or more NPC opponents, such as Nereids, are vulnerable to poison. So, when I see Nereids among the prospective combatants, then I usually equip a poison(s) on the weapon(s) before combat.
  2. When at least one or more NPC opponents, such as Giant Bats -?-, are invulnerable to, or receive reduced damage from, the readied weapon's enchantment. So, when I see Giant Bats among the prospective combatants, then I will either change the character's Frost enchanted weapon to a weapon with a different enchantment, or apply a poison to the weapon that is currently equipped instead.
I wish that I had a list of all of the MOBs which a character can encounter in combat, with notations as to which ones either are vulnerable to poison, or receive reduced damage from fire, frost, shock, or magic attacks. Then it could be incorporated into an add-on such as this one to notify the player that a specific poison is advisable, or even to automatically equip a pre-selected poison when that specific MOB is encountered.

This assumes, of course, that the character has a set of poisons in their Bags from which to select. If a configured poison is not avaliable, then a configured default would be applied instead. If no poisons remain, the player should be advised of that situation, and the add-on does nothing else.

That said, I do not engage in PvP combat in any context. I have no idea how poisons compare to the damage inflicted by enchantments when they are triggered.

By the way, are you familiar with the Greek myth of Pandora's Box?
__________________
---- Shadowshire ..... nil carborundum illegitimi
Last edited by Shadowshire : 04/24/20 at 03:00 PM.
Report comment to moderator  
Reply With Quote
Unread 03/10/20, 12:05 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3048
File comments: 3647
Uploads: 63
Understood the inCombat stuff. You could write it simply like this then:
Lua Code:
  1. inCombat = inCombat  or IsUnitInCombat("player")

At least the IsPlayerInRaid returns true for all others and the zone checks can be aborted for it then.
zone checks are done very often as there are also subzones which get triggered even if you are in the same zone.
And other addons also apply to this events very often so having less is better in total, if not needed.
Last edited by Baertram : 03/10/20 at 12:07 AM.
Report comment to moderator  
Reply With Quote
Unread 03/09/20, 05:08 PM  
ownedbynico
AddOn Author - Click to view AddOns

Forum posts: 4
File comments: 9
Uploads: 10
First of all: Thank you very much for your feedback.

Not sure if would make a performance difference but you could try to narrow the inventory items in your bag scan down to poisons only FIRST and then compar the itemlink.
I bet this will be a bit faster.
I changed this. It makes much more sense, didnt know u can filter things like if itemType == ITEM_TYPE_POISON then.

And your combat state event already provides the inCombat parameter, so no need to check it manually again:
I did this on purpose, so i can call FPXI.onCombatChange(_, _) everywhere. In FPXI.equipPoison() i use it to fire the event by hand and equip the poisons instantly. I changed it in some way. Im using the inCombat parameter and pass over IsUnitInCombat("player") if i want to equip poisons instantly.

Your zone change checks may be obsolete, not sure.
Because you could check the event_player_activated which will be fired as you ported into a dungeon, and in it's callback function use the API function IsPlayerInRaid() e.g. for the start.
IsPlayerInRaid() does not work for arenas. And i dont think its that much performance-hungry.

Add a reminder message ever x seconds (set from yaour settings) and do the check again then. If the poison is still missing remind again, or unregister the reminder then (or via your event_inventory_single_slot_update function etc.).
I dont think this will change much since im already checking it in FPXI.onInventoryChange().

You should add an event filter for it: https://wiki.esoui.com/AddFilterForEvent
e.g. the bagId, and another event filter for the update reason INVENTORY_UPDATE_REASON_DEFAULT
Else it wil lfire for each durability change, or weapon charge change as well!
I changed that one. Will boost performance quite a bit i guess.

The zone checks maybe only needed if you want to have a big amount of checks during running through the raid dungeons but the zoneId in total shouldn't switch in there anymore.
I use those to turn off features if the user is not in raid e.g.
Report comment to moderator  
Reply With Quote
Unread 03/09/20, 05:45 AM  
Baertram
 
Baertram's Avatar
AddOn Author - Click to view AddOns

Forum posts: 3048
File comments: 3647
Uploads: 63
Thanks for the addon.
Not sure if would make a performance difference but you could try to narrow the inventory items in your bag scan down to poisons only FIRST and then compar the itemlink.
I bet this will be a bit faster.

Something like this:
Lua Code:
  1. function FPXI.scanInventory(poisonType)
  2.  
  3.     for i = 1, GetBagSize(BAG_BACKPACK) do
  4.         local itemType = GetItemType(BAG_BAGPACK, i)
  5.         if itemType == ITEM_TYPE_POISON then
  6.            local itemLink = GetItemLink(BAG_BACKPACK, i, LINK_STYLE_DEFAULT)
  7.            if poisonType == itemLink then
  8.               return i
  9.            end
  10.         end
  11.     end
  12.  
  13.     return -1
  14. end

You could use the ESO profiler tool to check if it works faster or is just an additional check which slows it down. But as the itemlink comparison for EACH inventory item is a sring comparison it should be slower than "filtering" the itemtype on C side before (I guess).

And your combat state event already provides the inCombat parameter, so no need to check it manually again:
Lua Code:
  1. FPXI.onCombatChange(_, inCombat)
  2.     --if IsUnitInCombat("player") == false and
  3.         if not inCombat and ...
  4. ...
  5. end

Your zone change checks may be obsolete, not sure.
Because you could check the event_player_activated which will be fired as you ported into a dungeon, and in it's callback function use the API function IsPlayerInRaid() e.g. for the start.
Add a reminder message ever x seconds (set from yaour settings) and do the check again then. If the poison is still missing remind again, or unregister the reminder then (or via your event_inventory_single_slot_update function etc.).
-> Be carefull: This event, if registered, fires very often.
You should add an event filter for it: https://wiki.esoui.com/AddFilterForEvent
e.g. the bagId, and another event filter for the update reason INVENTORY_UPDATE_REASON_DEFAULT
Else it wil lfire for each durability change, or weapon charge change as well!

And then use your combat event callback function to set a missing poision as you start to get in combat or leave combat.

The zone checks maybe only needed if you want to have a big amount of checks during running through the raid dungeons but the zoneId in total shouldn't switch in there anymore.
I guess it also works and does more checks than needed.
Last edited by Baertram : 03/09/20 at 05:55 AM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: