• 0
Seravy

Consumables in favorites

Question

I've discovered that no matter how many times I put my Blue Gemstones into the favorites tab, they keep going back to to the etc tab soon after.

The reason seems to be very simple - whether something has been moved to the tab or not is stored in the item itself. Once I use up the gemstones and refill them from a shop or storage, they are new gemstones so they server won't remember they were set to be in the favorites tab. This is a problem especially because I changed my storeall and gstoreall commands to not store favorites, and use those to clean my inventory from loot but even otherwise, the point of the favorites tab is to have the items you need to keep in your inventory at all time separated. Gems, potions, arrows, quivers, etc are definitely those kinds of items.

So I request a way to PERMANENTLY store an item on the favorites tab, even if it's consumable and gets used up. Normally I'd do it myself but I'm pretty sure this requires adding a new database field or table and storing the favorites there, and I have no idea whatsoever how to do that. Basically, if something that isn't an equipment is set to a favorite, the item ID+char ID pair should be stored in a separate database table, and restored from there whenever a new instance of the matching item is placed into the inventory. (In case of equipment, they won't ever leave your inventory in the first place, and they are unique pieces, so the existing system is perfect for them.)

I don't know how this works on official - so this might actually be a bug, or might not, but it's certainly a missing, critically useful feature even if not a bug.

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
1 hour ago, Seravy said:

I've discovered that no matter how many times I put my Blue Gemstones into the favorites tab, they keep going back to to the etc tab soon after.

The reason seems to be very simple - whether something has been moved to the tab or not is stored in the item itself. Once I use up the gemstones and refill them from a shop or storage, they are new gemstones so they server won't remember they were set to be in the favorites tab. This is a problem especially because I changed my storeall and gstoreall commands to not store favorites, and use those to clean my inventory from loot but even otherwise, the point of the favorites tab is to have the items you need to keep in your inventory at all time separated. Gems, potions, arrows, quivers, etc are definitely those kinds of items.

So I request a way to PERMANENTLY store an item on the favorites tab, even if it's consumable and gets used up. Normally I'd do it myself but I'm pretty sure this requires adding a new database field or table and storing the favorites there, and I have no idea whatsoever how to do that. Basically, if something that isn't an equipment is set to a favorite, the item ID+char ID pair should be stored in a separate database table, and restored from there whenever a new instance of the matching item is placed into the inventory. (In case of equipment, they won't ever leave your inventory in the first place, and they are unique pieces, so the existing system is perfect for them.)

I don't know how this works on official - so this might actually be a bug, or might not, but it's certainly a missing, critically useful feature even if not a bug.

SQL table + source...

take a loot at item hotkey ...

it's save in sql table and read from ...(i dont know what reads from it thou)

may be you can find something there...

Edited by utofaery

Share this post


Link to post
Share on other sites
  • 0

why so complicated ?

 src/map/pc.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 5aace7ecb..f13aa90c3 100755
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -4595,6 +4595,9 @@ char pc_additem(struct map_session_data *sd,struct item *item,int amount,e_log_p
 		if (!itemdb_isstackable2(id) || id->flag.guid)
 			sd->inventory.u.items_inventory[i].unique_id = item->unique_id ? item->unique_id : pc_generate_unique_id(sd);
 
+		if ( item->nameid == 717 )
+			sd->inventory.u.items_inventory[i].favorite = 1;
+
 		clif_additem(sd,i,amount,0);
 	}
 

any character pick up, gets a blue_gemstone(717), is automatically put into favorite tab

Share this post


Link to post
Share on other sites
  • 0

Oh, you mean I should hardcode it into the source? Yeah that could work but I need to make it different based on class... priests will need their blue gems, but alchemists need their stems, fabrics and bombs instead, every class uses different stuff. And it can be well over a dozen items for some, like archers need all the arrow types and quivers.

Doable of course, but it's seems to actually take more time and effort that way than making the SQL table...

Share this post


Link to post
Share on other sites
  • 0
On 2/11/2019 at 11:11 AM, utofaery said:

SQL table + source...

take a loot at item hotkey ...

it's save in sql table and read from ...(i dont know what reads from it thou)

may be you can find something there...

Thanks, searching for hotkey was a good idea, was able to find all the relevant SQL parts through that. So far only tested on my GM account but my implementation seems to work correctly. If no bugs surface in the next few days, I'll consider posting it in source releases.

Edited by Seravy

Share this post


Link to post
Share on other sites
  • 0
On 2/12/2019 at 10:52 AM, Seravy said:

Oh, you mean I should hardcode it into the source? Yeah that could work but I need to make it different based on class... priests will need their blue gems, but alchemists need their stems, fabrics and bombs instead, every class uses different stuff. And it can be well over a dozen items for some, like archers need all the arrow types and quivers.

Doable of course, but it's seems to actually take more time and effort that way than making the SQL table...

Sql means more process needed in action.

Client -> Server -> SQL -> Server -> Client

source means 

Client -> Server -> Client

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now