# Player Has Reward

Grammar — Player p Has Reward reward
FlagsNative | Function

# Arguments

  • int — Player
  • string<gamelink::Reward> — Reward

Returns — bool

native bool PlayerHasReward(int inPlayer, string inReward);

Category: Player / Player Settings

# Examples

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:2340

    lv_itRotationReward = 0;
    for ( ; ( (auto1D5ED9EA_ai >= 0 && lv_itRotationReward <= auto1D5ED9EA_ae) || (auto1D5ED9EA_ai < 0 && lv_itRotationReward >= auto1D5ED9EA_ae) ) ; lv_itRotationReward += auto1D5ED9EA_ai ) {
        if ((PlayerHasReward(lp_player, (CatalogFieldValueGet(c_gameCatalogConfig, "Config", "FreeToPlayRewardArray[" + IntToString(lv_itRotationReward) + "]", lp_player))) == true)) {
            lv_heroRotationSlotsAvailable += 1;
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:2406

        lv_itRequiredReward = 1;
        for ( ; ( (auto7E5595FC_ai >= 0 && lv_itRequiredReward <= auto7E5595FC_ae) || (auto7E5595FC_ai < 0 && lv_itRequiredReward >= auto7E5595FC_ae) ) ; lv_itRequiredReward += auto7E5595FC_ai ) {
            if ((PlayerHasReward(lp_player, (CatalogFieldValueGet(c_gameCatalogHero, lv_heroID, "RequiredRewardArray[" + IntToString((lv_itRequiredReward - 1)) + "]", c_playerAny))) == false)) {
                return false;
            }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:2438

    lv_itRequiredReward = 1;
    for ( ; ( (auto699BFD32_ai >= 0 && lv_itRequiredReward <= auto699BFD32_ae) || (auto699BFD32_ai < 0 && lv_itRequiredReward >= auto699BFD32_ae) ) ; lv_itRequiredReward += auto699BFD32_ai ) {
        if ((PlayerHasReward(lp_player, (CatalogFieldValueGet(c_gameCatalogSkin, lv_skinID, "RequiredRewardArray[" + IntToString((lv_itRequiredReward - 1)) + "]", c_playerAny))) == false)) {
            return false;
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/HeroesLib.galaxy:2466

    lv_itRequiredReward = 1;
    for ( ; ( (auto7AC9FAB6_ai >= 0 && lv_itRequiredReward <= auto7AC9FAB6_ae) || (auto7AC9FAB6_ai < 0 && lv_itRequiredReward >= auto7AC9FAB6_ae) ) ; lv_itRequiredReward += auto7AC9FAB6_ai ) {
        if ((PlayerHasReward(lp_player, (CatalogFieldValueGet(c_gameCatalogMount, lv_mountLink, "RequiredRewardArray[" + IntToString((lv_itRequiredReward - 1)) + "]", c_playerAny))) == false)) {
            return false;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:7739

        lv_itReward = CatalogEntryGet(auto08666BD0_catalog, auto08666BD0_i);
        if ((CatalogEntryScope(c_gameCatalogReward, lv_itReward) == "CRewardVoicePack")) {
            if ((PlayerHasReward(lp_player, lv_itReward) == true)) {
                lv_rewardStringIDCombine = (((lv_itReward) + "_" + (libCOOC_gf_ActiveCommanderForPlayer(lp_player))));
                auto895D551D_catalog = c_gameCatalogReward;

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:7782

    for ( ; auto3F278324_i <= CatalogEntryCount(c_gameCatalogReward) ; auto3F278324_i += 1 ) {
        lv_itReward = CatalogEntryGet(auto3F278324_catalog, auto3F278324_i);
        if ((CatalogEntryScope(c_gameCatalogReward, lv_itReward) == "CRewardVoicePack") && (PlayerHasReward(lp_player, lv_itReward) == true) && (CatalogFieldValueGet(c_gameCatalogReward, lv_itReward, "VoicePack", c_playerAny) != "Default")) {
            return ;
        }

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:30111

        lv_itReward = CatalogEntryGet(autoA7A5BD22_catalog, autoA7A5BD22_i);
        if (((CatalogEntryScope(c_gameCatalogReward, lv_itReward) == "CRewardVoicePack") && (StringContains((lv_itReward), ("_" + (libCOOC_gf_ActiveCommanderForPlayer(1))), c_stringAnywhere, c_stringCase) == false))) {
            if ((PlayerHasReward(1, lv_itReward) == true)) {
                lv_rewardStringIDCombine = (((lv_itReward) + "_" + (libCOOC_gf_ActiveCommanderForPlayer(1))));
                TextExpressionSetToken("Param/Expression/lib_COMI_E45A8AE0", "A", StringToText((lv_itReward)));