diff --git a/def.go b/def.go index 1b99f62..c27b541 100644 --- a/def.go +++ b/def.go @@ -40,6 +40,11 @@ type Config struct { Mainchat int64 `json:"main_chat_id"` Depositchat int64 `json:"deposit_chat_id"` Reportchat int64 `json:"report_chat_id"` + VaultLimit []struct { + Item string `json:"item"` + Min int64 `json:"min_qty"` + Max int64 `json:"max_qty"` + } `json:"vault_limit"` } `json:"bot"` } diff --git a/job.go b/job.go index 3e01d08..ab35cc6 100644 --- a/job.go +++ b/job.go @@ -2142,8 +2142,13 @@ func jobCheckVaultLimit(j Job) { if p.Status == 0 { p2.JobCallbackID64 = j.ID64 p2.ItemTypeList = make([]int64, 0) - p2.ItemTypeList = append(p2.ItemTypeList, cacheObjSubType[`item_res`]) - p2.ItemTypeList = append(p2.ItemTypeList, cacheObjSubType[`item_alch`]) + + for _, c := range cfg.Bot.VaultLimit { + o, err := getObjItem(getSilentObjItemID(c.Item, ``)) + logOnError(err, "jobCheckVaultLimit : getObjItem") + p2.ItemTypeList = append(p2.ItemTypeList, o.ItemTypeID) + + } b, err = json.Marshal(p2) logOnError(err, "jobCheckVaultLimit : Marshal(p2)")