antibert / Hoard_Mode

3 stars 4 forks source link

dark seer can disasemble clone's items and sell the parts #117

Closed DankBudd closed 7 years ago

DankBudd commented 7 years ago

assuming there is no way to stop them from disassembling the items..

maybe a hack fix by constantly setting the items in the units inventory to not be droppable/sellable

DankBudd commented 7 years ago

nvm, something like this should work

function OrderFilter( filterTable )
    local units = filterTable["units"]
    local orderType = filterTable["order_type"]

    if orderType == DOTA_UNIT_ORDER_DISASSEMBLE_ITEM then
        for _,unitIndex in pairs(units) do
            local unit = EntIndexToHScript(unitIndex)
            if unit:HasModifier("modifier_darkseer_wallofreplica_illusion") then
                return false
            end
        end
    end
    return true
end