mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-05-01 18:19:20 +02:00
fix broken amulet infinity charges when bought from npc because the data was set to -1 while createItem accepts only unsigned ints
This commit is contained in:
parent
ba7d981b7d
commit
3b4dcabfea
@ -883,7 +883,7 @@ void BehaviourDatabase::checkAction(const NpcBehaviourAction* action, Player* pl
|
||||
} while (amount);
|
||||
} else {
|
||||
for (int32_t i = 0; i < std::max<int32_t>(1, amount); i++) {
|
||||
Item* item = Item::CreateItem(itemId, data);
|
||||
Item* item = Item::CreateItem(itemId, data == -1 ? 0 : data);
|
||||
if (!item) {
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user