Documentation ¶
Index ¶
- Constants
- Variables
- func ActivityLogic_updateStage()
- func CheckToplist(id uint32, on bool)
- func Exit()
- func GetActivityInfo(serverID uint32, infos *[]*proto.ST_ActivityInfo_PB)
- func Get_StartTime(ActivityType uint32, tm int64) time.Time
- func Initialize()
- func LeagueActivity_Load(id uint32)
- func LeagueActivity_updateStage(o *proto.ST_Activity_PB)
- func NewLeagueData(classID uint32, baLeague *proto.ST_LeagueInfo_Base)
- func SendStage2(o *proto.ST_Activity_PB)
- func Start2(serverID uint32, infos *[]*proto.ST_ActivityInfo_PB)
- func Start3(serverID, activityID uint32) bool
- func StartActivityByTime(sec uint64, serverID, activityID uint32, byOther bool, time string) bool
- func UpdateActivityStage(activityID, serverID uint32)
- func UpdateActivityStageTo(activityID, serverID uint32, stage proto.ActivityStage)
- type ActivityBase
- func (o *ActivityBase) GetAssetData() *proto.ST_Activity_PB
- func (o *ActivityBase) GetCSVData() *CSV.CF_Activity_DataEntry
- func (o *ActivityBase) GetConfigData() *ActivityConfig
- func (o *ActivityBase) GetID() uint32
- func (o *ActivityBase) GetIndex() uint32
- func (o *ActivityBase) MakeGmInfo() *proto.GM_ActivityInfo_PB
- func (o *ActivityBase) SetIndex(idx uint32)
- func (o *ActivityBase) UpdateScoreData(data *proto.ST_GS2AS_ActivityScore)
- type ActivityConfig
- type ActivityContentConfig
- type ActivityContents
- type ActivityDBData
- type ActivityInstance
- type ActivityInterface
- type ActivityManager
- func (o *ActivityManager) ForeachActivity(onlyRead bool, callback func(data ActivityInterface) bool)
- func (o *ActivityManager) New_ActivityType(id int64)
- func (o *ActivityManager) SafeRmvTimeFunction(activityID, serverID uint32)
- func (o *ActivityManager) Start1()
- func (o *ActivityManager) WithActivity(isRead bool, serverID, activityID uint32, ...) bool
- type ActivityScoreUser
- type BuffInstance
- type DailyTaskInstance
- type DropInstance
- type ExchangeInstance
- type GroupRate
- type RankStruct_LeagueActivity
- type SpawnInstance
Constants ¶
View Source
const ActivityStage_AS_CloseStage = uint32(99)
Variables ¶
View Source
var DataVer uint64 = 0
View Source
var MapActivityInstance = make(map[uint32]*ActivityInstance)
View Source
var RankTables_LeagueActivity = make(map[uint32]*RankStruct_LeagueActivity)
Functions ¶
func ActivityLogic_updateStage ¶
func ActivityLogic_updateStage()
func CheckToplist ¶
func GetActivityInfo ¶
func GetActivityInfo(serverID uint32, infos *[]*proto.ST_ActivityInfo_PB)
func Initialize ¶
func Initialize()
func LeagueActivity_Load ¶
func LeagueActivity_Load(id uint32)
func LeagueActivity_updateStage ¶
func LeagueActivity_updateStage(o *proto.ST_Activity_PB)
func NewLeagueData ¶
func NewLeagueData(classID uint32, baLeague *proto.ST_LeagueInfo_Base)
func SendStage2 ¶
func SendStage2(o *proto.ST_Activity_PB)
func StartActivityByTime ¶
* @brief 新开一个服务器的活动进程(在指定的时间)
func UpdateActivityStage ¶
func UpdateActivityStage(activityID, serverID uint32)
func UpdateActivityStageTo ¶
func UpdateActivityStageTo(activityID, serverID uint32, stage proto.ActivityStage)
* @brief 更新一个服务器的某个活动的阶段
Types ¶
type ActivityBase ¶
type ActivityBase struct {
// contains filtered or unexported fields
}
func (*ActivityBase) GetAssetData ¶
func (o *ActivityBase) GetAssetData() *proto.ST_Activity_PB
func (*ActivityBase) GetCSVData ¶
func (o *ActivityBase) GetCSVData() *CSV.CF_Activity_DataEntry
func (*ActivityBase) GetConfigData ¶
func (o *ActivityBase) GetConfigData() *ActivityConfig
func (*ActivityBase) GetID ¶
func (o *ActivityBase) GetID() uint32
func (*ActivityBase) GetIndex ¶
func (o *ActivityBase) GetIndex() uint32
func (*ActivityBase) MakeGmInfo ¶
func (o *ActivityBase) MakeGmInfo() *proto.GM_ActivityInfo_PB
func (*ActivityBase) SetIndex ¶
func (o *ActivityBase) SetIndex(idx uint32)
func (*ActivityBase) UpdateScoreData ¶
func (o *ActivityBase) UpdateScoreData(data *proto.ST_GS2AS_ActivityScore)
type ActivityConfig ¶
type ActivityConfig struct { GroupRateList []*GroupRate StageTime []uint64 ContentConfig map[uint32]*ActivityContentConfig Params map[string]interface{} }
type ActivityContentConfig ¶
type ActivityContents ¶
type ActivityContents struct { sync.RWMutex DeData *proto.ST_ActivityContent_PB Dirty bool }
func (*ActivityContents) SetDirty ¶
func (de *ActivityContents) SetDirty(key bool)
type ActivityDBData ¶
type ActivityDBData struct { IDx uint32 Data *proto.ST_Activity_PB }
type ActivityInstance ¶
type ActivityInstance struct { ActivityBase Contents map[uint32]*ActivityContents ScoreData map[uint64]*ActivityScoreUser sync.RWMutex // contains filtered or unexported fields }
/ 活动实例
func (*ActivityInstance) SendStage ¶
func (o *ActivityInstance) SendStage(tp uint32)
func (*ActivityInstance) UpdateScoreData ¶
func (o *ActivityInstance) UpdateScoreData(data *proto.ST_GS2AS_ActivityScore)
func (*ActivityInstance) UpdateStage2 ¶
func (o *ActivityInstance) UpdateStage2(ActivityType uint32)
func (*ActivityInstance) Update_Stage ¶
func (o *ActivityInstance) Update_Stage(now_next uint64)
type ActivityInterface ¶
type ActivityInterface interface { GetID() uint32 GetCSVData() *CSV.CF_Activity_DataEntry GetAssetData() *proto.ST_Activity_PB GetConfigData() *ActivityConfig UpdateScoreData(data *proto.ST_GS2AS_ActivityScore) /// function for ActivityBase GetIndex() uint32 SetIndex(idx uint32) MakeGmInfo() *proto.GM_ActivityInfo_PB // contains filtered or unexported methods }
type ActivityManager ¶
type ActivityManager struct { TimerLock sync.RWMutex ActivityLock sync.RWMutex ActivityMap []ActivityInterface ActivityMap2 map[uint32]*ActivityInstance StageTimer map[uint32]map[uint32]*time.Timer }
var (
ManagerInstance *ActivityManager
)
func (*ActivityManager) ForeachActivity ¶
func (o *ActivityManager) ForeachActivity(onlyRead bool, callback func(data ActivityInterface) bool)
func (*ActivityManager) New_ActivityType ¶
func (o *ActivityManager) New_ActivityType(id int64)
func (*ActivityManager) SafeRmvTimeFunction ¶
func (o *ActivityManager) SafeRmvTimeFunction(activityID, serverID uint32)
func (*ActivityManager) Start1 ¶
func (o *ActivityManager) Start1()
func (*ActivityManager) WithActivity ¶
func (o *ActivityManager) WithActivity(isRead bool, serverID, activityID uint32, callback func(data ActivityInterface)) bool
type ActivityScoreUser ¶
type ActivityScoreUser struct { sync.RWMutex ScData *proto.ST_ActivityScore_User //积分数据 Dirty bool }
func (*ActivityScoreUser) SetDirty ¶
func (sc *ActivityScoreUser) SetDirty(key bool)
type DailyTaskInstance ¶
type DailyTaskInstance struct {
ActivityBase
}
type DropInstance ¶
type DropInstance struct {
ActivityBase
}
type ExchangeInstance ¶
type ExchangeInstance struct {
ActivityBase
}
type RankStruct_LeagueActivity ¶
type RankStruct_LeagueActivity struct { RankList []*proto.ST_ActivityRank_League // contains filtered or unexported fields }
type SpawnInstance ¶
type SpawnInstance struct {
ActivityBase
}
Click to show internal directories.
Click to hide internal directories.