Fixed compile errors for effects lib

master
AlmTech Software 5 years ago
parent 32297ac03a
commit 83eeea9bde
  1. 5
      gamemode/engine/lib/server/sv_inventory.lua
  2. 4
      gamemode/engine/lib/sh_effects.lua

@ -31,7 +31,7 @@ local function isStackable( item )
return item.stack || false
end
function Quantum.Server.Inventory.SetEquipSlotItem( pl, slot, itemindex )
function Quantum.Server.Inventory.SetEquipSlotItem( pl, itemindex )
local char = Quantum.Server.Char.GetCurrentCharacter( pl )
local slotitem = Quantum.Server.Inventory.GetSlotItem( char, index )
local itemTbl = Quantum.Item.Get( slotitem[1] )
@ -42,8 +42,7 @@ function Quantum.Server.Inventory.SetEquipSlotItem( pl, slot, itemindex )
Quantum.Error( tostring(pl) .. " tried to equip an non-equipable item (" .. tostring(itemTbl[1]) .. ")" )
return
else
Quantum.Debug( "Commin' soon." )
-- add effects here and equip it to the slot but check before
end
end

@ -14,7 +14,7 @@ function Quantum.Effect.Create( effectid, tbl )
id = effectid,
icon = tbl.icon,
rarity = tbl.rarity || Quantum.Rarity.Common,
duration = tbl.duration || -1
duration = tbl.duration || -1,
func = {
start = tbl.startfunc || Quantum.EmptyFunction,
runtime = tbl.runtimefunc || Quantum.EmptyFunction,
@ -79,7 +79,7 @@ if SERVER then -- server only functions
local char = Quantum.Server.Char.GetCurrentCharacter( pl )
if( effectTbl != nil ) then
if( effectTbl.func.start != nil && effectTbl.func.start != Quantum.EmptyFunction )
if( effectTbl.func.start != nil && effectTbl.func.start != Quantum.EmptyFunction ) then
effectTbl.func.start( pl )
end

Loading…
Cancel
Save