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

Lezárt
megnyitva ekkor: 3 éve image által · 8 hozzászólás
image hozzászólt 3 éve
Még nincs tartalom.
image hozzászólt 3 éve
Közreműködő

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 hozzászólt 3 éve
Közreműködő

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 hozzászólt 3 éve
Közreműködő

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 hozzászólt 3 éve
Közreműködő

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 hozzászólt 3 éve
Közreműködő

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 hozzászólt 3 éve
Közreműködő

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 hozzászólt 3 éve
Közreműködő

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 hozzászólt 3 éve
Közreműködő
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 hivatkozott erre a hibajegyre egy commit-ban ekkor: 3 éve
image lezárta ekkor: 3 éve
Jelentkezzen be hogy csatlakozhasson a beszélgetéshez.
Töltés...
Mégse
Mentés
Még nincs tartalom.