Fixed mob drop index calculation

Thanks to @pigati23
This commit is contained in:
Lemongrass3110 2021-04-16 01:46:53 +02:00
parent f378f24f17
commit 7a1ea09eb1

View File

@ -4201,7 +4201,14 @@ const std::string MobDatabase::getDefaultLocation() {
bool MobDatabase::parseDropNode(std::string nodeName, YAML::Node node, uint8 max, s_mob_drop *drops) {
const YAML::Node &dropNode = node[nodeName];
uint16 i = 0;
uint16 i;
// Find first empty spot
for( i = 0; i < max; i++ ){
if( drops[i].nameid == 0 ){
break;
}
}
for (const YAML::Node &dropit : dropNode) {
uint16 index;