public KillMe ( double dmg, int hitDirection, bool pvp = false, string deathText = " was slain..." ) : void | ||
dmg | double | |
hitDirection | int | |
pvp | bool | |
deathText | string | |
Résultat | void |
/// <summary> /// Punishes <paramref name="p" /> if it is not the developer who owns the <see cref="Item" />. /// </summary> /// <param name="p">The <see cref="Player" /> to check.</param> /// <param name="fn">A method to call of <paramref name="p" /> is the developer.</param> protected void PunishIfCheater(Player p, Action<Player> fn = null) { if (IsOwner(p)) { if (fn != null) fn(p); return; } byte d = p.difficulty; p.difficulty = 0; p.KillMe(9001d, 1, false, " did something " + Developer + " would not like..."); item.SetDefaults(0); OnFoundCheater(p); p.difficulty = d; }