| | |
| | | return
|
| | |
|
| | | #---------------------------------------------------------------------
|
| | | def SendMailBatch(mailTypeKey, batchPlayerIDList, batchAddItemList=[], batchParamList=[], batchGold=[], batchGoldPaper=[], batchSilver=[], batchDetail=[]):
|
| | | def SendMailBatch(mailTypeKey, batchPlayerIDList, batchAddItemList=[], batchParamList=[], batchGold=[], batchGoldPaper=[], batchSilver=[], batchDetail=[], moneySource=ChConfig.Def_GiveMoney_Mail):
|
| | | '''批量发送邮件, 用于瞬间需要发送多封(大量)邮件的,比如一些公共副本活动等结算时
|
| | | @param mailTypeKey: 邮件模板key
|
| | | @param batchPlayerIDList: [playerIDList, playerIDList, ...]
|
| | |
| | | @param batchGoldPaper: [batchGoldPaper, batchGoldPaper, ...]
|
| | | @param batchSilver: [batchSilver, batchSilver, ...]
|
| | | @param batchDetail: [记录邮件流向用, ...]
|
| | | @param moneySource: 货币来源
|
| | | '''
|
| | | msgInfo = str([mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver, batchDetail])
|
| | | msgInfo = str([mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver, batchDetail, moneySource])
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "SendMailBatch", msgInfo, len(msgInfo))
|
| | | GameWorld.Log("SendMailBatch %s, batchPlayerIDList=%s, batchAddItemList=%s, batchParamList=%s, batchGold=%s, batchGoldPaper=%s, batchSilver=%s"
|
| | | % (mailTypeKey, batchPlayerIDList, batchAddItemList, batchParamList, batchGold, batchGoldPaper, batchSilver))
|
| | | return
|
| | |
|
| | | def SendMailByKey(mailTypeKey, playerIDList, addItemList, paramList=[], gold=0, goldPaper=0, silver=0, detail=""):
|
| | | def SendMailByKey(mailTypeKey, playerIDList, addItemList, paramList=[], gold=0, goldPaper=0, silver=0, detail="", moneySource=ChConfig.Def_GiveMoney_Mail):
|
| | | '''
|
| | | @param detail: 记录邮件流向用
|
| | | '''
|
| | |
| | | mailTypeKey = ShareDefine.DefaultLackSpaceMailType
|
| | |
|
| | | content = "<MailTemplate>%s</MailTemplate>%s" % (mailTypeKey, json.dumps(paramList, ensure_ascii=False))
|
| | | SendMail("", content, 30, playerIDList, addItemList, gold, goldPaper, silver, detail)
|
| | | SendMail("", content, 30, playerIDList, addItemList, gold, goldPaper, silver, detail, moneySource)
|
| | | return
|
| | |
|
| | | ## 功能发放物品补偿/奖励邮件
|
| | | # @param addItemList [(itemID, itemCnt, isBind), {或物品信息字典}, ...]
|
| | | # @return
|
| | | def SendMail(title, content, getDays, playerIDList, addItemList, gold=0, goldPaper=0, silver=0, detail=""):
|
| | | def SendMail(title, content, getDays, playerIDList, addItemList, gold=0, goldPaper=0, silver=0, detail="", moneySource=ChConfig.Def_GiveMoney_Mail):
|
| | | if not playerIDList:
|
| | | return
|
| | |
|
| | |
| | | for key, itemCnt in itemCountDict.items():
|
| | | itemID, isBind = key
|
| | | combineItemList.append((itemID, itemCnt, isBind))
|
| | | cmdList = [title, content, getDays, playerIDList, combineItemList, gold, goldPaper, silver, detail]
|
| | | cmdList = [title, content, getDays, playerIDList, combineItemList, gold, goldPaper, silver, detail, moneySource]
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, "SendMail", '%s' % (cmdList), len(str(cmdList)))
|
| | | return True
|
| | |
|
| | |
| | |
|
| | | if not GameWorld.IsCrossServer() and GetCrossMapID(curPlayer):
|
| | | NotifyCode(curPlayer, "CrossMap10")
|
| | | return False
|
| | | |
| | | if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
|
| | | GameWorld.Log("客户端自定义场景下无法传送!", curPlayer.GetPlayerID())
|
| | | return False
|
| | |
|
| | | return True
|
| | |
| | | if isNotify:
|
| | | NotifyCode(curPlayer, "Carry_lhs_697674")
|
| | | return ShareDefine.EntFBAskRet_Sit
|
| | | |
| | | if curPlayer.GetDictByKey(ChConfig.Def_PlayerKey_ClientCustomScene):
|
| | | if isNotify:
|
| | | NotifyCode(curPlayer, "Carry_lhs_697674")
|
| | | GameWorld.Log("客户端自定义场景下无法进入副本!", curPlayer.GetPlayerID())
|
| | | return ShareDefine.EntFBAskRet_Other
|
| | |
|
| | | if playerAction in ChConfig.Def_Player_Cannot_TransState:
|
| | | #Carry_lhs_697674:您当前所处的状态不能进行传送!
|
| | |
| | | # 检查最大等级
|
| | | if curLV >= maxLV and curTotalExp >= maxLVExpStore:
|
| | | self.__NotifyExpFull(curPlayer, "GeRen_admin_825676")
|
| | | GameWorld.DebugLog("经验已满!已满级!curLV=%s" % (curLV), curPlayer.GetPlayerID())
|
| | | #GameWorld.DebugLog("经验已满!已满级!curLV=%s" % (curLV), curPlayer.GetPlayerID())
|
| | | return 0, expViewType
|
| | |
|
| | | # 杀怪
|
| | |
| | | # 记录开服活动冲级数据
|
| | | OpenServerCampaign.UpdOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_LV, curPlayer.GetLV())
|
| | | #神秘限购
|
| | | FunctionNPCCommon.MysticalShopOpen(curPlayer, befLV, aftLV)
|
| | | FunctionNPCCommon.MysticalLimitShopOpen(curPlayer, befLV, aftLV)
|
| | | #不需要做升级任务, 设置玩家经验
|
| | | SetPlayerTotalExp(curPlayer, curTotalExp)
|
| | | return
|
| | |
| | | # ֪ͨGsmeServer;
|
| | | # SendGameServerRefreshState(int inputType, int inputValue)
|
| | |
|
| | | # SetExAttr15 ~ 18 对应神兵类型等级,场景特效用
|
| | |
|
| | | # 禁言 通知gameServer
|
| | | def SetGMForbidenTalk(curPlayer, value):
|
| | |
| | | GameWorld.DebugLog("更新玩家所属服务器组ID: serverGroupID=%s" % serverGroupID)
|
| | | return
|
| | |
|
| | | ##影响外观的3部位索引记录 123456789 123:武器格子索引 456:副手 789:衣服
|
| | | def GetFaceEquipIndexList(curPlayer):
|
| | | attr15 = curPlayer.GetExAttr15()
|
| | | return [attr15%1000, attr15/1000%1000, attr15/1000000]
|
| | | def SetFaceEquipIndex(curPlayer, value): return curPlayer.SetExAttr15(value)
|
| | |
|
| | | ##获得玩家威望值
|
| | | def GetPrestige(curPlayer): return 0
|
| | | def SetPrestige(curPlayer, value): return
|