opening additional merc slots

This commit is contained in:
xjeris 2026-04-07 10:30:34 -04:00
parent 6fb5a102f5
commit 8eafc8bc7d
2 changed files with 12 additions and 1 deletions

@ -1 +1 @@
Subproject commit b9aeec6eaf3d5610503439b4fae3581d9aff08e8
Subproject commit 4dfe1be74e684acca19ac1cf96cce0df9eac2a2d

View File

@ -5611,6 +5611,17 @@ uint8 Client::GetNumberOfMercenaries()
return count;
}
int Client::GetFirstFreeMercSlot()
{
int max_slots = std::min(RuleI(Mercs, MaxMercSlots), MAXMERCS);
for (int slot_id = 0; slot_id < max_slots; slot_id++) {
if (m_mercinfo[slot_id].mercid == 0) {
return slot_id;
}
}
return -1;
}
void Merc::SetMercData( uint32 template_id ) {
MercTemplate* merc_template = zone->GetMercTemplate(template_id);