Open Vlek opened 10 months ago
Looking into this more because I think it's going to be helpful when I review the prices before modifying them to be more sensible.
Was having a hard time figuring out how to leverage the current way that the server code is calculating what things are being bought for.
It appears that vendors have a list of lists of item groups that they are willing to buy. These lists are broken up into groups, such as SBPoleArms or SBCarpenter (I'm guessing for wood working tools and containers). After confirming that an item is on one of these lists, and then does a GetSellPrice on the item taking into consideration begging and merchantile skills.
Looks like we can bypass all of this however and use GenericSalesInfo and use GetSalesPriceFor on it?
If we then wish to show this price that is calculated, we need to add it to the item's list of onhover items. This is done in the GetProperties call which appears to be done in the base classes for the different item types. We would need an integer that references a cliloc(?) string and then we can pass in the integer value for the price .ToString'd as the second parameter.
I do not know if I want it to appear first or last. Guessing first after the name?
I got this working, but the problem is that it's being serialized at some point, so it wouldn't work with my current game save:
Also, I am fairly certain it's breaking other things, too. Trying to start a brand new world save causes no mobiles.
Also, I am fairly certain it's breaking other things, too. Trying to start a brand new world save causes no mobiles.
This may be due to something else. I am continuing to research.
Also, I am adding to the requirement that this only be available to the user IF they have a prerequisite amount of skill.
For weapons, I'm thinking 60 base skill of Arms Lore is required.
In order for this to work, the GenericSellInfo tables would either need to be read in every time someone wants to read the properties of an item, OR:
As part of my overhaul of the item pricing structure in #75, I would also like to have it so that the algorithm that is used to generate an item's cost is also used to give the player the value of the item on hover.
The reason why this is good is because it then gives the player more information before they have to go visit a vendor to see what the buy/sell rate of the item is.
This I think would be especially useful in a dungeon when a player has multiple items, and, if all they are worried about is the cost of the items, they know whether to bring or drop one item versus another to maximize the amount of gold that they get per run.
This is also kinda a feature that exists across almost all MMOs and RPGs at this point. This I feel is just bringing us forward to ten years ago, not even toward the current day.