| | |
| | | GameWorld.GetGameWorld().EventShell_SendEventEx(eventTypeStr, len(eventTypeStr), dataStr, len(dataStr))
|
| | | return
|
| | |
|
| | |
|
| | | ## 二次非同天登陆
|
| | | # @param accID: 账号ID
|
| | | # @param ip: ip
|
| | | # @return: None
|
| | | def DR_OtherDayLogin(accID, ip, curPlayer):
|
| | | |
| | | dataDict = {'AccID':accID, 'IP':ip}
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("OtherDayLogin", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 登陆
|
| | | # @param curPlayer 玩家实例
|
| | | # @return: None
|
| | |
| | | SendEventPack("AddNewMission", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 完成任务 |
| | | # @param curPlayer: 玩家实例
|
| | | # @param missionID: 任务ID
|
| | | # @return: None
|
| | | def DR_DeleteMission(curPlayer, missionID):
|
| | | return
|
| | |
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'MissionID':missionID}
|
| | | |
| | | #发送封包
|
| | | SendEventPack("DeleteMission", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 仓库存入金钱
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param moneyType: 金钱类型
|
| | |
| | |
|
| | | #发送封包
|
| | | SendEventPack("SetMoneyInWarehouse", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 仓库取出金钱
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param moneyType: 金钱类型
|
| | | # @param moneyCount: 金钱数量
|
| | | # @return: None
|
| | | def DR_GetMoneyInWarehouse(curPlayer, moneyType, moneyCount):
|
| | |
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), |
| | | 'MoneyType':moneyType, 'MoneyCount':moneyCount, |
| | | 'WarehouseMoneyCount':PlayerControl.GetWarehouseMoney(curPlayer, moneyType), |
| | | 'PlayerMoneyCount':PlayerControl.GetMoney(curPlayer, moneyType)}
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("GetMoneyInWarehouse", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | drDict["Official"] = [offRank, offBlessValue]
|
| | |
|
| | | return drDict
|
| | |
|
| | | ## 玩家充值后的点券信息及vip等级
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param changeCoin: 兑换的点券数
|
| | | # @param totaChangelCoin: 总兑换点券数
|
| | | # @param prizeCoin: 赠送点券数
|
| | | # @param totalPrizeCoin: 总赠送点券数
|
| | | # @param playerVIPLV: vip等级
|
| | | # @param crazyCoin: 额为赠送数
|
| | | # @return: None
|
| | | def DR_PlayerCoinAfterCharge(curPlayer, changeCoin, totaChangelCoin, prizeCoin, |
| | | totalPrizeCoin, playerVIPLV, crazyCoin, orderID):
|
| | | |
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'ChangeCoin':changeCoin, 'TotaChangelCoin':totaChangelCoin,
|
| | | 'PrizeCoin':prizeCoin, 'TotalPrizeCoin':totalPrizeCoin, 'VIPLv':playerVIPLV, |
| | | "CrazyCoin":crazyCoin, 'QueryOrderID':orderID}
|
| | |
|
| | | #发送封包
|
| | | SendEventPack("PlayerCoinAfterCharge", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 玩家升级
|
| | | # @param curPlayer: 玩家实例
|
| | |
| | | SendEventPack("ChangePackItem", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 设置仓库密码
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param OldPsw: 旧密码
|
| | | # @param NewPsw: 新密码
|
| | | # @return: |
| | | def DR_SetWarehousePsw(curPlayer, oldPsw, newPsw):
|
| | | dataDict = {"PlayerID":curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), |
| | | "AccID":curPlayer.GetAccID(),
|
| | | "OldPsw":oldPsw, "NewPsw":newPsw}
|
| | | |
| | | SendEventPack("SetWarehousePsw", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 消耗金钱
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param eventName: 功能事件名
|
| | |
| | | SendEventPack("LearnORUPSkill", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 碎片合成给予物品
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param itemID: 物品ID
|
| | | # @param itemCnt: 物品数量
|
| | | # @param isBind: 是否绑定
|
| | | # @return: |
| | | def DR_StuffMachining(curPlayer, itemID, itemCnt, isBind):
|
| | | return
|
| | | #MySql不识别 True False,改成1和0
|
| | | isBind = 1 if isBind else 0
|
| | | |
| | | dataDict = {"PlayerID":curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), |
| | | "AccID":curPlayer.GetAccID(),
|
| | | "ItemID":itemID, "ItemCount":itemCnt, "IsBind":isBind}
|
| | | |
| | | SendEventPack("StuffMachining", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 背包格子数量购买
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param packType: 背包类型
|
| | |
| | | SendEventPack("UsePetSoul", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 镖车
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param eventName: 事件名
|
| | | # @param addDataDict: 附加属性
|
| | | # @return: |
| | | def DR_Truck(curPlayer, eventName, addDataDict):
|
| | | dataDict = {"PlayerID":curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), |
| | | "AccID":curPlayer.GetAccID()}
|
| | | |
| | | dataDict.update(addDataDict)
|
| | | |
| | | SendEventPack("Truck_%s"%eventName, dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 设置玩家SB状态
|
| | | # @param curPlayer: 玩家实例
|
| | | # @param state: ״̬
|
| | |
| | |
|
| | | SendEventPack("PlayerFamily_%s"%eventName, dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 获得威望值
|
| | | # @param curPlayer 玩家实例
|
| | | # @param addPrestige 添加值
|
| | | # @param addType 原因
|
| | | # @return
|
| | | def DR_GetPrestigeValue(curPlayer, addPrestige, addType):
|
| | | return
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(),
|
| | | "Prestige":addPrestige, "TotalPrestige":PlayerControl.GetPrestige(curPlayer), "Type":addType}
|
| | | |
| | | SendEventPack("GetPrestigeValue", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 失去威望值
|
| | | # @param curPlayer 玩家实例
|
| | | # @param addPrestige 添加值
|
| | | # @param addType 原因
|
| | | # @return
|
| | | def DR_LostPrestigeValue(curPlayer, addPrestige, addType):
|
| | | return
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(),
|
| | | "Prestige":addPrestige, "TotalPrestige":PlayerControl.GetPrestige(curPlayer), "Type":addType}
|
| | | |
| | | SendEventPack("LostPrestigeValue", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 记录错误信息
|
| | | # @param info: 错误信息
|
| | |
| | |
|
| | | #发送封包
|
| | | SendEventPack("PlayerDead", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | |
|
| | | ## 给存奖励表物品
|
| | | # @param curPlayer: 玩家
|
| | | # @param rewardType: 奖励类型
|
| | | # @param itemID: 物品ID
|
| | | # @param itemCnt: 物品个数
|
| | | # @return
|
| | | def DR_PlayerGetReward(curPlayer, rewardType, itemID, itemCnt):
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), "PlayerName":curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'itemID':itemID, 'itemCnt':itemCnt,
|
| | | 'rewardType':rewardType}
|
| | | |
| | | #发送封包
|
| | | SendEventPack("PlayerGetReward", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 申请加入贵宾俱乐部
|
| | |
| | | SendEventPack("GlobalDropRate", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | def DR_MagicWeaponExp(curPlayer, mwID, succID, newExp, needExp):
|
| | | # 法宝激活经验获得记录
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'mwID':mwID, 'succID':succID, |
| | | 'newExp':newExp, 'needExp':needExp}
|
| | | #发送封包
|
| | | SendEventPack("MagicWeaponExp", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | def DR_MagicWeaponActive(curPlayer, mwID, mwLV):
|
| | | # 法宝等级升级记录
|
| | | dataDict = {'PlayerID':curPlayer.GetPlayerID(), 'PlayerName':curPlayer.GetPlayerName(), |
| | | 'AccID':curPlayer.GetAccID(), 'mwID':mwID, 'mwLV':mwLV}
|
| | | #发送封包
|
| | | SendEventPack("MagicWeaponActive", dataDict, curPlayer)
|
| | | return
|
| | |
|
| | | ## 玩家上线成就检查
|
| | | # @return
|
| | | def DR_CheckOldPlayerSuccess(curPlayer):
|
| | |
| | | SendEventPack("MailDel", dataDict)
|
| | | return
|
| | |
|
| | | def DR_ServerMail(GUID, eventName, addDict={}):
|
| | | ## 全服邮件流向
|
| | | dataDict = {'GUID':GUID, "eventName":eventName}
|
| | | dataDict.update(addDict)
|
| | | SendEventPack("MailServerMail", dataDict)
|
| | | return
|
| | |
|
| | | def DR_CreateRole(playerData):
|
| | | dataDict = {'PlayerID':playerData.PlayerID, 'AccID':playerData.AccID, 'PlayerName':playerData.PlayerName, "Job":playerData.Job}
|
| | | #发送封包
|
| | | SendEventPack("CreateRole", dataDict)
|
| | | return |
| | | return
|
| | |
|