| | |
| | | # @change: "2015-02-03 14:30" xmnathan 添加补偿时增加流向
|
| | | # @change: "2015-06-17 14:30" hxp 排行榜流向增加比较值信息
|
| | | # @change: "2015-07-13 14:00" hxp 增加pid信息
|
| | | # @change: "2015-10-25 17:00" hxp 增加DR_SendMergePKRewardMail
|
| | | # @change: "2015-11-05 12:00" hxp 增加恢复跨服连胜流向
|
| | | #------------------------------------------------------------------------------
|
| | | """Version = 2016-09-12 16:00"""
|
| | |
| | | import GameWorld
|
| | | import datetime
|
| | | import ShareDefine
|
| | | import PlayerControl
|
| | | import ChConfig
|
| | | #===============================================================================
|
| | | ##发送事件记录给EventShell
|
| | |
| | | if curPlayer:
|
| | | pid = curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_PlayerFromPID)
|
| | | dataDict["pid"] = pid
|
| | | 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)
|
| | |
| | | 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 = {"BillboardType":billboardType,
|
| | | "Place":index, "ObjID":objID, "ObjID2":objID2, "Name1":name1,
|
| | | "Name2":name2, "Type2":type2, "Value1":value1, "Value2":value2,
|
| | | "CmpValue":cmpValue, "CmpValue2":cmpValue2, "CmpValue3":cmpValue3,
|
| | | "CmpValue":cmpValue, "CmpValue2":cmpValue2, "CmpValue3":cmpValue3, |
| | | "Value3":value3, "Value4":value4, "Value5":value5, "Value6":value6, |
| | | "Value7":value7, "Value8":value8, "UserData":userData
|
| | | }
|
| | |
|
| | | dataDict.update(addDataDict)
|
| | |
|
| | | #发送封包
|
| | | SendEventPack(eventName, dataDict)
|
| | | SendEventPack("%s_%s" % (eventName, billboardType), dataDict)
|
| | | return
|
| | |
|
| | | ## GM执行命令操作
|
| | |
| | | # @param tagFamilyLV: 被踢者职位
|
| | | # @return:
|
| | | def DR_PlayerLeaveFamily(curPlayer, familyID, familyName, familyCnt, familyLV,
|
| | | tagPlayerID, tagPlayerName, tagFamilyLV):
|
| | | |
| | | tagPlayerID, tagPlayerName, tagFamilyLV, leaveFamilyTime=0):
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'AccID':curPlayer.GetAccID(),
|
| | | "PlayerName":curPlayer.GetName(),
|
| | | "FamilyID":familyID, "FamilyName":familyName, "Count":familyCnt, "FamilyJob":familyLV,
|
| | | "tagPlayerID":tagPlayerID, "tagPlayerName":tagPlayerName, "tagFamilyJob":tagFamilyLV}
|
| | | |
| | | if leaveFamilyTime:
|
| | | dataDict['leaveFamilyTime'] = leaveFamilyTime
|
| | | #发送封包
|
| | | SendEventPack("PlayerLeaveFamily", dataDict, curPlayer)
|
| | | return
|
| | |
| | | SendEventPack("UpdatePlayerName", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | def DR_MergePlayerEvent(playerID, eventType, eventTime, eventData, opType):
|
| | | # 跨服玩家记录事件流向
|
| | | dataDict = {'PlayerID':playerID, "EventType":eventType, "EventTime":eventTime, 'EventData':eventData}
|
| | | SendEventPack("MergePlayerEvent_%s" % opType, dataDict)
|
| | | return
|
| | |
|
| | | #-------------------------------------
|
| | | #↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓交易所↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
|
| | | ## 添加交易所物品数据到流向记录用字典
|
| | |
| | | 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
|
| | |
|
| | | ## 发送跨服PK奖励邮件记录流向
|
| | | # @param playerIdList 玩家ID列表
|
| | | # @param GUID 邮件标识
|
| | | # @param actionKey 活动Key
|
| | | # @param order 奖励排名
|
| | | # @param rewardItemList 奖励物品列表
|
| | | # @param addDataDict 附加属性
|
| | | # @return None
|
| | | def DR_SendMergePKRewardMail(playerIdList, guid, actionKey, rewardItemList, addDataDict={}):
|
| | | dataDict = {'PlayerIDList':playerIdList, 'GUID':guid, 'ItemList':rewardItemList}
|
| | |
|
| | | dataDict.update(addDataDict)
|
| | | |
| | | #发送封包
|
| | | SendEventPack("SendMergePKRewardMail_%s" % actionKey, dataDict)
|
| | | return
|
| | |
|
| | | ## 恢复跨服PK连胜次数
|
| | | def DR_RecoverMergePKWin(accID, cWin, maxCWin):
|
| | | dataDict = {'AccID':accID, 'cWin':cWin, 'maxCWin':maxCWin}
|
| | | #发送封包
|
| | | SendEventPack("RecoverMergePKWin", dataDict)
|
| | | return
|
| | |
|