public void ApplyDeathFinal() { this.player.difficulty = 2; // Set hardcore if (Main.netMode == 1 && this.player.whoAmI == Main.myPlayer) { DifficultyChangeProtocol.SendToServer(2); } }
//////////////// public void ApplyDeathNonFinal() { if (this.OriginalDifficulty == 2) // Hardcore? Guess we're just dead, then. { return; } this.player.difficulty = this.OriginalDifficulty; if (Main.netMode == 1 && this.player.whoAmI == Main.myPlayer) { DifficultyChangeProtocol.SendToServer(this.OriginalDifficulty); } }
//////////////// public void ApplyContinueDeathInventoryDropState() { int who = this.player.whoAmI; byte difficulty = this.player.difficulty; this.player.difficulty = 1; // Set mediumcore if (Main.netMode == 1 && who == Main.myPlayer) { DifficultyChangeProtocol.SendToServer(3); //<- Special amount to trigger revert after 1s } Timers.SetTimer("LivesContinueMediumcoreRevert", 60, false, () => { Main.player[who].difficulty = difficulty; return(false); }); }