| | |
| | | # @change: "2014-12-01 19:10" ljd 增加领取合服活动登陆奖励事件记录
|
| | | # @change: "2014-12-21 23:00" hxp 增加功能奖励物品
|
| | | # @change: "2014-12-23 00:30" hxp 充值前/消费时流向信息扩展(增加各大功能信息)
|
| | | # @change: "2015-01-27 22:30" hxp 增加转生等级变更流向
|
| | | # @change: "2015-02-05 15:00" hxp 充值送礼流向扩展信息字典
|
| | | # @change: "2015-02-27 21:00" hxp 增加大师等级升级流向; 重新开启技能学习流向
|
| | | # @change: "2015-03-30 14:00" hxp 增加击杀NPC流向
|
| | |
| | | pid = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_PlayerFromPID)
|
| | | dataDict["pid"] = pid
|
| | | dataDict["fightPower"] = curPlayer.GetFightPower()
|
| | | dataDict["PlayerLV"] = curPlayer.GetLV()
|
| | | dataDict["IP"] = curPlayer.GetIP()
|
| | | dataDict["time"] = str(datetime.datetime.today()).split(".")[0]
|
| | |
|
| | | dataStr = str(dataDict)
|
| | |
| | | ip = curPlayer.GetIP()
|
| | | loginTime = curPlayer.GetLoginTime()
|
| | | name = curPlayer.GetName()
|
| | | mapID = GameWorld.GetMap().GetMapID()
|
| | | lineID = GameWorld.GetGameWorld().GetLineID()
|
| | |
|
| | | dataDict = {'Type':'login', 'IP':str(ip), 'AccID':accID,
|
| | | dataDict = {'Type':'login', 'IP':str(ip), 'AccID':accID, 'mapID':mapID, 'lineID':lineID,
|
| | | 'Name':name, 'LoginTime':str(loginTime), 'LogoutTime':'', 'MFPFightPower':GetMFPFightPowerInfo(curPlayer)}
|
| | |
|
| | | if GameWorld.IsCrossServer():
|
| | | regCrossZoneID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBZoneID)
|
| | | regCrossMapID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBMapID)
|
| | | regCrossLineID = curPlayer.NomalDictGetProperty(ChConfig.Def_Player_Dict_ReqCrossFBFuncLine)
|
| | | dataDict.update({"RegCrossZoneID":regCrossZoneID, "RegCrossMapID":regCrossMapID, "RegCrossLineID":regCrossLineID})
|
| | | |
| | | #发送封包
|
| | | SendEventPack("LogInOut", dataDict, curPlayer)
|
| | | return
|
| | |
| | | #发送封包
|
| | | SendEventPack("CTGError", dataDict, curPlayer)
|
| | | GameWorld.ErrLog("%s. %s" % (errorInfo, addDict), curPlayer.GetPlayerID())
|
| | | |
| | | GameWorld.SendGameError("GameWarning", "CTGError:%s - %s"%(errorInfo, dataDict))
|
| | | return
|
| | |
|
| | | def DR_CTGOK(curPlayer, addDict):
|
| | |
| | | #发送封包
|
| | | SendEventPack("PlayerCoinAfterCharge", dataDict, curPlayer)
|
| | | return
|
| | | |
| | | |
| | | ## 玩家商城购买物品
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param buyItemID: 购买物品id
|
| | | # @param buyItemCount: 购买物品数量
|
| | | # @param buyItemGUID: GUID
|
| | | # @return: None
|
| | | def DR_PlayerSupermarket(curPlayer, buyItemID, buyItemCount, buyItemGUID):
|
| | |
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'ItemID':buyItemID, 'ItemCount':buyItemCount, |
| | | 'ItemGUID':buyItemGUID}
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("PlayerSupermarket", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 玩家升级
|
| | | # @param curPlayer: 玩家实例
|
| | |
| | |
|
| | | #发送封包
|
| | | SendEventPack("PlayerUpgrade", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 玩家转生等级变更
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param reincarnationLvBefore: 之前转生次数
|
| | | # @param playerLVExBefore: 之前转生等级
|
| | | # @param eventName: |
| | | # @return: None
|
| | | def DR_PlayerLVExChange(curPlayer, reincarnationLvBefore, playerLVExBefore, eventName, addDataDict={}):
|
| | |
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'ReincarnationLv':curPlayer.GetReincarnationLv(), |
| | | 'PlayerLV':curPlayer.GetLV(), 'PlayerLVEx':curPlayer.GetLVEx(), |
| | | 'TotalExp':curPlayer.GetTotalExp(), 'ReincarnationLvBefore':reincarnationLvBefore, |
| | | 'PlayerLVExBefore':playerLVExBefore, "EventName":eventName}
|
| | | |
| | | dataDict.update(addDataDict)
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("PlayerLVExChange", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 玩家大师等级变更
|
| | |
| | | SendEventPack("LVAward", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ##合服登陆奖励
|
| | | def DR_MixLoginDayAward(curPlayer, getState):
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), |
| | | 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(),
|
| | | "rewardState":getState
|
| | | }
|
| | | |
| | | SendEventPack("MixLoginDayAward", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 使用新手媒体卡
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param cardStr: 卡号
|
| | |
| | | dataDict["PlayerName"] = curPlayer.GetPlayerName()
|
| | |
|
| | | SendEventPack("OpenServerAward", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 合服活动奖励领取情况
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param dataDict: 记录信息字典
|
| | | # @return: None
|
| | | def DR_MixServerAward(curPlayer, dataDict):
|
| | | dataDict["PlayerID"] = curPlayer.GetPlayerID()
|
| | | dataDict["AccID"] = curPlayer.GetAccID()
|
| | | dataDict["PlayerName"] = curPlayer.GetPlayerName()
|
| | | |
| | | SendEventPack("MixServerAward", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## GM执行命令操作
|
| | |
| | | elif moneyType in ShareDefine.TYPE_Price_CurrencyDict:
|
| | | SendEventPack("GiveCurrency_%s" % moneyType, dataDict)
|
| | |
|
| | | return
|
| | |
|
| | | ## 获得金钱失败
|
| | | def DR_GiveMoneyError(curPlayer, priceType, value, giveType, addDataDict):
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), "GiveType":giveType, "GiveValue":value, "AddDataDict":addDataDict}
|
| | | SendEventPack("GiveMoneyError_%s" % priceType, dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 获得物品
|
| | |
| | | SendEventPack("CollectNPCOK", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 玩家领取充值特惠活动奖励
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param actionID: 活动id
|
| | | # @param actionNum: 活动编号
|
| | | # @param itemID: 物品id
|
| | | # @param itemCnt: 物品数量
|
| | | # @param isPutIn: 是否放入
|
| | | # @param prizeIndex: 奖励中的第x种奖励
|
| | | # @return |
| | | def DR_PlayerTeHuiRechargePrize(curPlayer, actionID, actionNum, itemID, itemCnt, isPutIn, prizeIndex):
|
| | | #MySql不识别 True False,改成1和0
|
| | | isPutIn = 1 if isPutIn else 0
|
| | | |
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'ActionID':actionID, 'ActionNum':actionNum, |
| | | 'IsPutIn':isPutIn, "ItemID":itemID, "ItemCount":itemCnt, 'PrizeIndex':prizeIndex}
|
| | | |
| | | SendEventPack("TeHuiRechargePrize", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 领取投资回报
|
| | | # @param curPlayer: 玩家实例
|
| | |
| | |
|
| | | #发送封包
|
| | | SendEventPack("TreasureResult", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 消费VIP升级记录
|
| | | # @param curPlayer
|
| | | # @param lastLV ԭVIPLV
|
| | | # @param curExp 当前VIP经验
|
| | | # @param addExp 增加VIP经验
|
| | | # @param costType 花费类型
|
| | | # @param costGold 花费数
|
| | | # @return: None
|
| | | def DR_PlayerCostVIPLV(curPlayer, lastLV, curExp, addExp, costType, costGold):
|
| | | |
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'VIPLv':curPlayer.GetVIPLv(), 'lastVIPLv':lastLV,
|
| | | 'curExp':curExp, 'addExp':addExp, 'costType':costType, 'costGold':costGold}
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("PlayerCostVIPLV", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 玩家提交bug及建议
|
| | |
| | |
|
| | | ## 玩家境界升级
|
| | | # @return
|
| | | def DR_RealmLVUp(curPlayer, realmlv, realmPoint, needRealmPoint):
|
| | | def DR_RealmLVUp(curPlayer, realmlv):
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(),
|
| | | 'AccID':curPlayer.GetAccID(), 'realmlv':realmlv, 'curRealmPoint':realmPoint, 'costRealmPoint':needRealmPoint,
|
| | | 'AccID':curPlayer.GetAccID(), 'realmlv':realmlv,
|
| | | 'playerlv':curPlayer.GetLV(), 'power':curPlayer.GetFightPower()}
|
| | |
|
| | | #发送封包
|
| | |
| | | #发送封包
|
| | | SendEventPack("FightPowerChangeInfo", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 玩家周狂欢(七天巡礼)
|
| | | # @return
|
| | | def DR_WeekPartyPoint(curPlayer, dayIndex, point):
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), |
| | | 'AccID':curPlayer.GetAccID(), 'dayIndex':dayIndex, 'point':point}
|
| | | |
| | | #发送封包
|
| | | SendEventPack("WeekPartyPoint", dataDict, curPlayer)
|
| | | return
|
| | | def DR_FeastWeekPartyPoint(curPlayer, dayIndex, point):
|
| | | ##节日巡礼
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), |
| | | 'AccID':curPlayer.GetAccID(), 'dayIndex':dayIndex, 'point':point}
|
| | | #发送封包
|
| | | SendEventPack("FeastWeekPartyPoint", dataDict, curPlayer)
|
| | | return |