Skip to content

Commit

Permalink
Second EquipmentName Hotfix
Browse files Browse the repository at this point in the history
Fixes a bug with tracking disguiser purchases.
  • Loading branch information
DarkRedemption committed Apr 24, 2017
1 parent 319e21b commit fa4d8a9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lua/ddd/main/hooks/sv_hooks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,19 @@ end)
-- Purchase Tracking Hooks
--
local function getEquipmentName(equipment, ply)

if (type(equipment) == "number") then
return EquipmentItems[ply:GetRole()][equipment].name
local roleItems = EquipmentItems[ply:GetRole()]

for index, roleItem in pairs(roleItems) do
if (roleItem.id == equipment) then
return roleItem.name
end
end
else
return equipment
end

return equipment
end

function DDD.Hooks.trackPurchases(tables, ply, equipment)
Expand Down

0 comments on commit fa4d8a9

Please sign in to comment.