Manigold
Well-Known Member
- Joined
- Nov 2, 2017
- Messages
- 202
- Solutions
- 9
- Reaction score
- 54
Hello , i'm using tfs 1.2 downgraded to 8.0 by ninja (ninjalulz/forgottenserver (https://github.com/ninjalulz/forgottenserver/tree/8.0) ) and i was having a problem with runes inside containers TFS 1.X+ - tfs 1.2 runes on container (https://otland.net/threads/tfs-1-2-runes-on-container.262139/)
i fixed this problem by adding this:
&& !item->isRune() on container.cpp in this part:
But now i'm facing another problem ,if i move a rune with 100 charges to a container that have, for example 5 free spaces , instead of moving the rune with 100 charges, a rune with 5 charges is created on container ( the charges of the moved runes are always the same number of free spaces of container).
Someone can help me with this please ?![Folded hands :pray: 🙏](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f64f.png)
i fixed this problem by adding this:
&& !item->isRune() on container.cpp in this part:
C++:
ReturnValue Container::queryMaxCount(int32_t index, const Thing& thing, uint32_t count,
uint32_t& maxQueryCount, uint32_t flags) const
{
const Item* item = thing.getItem();
if (item == nullptr) {
maxQueryCount = 0;
return RETURNVALUE_NOTPOSSIBLE;
}
if (hasBitSet(FLAG_NOLIMIT, flags)) {
maxQueryCount = std::max<uint32_t>(1, count);
return RETURNVALUE_NOERROR;
}
int32_t freeSlots = std::max<int32_t>(capacity() - size(), 0);
if (item->isStackable() && !item->isRune()) {
uint32_t n = 0;
But now i'm facing another problem ,if i move a rune with 100 charges to a container that have, for example 5 free spaces , instead of moving the rune with 100 charges, a rune with 5 charges is created on container ( the charges of the moved runes are always the same number of free spaces of container).
Someone can help me with this please ?
![Folded hands :pray: 🙏](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f64f.png)