logic

package
v1.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 25, 2020 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AirDrop_Result_GetItem  = 0
	AirDrop_Result_GetMoney = 1
	AirDrop_Result_Error    = 2
)
View Source
const (
	LEAGUERIGHT_DriveOut uint32 = iota
	LEAGUERIGHT_Transfer
	LEAGUERIGHT_PermissionUp
	LEAGUERIGHT_SetLang
	LEAGUERIGHT_ChangeLeagueName
	LEAGUERIGHT_ChangeDeclaration
	LEAGUERIGHT_Dissolution
	LEAGUERIGHT_ChangeRecruit
	LEAGUERIGHT_SetUpTechnology
	LEAGUERIGHT_StoreStock
	LEAGUERIGHT_OpenActivity
	LEAGUERIGHT_ChangeGrade
	LEAGUERIGHT_QuitLeague
	LEAGUERIGHT_ViewDistribution
	LEAGUERIGHT_LeagueMail
	LEAGUERIGHT_Online
	LEAGUERIGHT_ChangeRankName
	LEAGUERIGHT_ChangeFlag
	LEAGUERIGHT_WhetherApply
	LEAGUERIGHT_Invitation
	LEAGUERIGHT_OpenDepot
	LEAGUERIGHT_ModifyrRankName
	LEAGUERIGHT_DescardCity
	LEAGUERIGHT_ChangeNotice
	LEAGUERIGHT_DeleteMessage
	LEAGUERIGHT_LeagueCupTask
	LEAGUERIGHT_BuildingDemolition //联盟建筑拆除
	LEAGUERIGHT_BuildingPlacement  //联盟建筑放置
	LEAGUERIGHT_DisbandGarrison    //联盟驻防解散
	LEAGUERIGHT_MonsterAtkCity     //怪物攻城
)
View Source
const (
	NORMAL_AS_CHAPTER = 1
	ELITE_AS_CHAPTER  = 2
)
View Source
const (
	MoveUsercity uint32 = iota + 1
	Openbox
	LeagueMoveCity
)
View Source
const (
	PushType_CreateUser = 1
)

Variables

View Source
var (
	PushMsgHandlerMap map[proto.PushMsgType]func(proto.PushMsgType, []interface{})
	PushTitle         = "GlobalWar"
)
View Source
var (
	XTeaKey = "slorufjyepvufifu"

	OnlinePlayer sync.Map
)
View Source
var (
	AirShipChanllangeSecurty sync.Map
)
View Source
var (
	CityfightStageTimes []*proto.ST_Vector2Int_PB
)
View Source
var CommonBattleParm *stCommonBattleParm
View Source
var (
	GMCommandHandlerMap map[string]func(string) (error, string)
)
View Source
var (
	LeagueCupTaskActiID uint32 = 100012
)
View Source
var ProducttoPrice = map[int64]int32{
	1:  99,
	11: 149,
	7:  199,
	8:  299,
	2:  499,
	3:  999,
	12: 1499,
	4:  1999,
	9:  2999,
	5:  4999,
	6:  9999,
}
View Source
var (
	ReportChan chan *GameDB.ReportDocument
)
View Source
var (
	SCRegisterOnce sync.Once
)
View Source
var WildMonsterSeed int

Functions

func AcceptLeagueApply

func AcceptLeagueApply(uid, targetuid uint64) proto.LeagueResult

func AcceptLeagueInvitation

func AcceptLeagueInvitation(uid, leagueid uint64) proto.LeagueResult

func AcceptOrRejectLeagueInvitation

func AcceptOrRejectLeagueInvitation(uid, mailId uint64, acceptOrReject uint32, res *httputils.Respon)

* @brief 接受或拒绝联盟邀请

func AddAllHero

func AddAllHero(uid uint64)

func AddChat

func AddChat(respon *httputils.Respon, uid uint64, channel, subChannel, chatType int32, chatcontent string)

func AddChatReply

func AddChatReply(respon *httputils.Respon, chatType uint32, channel int32, uid uint64, chatcontent string, titleID uint64)

func AddEnergy

func AddEnergy(userData *cache.Info, energy uint32, gotType oss.OssSrcGotType, ossType uint32)

func AddFinishedTutorialId

func AddFinishedTutorialId(uid uint64, tutorialId uint32)

func AddFirstTutorialTimes

func AddFirstTutorialTimes(uid uint64, firstTutorialType uint32)

func AddFollow

func AddFollow(respon *httputils.Respon, channel int32, uid uint64, titleID uint64)

添加关注

func AddItem

func AddItem(userData *cache.Info, itemTypeID, itemCount, ossAddItemType uint32) bool

func AddLeagueBuilding

func AddLeagueBuilding(uid uint64, id, lv, x, y int32) int

func AddLeagueGift

func AddLeagueGift(leagueid uint64, itemid uint32, buyer string, packName uint64) []*proto.ST_LeagueGift_PB

func AddLeagueShopItem

func AddLeagueShopItem(lid, uid uint64, itemid, itemnum uint32) proto.RetActionType

func AddMaxHp

func AddMaxHp(userData *cache.Info) uint64

func AddPraise

func AddPraise(respon *httputils.Respon, channel int32, uid uint64, titleID uint64)

添加点赞

func AddPrisonMessage

func AddPrisonMessage(uid, targetUid uint64, content string) (proto.RetActionType, *proto.ST_PrisonMessgeClient_PB)

添加监狱留言

func AddPrivateChat

func AddPrivateChat(respon *httputils.Respon, uid, targetUid uint64, content string)

添加私聊

func AddSecondTime

func AddSecondTime(userData *cache.Info, remaintime uint64)

func AddTBCureProgress

func AddTBCureProgress(uid uint64, itemCount uint32) proto.RetActionType

func AddVipPoint

func AddVipPoint(charInfo *cache.Info, in uint64, itemTypeID, itemCount uint32, source oss.VIPSource) proto.RetActionType

func AddWarCityData

func AddWarCityData(actAsset *cache.GlobalActionEntry) uint32

func AddWarCityKill

func AddWarCityKill(tid int32, aid, kill uint64) bool

func AlterFeedback

func AlterFeedback(userId uint64, popid uint32, cancel uint32, res *httputils.Respon)

* @brief 评分反馈弹窗

func AlterUserSettings

func AlterUserSettings(userId uint64, paramStr string, res *httputils.Respon)

* @brief 修改玩家设置

func AppointTitle

func AppointTitle(titleId int32, uid, targetUid uint64) (proto.RetActionType, *proto.ST_Title_PB)

func BlackMarketBuyItem

func BlackMarketBuyItem(uid uint64, slotid uint32) proto.RetActionType

func BlackMarketNoticed

func BlackMarketNoticed(uid uint64) proto.RetActionType

func BlackMarketTryLock

func BlackMarketTryLock(uid uint64, slotid uint32) proto.RetActionType

func BlackMarketTryRefresh

func BlackMarketTryRefresh(sec uint64, userData *cache.Info, byUser bool) proto.RetActionType

/ 尝试刷新商店

func BuyExpeditionShopItem

func BuyExpeditionShopItem(uid uint64, slotIdx, itemType int32) proto.RetActionType

func BuyItem

func BuyItem(charInfo *cache.Info, itemTypeID, itemCount uint32) proto.RetActionType

func BuyLeagueShopItem

func BuyLeagueShopItem(lid, uid uint64, itemid, itemnum uint32) proto.RetActionType

func CSPay

func CSPay(payReq *proto.ST_CS2GS_Pay) *proto.ST_GS2CS_Pay

func CalcCommanderEquipAddition

func CalcCommanderEquipAddition(userData *cache.Info, equipUID uint64, state proto.CommanderEquipState)

* @brief 计算指挥官装备加成

func CancelFollow

func CancelFollow(respon *httputils.Respon, channel int32, uid uint64, titleID uint64)

取消关注

func CancelKeptMail

func CancelKeptMail(res *httputils.Respon, uid uint64, mailIdList *proto.ST_Uint64List_PB)

func ChangeCommanderFashion

func ChangeCommanderFashion(uid uint64, changeType, id uint32) proto.RetActionType

func ChangeMainCitySkin

func ChangeMainCitySkin(uid uint64, skinId uint32) Protocol.RetActionType

func ChangeServer

func ChangeServer(uid uint64, sid int64, changeType int32) proto.ChangeServerRetCode

func ChatTranslate

func ChatTranslate(respon *httputils.Respon, channel int32, subChannel int32, uid uint64, titleID uint64, translateType uint32, entryIdx uint64, languageID uint32, content string)

聊天翻译

func CheckActivityGiftCondition

func CheckActivityGiftCondition(param []interface{})

func CheckAddSpeExchangeActivity

func CheckAddSpeExchangeActivity(userData *cache.Info, newRole bool)

特殊兑换活动,每个玩家只开1次,到时间自动删除

func CheckAllGiftSaleCondition

func CheckAllGiftSaleCondition(userData *cache.Info, conditionType Protocol.GiftConditionType, value int64) bool

* @brief 检查是否有满足出售条件的礼包类型 @param userData 用户数据 @param conditionType 条件类型 @param value 变化值

func CheckConnection

func CheckConnection()

func CheckDelLeagueBuilding

func CheckDelLeagueBuilding(d *cache.WorldDataEntry)

func CheckGiftConditionEx

func CheckGiftConditionEx(userData *cache.Info, idx, giftPackId int64, condType Protocol.GiftConditionType, condValue string) bool

* @brief 玩家上线时检测是否有礼包达到购买条件

func CheckGiftPackID

func CheckGiftPackID(uid, giftId uint64) Protocol.RetActionType

func CheckIsOnSpecialTile

func CheckIsOnSpecialTile(tileid, width, height int32) bool

func CheckLeague

func CheckLeague(name, shortname string) uint32

func CheckLeagueRight

func CheckLeagueRight(uid uint64, leaguelevel int32, right uint32) bool

func CheckMakeUpBubble

func CheckMakeUpBubble(userData *cache.Info)

如果老玩家订阅了,但没有给头像框和汽泡,则上线时补发

func CheckPurchasedGiftValidity

func CheckPurchasedGiftValidity(userData *cache.Info, giftEntry *CSV.CF_GiftList_DataEntry, packEntry *CSV.CF_GiftPackList_DataEntry, byGM bool) bool

* @brief 检查要购买的礼包的有效性(次数和时间) @param userData 用户数据 @param giftEntry 礼包配置数据

func CheckRight

func CheckRight(uid uint64, right uint32) (proto.LeagueResult, *cache.Info, *cache.GlobalLeagueEntry)

func CheckSession

func CheckSession(req *httputils.Request, respon *httputils.Respon) bool

func CheckSkillUnitTarget

func CheckSkillUnitTarget(skillCSV *CSV.CF_HeroNewSkills_DataEntry, defBaseData *stBattleActionBaseData) proto.UnitBattleType

* @brief 检查是否存在技能释放对象

func CheckUid

func CheckUid(uid string) (bool, uint64)

func CheckUserCleanStatus

func CheckUserCleanStatus(user *cache.Info, CheckLazyTemplate []*proto.ST_Vector4Int_PB) bool

func CheckUserNameExists

func CheckUserNameExists(userName string, res *httputils.Respon)

* @brief 检查玩家名子是否存在

func ChecklidWarCity

func ChecklidWarCity(lid uint64, lv int64) bool

func CleanDiscardTask

func CleanDiscardTask(userData *cache.Info, force bool)

func ClearAvatar

func ClearAvatar(uid uint64, res *httputils.Respon) bool

* @brief 清理头像

func CommanderEquipOp

func CommanderEquipOp(userData *cache.Info, equipUID uint64, equipPos uint32, opType uint32) proto.RetActionType

* @brief 对指挥官装备进行操作

func CountCollect

func CountCollect(worldDataEntry *cache.WorldDataEntry)

func CountLeagueCenter

func CountLeagueCenter(worldAssetData *cache.WorldDataEntry) bool

func CountVagueUnitCount

func CountVagueUnitCount(in uint64) *proto.ST_Vector2Int64_PB

func CountWarCityData

func CountWarCityData(cid uint32) bool

func CreateLeague

func CreateLeague(ownerID uint64, name string, shortName string, slogan string,
	needreview uint32, maxpower, minpower uint64) proto.LeagueResult

func CreateRole

func CreateRole(accountid, uid uint64, sid uint32) *proto.ST_GS2LS_CreateRoleRst

func CreateSimpleInfo

func CreateSimpleInfo(uid uint64) *proto.ST_CharSimple_Server_PB

func CrossSpecialTile

func CrossSpecialTile(startid, endid int32) bool

func DecChanllengeTimes

func DecChanllengeTimes(mapInfo *proto.ST_MapInfo_PB, decTimes uint32)

func DecodeActionAppendDataEx

func DecodeActionAppendDataEx(str, key string) string

func DelActivityItem

func DelActivityItem(userData *cache.Info, data *cache.ActivityData)

删除活动道具

func DelLeagueBuilding

func DelLeagueBuilding(did uint64) int

func DelLeagueBuilding2

func DelLeagueBuilding2(did uint64)

func DelWarCityData

func DelWarCityData(tid int32, aid uint64) bool

func DelWarCityStage

func DelWarCityStage(cid uint32) bool

func DelWildMonster

func DelWildMonster()

func DeleteHero

func DeleteHero(userData *cache.Info, heroID uint32)

* @brief 删除英雄,目前正常逻辑中未使用

func DeleteLeagueGift

func DeleteLeagueGift(uid uint64, giftId uint32) proto.RetActionType

func DeleteLeagueMessage

func DeleteLeagueMessage(uid, senderUid, msgTime uint64) proto.RetActionType

func DiamondMineAirshipHandleActive

func DiamondMineAirshipHandleActive(userData *cache.Info, buildingID uint32, res *httputils.Respon) proto.RetActionType

* @brief 激活钻石矿|飞艇

func DoAirShipChanllange

func DoAirShipChanllange(uid uint64, detail *ST_AirShipChanllange_PB) (RetActionType, bool, *ST_BattleInfo_PB, *ST_Vector4IntList_PB, uint32, *ST_Vector4IntList_PB)

func DoMapLazyClean

func DoMapLazyClean()

func DropTest

func DropTest(userData *cache.Info, dropid int32) bool

func EnableOrDisableUserIdTimeout

func EnableOrDisableUserIdTimeout(enable bool)

//获取多人怪奖励最大次数

func GetMaxMutiMonsterRewardTimes(userData *cache.Info) uint64 {
	if nil == userData {
		return 0
	}
	var maxRewardTimes uint64

	//配置表
	configTimes := uint64(csv.GetGameConfigValueUint32("BigMonsterCost"))
	//订阅
	_, addValue, _ := getAttriValue(userData, nil, proto.AtttibuteType_MMReward)

	maxRewardTimes = configTimes + uint64(addValue)
	return maxRewardTimes
}
func AddMutiMonsterRewardTimes(userData *cache.Info, addValue uint64) {
	if nil == userData {
		return
	}
	tmpAsset := userData.GetStatisticsAsset()
	tmpAsset.Lock()
	defer tmpAsset.Unlock()

	curTimes := GetMutiMonsterRewardTimes(userData)
	tmpAsset.AssetData.MutiMonsterRewardTimes = proto.SetUint64(curTimes + addValue)

	tmpAsset.Dirty()
	userData.DirtyAll()
}
func ReduceMutiMonsterRewardTimes(userData *cache.Info) {
	tmpAsset := userData.GetStatisticsAsset()
	tmpAsset.Lock()
	defer tmpAsset.Unlock()

	times := GetMutiMonsterRewardTimes(userData)
	if times <= 0 {
		times = 0
		return
	}

	tmpAsset.AssetData.MutiMonsterRewardTimes = proto.SetUint64(times - 1)
	tmpAsset.Dirty()
	userData.DirtyAll()
}
func GetMutiMonsterRewardTimes(userData *cache.Info) uint64 {
	return userData.GetStatisticsAsset().AssetData.GetMutiMonsterRewardTimes()
}
func ResetMutiMonsterRewardTimes(userData *cache.Info) {
	tmpAsset := userData.GetStatisticsAsset()
	tmpAsset.Lock()
	defer tmpAsset.Unlock()

	tmpAsset.AssetData.MutiMonsterRewardTimes = proto.SetUint64(GetMaxMutiMonsterRewardTimes(userData))
	tmpAsset.AssetData.LastMutiMonsterRewardTime = proto.SetUint64(wtime.GetNow())
	tmpAsset.Dirty()
	userData.DirtyAll()
}
func SetLastMutiMonsterRewardTime(userData *cache.Info, time uint64) {
	tmpAsset := userData.GetStatisticsAsset()
	tmpAsset.Lock()
	defer tmpAsset.Unlock()

	tmpAsset.AssetData.LastMutiMonsterRewardTime = proto.SetUint64(time)
	tmpAsset.Dirty()
	userData.DirtyAll()
}
func GetLastMutiMonsterRewardTime(userData *cache.Info) uint64 {
	return userData.GetStatisticsAsset().AssetData.GetLastMutiMonsterRewardTime()
}

* @brief 禁用UID超时机制

func EndSaleCommonGift

func EndSaleCommonGift(userData *cache.Info, giftPackEntry *CSV.CF_GiftPackList_DataEntry) bool

func ExeGMCommand

func ExeGMCommand(command, params string) (error, string)

func Exit

func Exit()

func ExitLeague

func ExitLeague(uid uint64) proto.LeagueResult

func ExpeditionShopRefreshItems

func ExpeditionShopRefreshItems(uid uint64) proto.RetActionType

func Feedback

func Feedback(uid uint64, feedbackType uint32, content string) proto.RetActionType

func FillHeroKillRankingInfo

func FillHeroKillRankingInfo(start, end uint32, pairList wsort.MapSorter, list *proto.ST_PowerRankingList)

func FindLeagueByKey

func FindLeagueByKey(key string, max int32) *proto.ST_League_Simple_Info_List

func FindWildMonster

func FindWildMonster(uid uint64, entryType, level uint32, range_new, range_no, first int32) (*proto.ST_WorldDataEntryList_PB, proto.RetActionType)

func FinishCommanderEquipMake

func FinishCommanderEquipMake(userData *cache.Info, buildingID, equipID uint32)

* @brief 装备合成结束

func FoolsDayExchange

func FoolsDayExchange(userData *cache.Info, activityId int32) (ret proto.RetActionType)

func FoolsDayUnlockAdvanceByGem

func FoolsDayUnlockAdvanceByGem(userData *cache.Info, activityId int32) (ret proto.RetActionType)

func FoolsDayUnlockAdvanceByPay

func FoolsDayUnlockAdvanceByPay(userData *cache.Info, giftId uint64) (ret proto.RetActionType)

func ForbidLeagueChat

func ForbidLeagueChat(ld, uid, duration uint64)

func GMActivityScore

func GMActivityScore(userData *cache.Info, actiID, score uint32)

func GMCloseBlackMarket

func GMCloseBlackMarket(uid uint64)

func GMDelWorldDataByChunkIdx

func GMDelWorldDataByChunkIdx(idx int32)

func GMRefreshLeagueBox

func GMRefreshLeagueBox(uid uint64)

func GMResetLeagueBox

func GMResetLeagueBox(uid uint64)

func GMSetMiracleWarStage

func GMSetMiracleWarStage(sn, stage int32)

func GMUnlockAllMap

func GMUnlockAllMap(userData *cache.Info)

func GM_FinishSevenDayTaskByDay

func GM_FinishSevenDayTaskByDay(userData *cache.Info, day uint32)

func GMupdateActivityNormalScore

func GMupdateActivityNormalScore(userData *cache.Info, actiID, score uint32)

func GMupdateLeagueCupScore

func GMupdateLeagueCupScore(lid uint64, actiID, add uint32) *proto.ST_ActivityScore_League

func GO_ProcessReport

func GO_ProcessReport()

func GO_UpdateLeagueAsset

func GO_UpdateLeagueAsset()

func GarrisonToLeagueCenter

func GarrisonToLeagueCenter(actionData *cache.GlobalActionEntry, cityData *cache.WorldDataEntry) bool

func GeTransferBattleUserRank

func GeTransferBattleUserRank(uid uint64, rankType, start, end uint32) *proto.ST_Client_TransferBattle_User_Rank

func GeiDianQian

func GeiDianQian(uid uint64)

func GetActivityTaskBoxReward

func GetActivityTaskBoxReward(uid uint64, boxIdx uint32) proto.RetActionType

func GetBoonRewardConfig

func GetBoonRewardConfig(id uint32, RES *httputils.Respon)

func GetBoonRewardConfigTest

func GetBoonRewardConfigTest(boonID uint32, RES *httputils.Respon)

func GetChallengeMapListReward

func GetChallengeMapListReward(uid uint64, mapId uint32, starNum uint32, heros *proto.ST_HeroAsset_PB, units *proto.ST_UnitAsset_PB) (proto.RetActionType, *proto.ST_Vector4IntList_PB, *proto.ST_Vector4IntList_PB)

获取通关奖励

func GetCharSimple

func GetCharSimple(uid uint64) *proto.ST_CharSimpleInfo

func GetCharSimpleGarrison

func GetCharSimpleGarrison(uid uint64) *proto.ST_CharSimpleGarrison_PB

func GetChatReplyList

func GetChatReplyList(respon *httputils.Respon, uid uint64, channel int32, titleID uint64, startIndex, maxcount uint32)

func GetChatTitleList

func GetChatTitleList(respon *httputils.Respon, uid uint64, channel int32, subChannel int32, getType int32, startidx uint32, count uint32, chatVersionId int32)

func GetCompensation

func GetCompensation(userData *cache.Info)

func GetCurDurable

func GetCurDurable(userData *cache.Info) uint32

func GetDailyLoginReward

func GetDailyLoginReward(uid uint64, id uint32) Protocol.RetActionType

func GetDailyTaskReward

func GetDailyTaskReward(uid uint64, taskId int64) proto.RetActionType

领取日常活动奖励

func GetDirtyData

func GetDirtyData(uid uint64, version uint32, actionlist *proto.ST_GlobalActionVersionList_PB, respon *httputils.Respon, request *httputils.Request)

* @brief 获取用户脏数据

func GetDropActivityRank

func GetDropActivityRank(uid uint64, activityType, start, end uint32) *proto.ST_PowerRankingList

func GetEarlyWarningDetail

func GetEarlyWarningDetail(inputList []uint32, targetUser *cache.Info, dataentry *proto.ST_GlobalActionEntry_PB, isMain bool) (*proto.ST_MultiplayerEarlyWarning_PB, *proto.ST_Vector2Int64_PB, uint64)

* @brief 获取玩家详细信息

func GetEarlyWarningMonsterAtkDetail

func GetEarlyWarningMonsterAtkDetail(inputList []uint32, monsterEntityId int64, dataentry *proto.ST_GlobalActionEntry_PB, isMain bool) (*proto.ST_MultiplayerEarlyWarning_PB, *proto.ST_Vector2Int64_PB, uint64)

* @brief 怪物玩家详细信息

func GetExchangeActivityReward

func GetExchangeActivityReward(uid uint64, activityType, exchangeId uint32) proto.RetActionType

func GetFoolsDayRewards

func GetFoolsDayRewards(userData *cache.Info, activityId, rewardsId, advanced int32) (ret proto.RetActionType)

func GetGlobalRanking

func GetGlobalRanking(uid uint64, rankId string, start, end uint32) *proto.ST_PowerRankingList

func GetHeroLimtNum

func GetHeroLimtNum(mainCityLevel uint32) int

func GetHistoryArchons

func GetHistoryArchons(uid uint64, startIdx, count int32) (proto.RetActionType, []*proto.ST_HistoryArchon_PB)

func GetLeagueBattleLog

func GetLeagueBattleLog(uid uint64, startid, count uint32) (proto.RetActionType, *proto.ST_LeagueBattle_Log)

func GetLeagueBoxReward

func GetLeagueBoxReward(uid, targetUid, boxId uint64) proto.RetActionType

func GetLeagueBusinessHistory

func GetLeagueBusinessHistory(uid uint64, hType, hStart, hLimit uint32, res *httputils.Respon)

func GetLeagueDetailData

func GetLeagueDetailData(id uint64, vid uint32) *proto.ST_League_Detail_Info

func GetLeagueHelpDetail

func GetLeagueHelpDetail(id uint64) *proto.ST_LeagueHelpDetail_PB

func GetLeagueRankingList

func GetLeagueRankingList(uid uint64, rankingListType, start, end uint32, rank_name string) *proto.ST_PowerRankingList

* @brief 获取联盟相关排行榜

func GetLeagueSimpleInfoList

func GetLeagueSimpleInfoList(idList []uint64) (*proto.ST_League_Simple_Info_List, proto.LeagueResult)

* @brief 获取联盟简单信息列表

func GetLeagueTaskReward

func GetLeagueTaskReward(uid uint64, taskId int32) proto.RetActionType

func GetLgRoleInfo

func GetLgRoleInfo(userData *cache.Info) bool

func GetLoginGiftReward

func GetLoginGiftReward(uid uint64, index uint32) proto.RetActionType

func GetMailIdListByType

func GetMailIdListByType(uid uint64, mailType uint32) (proto.RetActionType, *proto.ST_Uint64List_PB)

func GetMailSummary

func GetMailSummary(uid uint64, mailTypes *proto.ST_MailTypeList) (proto.RetActionType, *proto.ST_MailAssetSummary)

func GetMainCityLevelReward

func GetMainCityLevelReward(uid uint64, level uint32) proto.RetActionType

func GetMaxDurable

func GetMaxDurable(userData *cache.Info) uint32

func GetMaxHp

func GetMaxHp(userData *cache.Info) uint64

func GetMiracleGarrisonCapacity

func GetMiracleGarrisonCapacity(cid uint32) (uint32, uint32)

func GetMiracleWarDetail

func GetMiracleWarDetail(cid int32) *proto.ST_MiracleWar_PB

func GetMiracleWarRecords

func GetMiracleWarRecords(uid uint64, recordType, startIdx, count int32) (proto.RetActionType, []*proto.ST_MiracleWarRecord_PB)

func GetNewPrivateChat

func GetNewPrivateChat(respon *httputils.Respon, uid, targetUid uint64)

func GetNoviceReward

func GetNoviceReward(uid uint64) proto.RetActionType

领取活动奖励

func GetNoviceTaskReward

func GetNoviceTaskReward(uid uint64, taskId uint32) proto.RetActionType

领取活动任务奖励

func GetPrepareForWarRank

func GetPrepareForWarRank(uid uint64, rankType, start, end uint32) *proto.ST_PowerRankingList

func GetPrepareForWarReward

func GetPrepareForWarReward(uid uint64, rewardIdx uint32) proto.RetActionType

func GetPrisonInfo

func GetPrisonInfo(targetUid uint64) (*proto.ST_PrisonAsset_PB, proto.RetActionType)

func GetPrisonMessage

func GetPrisonMessage(targetUid uint64, startId, count uint32) (proto.RetActionType, *proto.ST_PrisonMessageList_PB)

func GetPrivateChatList

func GetPrivateChatList(respon *httputils.Respon, uid, targetUid uint64, startIdx uint64, maxCount uint32)

获取私聊列表

func GetRoles

func GetRoles(accountid, uid uint64) *proto.ST_GetRoleRst

func GetServerSimpleList

func GetServerSimpleList(uid uint64, userName, Ip string) *proto.ST_ServerList

func GetSevenDayReward

func GetSevenDayReward(uid uint64) proto.RetActionType

领取七日活动奖励

func GetSevenDayTaskReward

func GetSevenDayTaskReward(uid uint64, taskId uint32) (proto.RetActionType, uint32)

领取七日活动任务奖励

func GetSimpleInfoList

func GetSimpleInfoList(uid uint64, index int32) *proto.ST_League_Simple_Info_List

func GetStarBoxReward

func GetStarBoxReward(uid uint64, chapterId, starBoxIdx uint32) proto.RetActionType

获取星星宝箱奖励

func GetStrongestCommanderRank

func GetStrongestCommanderRank(uid uint64, rankType, start, end uint32) *proto.ST_PowerRankingList

func GetStrongestCommanderReward

func GetStrongestCommanderReward(uid uint64, rewardIdx uint32) proto.RetActionType

func GetTaskAccNum

func GetTaskAccNum(userData *cache.Info, conf *CSV.CF_Task_DataEntry) uint64

func GetTransferBattleInfo

func GetTransferBattleInfo(uid uint64) *proto.ST_Client_TransferBattle_Info

func GetTransferBattleLeagueRank

func GetTransferBattleLeagueRank(uid uint64, rankType, start, end uint32) *proto.ST_Client_TransferBattle_League_Rank

func GetTransferBattleReward

func GetTransferBattleReward(uid uint64, rewardType, rewardIdx uint32) proto.RetActionType

func GetUseOutTime

func GetUseOutTime(user *cache.Info) uint64

func GetUserData

func GetUserData(uid uint64, language uint32, clientInfo *cache.ClientInfo, res *httputils.Respon)

* @brief 获取用户数据

func GetUserInfo

func GetUserInfo(userId uint64, res *httputils.Respon)

func GetUserRankingList

func GetUserRankingList(uid uint64, rankingListType, start, end uint32, rank_name string) *proto.ST_PowerRankingList

* @brief 获取用户相关排行榜

func GetVIPDailyReward

func GetVIPDailyReward(uid uint64) proto.RetActionType

func GetVipPassASTimes

func GetVipPassASTimes(vipLevel uint32) uint32

func GetWarCityFromPos

func GetWarCityFromPos(tmpx, tmpy int32) (uint32, uint64)

遍历所有城市判断水泥地归属

func GetWorldSituationRankSnapshotList

func GetWorldSituationRankSnapshotList(csvId, start, end uint32) *proto.ST_PowerRankingList

func GetWorldSituationReward

func GetWorldSituationReward(uid uint64, csvId int32) (proto.RetActionType, int32)

func GetcityID

func GetcityID(wdata *cache.WorldDataEntry) uint32

func GiftCode

func GiftCode(uid uint64, code string) (Protocol.RetActionType, []*Protocol.ST_ItemEntry_PB)

func GiftPackPurchase

func GiftPackPurchase(userData *cache.Info, giftId uint64, endTimestamp uint64, orderId string, byGM bool) Protocol.RetActionType

* @brief 购买礼包 @param userData 用户数据 @param giftId 礼包id

func GiveDefHeaderBox

func GiveDefHeaderBox(userData *cache.Info)

func Go_DelWildMonster

func Go_DelWildMonster()

func Go_OnlinePlayerTick

func Go_OnlinePlayerTick()

func Go_UpdateOssGiftPack

func Go_UpdateOssGiftPack()

func Go_UpdateWarCity

func Go_UpdateWarCity()

func Go_UpdateWorldMapActivity

func Go_UpdateWorldMapActivity()

func Go_WILDMONSTEREX

func Go_WILDMONSTEREX()

func HandleAddBookmark

func HandleAddBookmark(userId uint64, bookmark *proto.ST_BookmarkEntry_PB) proto.RetActionType

func HandleAlterBookmark

func HandleAlterBookmark(userId uint64, bookmark *proto.ST_BookmarkEntry_PB) proto.RetActionType

func HandleGetPolicyToken

func HandleGetPolicyToken(uid uint64, ctrlType uint32, fileName string, fileSize int64, res *httputils.Respon) bool

* @brief 获取OSS上传令牌 //AWS: 获取预授权URL

func HandleQueryAccountBound

func HandleQueryAccountBound(uid uint64, accountType uint32, idToken, secret string, res *httputils.Respon)

* @brief 查询账户绑定信息

func HandleRemoveBookmark

func HandleRemoveBookmark(userId uint64, tileIds *proto.ST_Int64List_PB) proto.RetActionType

func HandleUpdateAccountDetails

func HandleUpdateAccountDetails(uid uint64, accountType uint32, idToken, secret string, res *httputils.Respon)

* @brief 绑定账户信息

func HasWarCityUint

func HasWarCityUint(d *cache.WorldDataEntry) bool

func HelpLeagueBox

func HelpLeagueBox(uid, targetUid, boxId uint64) proto.RetActionType

func HeroFragmentsExchange

func HeroFragmentsExchange(uid uint64, heroId, num uint32) proto.RetActionType

* @brief 英雄碎片兑换

func HeroSkillUp

func HeroSkillUp(uid uint64, heroId uint32) (proto.RetActionType, uint32)

* @brief 英雄技能升级

func HeroStarUp

func HeroStarUp(uid uint64, heroId uint32) proto.RetActionType

* @brief 英雄升星

func IgnoreAllLeagueApply

func IgnoreAllLeagueApply(uid uint64) proto.LeagueResult

func IgnoreLeagueApply

func IgnoreLeagueApply(uid, targetUid uint64) proto.LeagueResult

func InitCurDurable

func InitCurDurable(userData *cache.Info)

func InitDelWildMonster

func InitDelWildMonster()

func InitStrongestCommander

func InitStrongestCommander(scInfo *proto.ST_StrongestCommander_Entry)

func InitTransferBattle

func InitTransferBattle(fbInfo *proto.ST_TransferBattle_Group_Entry)

func InitUserWorldSituation

func InitUserWorldSituation(uid uint64)

func InitWorldMapActivity

func InitWorldMapActivity()

func Initialize

func Initialize()

func InvitationJoinLeague

func InvitationJoinLeague(uid, targetuid uint64) proto.LeagueResult

func InvitationUsersJoinLeague

func InvitationUsersJoinLeague(uid uint64, targetUidList *proto.ST_Uint64List_PB) (*proto.ST_Int64List_PB, *proto.ST_Int64List_PB)

func IsManuCapHero

func IsManuCapHero(userData *cache.Info, defpos uint32) (hasManu bool)

func IsSecondTime

func IsSecondTime(userData *cache.Info, remaintime uint64) proto.RetActionType

func JoinLeague

func JoinLeague(uid, leagueid uint64) proto.LeagueResult

func KeptMail

func KeptMail(res *httputils.Respon, uid uint64, mailIdList *proto.ST_Uint64List_PB)

func KickCityGarrisonUser

func KickCityGarrisonUser(tileID int32, garrisonid uint64) proto.RetActionType

func KickGarrisonUser

func KickGarrisonUser(uid, garrisonid uint64) proto.RetActionType

func KickMassUser

func KickMassUser(uid, massid, kickuid uint64) proto.RetActionType

func KillCommander

func KillCommander(uid uint64, targetUid uint64) proto.RetActionType

处决指挥官

func LeagueBoxRefresh

func LeagueBoxRefresh(uid uint64) proto.RetActionType

func LeagueBoxSendMsg

func LeagueBoxSendMsg(uid, boxId uint64) proto.RetActionType

func LeagueBoxSpeedUpByCash

func LeagueBoxSpeedUpByCash(userData *cache.Info, actionId uint32, costVal uint64) proto.RetActionType

func LeagueBoxSpeedUpByItem

func LeagueBoxSpeedUpByItem(userData *cache.Info, itemTypeID, itemCount, actionId uint32) bool

func LeagueDevote

func LeagueDevote(leagueId, userId uint64, technologyID uint32, devoteType uint32, res *httputils.Respon) (proto.RetActionType, int32, int32)

* @brief 联盟捐献 @param leagueId 联盟ID @param userId 用户ID @param technologyID 科技ID @param devoteType 捐献类型 @param res 响应

func LeagueMessage

func LeagueMessage(uid, leagueid uint64, message string) proto.LeagueResult

func LeaguePermission

func LeaguePermission(uid, targetId, leagueId uint64, operator, leagueMemberLevel int32, res *httputils.Respon) proto.LeagueResult

func LidClean

func LidClean()

func LimitPower

func LimitPower(uid uint64, idx int32) proto.RetActionType

func LockOrUnlockMail

func LockOrUnlockMail(res *httputils.Respon, uid uint64, value interface{}, lockOrUnlock uint32)

func LotteryCardActivity

func LotteryCardActivity(userData *cache.Info, activityId int64, lotterTimes uint32) (ret proto.RetActionType, rstList proto.ST_Uint32List_PB)

func LotteryCardStageRewards

func LotteryCardStageRewards(userData *cache.Info, activityId int64, stage uint32) (ret proto.RetActionType)

func LuckyStarPurchase

func LuckyStarPurchase(userData *cache.Info, uid uint64, giftPackageId int64, luckyStarItemId uint32, orderId string) string

func MainCityEventHandleBattle

func MainCityEventHandleBattle(userData *cache.Info, eventID uint64, unitAsset string, heroIDList string) (bool, proto.RetActionType, *proto.ST_BattleInfo_PB, *proto.ST_Vector4IntList_PB)

* @brief 主城战斗

func MainCityEventHandleGetReward

func MainCityEventHandleGetReward(userData *cache.Info, eventID uint64) proto.RetActionType

* @brief 领取事件奖励

func MainCityEventHandlePause

func MainCityEventHandlePause(userData *cache.Info, eventID uint64) proto.RetActionType

* @brief 主动停止主城事件

func MainCityEventHandleStartEvent

func MainCityEventHandleStartEvent(userData *cache.Info, eventID uint64, unitasset string, heroIDList string) proto.RetActionType

* @brief 开始事件

func MainCityEventSpeedUpByCash

func MainCityEventSpeedUpByCash(userData *cache.Info, actionId uint32) proto.RetActionType

func MainCityEventSpeedUpByItem

func MainCityEventSpeedUpByItem(userData *cache.Info, itemTypeID, itemCount, actionId uint32) bool

func MainCityLevelUpgradeEventHandler

func MainCityLevelUpgradeEventHandler(param []interface{})

func MakeAWSSession

func MakeAWSSession() *session.Session

* @brief 得到AWSsession

func MaterialCompose

func MaterialCompose(userData *cache.Info, materialID uint32, isAll uint32) (proto.RetActionType, uint32, uint64)

* @brief 材料合成

func MaterialDecompose

func MaterialDecompose(userData *cache.Info, materialID int64, isAll uint32) (proto.RetActionType, uint32, uint64)

* @brief 材料分解

func MiracleWarGift

func MiracleWarGift(giftId int64, uid, targetUid uint64) (proto.RetActionType, *proto.ST_WarGift_PB, *proto.ST_MiracleWarRecord_PB)

func MiracleWarStart

func MiracleWarStart()

func MopUpAllMapList

func MopUpAllMapList(uid uint64) (proto.RetActionType, *proto.ST_MopUpRewards_PB)

扫荡所有地图

func MopUpMapList

func MopUpMapList(uid uint64, mapId, count uint32) (proto.RetActionType, *proto.ST_MopUpRewards_PB)

扫荡

func Movecity

func Movecity(data *UserCommand, isLeagueMove bool) bool

func NewOssLeagueBuilding

func NewOssLeagueBuilding(userData *cache.Info, arg ...interface{})

func NotifyLeagueBattleLog

func NotifyLeagueBattleLog(lid uint64)

func NotifyUploadSucceed

func NotifyUploadSucceed(uid uint64, ctrlType uint32, avatarKey, fileName string, res *httputils.Respon) bool

* @brief 修改头像状态

func OnlinePlayerReloadPackGiftCfg

func OnlinePlayerReloadPackGiftCfg()

func OpenLeagueBox

func OpenLeagueBox(uid uint64, boxId uint64) proto.RetActionType

func Pay

func Pay(payType uint32, uid uint64, giftPackageId int64, productId, orderId string, totalPay float64, endTimeStamp uint64, luckyStarItemId uint32) string

func PopupedPack

func PopupedPack(uid uint64, ids *Protocol.ST_Uint64List_PB) Protocol.RetActionType

拍脸后回调

func ProcessActionCommand

func ProcessActionCommand(actionParameter *ActionParameter, respon *httputils.Respon)

func ProcessActionEnd

func ProcessActionEnd(actionParameter *ActionParameter, respon *httputils.Respon)

func ProcessActionStart

func ProcessActionStart(actionParameter *ActionParameter, respon *httputils.Respon)

* @brief 开始活动

func ProcessActivityLogin

func ProcessActivityLogin(userData *cache.Info)

func ProcessActivityTask

func ProcessActivityTask(userData *cache.Info)

func ProcessBlackMarketLogin

func ProcessBlackMarketLogin(userData *cache.Info)

func ProcessChangeServerRequest

func ProcessChangeServerRequest(request *proto.ST_ChangeServer_Request) proto.ChangeServerRetCode

func ProcessChangeServerResponse

func ProcessChangeServerResponse(response *proto.ST_ChangeServer_Response)

func ProcessCommanderEquipMake

func ProcessCommanderEquipMake(userData *cache.Info, buildingID, actionType, equipID uint32) proto.RetActionType

* @brief 开始装备合成

func ProcessCommanderLevelUpPrisonAttribute

func ProcessCommanderLevelUpPrisonAttribute(userData *cache.Info)

func ProcessGiftCheck

func ProcessGiftCheck(userData *cache.Info)

* @brief 玩家上线时检测是否有礼包达到购买条件

func ProcessHeroDefense

func ProcessHeroDefense(userData *cache.Info, heroID uint32, onOrOff uint32, defpos int32, auto bool) bool

处理英雄驻守城墙

func ProcessMainCityDefenseLogic

func ProcessMainCityDefenseLogic(uid uint64, result bool, leftDurable uint32, speed uint64) uint32

处理主城城防逻辑

func ProcessMainCityDefenseLogic_MonsterAtk

func ProcessMainCityDefenseLogic_MonsterAtk(uid uint64, result bool, leftDurable uint32, speed uint64) uint32

func ProcessMainCitySkin

func ProcessMainCitySkin(userData *cache.Info)

func ProcessSyncAccountDetailsResponse

func ProcessSyncAccountDetailsResponse(res *proto.ST_SyncAccountDetailsResponse)

func ProcessTBTransferServerResponse

func ProcessTBTransferServerResponse(response *proto.ST_TBTransferServer_Response)

func ProcessUnitAttribute

func ProcessUnitAttribute(targetType uint32, outCorps *stCorps, globalAttribute map[uint64]uint64, commonBattleParm *stCommonBattleParm, isDef bool, calcAttribute bool)

* @brief 处理战斗单位属性加成 calcAttribute 是否计算属性加成

func ProcessUserCommand

func ProcessUserCommand(data *UserCommand, respon *httputils.Respon)

func ProduceResource

func ProduceResource(uid uint64)

func PushMsg

func PushMsg(msgType proto.PushMsgType, params []interface{})

func PushMsgWithoutMsgType

func PushMsgWithoutMsgType(languageID int64, pushType int, userData *cache.Info, endTime uint64)

func Questionnaire

func Questionnaire(userData *cache.Info, activityId int32) (ret proto.RetActionType)

func RadarCheckOtherGAction

func RadarCheckOtherGAction(dataAsset *cache.GlobalActionEntry, isLeaving bool)

雷达检测针对当前地块的其他全局行为

func Raffle

func Raffle(userData *cache.Info, costType oss.AirDropCostType, res *httputils.Respon) bool

func RansomCommander

func RansomCommander(uid, targetUid uint64) proto.RetActionType

赎回指挥官

func RcvBubble

func RcvBubble(userData *cache.Info, bubbleId uint32, remainTime int64) bool

func RcvHeaderBox

func RcvHeaderBox(userData *cache.Info, boxId uint32, remainTime int64) bool

func ReCountLeagueMemberCityBuff

func ReCountLeagueMemberCityBuff(lid uint64)

func ReadAllPrivateChat

func ReadAllPrivateChat(respon *httputils.Respon, uid uint64)

func ReadLeagueBattleLog

func ReadLeagueBattleLog(uid uint64)

func ReadLeagueMessage

func ReadLeagueMessage(uid uint64)

func RecallWorldDataEntryArmy

func RecallWorldDataEntryArmy(assert *cache.WorldDataEntry) bool

func RecallWorldDataEntryArmy2

func RecallWorldDataEntryArmy2(assert *cache.WorldDataEntry) bool

func ReceiveLeagueKeyGift

func ReceiveLeagueKeyGift(uid uint64) (proto.RetActionType, *proto.ST_Asset_ItemPack_PB)

func RecruitHero

func RecruitHero(uid uint64, heroID uint32) proto.RetActionType

* @brief 召唤英雄

func ReduceVipPoint_GM

func ReduceVipPoint_GM(charInfo *cache.Info, reducePoint uint64)

func RefreshEliteChanllangeTims

func RefreshEliteChanllangeTims(user *cache.Info)

func ReleaseCommander

func ReleaseCommander(uid uint64, targetUid uint64) proto.RetActionType

释放指挥官

func RemoveMyChat

func RemoveMyChat(respon *httputils.Respon, channel int32, uid uint64, titleID uint64)

删除我的话题

func RemovePrivateChat

func RemovePrivateChat(respon *httputils.Respon, uid uint64, ids []uint64)

删除私聊

func RemoveReply

func RemoveReply(respon *httputils.Respon, channel int32, uid uint64, replyId uint32, titleID uint64)

删除我的回复

func Report

func Report(uid, targetUid uint64, reportType uint32, reportContent string) proto.RetChatType

func ReportOnline

func ReportOnline(sid, number uint32)

func RequestAirdrop

func RequestAirdrop(userData *cache.Info, freeTime uint64, res *httputils.Respon)

func RequestChapterTaskRew

func RequestChapterTaskRew(userData *cache.Info, cID, tID uint32) (Protocol.RetActionType, *Protocol.ST_Asset_Chapters_PB)

func ResearchMax

func ResearchMax(uid uint64)

func ResetBuildingPos

func ResetBuildingPos(userData *cache.Info)

func ResetPurchaseGift_GM

func ResetPurchaseGift_GM(userData *cache.Info, giftID uint64)

func ReviveCommander

func ReviveCommander(uid uint64) proto.RetActionType

复活指挥官

func RobotBattle

func RobotBattle(battleKey *stBattleKey)

* @brief 机器人战斗

func SafeDispatchTaskHandleFinish

func SafeDispatchTaskHandleFinish(userData *cache.Info, lActionID uint32) bool

* @brief 处理快速完成任务

func SafeDispatchTaskHandleGetReward

func SafeDispatchTaskHandleGetReward(userData *cache.Info, taskID uint64) (proto.RetActionType, *proto.ST_Vector4IntList_PB)

* @brief 处理领取奖励

func SafeDispatchTaskHandleReceiveTask

func SafeDispatchTaskHandleReceiveTask(userData *cache.Info, id uint64, heroIDList *proto.ST_Int32List_PB) proto.RetActionType

* @brief 处理领取任务

func SafeLeagueTaskHandleFinish

func SafeLeagueTaskHandleFinish(userData *cache.Info, lActionID uint32) bool

* @brief 处理快速完成任务

func SafeOnDispatchTaskHandle

func SafeOnDispatchTaskHandle(userData *cache.Info, taskID uint64, callback func(data *proto.ST_DispatchTaskEntry_PB) bool) bool

* @brief 处理加速任务

func SaveRankSnapshot

func SaveRankSnapshot(csvId int64, rankingList *proto.ST_PowerRankingList)

func SendArchonNotice

func SendArchonNotice(uid uint64, content string) (proto.RetActionType, *proto.ST_GlobalNotice)

func SendGMMail

func SendGMMail(userData *cache.Info)

* @brief GM发送邮件

func SendLeagueGroupMail

func SendLeagueGroupMail(res *httputils.Respon, fromId uint64, toIdList []uint64, content string)

func SetBounty

func SetBounty(uid, targetUid uint64, bounty uint32) proto.RetActionType

设置赏金

func SetBuildingLevel

func SetBuildingLevel(userData *cache.Info, buildinglevel uint32)

func SetDelWildMonsterTime

func SetDelWildMonsterTime(now time.Time)

func SetFirstEnterBigMap

func SetFirstEnterBigMap(uid uint64, value bool)

func SetFlag

func SetFlag(uid uint64, color, background, icon uint32) proto.LeagueResult

func SetLeague

func SetLeague(uid uint64, leaguename, outSlogan, shortname string, language, needreview uint32, max, min uint64) proto.LeagueResult

func SetLegueSlogan

func SetLegueSlogan(uid uint64, slogan string) proto.LeagueResult

func SetMemTitle

func SetMemTitle(uid, targetuid, title uint64) proto.LeagueResult

func SetMemberTitle

func SetMemberTitle(uid uint64, titles []*proto.ST_LeagueMemberTitleName_PB) proto.LeagueResult

func SetRansom

func SetRansom(uid, targetUid uint64, ransom uint32) proto.RetActionType

设置赎金

func SetRecommendLeagueTech

func SetRecommendLeagueTech(uid uint64, oldTechId, newTechId uint32) proto.RetActionType

func SetSession

func SetSession(uid uint64, respon *httputils.Respon)

func SetUserAvatarBox

func SetUserAvatarBox(uid uint64, avatarBoxId uint32, res *httputils.Respon)

* @brief 设置玩家头像

func SetUserName

func SetUserName(userId uint64, name string, res *httputils.Respon)

func SetUserNickName

func SetUserNickName(uid uint64, nickName string, res *httputils.Respon)

* @brief 设置玩家昵称

func SetUserSignature

func SetUserSignature(uid uint64, signature string, res *httputils.Respon)

* @brief 设置玩家签名

func SetWarCityStage

func SetWarCityStage(cid uint32, stage int32, tm uint64) bool

func SetWarCityStageFromLv

func SetWarCityStageFromLv(lv int64, s int32)

func SignInHandleSignIn

func SignInHandleSignIn(userData *cache.Info) (proto.RetActionType, []*proto.ST_Vector4Int_PB)

* @brief 飞艇签到

func StartCheckCondition

func StartCheckCondition(userData *cache.Info, changeValue int64, giftPackId int64, mainType Protocol.GiftConditionType, strMainValue string, i64SecondType int64, strSecondValue string) bool

* @brief 开始检查条件 @param userData 用户数据 @parm giftPackEntry 礼包系列的配置数据 @param changeValue 变化值 @param giftPackId 礼包系列ID @param firstType 条件1类型 @param strFirstValue 条件1值 @param SecondType 条件2类型 @param strSecondValue 条件2值

func StartLeagueTask

func StartLeagueTask(uid uint64, taskId int32) proto.RetActionType

func StartSaleCommonGift

func StartSaleCommonGift(userData *cache.Info, giftPackEntry *CSV.CF_GiftPackList_DataEntry) bool

* @brief 开始出售 @param userData 用户数据 @parm giftPackEntry 礼包系列的配置数据

func StartSaleRandomGift

func StartSaleRandomGift(userData *cache.Info, randomID int64) bool

* @brief 出售随机礼包 @param userData 用户数据 @parm giftPackEntry 礼包系列的配置数据

func StartSaleRandomGiftEx

func StartSaleRandomGiftEx(userData *cache.Info, RandomGiftID int64) bool

* @brief 出售随机礼包 @param userData 用户数据 @parm giftPackEntry 礼包系列的配置数据

func StartTakeCard

func StartTakeCard(uid uint64, cardPoolID, times uint32) (proto.RetActionType, *proto.ST_Vector4IntList_PB, *proto.ST_Vector4IntList_PB)

* @brief 开始抽卡

func StatueBuildStatue

func StatueBuildStatue(userData *cache.Info, statueClass, statueLevel, buildingId uint32) proto.RetActionType

* @brief 建造雕像

func StatueDecompose

func StatueDecompose(userData *cache.Info, item *proto.ST_Vector4Int_PB) proto.RetActionType

* @brief 分解

func StatueEnhance

func StatueEnhance(userData *cache.Info, statueID uint32) proto.RetActionType

* @brief 雕像增幅

func StatueExchangeMaterial

func StatueExchangeMaterial(userData *cache.Info, item *proto.ST_Vector4Int_PB) proto.RetActionType

* @brief 兑换材料

func StatueReduceEnhance

func StatueReduceEnhance(userData *cache.Info, actionID uint32)

* @brief 清除增幅

func StatueSafeCancelBuildStatue

func StatueSafeCancelBuildStatue(userData *cache.Info, actionId uint32)

* @brief 撤销建造

func StatueSafeDestroyStatue

func StatueSafeDestroyStatue(userData *cache.Info, statueID uint32) proto.RetActionType

* @brief 销毁雕像

func StatueSafeMoveStatue

func StatueSafeMoveStatue(userData *cache.Info, statueID, x, y uint32) proto.RetActionType

* @brief 移动雕像

func StatueSafeOpenStatue

func StatueSafeOpenStatue(userData *cache.Info, statueId uint32) proto.RetActionType

* @brief 打开雕像

func StatueSpeedUpByCash

func StatueSpeedUpByCash(userData *cache.Info, statue *proto.ST_Statue_PB, cost uint32) proto.RetActionType

* @brief 使用金币加速

func StatueSpeedUpByItem

func StatueSpeedUpByItem(userData *cache.Info, statueEntry *proto.ST_Statue_PB, itemTypeID, itemCount uint32) bool

* @brief 雕像物品加速

func SummonMonster

func SummonMonster(uid uint64, x, y, itemId int32) proto.RetActionType

func Supply

func Supply(uid uint64, cashType, supplyType uint32) *proto.ST_ResourceObtain_Supply_PB

func SwitchNewAccount

func SwitchNewAccount(uid uint64, accountType uint32, idToken, secret string, res *httputils.Respon)

* @brief 切换账户

func SwitchRole

func SwitchRole(uid uint64) *proto.ST_SwitchRoleRst

func SyncServerList

func SyncServerList(infos []*proto.ST_Server_PB)

func SysncUserAccountInfo

func SysncUserAccountInfo()

func SystemRecommendLeague

func SystemRecommendLeague(userData *cache.Info)

func TBTransferServer

func TBTransferServer(uid uint64, changeType uint32, tileId int32) proto.ChangeServerRetCode

func TakeBoonReward

func TakeBoonReward(uid uint64, dataID, boonType uint32) proto.RetActionType

func TestKernelBattle

func TestKernelBattle(userData *cache.Info)

* @brief 仅仅为测试机器人战斗准备的一级一星一阶英雄,用于测试战斗核心代码

func TestUnlockTalent

func TestUnlockTalent(uid uint64)

func TickLeagueBoxRefresh

func TickLeagueBoxRefresh(userData *cache.Info)

func TimeLeagueCenter

func TimeLeagueCenter(worldAssetData *cache.WorldDataEntry)

func TriggerEliteChapter

func TriggerEliteChapter(vipLevel uint32, mainCity uint32, asset *proto.ST_Asset_MapList_PB, chapterId, mapId uint32)

func TrySetLeagueTaskRefreshTimestamp

func TrySetLeagueTaskRefreshTimestamp(uid uint64)

func UpdateTaskGetRewardId

func UpdateTaskGetRewardId(userData *cache.Info, entryId uint64) *proto.ST_AchievementFinishedItem_PB

* @brief 更新下一个任务

func UpdateUserSid

func UpdateUserSid(uid uint64, sid, currentSid uint32) *proto.ST_NoRespon_PB

func UseFoolsDayItem

func UseFoolsDayItem(userData *cache.Info, activityId, num int32) (ret proto.RetActionType, rstLst *proto.ST_Uint32List_PB)

func UseItemAddNewFashion

func UseItemAddNewFashion(userData *cache.Info, fashionType, id uint32, remainTime int64) bool

func UseItemAddUnit

func UseItemAddUnit(userData *cache.Info, unitId uint32, unitNum uint64) bool

func UseItemChangeMainCitySkin

func UseItemChangeMainCitySkin(userData *cache.Info, skinId uint32, remainTime int64) bool

func UseItemInItemPack

func UseItemInItemPack(charInfo *cache.Info, itemTypeID, itemCount, chooseID uint32, needCount *uint32) (bool, *proto.ST_Asset_ItemPack_PB)

func UseItemOnGlobalAction

func UseItemOnGlobalAction(charInfo *cache.Info, globalActionID uint64, itemTypeID, itemCount uint32, itemnameid uint32) (bool, int)

func UseItemOnLocalAction

func UseItemOnLocalAction(charInfo *cache.Info, actionID uint32, itemTypeID, itemCount uint32) bool

func UseItemRefreshLeagueTask

func UseItemRefreshLeagueTask(uid uint64)

func UserActionBack

func UserActionBack(userinfo *cache.Info)

func UserLoginEventHandler

func UserLoginEventHandler(params []interface{})

func User_FinishEntry

func User_FinishEntry(tmpInfo *cache.Info, id uint64)

func VipUpdateASLeftTimes

func VipUpdateASLeftTimes(user *cache.Info, oldLevel, newLevel int64)

func WarCityStageUpdate

func WarCityStageUpdate(cid uint32)

func WinCity

func WinCity(cid uint32, lid uint64)

func WorldSituationReset

func WorldSituationReset()

func WorldSituationSet

func WorldSituationSet(num uint64) (string, string)

Types

type ActionParameter

type ActionParameter struct {
	Uid              uint64
	ActionType       uint32
	ActionID         uint32
	GActionID        uint64
	OActionID        uint64
	BuildingType     uint32
	BuildingID       uint32
	UnitType         uint32
	UnitNum          uint64
	ResearchTypeID   uint32
	StartTileID      int32
	EndTileID        int32
	TileID           int32
	Asset            string
	HeroIDList       string
	ParentID         uint64
	WaitTime         uint32
	ItemTypeID       uint32
	ItemCount        uint32
	Resource         string
	SkillID          uint32
	TalentID         uint32
	StatueClass      uint32
	StatueLevel      uint32
	EventId          uint32
	BoxId            uint32
	TargetUid        uint64
	FactoryItemID    uint64
	FactoryOpAll     uint32
	BuildingIDList   string
	DefenseOp        uint32
	DefensePos       int32
	Hit              uint32
	TileIDList       string
	UnlockTalent     string
	ItemTypeIDs      *proto.ST_Uint64List_PB
	ItemCounts       *proto.ST_Uint64List_PB
	CrossSpecialTile uint32
}

