TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ Step_QuickHeal()

void Terraria.GameContent.ChromaHotkeyPainter.Step_QuickHeal ( )
inlineprivate

Definition at line 487 of file ChromaHotkeyPainter.cs.

488 {
489 //IL_0061: Unknown result type (might be due to invalid IL or missing references)
490 //IL_0066: Unknown result type (might be due to invalid IL or missing references)
491 //IL_006c: Unknown result type (might be due to invalid IL or missing references)
492 //IL_0072: Unknown result type (might be due to invalid IL or missing references)
493 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
494 //IL_007e: Unknown result type (might be due to invalid IL or missing references)
495 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
496 //IL_0085: Unknown result type (might be due to invalid IL or missing references)
497 //IL_0150: Unknown result type (might be due to invalid IL or missing references)
498 //IL_00ea: Unknown result type (might be due to invalid IL or missing references)
499 //IL_00ef: Unknown result type (might be due to invalid IL or missing references)
500 //IL_0135: Unknown result type (might be due to invalid IL or missing references)
501 //IL_013a: Unknown result type (might be due to invalid IL or missing references)
502 PaintKey healKey = _healKey;
504 {
505 healKey.SetClear();
506 _quickHealAlert = 0;
507 }
508 else if (_player.potionDelay > 0)
509 {
510 float lerpValue = Utils.GetLerpValue(_player.potionDelayTime, 0f, _player.potionDelay, clamped: true);
511 Color solid = Color.Lerp(PainterColors.DangerKeyBlocked, PainterColors.QuickHealCooldown, lerpValue) * lerpValue * lerpValue * lerpValue;
512 healKey.SetSolid(solid);
513 _quickHealAlert = 0;
514 }
516 {
517 healKey.SetClear();
518 _quickHealAlert = 0;
519 }
520 else if ((float)_player.statLife <= (float)_player.statLifeMax2 / 4f)
521 {
522 if (_quickHealAlert != 1)
523 {
524 _quickHealAlert = 1;
525 healKey.SetAlert(Color.Black, PainterColors.QuickHealReadyUrgent, -1f, 2f);
526 }
527 }
528 else if ((float)_player.statLife <= (float)_player.statLifeMax2 / 2f)
529 {
530 if (_quickHealAlert != 2)
531 {
532 _quickHealAlert = 2;
533 healKey.SetAlert(Color.Black, PainterColors.QuickHealReadyUrgent, -1f, 2f);
534 }
535 }
536 else
537 {
538 healKey.SetSolid(PainterColors.QuickHealReady);
539 _quickHealAlert = 0;
540 }
541 }
int statLifeMax2
The maximum health this player can have, adjusted by buffs and equipment.
Definition Player.cs:2092
int statLife
The current health of this player. Capped at F:Terraria.Player.statLifeMax2. If you increase this v...
Definition Player.cs:2102
Item QuickHeal_GetItemToUse()
Definition Player.cs:5967
int potionDelayTime
Definition Player.cs:2989

References Terraria.GameContent.ChromaHotkeyPainter._healKey, Terraria.GameContent.ChromaHotkeyPainter._player, Terraria.GameContent.ChromaHotkeyPainter._quickHealAlert, Terraria.GameContent.ChromaHotkeyPainter.PainterColors.DangerKeyBlocked, Terraria.Player.DeadOrGhost, Terraria.Utils.GetLerpValue(), Terraria.Player.potionDelay, Terraria.Player.potionDelayTime, Terraria.Player.QuickHeal_GetItemToUse(), Terraria.GameContent.ChromaHotkeyPainter.PainterColors.QuickHealCooldown, Terraria.GameContent.ChromaHotkeyPainter.PainterColors.QuickHealReady, Terraria.GameContent.ChromaHotkeyPainter.PainterColors.QuickHealReadyUrgent, Terraria.Player.statLife, and Terraria.Player.statLifeMax2.

Referenced by Terraria.GameContent.ChromaHotkeyPainter.Update().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: