pub struct RewardCtx<'a> {
pub character: Option<&'a CharacterState>,
pub last_claim_at: Option<u64>,
pub now: Option<u64>,
pub rng: Option<&'a GameRng>,
pub apply_afk_boost: bool,
pub config: &'a GameConfig,
pub lookups: &'a ContentLookups,
}Expand description
Inputs available to a bundle currency-step reward fn. The afk-claim call
site provides the claim window and a seeded RNG; the plain claim site
leaves them None.
Fields§
§character: Option<&'a CharacterState>§last_claim_at: Option<u64>Last-claim unix seconds (clamped >= 0) — afk accrual only.
now: Option<u64>Current unix seconds (clamped >= 0) — afk accrual only.
rng: Option<&'a GameRng>Seeded RNG — afk accrual only (seeded from character.afk_reward_seed).
apply_afk_boost: boolWhether a pending AFK ad charge may scale this accrual. Only the
ordinary claim path (and its preview) sets this: the charge is spent by
ClaimAfkReward alone and never amplifies an instant ad/Gem grant.
config: &'a GameConfig§lookups: &'a ContentLookupsAuto Trait Implementations§
impl<'a> Freeze for RewardCtx<'a>
impl<'a> RefUnwindSafe for RewardCtx<'a>
impl<'a> Send for RewardCtx<'a>
impl<'a> Sync for RewardCtx<'a>
impl<'a> Unpin for RewardCtx<'a>
impl<'a> UnwindSafe for RewardCtx<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more