package activity

import (
	"fmt"
	"server/GoUtil"
	activityCfg "server/conf/activity"
	"server/game/mod/item"
)

func (a *Activity) Fire(Id int) ([]*item.Item, error) {
	AId := activityCfg.GetActivityGiftId(Id)
	Var := a.getGIftVar(AId)
	if Var.Buy {
		return nil, fmt.Errorf("已购买")
	}
	Var.Buy = true
	Var.Time = GoUtil.Now()
	return activityCfg.GetAcitivityGiftItems(Id), nil
}
