package activity

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

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
}
