Skip to content

Check for NPC on ownedby condition#55

Merged
rexxar-tc merged 5 commits intoTorchAPI:masterfrom
SplenectomY:patch-1
Aug 24, 2018
Merged

Check for NPC on ownedby condition#55
rexxar-tc merged 5 commits intoTorchAPI:masterfrom
SplenectomY:patch-1

Conversation

@SplenectomY
Copy link
Copy Markdown
Contributor

Added a check to Keen's mysterious NPC Identity list, since NPCs cannot be found with MySession.Static.Players.TryGetPlayerById

Added a check to Keen's mysterious NPC Identity list, since NPCs cannot be found with MySession.Static.Players.TryGetPlayerById
if(long.TryParse(str, out long NPCId))
{
if(MySession.Static.Players.IdentityIsNpc(NPCId))
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll get a null reference exception if this statement is false. Remove the else on L291

@rexxar-tc rexxar-tc merged commit 4b75ecd into TorchAPI:master Aug 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants