Add() public method

public Add ( InvItem item ) : bool
item InvItem
return bool
Example #1
0
        public void ToInv(Inv inv, bool notify = true)
        {
            try {
                bool perms = false;
                if (NormalUse)
                {
                    perms = true;
                }
                else if (ModeratorUse && inv.owner.Moderator)
                {
                    perms = true;
                }
                else if (OwnerUse && inv.owner.Owner)
                {
                    perms = true;
                }

                if (perms)
                {
                    foreach (LoadOutItem item in items.Values)
                    {
                        if (notify)
                        {
                            inv.Notice(item);
                        }
                        inv.Add(item.invItem);
                    }
                }
            } catch (Exception ex) {
                Logger.LogException(ex);
            }
        }
Example #2
0
        public void ToInv(Inv inv, bool notify = true)
        {
            try {
                bool perms = false;
                if (NormalUse)
                    perms = true;
                else if (ModeratorUse && inv.owner.Moderator)
                    perms = true;
                else if (OwnerUse && inv.owner.Owner)
                    perms = true;

                if (perms)
                    foreach (LoadOutItem item in items.Values) {
                        if (notify)
                            inv.Notice(item);
                        inv.Add(item.invItem);
                    }
                
            } catch (Exception ex) {
                Logger.LogException(ex);
            }
        }