Merge pull request #1491 from ProfessorXZ/professorx

Fixes #1469
This commit is contained in:
Patrikk 2017-09-16 01:48:45 +02:00 committed by GitHub
commit c4452c6d13
2 changed files with 5 additions and 5 deletions

View file

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

View file

@ -465,7 +465,7 @@ namespace TShockAPI
/// <returns>description</returns> /// <returns>description</returns>
public string GetBuffDescription(int id) 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> /// <summary>