Terraria v1.4.4.9
Terraria source code documentation
All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events Macros

◆ CalculateExpirationTime()

int Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.CalculateExpirationTime ( int gameCacheTime,
int coinValue )
inlineprivate

Definition at line 161 of file CoinLossRevengeSystem.cs.

162 {
163 int num = 0;
164 num = ((coinValue < _expirationCompSilver) ? ((int)MathHelper.Lerp(0f, 3600f, Utils.GetLerpValue(_expirationCompCopper, _expirationCompSilver, coinValue))) : ((coinValue < _expirationCompGold) ? ((int)MathHelper.Lerp(36000f, 108000f, Utils.GetLerpValue(_expirationCompSilver, _expirationCompGold, coinValue))) : ((coinValue >= _expirationCompPlat) ? 432000 : ((int)MathHelper.Lerp(108000f, 216000f, Utils.GetLerpValue(_expirationCompSilver, _expirationCompGold, coinValue))))));
165 num += 18000;
166 return gameCacheTime + num;
167 }
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53

References Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._expirationCompCopper, Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._expirationCompGold, Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._expirationCompPlat, Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker._expirationCompSilver, Terraria.Utils.GetLerpValue(), and Microsoft.Xna.Framework.MathHelper.Lerp().

Referenced by Terraria.GameContent.CoinLossRevengeSystem.RevengeMarker.RevengeMarker().