Merge pull request #2299 from moisterrific/patch-20
Update HealOtherPlayer check to respect ignoredamagecap permission
This commit is contained in:
commit
356cdaa7ad
2 changed files with 2 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
## Upcoming changes
|
## Upcoming changes
|
||||||
* Added permissions for using Teleportation Potions, Magic Conch, and Demon Conch. (@drunderscore)
|
* Added permissions for using Teleportation Potions, Magic Conch, and Demon Conch. (@drunderscore)
|
||||||
* `tshock.tp.tppotion`, `tshock.tp.magicconch`, and `tshock.tp.demonconch` respectively.
|
* `tshock.tp.tppotion`, `tshock.tp.magicconch`, and `tshock.tp.demonconch` respectively.
|
||||||
|
* Updated HealOtherPlayer damage check to make more sense by respecting `ignoredamagecap` permission. (@moisterrific)
|
||||||
|
|
||||||
## TShock 4.5.2
|
## TShock 4.5.2
|
||||||
* Added preliminary support for Terraria 1.4.2.2. (@hakusaro)
|
* Added preliminary support for Terraria 1.4.2.2. (@hakusaro)
|
||||||
|
|
|
||||||
|
|
@ -1603,7 +1603,7 @@ namespace TShockAPI
|
||||||
// Why 0.2?
|
// Why 0.2?
|
||||||
// @bartico6: Because heal other player only happens when you are using the spectre armor with the hood,
|
// @bartico6: Because heal other player only happens when you are using the spectre armor with the hood,
|
||||||
// and the healing you can do with that is 20% of your damage.
|
// and the healing you can do with that is 20% of your damage.
|
||||||
if (amount >= TShock.Config.Settings.MaxDamage * 0.2)
|
if (amount >= TShock.Config.Settings.MaxDamage * 0.2 && !args.Player.HasPermission(Permissions.ignoredamagecap))
|
||||||
{
|
{
|
||||||
TShock.Log.ConsoleDebug("Bouncer / OnHealOtherPlayer 0.2 check from {0}", args.Player.Name);
|
TShock.Log.ConsoleDebug("Bouncer / OnHealOtherPlayer 0.2 check from {0}", args.Player.Name);
|
||||||
args.Player.Disable("HealOtherPlayer cheat attempt!", DisableFlags.WriteToLogAndConsole);
|
args.Player.Disable("HealOtherPlayer cheat attempt!", DisableFlags.WriteToLogAndConsole);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue