vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
Hi, i added boost attribute to tfs 1.5 8.6 (this: Adding features from #998 by nekiro · Pull Request #2807 · otland/forgottenserver (https://github.com/otland/forgottenserver/pull/2807/files) )
And now when monster attacking me server got crash
(i don't have items with boost attributes only with manaleech, without any item it not crashing)
Btw manaleech working and before not crashing server, only after added boost attributes
Im runing it by visual studio to get log, and it sending me here:
And now when monster attacking me server got crash
(i don't have items with boost attributes only with manaleech, without any item it not crashing)
Btw manaleech working and before not crashing server, only after added boost attributes
Im runing it by visual studio to get log, and it sending me here:
Code:
if (Player* attackerPlayer = attacker->getPlayer()) {
for (int32_t slot = CONST_SLOT_FIRST; slot <= CONST_SLOT_LAST; ++slot) {
if (!attackerPlayer->isItemAbilityEnabled(static_cast<slots_t>(slot))) {
continue;
}
Item* item = attackerPlayer->getInventoryItem(static_cast<slots_t>(slot));
if (!item) {
continue;
}
const uint16_t boostPercent = item->getBoostPercent(combatType);
if (boostPercent != 0) {
damage += std::round(damage * (boostPercent / 100.));
}
}
}