Update GetDataHandlers.cs
This commit is contained in:
parent
5a9f8fad20
commit
0b1da29cf8
1 changed files with 4 additions and 2 deletions
|
|
@ -1073,11 +1073,12 @@ namespace TShockAPI
|
||||||
public class NpcTalkEventArgs : GetDataHandledEventArgs
|
public class NpcTalkEventArgs : GetDataHandledEventArgs
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Player Id
|
/// The Terraria ID of the player talking to the NPC
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public byte PlayerId { get; set; }
|
public byte PlayerId { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// NPC Id player's talk to
|
/// The NPC ID of the NPC the player is talking to
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public short NPCTalkTarget { get; set; }
|
public short NPCTalkTarget { get; set; }
|
||||||
}
|
}
|
||||||
|
|
@ -3145,6 +3146,7 @@ namespace TShockAPI
|
||||||
|
|
||||||
if (OnNpcTalk(args.Player, args.Data, plr, npc))
|
if (OnNpcTalk(args.Player, args.Data, plr, npc))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
//Rejecting player who trying to talk to a npc if player were disabled, mainly for unregistered and logged out players. Preventing smuggling or duplicating their items if player put it in a npc's item slot
|
//Rejecting player who trying to talk to a npc if player were disabled, mainly for unregistered and logged out players. Preventing smuggling or duplicating their items if player put it in a npc's item slot
|
||||||
if (args.Player.IsBeingDisabled())
|
if (args.Player.IsBeingDisabled())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue