Merge branch 'general-devel' into feature/teleportation-potion-protection
This commit is contained in:
commit
9c24540f30
2 changed files with 4 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change.
|
* If there is no section called "Upcoming changes" below this line, please add one with `## Upcoming changes` as the first line, and then a bulleted item directly after with the first change.
|
||||||
|
|
||||||
## Upcoming changes
|
## Upcoming changes
|
||||||
|
* Fixed `TSPlayer.GiveItem` not working if the player is in lava. (@gohjoseph)
|
||||||
* Only allow using Teleportation Potions, Magic Conch, and Demon Conch whilst holding them. (@drunderscore)
|
* Only allow using Teleportation Potions, Magic Conch, and Demon Conch whilst holding them. (@drunderscore)
|
||||||
|
|
||||||
## TShock 4.5.17
|
## TShock 4.5.17
|
||||||
|
|
|
||||||
|
|
@ -1380,7 +1380,9 @@ namespace TShockAPI
|
||||||
public virtual void GiveItem(int type, int stack, int prefix = 0)
|
public virtual void GiveItem(int type, int stack, int prefix = 0)
|
||||||
{
|
{
|
||||||
int itemIndex = Item.NewItem(new EntitySource_DebugCommand(), (int)X, (int)Y, TPlayer.width, TPlayer.height, type, stack, true, prefix, true);
|
int itemIndex = Item.NewItem(new EntitySource_DebugCommand(), (int)X, (int)Y, TPlayer.width, TPlayer.height, type, stack, true, prefix, true);
|
||||||
SendData(PacketTypes.ItemDrop, "", itemIndex);
|
Main.item[itemIndex].playerIndexTheItemIsReservedFor = this.Index;
|
||||||
|
SendData(PacketTypes.ItemDrop, "", itemIndex, 1);
|
||||||
|
SendData(PacketTypes.ItemOwner, null, itemIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue