Remove netID handling of GiveItem, and provide a smaller overload
This commit is contained in:
parent
983a678ff3
commit
ac8fe2a215
2 changed files with 77 additions and 57 deletions
|
|
@ -5297,7 +5297,7 @@ namespace TShockAPI
|
|||
if (itemAmount == 0 || itemAmount > item.maxStack)
|
||||
itemAmount = item.maxStack;
|
||||
|
||||
if (args.Player.GiveItemCheck(item.type, EnglishLanguage.GetItemNameById(item.type), item.width, item.height, itemAmount, prefixId))
|
||||
if (args.Player.GiveItemCheck(item.type, EnglishLanguage.GetItemNameById(item.type), itemAmount, prefixId))
|
||||
{
|
||||
item.prefix = (byte)prefixId;
|
||||
args.Player.SendSuccessMessage("Gave {0} {1}(s).", itemAmount, item.AffixName());
|
||||
|
|
@ -5436,7 +5436,7 @@ namespace TShockAPI
|
|||
{
|
||||
if (itemAmount == 0 || itemAmount > item.maxStack)
|
||||
itemAmount = item.maxStack;
|
||||
if (plr.GiveItemCheck(item.type, EnglishLanguage.GetItemNameById(item.type), item.width, item.height, itemAmount, prefix))
|
||||
if (plr.GiveItemCheck(item.type, EnglishLanguage.GetItemNameById(item.type), itemAmount, prefix))
|
||||
{
|
||||
args.Player.SendSuccessMessage(string.Format("Gave {0} {1} {2}(s).", plr.Name, itemAmount, item.Name));
|
||||
plr.SendSuccessMessage(string.Format("{0} gave you {1} {2}(s).", args.Player.Name, itemAmount, item.Name));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue