| | |
| | | __WriteEvent_mission_log(curPlayer, startType, missionName, isFinish, failReason)
|
| | | return
|
| | |
|
| | | def WriteFuncCMEAcceptable(curPlayer, funcID):
|
| | | return
|
| | | if funcID not in ChConfig.FuncCMEDict:
|
| | | return
|
| | | WriteEvent_custom_mission_log(curPlayer, ChConfig.FuncCMEDict[funcID], ChConfig.CME_Log_Acceptable)
|
| | | return True
|
| | |
|
| | | def WriteEvent_MWSuccess(curPlayer, mwID, succID, logType, isFinish=0):
|
| | | '''写自定义任务 - 法宝成就事件, 事件ID格式: 91+法宝ID+至少4位的成就ID
|
| | | '''
|
| | |
| | | # customEvent.chr_level = GetScribeEvent_chr_level(curPlayer)
|
| | | # customEvent.comments = CommFunc.GetStrCutoff(comments, 255)
|
| | | # WriteEvent(customEvent)
|
| | | #===========================================================================
|
| | | return
|
| | |
|
| | | #// A1 01 玩家电脑信息 #tagCMPCInfo
|
| | | #
|
| | | #struct tagCMPCInfo
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE PCOSLen; |
| | | # char PCOS[PCOSLen]; // 操作系统
|
| | | # BYTE ResolutionLen; |
| | | # char Resolution[ResolutionLen]; // 分辨率
|
| | | # BYTE BrowserLen; |
| | | # char Browser[BrowserLen]; // 浏览器
|
| | | # BYTE ScribeTypeLen; |
| | | # char ScribeType[ScribeTypeLen]; // 记录类型
|
| | | # BYTE ScribeDataLen; |
| | | # char ScribeData[ScribeDataLen]; // 记录扩展信息
|
| | | #};
|
| | | def ReceiveClientPCInfo(index, clientData, tick):
|
| | | #===========================================================================
|
| | | # curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | # PCOS = clientData.PCOS
|
| | | # Resolution = clientData.Resolution
|
| | | # Browser = clientData.Browser
|
| | | # ScribeType = clientData.ScribeType
|
| | | # #ScribeData = clientData.ScribeData
|
| | | # |
| | | # GameWorld.DebugLog("ReceiveClientPCInfo %s" % ScribeType)
|
| | | # GameWorld.DebugLog(" PCOS=%s" % PCOS)
|
| | | # GameWorld.DebugLog(" Resolution=%s" % Resolution)
|
| | | # GameWorld.DebugLog(" Browser=%s" % Browser)
|
| | | # |
| | | # # 转化为对方所需格式
|
| | | # if PCOS and "Windows" in PCOS:
|
| | | # PCOS = " ".join(PCOS.split(" ")[:2])
|
| | | # |
| | | # # 转化为对方所需格式
|
| | | # if Resolution:
|
| | | # Resolution = "%s*%s" % eval(Resolution)
|
| | | # |
| | | # if ScribeType == ShareDefine.Def_UserAction_Login:
|
| | | # firstLogin = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_FirstLogin)
|
| | | # if not firstLogin:
|
| | | # PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_Player_Dict_FirstLogin, 1)
|
| | | # WriteEvent_entry_firstlogin(curPlayer, Browser, Resolution, PCOS)
|
| | | # if curPlayer.GetLV() == 1:
|
| | | # WriteEvent_level_up(curPlayer) # 首登发送一次1级数据
|
| | | # GameWorld.DebugLog(" entry_firstlogin")
|
| | | # |
| | | # WriteEvent_login(curPlayer, Browser, Resolution, PCOS)
|
| | | #===========================================================================
|
| | | |
| | | return
|
| | |
|
| | | #// A2 19 游戏建议收集 #tagCMAdviceSubmit
|
| | | #
|
| | | #struct tagCMAdviceSubmit
|
| | | #{
|
| | | # tagHead Head;
|
| | | # BYTE Type; //提交类型
|
| | | # WORD Len;
|
| | | # char Content[Len]; //size = Len
|
| | | #};
|
| | | def OnSubmitBugSuggest(index, clientData, tick):
|
| | | #===========================================================================
|
| | | # curPlayer = GameWorld.GetPlayerManager().GetPlayerByIndex(index)
|
| | | # subType = clientData.Type
|
| | | # content = clientData.Content
|
| | | # eventName = Def_Custom_Events_Bug if subType == 0 else Def_Custom_Events_Suggest
|
| | | # WriteEvent_custom_events(curPlayer, eventName, content)
|
| | | # DataRecordPack.DR_BugSuggest(curPlayer, eventName, content)
|
| | | #===========================================================================
|
| | | return
|
| | |
|
| | |
| | | # coinToGold.gold = addGold
|
| | | # coinToGold.total_gold = curPlayer.GetGold()
|
| | | # WriteEvent(coinToGold)
|
| | | #===========================================================================
|
| | | return
|
| | |
|
| | | class god_weapon_lv(ScribeEvent):
|
| | | # 神兵升级记录
|
| | | def __init__(self):
|
| | | #必须字段
|
| | | super(god_weapon_lv, self).__init__()
|
| | | self.account_id = "" # 账号 ID,平台下唯一,且终生不变
|
| | | self.chr_name = "" # 玩家角色名
|
| | | |
| | | self.god_weapon_name = "" # 神兵名称
|
| | | self.bef_lv = 0 # 此次操作前的等级, 0代表0级, 1代表+1级
|
| | | self.bef_exp = 0 # 此次操作前的经验值
|
| | | self.cost_item_cnt = 0 # 此次消耗的道具数量
|
| | | self.aft_lv = 0 # 此次操作后的等级, 0代表0级, 1代表+1级
|
| | | self.aft_exp = 0 # 此次进阶操作后的经验值
|
| | | |
| | | #非必须字段
|
| | |
|
| | | #即时是非必须字段也应该传送,各字段用,分隔,并且用双引号包含,参考格式'"1","","","12314"'
|
| | | return
|
| | | |
| | | def GetCurEventStr(self):
|
| | | if not self.time:
|
| | | self.time = GameWorld.GetCurrentDataTimeStr()
|
| | | tmpList = [self.product_slug, self.agent_name, self.gameserver_no, self.account_id, self.chr_name, |
| | | self.god_weapon_name, str(self.bef_lv), str(self.bef_exp), str(self.cost_item_cnt),
|
| | | str(self.aft_lv), str(self.aft_exp), self.time]
|
| | | |
| | | return super(god_weapon_lv, self).GetEventStr(tmpList)
|
| | | |
| | | def GetScribeEventName(self): return ShareDefine.Def_UserAction_GodWeaponLV
|
| | | |
| | | def WriteEvent_god_weapon_lv(curPlayer, godWeaponName, befLV, befExp, costCnt, aftLV, aftExp):
|
| | | ## 写神兵升级记录
|
| | | #===========================================================================
|
| | | # godWeaponLV = god_weapon_lv()
|
| | | # godWeaponLV.SetEventAgentInfo(GameWorld.GetPlayerPlatform(curPlayer.GetAccID()))
|
| | | # godWeaponLV.account_id = GameWorld.GetPlatformAccID(curPlayer.GetAccID())
|
| | | # godWeaponLV.chr_name = curPlayer.GetPlayerName()
|
| | | # godWeaponLV.god_weapon_name = godWeaponName
|
| | | # godWeaponLV.bef_lv = befLV
|
| | | # godWeaponLV.bef_exp = befExp
|
| | | # godWeaponLV.cost_item_cnt = costCnt
|
| | | # godWeaponLV.aft_lv = aftLV
|
| | | # godWeaponLV.aft_exp = aftExp
|
| | | # WriteEvent(godWeaponLV)
|
| | | #===========================================================================
|
| | | return
|
| | |
|