function RollDrops_fat(event)
for playerID = 0, DOTA_MAX_TEAM_PLAYERS-1 do
if PlayerResource:IsValidPlayerID(playerID) then
local hero = PlayerResource:GetSelectedHeroEntity(playerID)
local DropInfo_fat = GameRules.DropTable_fat[event:GetUnitName()]
if DropInfo_fat then
for k,ItemTable in pairs(DropInfo_fat) do
local chance = ItemTable.Chance or 100
local max_drops = ItemTable.Multiple or 1
local item_name = ItemTable.Item
for i=1,max_drops do
if hero:HasItemInInventory("item_scalp") then
if RollPercentage(chance) then
print("Creating "..item_name)
local item = CreateItem(item_name, nil, nil)
item:SetPurchaseTime(0)
local pos = event:GetAbsOrigin()
local drop = CreateItemOnPositionSync( pos, item )
local pos_launch = pos+RandomVector(RandomFloat(150,200))
item:LaunchLoot(false, 200, 0.75, pos_launch)
end
end
end
end
end
end
end
end