| 14 | } |
| 15 | |
| 16 | int BuildingTypeExt::ExtData::GetSuperWeaponIndex(const int index, HouseClass* pHouse) const |
| 17 | { |
| 18 | auto idxSW = this->GetSuperWeaponIndex(index); |
| 19 | |
| 20 | if (auto pSuper = pHouse->Supers.GetItemOrDefault(idxSW)) |
| 21 | { |
| 22 | auto pExt = SWTypeExt::ExtMap.Find(pSuper->Type); |
| 23 | |
| 24 | if (!pExt->IsAvailable(pHouse)) |
| 25 | return -1; |
| 26 | } |
| 27 | |
| 28 | return idxSW; |
| 29 | } |
| 30 | |
| 31 | int BuildingTypeExt::ExtData::GetSuperWeaponIndex(const int index) const |
| 32 | { |
no test coverage detected