1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2025-07-04 09:00:22 +02:00

fixed diamond not consumed when tamed npc

fixed npc follow diamond
This commit is contained in:
2015-07-14 16:38:50 +02:00
parent 3a94bc81b5
commit 64ff460668
2 changed files with 3 additions and 2 deletions

View File

@ -467,9 +467,9 @@ function mobs:register_mob(name, def)
end
end
if self.type == "npc" and self.order == "follow" and self.state ~= "attack" then
if self.type == "npc" and self.order == "follow" and self.owner and self.owner ~= "" and self.state ~= "attack" then
-- npc stop following player if not owner
if self.following and self.type == "npc" and self.owner and self.owner ~= self.following:get_player_name() then
if self.following and self.owner and self.owner ~= self.following:get_player_name() then
self.following = nil
end
else