package inviteCfg

import (
	"server/game/mod/item"
	"server/gamedata"
)

const (
	CFG_INVITE = "Invite"
)

func init() {
	gamedata.InitCfg(CFG_INVITE)
}

func GetInviteReward(index int) (int, []*item.Item) {
	data, err := gamedata.GetDataByIntKey(CFG_INVITE, index)
	if err != nil {
		return 0, nil
	}
	return gamedata.GetIntValue(data, "Need"), gamedata.GetItemList(data, "Items")

}
