Fix player does't use the Shellphone (Ocean), Shellphone (Underworld) and Shellphone (Spawn).
This commit is contained in:
parent
0c37b0fed3
commit
66379a4a17
2 changed files with 32 additions and 6 deletions
|
|
@ -32,6 +32,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
|||
* Fixed painting wall/tile being rejected from hand of creation. (@Rozen4334)
|
||||
* Added a second `Utils.TryParseTime` method for parsing large, positive time spans. (@punchready)
|
||||
* Fixed `/tempgroup` breaking on durations greater than roughly 24 days. (@punchready)
|
||||
* Fix player does't use the Shellphone (Ocean), Shellphone (Underworld) and Shellphone (Spawn). (@hufang360)
|
||||
|
||||
## TShock 4.5.18
|
||||
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph)
|
||||
|
|
|
|||
|
|
@ -3828,9 +3828,11 @@ namespace TShockAPI
|
|||
return true;
|
||||
}
|
||||
break;
|
||||
case 1: // Magic Conch
|
||||
case 1: // Magic Conch or Shellphone (Ocean)
|
||||
if (args.Player.ItemInHand.type != ItemID.MagicConch &&
|
||||
args.Player.SelectedItem.type != ItemID.MagicConch)
|
||||
args.Player.SelectedItem.type != ItemID.MagicConch &&
|
||||
args.Player.ItemInHand.type != ItemID.ShellphoneOcean &&
|
||||
args.Player.SelectedItem.type != ItemID.ShellphoneOcean)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("GetDataHandlers / HandleTeleportationPotion rejected not holding the correct item {0} {1}", args.Player.Name, type);
|
||||
return true;
|
||||
|
|
@ -3838,13 +3840,22 @@ namespace TShockAPI
|
|||
|
||||
if (!args.Player.HasPermission(Permissions.magicconch))
|
||||
{
|
||||
Fail("the Magic Conch");
|
||||
if (args.Player.ItemInHand.type == ItemID.ShellphoneOcean || args.Player.SelectedItem.type != ItemID.ShellphoneOcean)
|
||||
{
|
||||
Fail("the Shellphone (Ocean)");
|
||||
}
|
||||
else
|
||||
{
|
||||
Fail("the Magic Conch");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case 2: // Demon Conch
|
||||
case 2: // Demon Conch or Shellphone (Underworld)
|
||||
if (args.Player.ItemInHand.type != ItemID.DemonConch &&
|
||||
args.Player.SelectedItem.type != ItemID.DemonConch)
|
||||
args.Player.SelectedItem.type != ItemID.DemonConch &&
|
||||
args.Player.ItemInHand.type != ItemID.ShellphoneHell &&
|
||||
args.Player.SelectedItem.type != ItemID.ShellphoneHell)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("GetDataHandlers / HandleTeleportationPotion rejected not holding the correct item {0} {1}", args.Player.Name, type);
|
||||
return true;
|
||||
|
|
@ -3852,7 +3863,21 @@ namespace TShockAPI
|
|||
|
||||
if (!args.Player.HasPermission(Permissions.demonconch))
|
||||
{
|
||||
Fail("the Demon Conch");
|
||||
if (args.Player.ItemInHand.type == ItemID.ShellphoneHell || args.Player.SelectedItem.type != ItemID.ShellphoneHell)
|
||||
{
|
||||
Fail("the Shellphone (Underworld)");
|
||||
}
|
||||
else
|
||||
{
|
||||
Fail("the Demon Conch");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
case 3: // Shellphone (Spawn)
|
||||
if (args.Player.ItemInHand.type != ItemID.ShellphoneSpawn && args.Player.SelectedItem.type != ItemID.ShellphoneSpawn)
|
||||
{
|
||||
TShock.Log.ConsoleDebug("GetDataHandlers / HandleTeleportationPotion rejected not holding the correct item {0} {1}", args.Player.Name, type);
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue