Merge branch 'general-devel' into issue-1485

This commit is contained in:
quake1337 2017-09-20 10:31:39 +03:00 committed by GitHub
commit f4775a1e1e
5 changed files with 8 additions and 6 deletions

View file

@ -9,6 +9,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
* Fixed /spawnmob not spawning negative IDs (@MarioE)
* Validated tile placement on PlaceObject; clients can no longer place frames, paintings etc with dirt blocks (@bartico6, @ProfessorXZ)
* Updated to new stat tracking system with more data so we can actually make informed software decisions (Jordan Coulam)
* Fixed /time display at the end of Terraria hours (@koneko-nyan)
## TShock 4.3.24
* API: Changed `PlayerHooks` permission hook mechanisms to allow negation from hooks (@deadsurgeon42)

1
PULL_REQUEST_TEMPLATE.md Normal file
View file

@ -0,0 +1 @@
<!-- Warning: If you create a pull request and wish to remain anonymous, you are highly advised to use Tails (https://tails.boum.org/) or a fresh git environment. We will *not* be able to help with anonymization after your pull request has been created. -->

View file

@ -3872,7 +3872,7 @@ namespace TShockAPI
if (!Main.dayTime)
time += 15.0;
time = time % 24.0;
args.Player.SendInfoMessage("The current time is {0}:{1:D2}.", (int)Math.Floor(time), (int)Math.Round((time % 1.0) * 60.0));
args.Player.SendInfoMessage("The current time is {0}:{1:D2}.", (int)Math.Floor(time), (int)Math.Floor((time % 1.0) * 60.0));
return;
}

View file

@ -895,14 +895,14 @@ namespace TShockAPI
/// <summary>
/// Time the buff lasts
/// </summary>
public short Time { get; set; }
public int Time { get; set; }
}
/// <summary>
/// PlayerBuff - Called when a player is buffed
/// </summary>
public static HandlerList<PlayerBuffEventArgs> PlayerBuff;
private static bool OnPlayerBuff(byte id, byte type, short time)
private static bool OnPlayerBuff(byte id, byte type, int time)
{
if (PlayerBuff == null)
return false;
@ -911,7 +911,7 @@ namespace TShockAPI
{
ID = id,
Type = type,
Time = time,
Time = time
};
PlayerBuff.Invoke(null, args);
return args.Handled;
@ -3425,7 +3425,7 @@ namespace TShockAPI
{
var id = args.Data.ReadInt8();
var type = args.Data.ReadInt8();
var time = args.Data.ReadInt16();
var time = args.Data.ReadInt32();
if (OnPlayerBuff(id, type, time))
return true;

View file

@ -465,7 +465,7 @@ namespace TShockAPI
/// <returns>description</returns>
public string GetBuffDescription(int id)
{
return (id > 0 && id < Main.maxBuffTypes) ? Lang.GetBuffName(id) : "null";
return (id > 0 && id < Main.maxBuffTypes) ? Lang.GetBuffDescription(id) : "null";
}
/// <summary>