Asterisk
1
Вклад в тег
GetAmmoFromInventory(CurrentAmmo.AmmoType, Qt);
void ANCGRangeWeapon::GetAmmoFromInventory(TSubclassOf<ANCGAmmo> ItemType, int32& AmmoCount) {
ANCGBaseCharacter* CharOwner = Cast<ANCGBaseCharacter>(this->GetOwner());
CharOwner->StorageComponent->GetAmmoByType(ItemType, AmmoCount);
}
void UNCGStorageComponent::GetAmmoByType_Implementation(TSubclassOf<ANCGAmmo> ItemToSearch, int32& Quantity)
{
if (ItemToSearch == nullptr) {
Quantity = 0;
return;
}
const auto Item = Cast<ANCGBaseItem>(ItemToSearch->GetDefaultObject());
for (ANCGBaseItem* CurrentItem : StorageItems)
{
if (CurrentItem->GetClass() == Item->GetClass()) {
Quantity = CurrentItem->Count;
}
}
}
add action=src-nat chain=srcnat dst-address=192.168.0.93 dst-port=5000 protocol=tcp src-address=192.168.0.0/24 to-addresses=192.168.0.253