| | |
| | | import GameWorld
|
| | | import datetime
|
| | | import ShareDefine
|
| | | import PlayerControl
|
| | | import PlayerBillboard
|
| | | import ChConfig
|
| | | #===============================================================================
|
| | | ##发送事件记录给EventShell
|
| | |
| | | if curPlayer:
|
| | | pid = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_PlayerFromPID)
|
| | | dataDict["pid"] = pid
|
| | | dataDict["fightPower"] = curPlayer.GetFightPower()
|
| | | dataDict["fightPower"] = PlayerControl.GetFightPower(curPlayer)
|
| | | dataDict["PlayerLV"] = curPlayer.GetLV()
|
| | | dataDict["IP"] = curPlayer.GetIP()
|
| | |
|
| | | dataDict["time"] = str(datetime.datetime.today()).split(".")[0]
|
| | |
|
| | |
| | | # @param familyName: 家族名
|
| | | # @param familyID: 家族ID
|
| | | # @return None
|
| | | def DR_CreateFamily(accID, playerID, playerNaem, familyName, familyID):
|
| | | def DR_CreateFamily(accID, playerID, playerNaem, familyName, familyID, creatFamilyTimes):
|
| | |
|
| | | dataDict = {'AccID':accID, 'PlayerID':playerID, "PlayerName":playerNaem, 'FamilyName':familyName,
|
| | | 'FamilyID':familyID}
|
| | | 'FamilyID':familyID, 'creatFamilyTimes':creatFamilyTimes}
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("CreateFamily", dataDict)
|
| | |
| | | SendEventPack("GameMapOnLinePlayerCnt", dataDict)
|
| | | return
|
| | |
|
| | | ## 每天记录排行榜数据
|
| | | # @param billboardType: 排行榜类型
|
| | | # @return: None
|
| | | def DR_BillboardDataByDay(billboardType):
|
| | | DR_BillboardData(billboardType, "BillboardDataByDay")
|
| | | return
|
| | |
|
| | | ## 记录排行榜数据
|
| | | # @param billboardType: 排行榜类型
|
| | | # @return: None
|
| | |
| | | if not billBoard:
|
| | | #找不到排行榜
|
| | | return
|
| | | dataCount = billBoard.GetCount()
|
| | | if not dataCount:
|
| | | return
|
| | |
|
| | | for index in range(0, billBoard.GetCount()):
|
| | | billboardMgr = PlayerBillboard.GetBillboardMgr()
|
| | | billboardObj = billboardMgr.GetBillboardObj(billboardType)
|
| | | idOrderDict = billboardObj.GetIDOrderDict()
|
| | | |
| | | serverTime = GameWorld.GetServerTime()
|
| | | timeStr = "%02d%02d%02d%s" % (serverTime.hour, serverTime.minute, serverTime.second, str(serverTime.microsecond)[:3])
|
| | | eventTypeStr = "Billboard_%s_%s_%s" % (billboardType, eventName, timeStr)
|
| | | |
| | | dataDict = {"BillboardType":billboardType, "DataCount":dataCount, "addDataDict":addDataDict}
|
| | | SendEventPack(eventTypeStr, dataDict)
|
| | | |
| | | for index in range(0, dataCount):
|
| | | billBoardData = billBoard.At(index)
|
| | | if not billBoardData:
|
| | | continue
|
| | | |
| | | objID = billBoardData.GetID()
|
| | | objID2 = billBoardData.GetID2()
|
| | | name1 = billBoardData.GetName1()
|
| | | name2 = billBoardData.GetName2()
|
| | | type2 = billBoardData.GetType2()
|
| | | value1 = billBoardData.GetValue1()
|
| | | value2 = billBoardData.GetValue2()
|
| | | cmpValue = billBoardData.GetCmpValue()
|
| | | cmpValue2 = billBoardData.GetCmpValue2()
|
| | | cmpValue3 = billBoardData.GetCmpValue3()
|
| | | |
| | | dataDict = {"BillboardType":billboardType,
|
| | | "Place":index, "ObjID":objID, "ObjID2":objID2, "Name1":name1, |
| | | "Name2":name2, "Type2":type2, "Value1":value1, "Value2":value2,
|
| | | "CmpValue":cmpValue, "CmpValue2":cmpValue2, "CmpValue3":cmpValue3,
|
| | | rank = idOrderDict.get(billBoardData.GetID(), index + 1)
|
| | | dataDict = {"Rank":rank, "Index":index,
|
| | | "ID":billBoardData.GetID(),
|
| | | "ID2":billBoardData.GetID2(),
|
| | | "Name1":billBoardData.GetName1(),
|
| | | "Name2":billBoardData.GetName2(),
|
| | | "Type2":billBoardData.GetType2(),
|
| | | "Value1":billBoardData.GetValue1(),
|
| | | "Value2":billBoardData.GetValue2(),
|
| | | "Value3":billBoardData.GetValue3(),
|
| | | "Value4":billBoardData.GetValue4(),
|
| | | "Value5":billBoardData.GetValue5(),
|
| | | "Value6":billBoardData.GetValue6(),
|
| | | "Value7":billBoardData.GetValue7(),
|
| | | "Value8":billBoardData.GetValue8(),
|
| | | "CmpValue":billBoardData.GetCmpValue(),
|
| | | "CmpValue2":billBoardData.GetCmpValue2(),
|
| | | "CmpValue3":billBoardData.GetCmpValue3(),
|
| | | "UserData":billBoardData.GetUserData(),
|
| | | }
|
| | | |
| | | dataDict.update(addDataDict)
|
| | | |
| | | #发送封包
|
| | | SendEventPack(eventName, dataDict)
|
| | | SendEventPack(eventTypeStr, dataDict)
|
| | | return
|
| | |
|
| | | ## GM执行命令操作
|
| | |
| | | #发送封包
|
| | | SendEventPack("ResetGameDataRecord", dataDict)
|
| | | return
|
| | |
|
| | |
|
| | | ## 复制的排行榜记录
|
| | | # @param Place: 名次
|
| | | # @param playerID: 玩家ID
|
| | | # @param playerName: 玩家名字
|
| | | # @param playerLV: 玩家等级
|
| | | # @param playerJob: 玩家职业
|
| | | # @param totalPoint: 积分
|
| | | # @return: None
|
| | | def DR_BillboardCopy(billboardType):
|
| | | DR_BillboardData(billboardType, "BillboardCopy")
|
| | | return
|
| | |
|
| | |
|
| | | ## 弹劾玩家家族职位变更
|
| | | # @param familyID: 家族ID
|
| | |
| | | SendEventPack("CompensationPersonal", dataDict)
|
| | | return
|
| | |
|
| | | ## 删除个人补偿流向
|
| | | # @param curPlayerID, GUID, ItemDictList
|
| | | # @return: None |
| | | def DR_DelPersonalCompensation(playerID, GUID, eventName):
|
| | | dataDict = {'PlayerID':playerID, 'GUID':GUID, 'eventName':eventName}
|
| | | #发送封包
|
| | | SendEventPack("CompensationPersonalDel", dataDict)
|
| | | return |
| | |
|
| | | ## 添加全服补偿流向
|
| | | # @param GUID, ItemDictList
|
| | | # @return: None
|
| | |
| | | dataDict = {'GUID':GUID, "eventName":eventName}
|
| | | dataDict.update(addDict)
|
| | | SendEventPack("CompensationEntire", dataDict)
|
| | | return
|
| | |
|
| | | ## 发送充值排行榜特惠活动奖励邮件记录流向
|
| | | # @param curPlayerID: 玩家ID
|
| | | # @param GUID: |
| | | # @param actionID: 活动ID
|
| | | # @param actionValue: 活动编号
|
| | | # @param order: 奖励排名
|
| | | # @param rewardItemList: 奖励物品列表
|
| | | # @return None
|
| | | def DR_SendRechareRankTeHuiRewardMail(curPlayerID, GUID, actionID, actionValue, order, rewardItemList):
|
| | | |
| | | dataDict = {'PlayerID':curPlayerID, 'GUID':GUID, 'ActionID':actionID, 'ActionValue':actionValue,
|
| | | 'Order':order, 'ItemList':rewardItemList}
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("SendRechareRankTeHuiRewardMail", dataDict)
|
| | | return
|
| | |
|
| | | ## 发送消费排行榜特惠活动奖励邮件记录流向
|
| | | # @param curPlayerID: 玩家ID
|
| | | # @param GUID: |
| | | # @param actionID: 活动ID
|
| | | # @param actionValue: 活动编号
|
| | | # @param order: 奖励排名
|
| | | # @param rewardItemList: 奖励物品列表
|
| | | # @return None
|
| | | def DR_SendCostRankTeHuiRewardMail(curPlayerID, GUID, actionID, actionValue, order, rewardItemList):
|
| | | |
| | | dataDict = {'PlayerID':curPlayerID, 'GUID':GUID, 'ActionID':actionID, 'ActionValue':actionValue,
|
| | | 'Order':order, 'ItemList':rewardItemList}
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("SendCostRankTeHuiRewardMail", dataDict)
|
| | | return
|
| | |
|