# Player Has Reward
Grammar — Player p Has Reward reward
Flags —Native
|Function
# Arguments
int
— Playerstring
<gamelink::Reward> — Reward
Returns — bool
native bool PlayerHasReward(int inPlayer, string inReward);
# Related
Category: Player / Player Settings
- Modify Player Property (Integer) —
void
— PlayerModifyPropertyInt - Modify Player Property (Real) —
void
— PlayerModifyPropertyFixed - Player Property (Integer) —
int
— PlayerGetPropertyInt - Player Property (Real) —
fixed
— PlayerGetPropertyFixed - Modify Player Score (Integer) —
void
— PlayerScoreValueSetFromInt - Modify Player Score (Real) —
void
— PlayerScoreValueSetFromFixed - Player Score Value (Integer) —
int
— PlayerScoreValueGetAsInt - Player Score Value (Real) —
fixed
— PlayerScoreValueGetAsFixed - Turn Player Flag On/Off —
void
— PlayerSetState - Player Flag Check —
bool
— PlayerGetState - Player License Check —
bool
— PlayerHasLicense - Player Access Check —
bool
— PlayerHasAccessTo - Player Has Reward —
bool
— PlayerHasReward - Player Has Talent —
bool
— PlayerHasTalent - Name Of Player —
text
— PlayerName - Handle Of Player —
string
— PlayerHandle - Race Of Player —
string
<gamelink::Race> — PlayerRace - Hero Of Player —
string
<gamelink::Hero> — PlayerHero - Skin Of Player —
string
<gamelink::Skin> — PlayerSkin - Mount Of Player —
string
<gamelink::Mount> — PlayerMount - Spray Of Player —
string
<gamelink::Spray> — PlayerSpray - Artifact Of Player —
string
<gamelink::Artifact> — PlayerArtifact - Artifact Rank Of Player —
int
— PlayerArtifactRank - Commander Of Player —
string
<gamelink::Commander> — PlayerCommander - Commander Level Of Player —
int
— PlayerCommanderLevel - Commander Mastery Level Of Player —
int
— PlayerCommanderMasteryLevel - Commander Mastery Talent Rank Of Player —
int
— PlayerCommanderMasteryTalentRank - Commander Selected Prestige Of Player —
int
— PlayerCommanderSelectedPrestige - Brutal Plus Difficulty of Player —
int
— PlayerBrutalPlusDifficulty - Retry Mutation Index of Player —
int
— PlayerRetryMutation - Allied Commander Enemy Wave Type —
int
— PlayerACEnemyWaveType - Start Location Of Player —
point
— PlayerStartLocation - Controller Of Player —
int
<preset::PlayerController> — PlayerType - Status Of Player —
int
<preset::PlayerStatus> — PlayerStatus - Set Player Color —
void
— PlayerSetColorIndex - Set Player Race —
void
— PlayerSetRace - Set Player Hero —
void
— PlayerSetHero - Set Player Skin —
void
— PlayerSetSkin - Set Player Console Skin —
void
— PlayerSetConsoleSkin - Apply Player Skin —
void
— PlayerApplySkin - Apply Player Skin (Replacing Existing Unit) —
void
— libNtve_gf_PlayerApplySkinReplacingExistingUnit - Set Player Mount —
void
— PlayerSetMount - Set Player Spray —
void
— PlayerSetSpray - Set Player Commander —
void
— PlayerSetCommander - Set Player Commander Level —
void
— PlayerSetCommanderLevel - Set Player Commander Mastery Level —
void
— PlayerSetCommanderMasteryLevel - Set Player Death Timer —
void
— PlayerSetDeathTimer - Set Player Bounds —
void
— PlayerSetBounds - Add Player Talent —
void
— PlayerAddTalent - Remove Player Talent —
void
— PlayerRemoveTalent - Add Player Response —
void
— PlayerAddResponse - Remove Player Response —
void
— PlayerRemoveResponse - Clear Player Response —
void
— PlayerClearResponse - Player Color —
int
<playercolor> — PlayerGetColorIndex - Override Player Option —
void
— PlayerOptionOverride - Player Hotkey Profile —
string
— PlayerGetHotkeyProfile - Player Property Changed —
void
— TriggerAddEventPlayerPropChange - Player Joins Game —
void
— TriggerAddEventPlayerJoin - Player Leaves Game —
void
— TriggerAddEventPlayerLeft - Triggering Player —
int
— EventPlayer - Triggering Player Property —
int
<preset::Player_Property_Get> — EventPlayerProperty - Triggering Player Property Change (Integer) —
int
— EventPlayerPropertyChangeInt - Triggering Player Property Change (Real) —
fixed
— EventPlayerPropertyChangeFixed - Player Add Label —
void
— PlayerAddLabel - Player Remove Label —
void
— PlayerRemoveLabel - Player Remove All Labels —
void
— PlayerRemoveAllLabels - Player Has Label —
bool
— PlayerHasLabel - Player Add Reward —
void
— PlayerAddReward
# Examples
mods/heroesdata.stormmod — base.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.stormmod — base.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.stormmod — base.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.stormmod — base.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.sc2mod — base.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.sc2mod — base.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.sc2mod — base.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)));