function on_DieDropItem(actor, killActor, item)
local actorname = actor:getCharName()
local itemName = item:getName()--物品名称
local killname = killActor:getCharName()
local RaceId = actor:getRace()--死亡者的种族ID
local RaceId1 = killActor:getRace()--击杀者的种族ID
if RaceId == 66 or RaceId ==0 then--死亡者是玩家或英雄时
if RaceId1 == 66 then--击杀者是英雄时检测
print(1111)
return false
elseif RaceId1 == 0 then
print(2222)
return false
end
return true
end
end
英雄击杀检测不到。
function on_DieDropItem(actor, killActor, item)
local actorname = actor:getCharName()
local itemName = item:getName()--物品名称
local killname = killActor:getCharName()
local RaceId = actor:getRace()--死亡者的种族ID
local RaceId1 = killActor:getRace()--击杀者的种族ID
if RaceId == 66 or RaceId ==0 then--死亡者是玩家或英雄时
if RaceId1 == 66 then--击杀者是英雄时检测
print(1111)
return false
elseif RaceId1 == 0 then
print(2222)
return false
end
return true
end
end
英雄击杀检测不到。