type ActivityManager

type ActivityManager struct {
}
var (
	Instance_ActivityManager *ActivityManager
)

func (*ActivityManager) GetActivityStage

func (this *ActivityManager) GetActivityStage(actID uint32) uint32

type BattleInstance

type BattleInstance struct {
	// contains filtered or unexported fields
}

type BattleRecordInstance

type BattleRecordInstance struct {
	// contains filtered or unexported fields
}

type ChapterTaskID

type ChapterTaskID struct {
	Cid int64
	Tid int64
}

type ConfigStruct

type ConfigStruct struct {
	Expiration string     `json:"expiration"`
	Conditions [][]string `json:"conditions"`
}

type EventRequire

type EventRequire struct {
	PlayerLevel uint32
	InLeague    bool
	VIPLevel    uint32
	HeroID      uint32
	HeroLevel   uint32
	HeroQuality uint32
}

* @brief 事件需求

func EventRequireFromString

func EventRequireFromString(input string) *EventRequire

* @brief 从字符串转换

func (*EventRequire) Validate

func (object *EventRequire) Validate(userData *cache.Info) bool

* @brief 校验条件

type IDProbabilityPair

type IDProbabilityPair struct {
	// contains filtered or unexported fields
}

type IDProbabilityPairArray

type IDProbabilityPairArray []IDProbabilityPair

func (IDProbabilityPairArray) Len

func (object IDProbabilityPairArray) Len() int

func (IDProbabilityPairArray) Less

func (object IDProbabilityPairArray) Less(i, j int) bool

func (IDProbabilityPairArray) Swap

func (object IDProbabilityPairArray) Swap(i, j int)

type LC_WorldMapActivity_Default

type LC_WorldMapActivity_Default struct {
	NewRefresh chan *RefreshParam
	// contains filtered or unexported fields
}
var (
	Instance_WorldMapActivity_Default *LC_WorldMapActivity_Default

	DelWildMonsterTime time.Time
)

func (*LC_WorldMapActivity_Default) ImportNewPlayer

func (this *LC_WorldMapActivity_Default) ImportNewPlayer(userData *cache.Info)

func (*LC_WorldMapActivity_Default) ProcessActivityStage

func (this *LC_WorldMapActivity_Default) ProcessActivityStage(params []interface{})

type LeagueCupTimerStruct

type LeagueCupTimerStruct struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

type MonsterAtkCity

type MonsterAtkCity struct {
	ChanExit chan bool
	// contains filtered or unexported fields
}

type MonsterAtkCityMgr

type MonsterAtkCityMgr struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func GetMacMgrInstance

func GetMacMgrInstance() *MonsterAtkCityMgr

func (*MonsterAtkCityMgr) ActivityStageChange

func (m *MonsterAtkCityMgr) ActivityStageChange(stage, from uint32)

func (*MonsterAtkCityMgr) ClearData

func (m *MonsterAtkCityMgr) ClearData()

func (*MonsterAtkCityMgr) ClearGM

func (m *MonsterAtkCityMgr) ClearGM(player *cache.Info)

func (*MonsterAtkCityMgr) GetFailTms

func (m *MonsterAtkCityMgr) GetFailTms(uid uint64) (tms int32)

func (*MonsterAtkCityMgr) GetMacInfo

func (m *MonsterAtkCityMgr) GetMacInfo(player *cache.Info, activityId int64) (bool, *proto.ST_MonsterAtkCity)

func (*MonsterAtkCityMgr) GetOrgLid

func (m *MonsterAtkCityMgr) GetOrgLid(player *cache.Info) (lid uint64)

获取报名时的公会id

func (*MonsterAtkCityMgr) LoadData

func (m *MonsterAtkCityMgr) LoadData()

func (*MonsterAtkCityMgr) MacInfo

func (m *MonsterAtkCityMgr) MacInfo(player *cache.Info)

func (*MonsterAtkCityMgr) NewOssMac

func (m *MonsterAtkCityMgr) NewOssMac(player *cache.Info, wave, etype uint32,
	battleReport *proto.ST_BattleReport_PB, definfo *proto.ST_BattleReportDetail_PB, startunit []*proto.ST_UnitCount_PB)

func (*MonsterAtkCityMgr) PlayerQuitLeague

func (m *MonsterAtkCityMgr) PlayerQuitLeague(lid, uid uint64, memberCnt uint32)

func (*MonsterAtkCityMgr) SaveAllData

func (m *MonsterAtkCityMgr) SaveAllData()

func (*MonsterAtkCityMgr) SetMacInfo

func (m *MonsterAtkCityMgr) SetMacInfo(player *cache.Info, tm uint32)

func (*MonsterAtkCityMgr) StartChanllenge

func (m *MonsterAtkCityMgr) StartChanllenge(player *cache.Info, activityId int64) bool

func (*MonsterAtkCityMgr) StartMacDefBattle

func (m *MonsterAtkCityMgr) StartMacDefBattle(player *cache.Info, activityId int64) bool

type PolicyToken

type PolicyToken struct {
	AccessKeyId string `json:"accessid"`
	Host        string `json:"host"`
	Expire      int64  `json:"expire"`
	Signature   string `json:"signature"`
	Policy      string `json:"policy"`
	Directory   string `json:"dir"`
}

type RandomTuple

type RandomTuple struct {
	Min   uint32
	Max   uint32
	Value uint32
}

type RandomTupleArray

type RandomTupleArray []*RandomTuple

func (RandomTupleArray) Len

func (object RandomTupleArray) Len() int

func (RandomTupleArray) Less

func (object RandomTupleArray) Less(i, j int) bool

func (RandomTupleArray) Swap

func (object RandomTupleArray) Swap(i, j int)

type RefreshParam

type RefreshParam struct {
	// contains filtered or unexported fields
}

type RobotWorldBattlePool

type RobotWorldBattlePool struct {
	sync.RWMutex
	RobotUIDList      []uint64
	PVPMatchesDataMap map[*cache.Info]*cache.Info //key:进攻方 UID 防守方
	//PVPMatchesDataMap map[uint64]*RobotDefInfo //key:进攻方 UID 防守方
	RecordInstanceMap map[uint64]*BattleRecordInstance
	// contains filtered or unexported fields
}
var RobotWorldBattleManager *RobotWorldBattlePool

仅仅用于机器人战斗时记录战斗场次信息

func (*RobotWorldBattlePool) ClearRobotReocrd

func (this *RobotWorldBattlePool) ClearRobotReocrd()

func (*RobotWorldBattlePool) CreateInstance

func (this *RobotWorldBattlePool) CreateInstance(UID uint64) bool

func (*RobotWorldBattlePool) DeployRobotPVPBattle

func (this *RobotWorldBattlePool) DeployRobotPVPBattle()

准备PVP数据

func (*RobotWorldBattlePool) EndRobotBattle

func (this *RobotWorldBattlePool) EndRobotBattle(UID uint64, isSucceed uint32)

func (*RobotWorldBattlePool) ShowTotoalBattleNum

func (this *RobotWorldBattlePool) ShowTotoalBattleNum()

func (*RobotWorldBattlePool) StartRobotPVPBattle

func (this *RobotWorldBattlePool) StartRobotPVPBattle()

开始机器人PVP战斗

type TimerUids

type TimerUids struct {
	// contains filtered or unexported fields
}

type TranslateTask

type TranslateTask struct {
	UID        uint64
	LanguageID uint32
	Content    string
	ChannelID  int32
	SubChannel int32
	TitleID    uint64
}

type UserCommand

type UserCommand struct {
	Uid         uint64 `json:"uid"`
	X           int32  `json:"x"`
	Y           int32  `json:"y"`
	Commandtype uint32 `json:"commandtype"`
	WdataId     uint64 `json:"wdataid"`
}

type WarCityCount

type WarCityCount struct {
	// contains filtered or unexported fields
}

type WorldBattlePool

type WorldBattlePool struct {
	sync.RWMutex
	// contains filtered or unexported fields
}
var WorldBattleManager *WorldBattlePool

func (*WorldBattlePool) CreateInstance

func (this *WorldBattlePool) CreateInstance(worldDataId uint64, actionData *cache.GlobalActionEntry) bool

func (*WorldBattlePool) HasBattle

func (this *WorldBattlePool) HasBattle(worldDataId uint64) bool

func (*WorldBattlePool) ReleaseInstance

func (this *WorldBattlePool) ReleaseInstance(worldDataId uint64)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL