v1.10.0
This commit is contained in:
parent
ae13d6a15c
commit
53917a8b4b
62 changed files with 2643 additions and 935 deletions
|
|
@ -47,7 +47,7 @@ namespace src.player.skills
|
|||
if (!victim.IsValid || !victim.PawnIsAlive || !skillInfo.CanUse) return;
|
||||
skillInfo.CanUse = false;
|
||||
skillInfo.Cooldown = DateTime.Now;
|
||||
RestoreHealth(victim, damage);
|
||||
SkillUtils.RestoreHealth(victim);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -88,19 +88,6 @@ namespace src.player.skills
|
|||
playerInfo.PrintHTML = $"{player.GetTranslation("hud_info", $"<font color='#FF0000'>{cooldown}</font>")}";
|
||||
}
|
||||
|
||||
private static void RestoreHealth(CCSPlayerController victim, float damage)
|
||||
{
|
||||
var playerPawn = victim.PlayerPawn.Value;
|
||||
if (playerPawn == null || !playerPawn.IsValid) return;
|
||||
var newHealth = playerPawn.Health + damage;
|
||||
|
||||
if (newHealth > 100)
|
||||
newHealth = 100;
|
||||
|
||||
playerPawn.Health = (int)newHealth;
|
||||
Utilities.SetStateChanged(playerPawn, "CBaseEntity", "m_iHealth");
|
||||
}
|
||||
|
||||
public class PlayerSkillInfo
|
||||
{
|
||||
public ulong SteamID { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue