Post by Moongaze on Apr 6, 2007 6:38:27 GMT -5
So, for the Lunar Sphere addon, I wanted to make a module that will handle the localization of drinks, foods, mounts, etc. that the user might have and want to set up. After some debate, I decided to NOT go with pre-made lists of items (like the stuff you find in ACE) because, honestly ... if you're not using all of that data, it's taking up space. Plus, whenever a new item comes out (expansions, content updates, or you just MISSED an item), you have to update the source code and release it again.
My idea revolves around grabbing some generic data from the server (such as, Refreshing Spring Water? That casts the spell "Drink" ... and ALL drinks cast that spell, unless it's PVP drink or Alterac Valley drink). Using that data, you can search every item in your inventory. If the item casts the same spell, it's a type of item (i.e., a drink) and you add the item's name (which is localized when you pass the item's link to the server for more info) to a list that's made at run time. This makes it so the list is small, and takes up the room it needs for whatever you actually HAVE.
The same rules can apply to mounts as well. From what I've been able to track, all mounts have a ItemLevel and ItemMinLevel that are exactly the same. They are also classified as "Misc" and the item level is 20 or higher (level 20 mount is the Turtle mount from the card game). So, if you find items that have those qualities, they're mounts! I tested it with several types of mounts, even PVP mounts and special mounts, and it came up the same.
So, this will be a HUGE advantage in my addon, as there will be less to upkeep =)
My idea revolves around grabbing some generic data from the server (such as, Refreshing Spring Water? That casts the spell "Drink" ... and ALL drinks cast that spell, unless it's PVP drink or Alterac Valley drink). Using that data, you can search every item in your inventory. If the item casts the same spell, it's a type of item (i.e., a drink) and you add the item's name (which is localized when you pass the item's link to the server for more info) to a list that's made at run time. This makes it so the list is small, and takes up the room it needs for whatever you actually HAVE.
The same rules can apply to mounts as well. From what I've been able to track, all mounts have a ItemLevel and ItemMinLevel that are exactly the same. They are also classified as "Misc" and the item level is 20 or higher (level 20 mount is the Turtle mount from the card game). So, if you find items that have those qualities, they're mounts! I tested it with several types of mounts, even PVP mounts and special mounts, and it came up the same.
So, this will be a HUGE advantage in my addon, as there will be less to upkeep =)