Fabi Marzan
Well-Known Member
- Joined
- Aug 31, 2020
- Messages
- 141
- Solutions
- 7
- Reaction score
- 74
Greetings as always, I have a problem that does not show the text when the value of the attribute is 0, I added the Tier attribute in the items, but apparently when I set it to 0, it does not show me the Tier text.
Add in sources in item.ccp
But when placing in attribute
Basically does not show the text
Just so you know, if it works if I put it in 1 or another number
Any idea what it could be? I would be grateful for the help
EDIT:
In fact, I put it like this:
But then it shows me on all items, when they don't even have the attribute
Add in sources in item.ccp
Lua:
// Show Classification and Tier on item
uint32_t classification = item ? item->getClassification() : it.classification;
uint32_t tier = item ? item->getTier() : it.tier;
if (classification) {
s << "\nClassification: " << classification;
}
if (tier) {
if (tier >= 0) {
s << " Tier " << tier;
}
}
But when placing in attribute
Code:
<attribute key="tier" value="0"/>
Basically does not show the text
Just so you know, if it works if I put it in 1 or another number
Any idea what it could be? I would be grateful for the help
EDIT:
In fact, I put it like this:
Lua:
// Show Classification and Tier on item
uint32_t classification = item ? item->getClassification() : it.classification;
uint32_t tier = item ? item->getTier() : it.tier;
if (classification) {
s << "\nClassification: " << classification;
}
if (tier >= 0) {
s << " Tier: " << tier;
}
But then it shows me on all items, when they don't even have the attribute
Last edited: