#231 (neatz) need a function to grey out items in merchant inventories

已关闭
image3 年之前创建 · 8 条评论
image 评论于 3 年之前
这个人很懒,什么都没留下。
image 评论于 3 年之前
协作者

this is item_difficulty (GetArrowColor) on the SendBuyMerchantList

probably should have done this as part of the buy item changes lol

Neatz can you give more context, why are we greying them out? Is it the item thats always grey for everyone, is the merchant greying for one player?

this is item_difficulty (GetArrowColor) on the SendBuyMerchantList probably should have done this as part of the buy item changes lol Neatz can you give more context, why are we greying them out? Is it the item thats always grey for everyone, is the merchant greying for one player?
neatz09 评论于 3 年之前
协作者

well like linguists/trainers are a few examples linguist if you have the language greys out the item and buy button and displays red text(screenshot 1)

trainers get out the spell but display blue text and buy button still works(screenshot 2

well like linguists/trainers are a few examples linguist if you have the language greys out the item and buy button and displays red text(screenshot 1) trainers get out the spell but display blue text and buy button still works(screenshot 2
image 评论于 3 年之前
协作者

we need a different way to look at the languages cause we don't know what language a book item represents.

Either we have a new DB column for the language that is applicable or we support a new lua function that does the check for us based on the item script.

we need a different way to look at the languages cause we don't know what language a book item represents. Either we have a new DB column for the language that is applicable or we support a new lua function that does the check for us based on the item script.
neatz09 评论于 3 年之前
协作者

gonna say lua here as i was dickin around i also found like shady swashbuckler that has restrictions on his vendor inventory(per item) depending if you had completed certain quests or not.

gonna say lua here as i was dickin around i also found like shady swashbuckler that has restrictions on his vendor inventory(per item) depending if you had completed certain quests or not.
image 评论于 3 年之前
协作者

DwarvenLanguagePrimer.lua:

function item_difficulty(Item, Spawn)
	return 3
end

the return is based on the arrow colors

#define ARROW_COLOR_GRAY 0 // 3
#define ARROW_COLOR_GREEN 1 // 1
#define ARROW_COLOR_BLUE 2
#define ARROW_COLOR_WHITE 3 // 3
#define ARROW_COLOR_YELLOW 4 // 4
#define ARROW_COLOR_ORANGE 5 // 5
#define ARROW_COLOR_RED 6

I only know gray, white and red work. Cant' say the others would.

Side note: WE SHOULD NEVER REMOVE/DELETE ITEM THRU ITEM_DIFFICULTY! We send the master list item via the buy back panel, so it would be a big no no to try to delete the master item from memory (this is to save trouble instantiating the item + tracking it in memory over time).

![https://cdn.discordapp.com/attachments/380808849722048525/822077855889621052/unknown.png](https://cdn.discordapp.com/attachments/380808849722048525/822077855889621052/unknown.png) DwarvenLanguagePrimer.lua: ``` function item_difficulty(Item, Spawn) return 3 end ``` the return is based on the arrow colors ``` #define ARROW_COLOR_GRAY 0 // 3 #define ARROW_COLOR_GREEN 1 // 1 #define ARROW_COLOR_BLUE 2 #define ARROW_COLOR_WHITE 3 // 3 #define ARROW_COLOR_YELLOW 4 // 4 #define ARROW_COLOR_ORANGE 5 // 5 #define ARROW_COLOR_RED 6 ``` I only know gray, white and red work. Cant' say the others would. Side note: WE SHOULD NEVER REMOVE/DELETE ITEM THRU ITEM_DIFFICULTY! We send the master list item via the buy back panel, so it would be a big no no to try to delete the master item from memory (this is to save trouble instantiating the item + tracking it in memory over time).
image 评论于 3 年之前
协作者

the you already know this language or already scribed this defined on the item, need to identify where those are. However that would be on the item itself and not the merchant.

the you already know this language or already scribed this defined on the item, need to identify where those are. However that would be on the item itself and not the merchant.
image 评论于 3 年之前
协作者

got you have already scribed this item.. working and also requiring previous tier

https://cdn.discordapp.com/attachments/684934458738212962/822931033044418701/scribestatus.mp4

RULE_INIT(R_Spells, RequirePreviousTierScribe, "0"); // requires step up apprentice -> apprentice (handcrafted?) -> journeyman (handcrafted?) -> adept -> expert -> master
got you have already scribed this item.. working and also requiring previous tier https://cdn.discordapp.com/attachments/684934458738212962/822931033044418701/scribestatus.mp4 RULE_INIT(R_Spells, RequirePreviousTierScribe, "0"); // requires step up apprentice -> apprentice (handcrafted?) -> journeyman (handcrafted?) -> adept -> expert -> master
image 评论于 3 年之前
协作者
function item_description(Item, Spawn)
	return "You already know this language."
end

``` function item_description(Item, Spawn) return "You already know this language." end ``` ![](https://cdn.discordapp.com/attachments/684934458738212962/823156622623899658/unknown.png)
image 在代码提交 3 年之前 中引用了该工单
image3 年之前 关闭
登录 并参与到对话中。
正在加载...
取消
保存
这个人很懒,什么都没留下。