Merge remote-tracking branch 'origin/general-devel' into otapi3

This commit is contained in:
Lucas Nicodemus 2022-04-01 01:14:01 -07:00
commit 49a2dce59e
3 changed files with 26 additions and 1 deletions

View file

@ -3813,6 +3813,13 @@ namespace TShockAPI
switch (type)
{
case 0: // Teleportation Potion
if (args.Player.ItemInHand.type != ItemID.TeleportationPotion &&
args.Player.SelectedItem.type != ItemID.TeleportationPotion)
{
TShock.Log.ConsoleDebug("GetDataHandlers / HandleTeleportationPotion rejected not holding the correct item {0} {1}", args.Player.Name, type);
return true;
}
if (!args.Player.HasPermission(Permissions.tppotion))
{
Fail("Teleportation Potions");
@ -3820,6 +3827,13 @@ namespace TShockAPI
}
break;
case 1: // Magic Conch
if (args.Player.ItemInHand.type != ItemID.MagicConch &&
args.Player.SelectedItem.type != ItemID.MagicConch)
{
TShock.Log.ConsoleDebug("GetDataHandlers / HandleTeleportationPotion rejected not holding the correct item {0} {1}", args.Player.Name, type);
return true;
}
if (!args.Player.HasPermission(Permissions.magicconch))
{
Fail("the Magic Conch");
@ -3827,6 +3841,13 @@ namespace TShockAPI
}
break;
case 2: // Demon Conch
if (args.Player.ItemInHand.type != ItemID.DemonConch &&
args.Player.SelectedItem.type != ItemID.DemonConch)
{
TShock.Log.ConsoleDebug("GetDataHandlers / HandleTeleportationPotion rejected not holding the correct item {0} {1}", args.Player.Name, type);
return true;
}
if (!args.Player.HasPermission(Permissions.demonconch))
{
Fail("the Demon Conch");