--tbl_gl = tbl_gl or {};
--tbl_gl["哥布林"] = 1;
--tbl_gl["红帽哥布林"] = 1;
--tbl_gl["新手宠"] = 1;
Delegate.RegInit("fb1_Init");
function fb1_Init()
Protocol.OnRecv("lua/Module/fb1.lua", "DropPet_Recv", %RECV_DP%);
end
function DropPet_Recv(fd,head,packet)
local player = Protocol.GetCharByFd(fd);
if Char.GetData(player,%对象_地图%) ~= 10 or Char.GetData(player,%对象_地图%) ~= 1000 then
local SplitArray = Split(packet,":");
local PetSlot = tonumber(SplitArray[3]);
local _Pet = Char.GetPet(player,PetSlot);
local bh = Char.GetData(_Pet,%对象_原名%);
if tbl_gl[bh] ~= nil then
Char.DelSlotPet(player,PetSlot)
NLG.SystemMessage(player,"这类宠物丢地直接消失了。");
return 1;
end
end
end
|
|