Update /godmode to use JourneyMode Godmode power.
- Previous Bouncer checks for GodMode (namely, Hurt) were removed. - The command now uses the GodmodePower from core Terraria - The toggle powers (which this command will now make use of) are now reset on disconnect to prevent accidentally "gifting" godmode to an unsuspecting player.
This commit is contained in:
parent
173d6f71f5
commit
207b43e772
3 changed files with 24 additions and 10 deletions
|
|
@ -2571,10 +2571,6 @@ namespace TShockAPI
|
|||
args.Player.PlayerData.maxHealth = max;
|
||||
}
|
||||
|
||||
if (args.Player.GodMode && (cur < max))
|
||||
{
|
||||
args.Player.Heal(args.TPlayer.statLifeMax2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -3733,12 +3729,6 @@ namespace TShockAPI
|
|||
if (OnPlayerDamage(args.Player, args.Data, id, direction, dmg, pvp, crit, playerDeathReason))
|
||||
return true;
|
||||
|
||||
if (TShock.Players[id].GodMode)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("GetDataHandlers / HandlePlayerDamageV2 rejected (god mode on) {0}", args.Player.Name);
|
||||
TShock.Players[id].Heal(args.TPlayer.statLifeMax);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue