local bwxz_ATT = {
"邪眼指环","邪眼戒指[天]","邪眼戒指[地]","邪眼戒指[玄]","邪眼戒指[黄]","邪眼戒指[神]","嗜血之戒LV1","嗜血之戒LV2","嗜血之戒LV3","复活戒指",
"复活护腕","复活护腕[天]","复活护腕[地]","复活护腕[玄]","复活护腕[黄]","复活护腕[神]","暴力手镯LV1","暴力手镯LV2","暴力手镯LV3"
}
local bw_ATT = {
[5] = {bw=6,s={"复活护腕","复活护腕[天]","复活护腕[地]","复活护腕[玄]","复活护腕[黄]","复活护腕[神]"}},
[6] = {bw=5,s={"复活护腕","复活护腕[天]","复活护腕[地]","复活护腕[玄]","复活护腕[黄]","复活护腕[神]"}},
[7] = {bw=8,s={"复活戒指","邪眼指环","邪眼戒指[天]","邪眼戒指[地]","邪眼戒指[玄]","邪眼戒指[黄]","邪眼戒指[神]"}},
[8] = {bw=7,s={"复活戒指","邪眼指环","邪眼戒指[天]","邪眼戒指[地]","邪眼戒指[玄]","邪眼戒指[黄]","邪眼戒指[神]"}},
[56] = {bw=57,s={"暴力手镯LV1","暴力手镯LV2","暴力手镯LV3"}},
[57] = {bw=56,s={"暴力手镯LV1","暴力手镯LV2","暴力手镯LV3"}},
[58] = {bw=59,s={"嗜血之戒LV1","嗜血之戒LV2","嗜血之戒LV3"}},
[59] = {bw=58,s={"嗜血之戒LV1","嗜血之戒LV2","嗜血之戒LV3"}},
[99] = {bw=99,s=""},
}
--穿装备之前回调(item:将穿上的物品)
function on_TakeOnItemsBegin(Actor, item, where)
if Actor:getAIType() == 0 and (Actor:getRace() == 0 or Actor:getRace() == 66) then
if in_array(where, {5,6,7,8,56,57,58,59}) and in_array(item:getName(), bwxz_ATT) then
local itemx = Actor:getUseItem(bw_ATT[where].bw)
if itemx then
if in_array(itemx:getName(), bw_ATT[where].s) then
return false
else
return true
end
end
end
end
end
|