Dear (hopefully) helpers,
I'm digging in the server files of AlterEmu v5 and I noticed in-game that the healing system isn't working.
I also saw this thread where DarkRaptor fixed the healing system but he didn't release it, or deleted it.
Someone able to help me? Or someone that still has the fix available?
With regards,
Jochem
I've but the code from the heal.cs system below.
I'm digging in the server files of AlterEmu v5 and I noticed in-game that the healing system isn't working.
I also saw this thread where DarkRaptor fixed the healing system but he didn't release it, or deleted it.
Someone able to help me? Or someone that still has the fix available?
With regards,
Jochem
I've but the code from the heal.cs system below.
Code:
namespace Game.Handlers.Game.Ingame{ class Heal : Networking.GameDataHandler { protected override void Handle() { if (Room.State == Enums.RoomState.Playing) { byte targetSlot = GetByte(2); // The target bool heal = GetBool(5); // If user needed to be healed or killed bool isBoxStation = false; // If it's an medic station or just normal healing ushort healing = 0; //if (heal) { if (targetSlot >= 0 && targetSlot <= Room.MaximumPlayers) { Entities.Player p = null; try { Room.Players.TryGetValue(targetSlot, out p); } catch { p = null; } if (p != null) { if (isBoxStation) { p.Health += 500; } else { switch (Player.Weapon) { case 94: // medic kit { if (p.Health < 1000) p.Health += 300; break; } case 99: // adrenaline { if (p.Health < 300) p.Health += 300; else p.Health += 100; break; } } } p.Health += healing; if (p.Health > 1000) p.Health = 1000; respond = true; Set(3, Player.Health); } } } } } }}