代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。

原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html



七.青蛙不偷东西

	用MT管理器打开游戏目录/assets/scripts/prefabs/frog.lua文件,将inst.components.combat.onhitotherfn = function(inst, other, damage) inst.components.thief:StealItem(other) end替换为--inst.components.combat.onhitotherfn = function(inst, other, damage) inst.components.thief:StealItem(other) end

	即可让青蛙在攻击主角时,主角不掉物品