Merge branch 'general-devel' into fix-invalid-groups
This commit is contained in:
commit
91376ae087
23 changed files with 128 additions and 81 deletions
|
|
@ -346,7 +346,7 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public Vector2 Velocity { get; set; }
|
||||
/// <summary>
|
||||
/// Original poisition of the player when using Potion of Return.
|
||||
/// Original position of the player when using Potion of Return.
|
||||
/// </summary>
|
||||
public Vector2? OriginalPos { get; set; }
|
||||
/// <summary>
|
||||
|
|
@ -770,7 +770,7 @@ namespace TShockAPI
|
|||
{
|
||||
/// <summary>The projectile's identity...?</summary>
|
||||
public int ProjectileIdentity;
|
||||
/// <summary>The the player index of the projectile's owner (Main.players).</summary>
|
||||
/// <summary>The player index of the projectile's owner (Main.players).</summary>
|
||||
public byte ProjectileOwner;
|
||||
/// <summary>The index of the projectile in Main.projectile.</summary>
|
||||
public int ProjectileIndex;
|
||||
|
|
@ -1846,7 +1846,7 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public byte ID { get; set; }
|
||||
/// <summary>
|
||||
/// The direction the damage is occuring from
|
||||
/// The direction the damage is occurring from
|
||||
/// </summary>
|
||||
public byte Direction { get; set; }
|
||||
/// <summary>
|
||||
|
|
@ -1902,7 +1902,7 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public byte Direction { get; set; }
|
||||
/// <summary>
|
||||
/// Amount of damage delt
|
||||
/// Amount of damage dealt
|
||||
/// </summary>
|
||||
public short Damage { get; set; }
|
||||
/// <summary>
|
||||
|
|
@ -1989,7 +1989,7 @@ namespace TShockAPI
|
|||
/// </summary>
|
||||
public int Slot { get; set; }
|
||||
/// <summary>
|
||||
/// Wether or not the slot that is being modified is a Dye slot.
|
||||
/// Whether or not the slot that is being modified is a Dye slot.
|
||||
/// </summary>
|
||||
public bool IsDye { get; set; }
|
||||
/// <summary>
|
||||
|
|
@ -2812,10 +2812,26 @@ namespace TShockAPI
|
|||
{
|
||||
args.Player.SendErrorMessage("You do not have permission to hurt Town NPCs.");
|
||||
args.Player.SendData(PacketTypes.NpcUpdate, "", id);
|
||||
TShock.Log.ConsoleDebug("GetDataHandlers / HandleNpcStrike rejected npc strike {0}", args.Player.Name);
|
||||
TShock.Log.ConsoleDebug($"GetDataHandlers / HandleNpcStrike rejected npc strike {args.Player.Name}");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
if (Main.npc[id].netID == NPCID.EmpressButterfly)
|
||||
{
|
||||
if (!args.Player.HasPermission(Permissions.summonboss))
|
||||
{
|
||||
args.Player.SendErrorMessage("You do not have permission to summon the Empress of Light.");
|
||||
args.Player.SendData(PacketTypes.NpcUpdate, "", id);
|
||||
TShock.Log.ConsoleDebug($"GetDataHandlers / HandleNpcStrike rejected EoL summon from {args.Player.Name}");
|
||||
return true;
|
||||
}
|
||||
else if (!TShock.Config.Settings.AnonymousBossInvasions)
|
||||
{
|
||||
TShock.Utils.Broadcast(string.Format($"{args.Player.Name} summoned the Empress of Light!"), 175, 75, 255);
|
||||
}
|
||||
else
|
||||
TShock.Utils.SendLogs(string.Format($"{args.Player.Name} summoned the Empress of Light!"), Color.PaleVioletRed, args.Player);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -3207,10 +3223,23 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
|
||||
if (type == 3 && !args.Player.HasPermission(Permissions.usesundial))
|
||||
if (type == 3)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("GetDataHandlers / HandleSpecial rejected enchanted sundial permission {0}", args.Player.Name);
|
||||
args.Player.SendErrorMessage("You do not have permission to use the Enchanted Sundial.");
|
||||
if (!args.Player.HasPermission(Permissions.usesundial))
|
||||
{
|
||||
TShock.Log.ConsoleDebug($"GetDataHandlers / HandleSpecial rejected enchanted sundial permission {args.Player.Name}");
|
||||
args.Player.SendErrorMessage("You do not have permission to use the Enchanted Sundial.");
|
||||
}
|
||||
else if (TShock.Config.Settings.ForceTime != "normal")
|
||||
{
|
||||
TShock.Log.ConsoleDebug($"GetDataHandlers / HandleSpecial rejected enchanted sundial permission (ForceTime) {args.Player.Name}");
|
||||
if (!args.Player.HasPermission(Permissions.cfgreload))
|
||||
{
|
||||
args.Player.SendErrorMessage("You cannot use the Enchanted Sundial because time is stopped.");
|
||||
}
|
||||
else
|
||||
args.Player.SendErrorMessage("You must set ForceTime to normal via config to use the Enchanted Sundial.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue