From 3c9ee59eee1b999aec5f9ad7cd657d2baeca1129 Mon Sep 17 00:00:00 2001 From: Shane Malin Date: Tue, 4 Apr 2017 21:01:14 -0400 Subject: [PATCH] Fix #22 --- src/FNPC/npc/NPC.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/FNPC/npc/NPC.php b/src/FNPC/npc/NPC.php index 88d94a0..6953a98 100644 --- a/src/FNPC/npc/NPC.php +++ b/src/FNPC/npc/NPC.php @@ -88,11 +88,14 @@ public static function packetReceive($player,$packet) { if($packet->target==$npc->getEID()) { - if($npc->needPay() && !$npc->checkPay($player,true,$player)) + if($packet->action==2 || $packet->action=4) { - break; + if($npc->needPay() && !$npc->checkPay($player,true,$player)) + { + break; + } + $npc->onTouch($player); } - $npc->onTouch($player); } unset($npc); }