Fix bug in NpcScript::onPlayerEndTrade