MCPcopy Create free account
hub / github.com/Phobos-developers/Phobos / GetSuperWeaponIndex

Method GetSuperWeaponIndex

src/Ext/BuildingType/Body.cpp:16–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14}
15
16int 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
31int BuildingTypeExt::ExtData::GetSuperWeaponIndex(const int index) const
32{

Callers 1

HasSuperWeaponMethod · 0.80

Calls 3

FindMethod · 0.45
IsAvailableMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected