From 887a4882a958e29923e58805bf552f3f13499693 Mon Sep 17 00:00:00 2001
From: hxp <ale99527@vip.qq.com>
Date: 星期二, 03 六月 2025 14:40:23 +0800
Subject: [PATCH] 16 卡牌服务端(删除部分不需要的GMT命令)
---
/dev/null | 116 ----------------------------------------------------------
1 files changed, 0 insertions(+), 116 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_AddNewGuyCard.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_AddNewGuyCard.py
deleted file mode 100644
index 09e5cfb..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_AddNewGuyCard.py
+++ /dev/null
@@ -1,164 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package GMT_AddNewGuyCard.py
-# GM命令GM工具生成新手卡
-#
-# @author wdb
-# @date 2012-06-21
-# @version 1.3
-#
-# @note
-# @change: "2012-06-27 12:00" wdb 去除新手卡类型最大29限制,改用开始索引取代数量
-# @change: "2012-07-13 10:00" wdb 修改获得玩家id错误
-# @change: "2012-07-30 11:30" wdb GM回复细化,代码优化
-#---------------------------------------------------------------------
-"""Version = 2012-07-30 11:30"""
-#---------------------------------------------------------------------
-#导入
-from MangoDBCommon import fix_incomingText
-from Collections import DataServerPlayerData
-from Collections.CollectionDefine import *
-from Common import mylog
-import GMCommon
-import md5
-import binascii
-import ctypes
-import traceback
-#---------------------------------------------------------------------
-#全局变量
-Def_MaxFailCount = 10 # 插入失败大于等于10次,则终止操作
-
-# 单次插入最大数量
-MaxMakeCount = 500
-# GM工具生成的新手卡标志
-StoreInDBCardFlag = 'n'
-#---------------------------------------------------------------------
-
-## 收到gm命令执行
-# @param gmCmdDict:gm命令字典
-# @return None
-def OnExec(gmCmdDict):
-
- return GMCommon.Def_DoQueryUserDB, ''
-
-
-## 查询logdb返回
-# @param logdb:logdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def LogDBResponse(logdb, data, gmCmdDict):
- return GMCommon.Def_ParamErr, ''
-
-
-## 查询userdb返回
-# @param userdb:userdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def UserDBResponse(userdb, data, gmCmdDict):
- serverMark = gmCmdDict.get('serverMark', '')
- codeKey = gmCmdDict.get('codeKey', '')
-
- cardType = GMCommon.ToIntDef(gmCmdDict.get('cardType', ''))
- endIndex = GMCommon.ToIntDef(gmCmdDict.get('endIndex', ''))
- startIndex = GMCommon.ToIntDef(gmCmdDict.get('startIndex', ''))
- valiDayStr = gmCmdDict.get('validDay', '')
-
- # 参数错误
- if serverMark == '' or codeKey == '' or cardType <= 0 or (endIndex < startIndex):
- return GMCommon.Def_ParamErr, ''
-
- if (endIndex - startIndex + 1) > MaxMakeCount:
- return GMCommon.Def_MaxLimit, ''
-
- # 获得有效时间
- validTime = ''
- if valiDayStr != '':
- validDay = GMCommon.ToIntDef(valiDayStr)
- # 设置错误
- if validDay <= 0:
- return GMCommon.Def_InvalidTime, ''
-
- curDateTime = GMCommon.GetDatetimeByPlusDays(validDay)
- validTime = str(curDateTime).split(".")[0]
-
- # 插入失败的卡数据
- failCardList = []
- failCount = 0
-
- collection = userdb[UCN_DBNewGuyCardState]
- for index in xrange(startIndex, endIndex + 1):
-
- # 生成新卡
- cardID = MakeNewCardID(serverMark, codeKey, cardType, index)
- if cardID == '':
- return GMCommon.Def_MakeNewCardFail, ''
-
- # 生成卡号不重复,可以插入
- if collection.find({'CardID':fix_incomingText(cardID)}).count() <= 0:
-
- cardObj = DataServerPlayerData.tagDBNewGuyCardState()
- cardObj.CardIDLen = len(cardID)
- cardObj.CardID = cardID
- cardObj.IsUsed = 0
- cardObj.UserDataLen = 0
- cardObj.UserData = ''
- cardObj.CardType = cardType
- cardObj.ValidTime = validTime
-
- # 插入成功,继续插入
- if cardObj.adoInsert(collection):
- continue
-
- failCardList.append(cardID)
- failCount += 1
- #失败次数未到上限
- if failCount >= Def_MaxFailCount:
- break
-
- # 操作结果信息,返回个gm工具
- gmCmdDict['lastIndex'] = index
- gmCmdDict['failCount'] = failCount
- gmCmdDict['failCard'] = failCardList
-
- # 记录流向
- dataDic = {"PlayerID":0, 'AccID':''}
- GMCommon.SendEventPack(gmCmdDict.get(GMCommon.Def_GMKey_Type, ''), dataDic, str(gmCmdDict))
-
- if failCount >= Def_MaxFailCount:
- return GMCommon.Def_InsertFail, gmCmdDict
-
- return GMCommon.Def_Success, gmCmdDict
-
-
-## 生成卡号函数
-# @param serverMark:服务器标志
-# @param codeKey:生成密码
-# @param cardType:卡的类型
-# @param index:卡的索引
-# @return 卡号
-def MakeNewCardID(serverMark, codeKey, cardType, index):
-
- try:
- markMD5 = md5.md5('wyOu' + serverMark + str(cardType)).hexdigest()
- realStr = str(index)*2 + markMD5 + codeKey
- result = md5.md5(realStr).hexdigest()
-
- #crc生成
- crc = binascii.crc32(result)
- crc = ctypes.c_uint32(crc).value
- # GM工具生成的新手卡标志
- result = StoreInDBCardFlag + hex(crc).replace('0x', '', 1)
-
- except BaseException:
- mylog.warning('GM ->MakeNewCardID error -> %s'%(traceback.format_exc()))
- return ''
-
- return result
-
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_CardTypeInfo.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_CardTypeInfo.py
deleted file mode 100644
index 2a5fa7d..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_CardTypeInfo.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package GMT_CardTypeInfo.py
-# GM命令新手卡类型数据查询
-#
-# @author wdb
-# @date 2012-06-21
-# @version 1.0
-#
-# @note
-#---------------------------------------------------------------------
-"""Version = 2012-06-21 15:30"""
-#---------------------------------------------------------------------
-#导入
-import GMCommon
-from Collections.CollectionDefine import *
-#---------------------------------------------------------------------
-#全局变量
-#---------------------------------------------------------------------
-
-## 收到gm命令执行
-# @param gmCmdDict:gm命令字典
-# @return None
-def OnExec(gmCmdDict):
-
- if GMCommon.ToIntDef(gmCmdDict.get('cardType', ''), -1) < 0:
- return GMCommon.Def_ParamErr, ''
-
- return GMCommon.Def_DoQueryUserDB, ''
-
-
-## 查询logdb返回
-# @param logdb:logdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def LogDBResponse(logdb, data, gmCmdDict):
- return GMCommon.Def_ParamErr, ''
-
-
-## 查询userdb返回
-# @param userdb:userdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def UserDBResponse(userdb, data, gmCmdDict):
- cardType = GMCommon.ToIntDef(gmCmdDict.get('cardType', ''))
-
- collection = userdb[UCN_DBNewGuyCardState]
- validTime = ''
-
- # 该类型总数
- findCards = collection.find({'CardType':cardType})
- totalCnt = findCards.count()
- if totalCnt > 0:
- validTime = findCards[0].get('ValidTime', '')
-
- # 该类型未使用数量
- unUsedCnt = collection.find({'CardType':cardType, 'IsUsed':0}).count()
-
- cartTypeInfo = {
- 'totalCnt':totalCnt,
- 'usedCnt':totalCnt - unUsedCnt,
- 'unUsedCnt':unUsedCnt,
- 'validTime':validTime,
- }
-
- return GMCommon.Def_Success, cartTypeInfo
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_ItemExpiation.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_ItemExpiation.py
deleted file mode 100644
index 43fcb99..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_ItemExpiation.py
+++ /dev/null
@@ -1,108 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package GMT_ItemExpiation.py
-# GM命令玩家物品补偿
-#
-# @author wdb
-# @date 2012-06-21
-# @version 1.5
-#
-# @note
-# @change: "2012-07-12 18:00" wdb 增加编码属性
-# @change: "2012-07-13 10:00" wdb 修改获得玩家id错误
-# @change: "2012-07-30 11:30" wdb GM回复细化,代码优化
-# @change: "2011-09-21 13:00" whx 修改玩家不在线不补偿
-# @change: "2012-09-25 18:00" whx 修改玩家不存在不补偿
-#---------------------------------------------------------------------
-"""Version = 2012-09-25 18:00"""
-#---------------------------------------------------------------------
-#导入
-import GMCommon
-from MangoDBCommon import (fix_incomingText, fix_outgoingText)
-from Collections import DataServerPlayerData
-from Common import(mylog, CommFuncEx)
-from Collections.CollectionDefine import *
-from MangoDBCommon import seq
-DBConfig = __import__('Config.DBConfig')
-#---------------------------------------------------------------------
-#全局变量
-
-#---------------------------------------------------------------------
-
-## 收到gm命令执行
-# @param gmCmdDict:gm命令字典
-# @return None
-def OnExec(gmCmdDict):
- playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
- itemID = GMCommon.ToIntDef(gmCmdDict.get('itemID', ''))
- itemCount = GMCommon.ToIntDef(gmCmdDict.get('itemCount', ''))
-
- if playerFind == '' or itemID <= 0 or itemCount <= 0:
- return GMCommon.Def_ParamErr, ''
-
- # 回复gm参数错误
- return GMCommon.Def_DoQueryUserDB, ''
-
-
-## 查询logdb返回
-# @param logdb:logdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def LogDBResponse(logdb, data, gmCmdDict):
- return GMCommon.Def_PlayerOfLine, ''
-
-
-## 查询userdb返回
-# @param userdb:userdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def UserDBResponse(userdb, data, gmCmdDict):
- playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
- queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
-
- itemID = GMCommon.ToIntDef(gmCmdDict.get('itemID', ''), 0)
- itemCount = GMCommon.ToIntDef(gmCmdDict.get('itemCount', ''), 0)
-
- # queryType不是accID,发送的信息是玩家的名字, 取得玩家accid
- playerAccID = ""
- if queryType == 'playerName':
- playerAccID = GMCommon.GetPlayerAccID(userdb, {'PlayerName':fix_incomingText(playerFind), 'IsDeleted':0})
-
- elif queryType == 'accID':
- playerAccID = GMCommon.GetPlayerAccID(userdb, {'AccID':fix_incomingText(playerFind), 'IsDeleted':0})
-
- else:
- return GMCommon.Def_ParamErr, ''
-
- if playerAccID == '':
- return GMCommon.Def_NoTag, ''
-
- con = userdb[UCN_Expiation]
- doc = DataServerPlayerData.tagExpiation()
- doc.AccID = playerAccID
- doc.ExpiationTime = CommFuncEx.TDateTime_Now()
- doc.ExpiationIndex = seq(userdb, UCN_Expiation, 'ExpiationIndex',
- DBConfig.tagExpiation_ExpiationIndex_FEED,
- DBConfig.tagExpiation_ExpiationIndex_STEP)
-
- doc.ItemTypeID = itemID
- doc.Count = itemCount
-
- if not doc.adoInsert(con):
- return GMCommon.Def_InsertFail, ''
-
- # 记录流向
- dataDic = {"PlayerID":0, 'AccID':playerAccID}
-
- GMCommon.SendEventPack(gmCmdDict.get(GMCommon.Def_GMKey_Type, ''), dataDic, str(gmCmdDict))
- return GMCommon.Def_Success, ''
-
-
-
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_MergeBattleInfo.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_MergeBattleInfo.py
deleted file mode 100644
index e8bd077..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_MergeBattleInfo.py
+++ /dev/null
@@ -1,158 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package GMT_MergeBattleInfo.py
-# GM获得跨服战或国王战信息
-#
-# @author wdb
-# @date 2012-12-28
-# @version 1.0
-#
-# @note
-#---------------------------------------------------------------------
-"""Version = 2012-12-28 10:00"""
-#---------------------------------------------------------------------
-#导入
-import GMCommon
-from Common import mylog
-from Collections import DataServerPlayerData
-from Collections.CollectionDefine import UCN_DBPlayer
-#---------------------------------------------------------------------
-#全局变量
-
-#跨服战战斗状态
-(
-Def_NotBegin, #还没开始
-Def_IDFirstWin, #第一个玩家胜利(与CampType_Justice一致)
-Def_IDSecondWin, #第二个玩家胜利(与CampType_Evil一致)
-Def_Battling, #正在战斗中
-) = range(4)
-
-#----------------------------跨服战表------------------------------------
-#表名
-PyTable_MSBattle = "PyMSBattle"
-#---------------------------------------------------------------------
-
-## 收到gm命令执行
-# @param gmCmdDict:{'coding': 'gbk', 'competeID': '176', 'key': '2', 'pack_type': 'GMT_MergeBattleInfo'}
-# @return None
-def OnExec(gmCmdDict):
- competeID = GMCommon.ToIntDef(gmCmdDict.get("competeID", "0"))
-
- if competeID > 0:
- return GMCommon.Def_DoQueryUserDB, ""
-
- # 回复
- return GMCommon.Def_ParamErr, ''
-
-
-## 查询logdb返回
-# @param logdb:logdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def LogDBResponse(logdb, data, gmCmdDict):
- # 回复
- return GMCommon.Def_ParamErr, ''
-
-
-## 查询userdb返回
-# @param userdb:userdb
-# @param data:传入的信息
-# @param gmCmdDict:{'coding': 'gbk', 'competeID': '176', 'key': '2', 'pack_type': 'GMT_MergeBattleInfo'}
-# @return None
-def UserDBResponse(userdb, data, gmCmdDict):
- battleCollect = userdb[PyTable_MSBattle]
-
- competeID = GMCommon.ToIntDef(gmCmdDict.get("competeID", "0"))
- coll = battleCollect.find({"CompeteID":competeID, "Result":{"$in":[Def_IDFirstWin, Def_IDSecondWin]}})
-
- if coll.count() <= 0:
- return GMCommon.Def_Success, {"competeID":competeID, "PlayerList":[]}
-
- # 玩家信息列表
- playerInfoList = []
-
- # 已经添加信息的玩家id列表
- playerIDList = []
-
- # 根据battleId倒序排列,从battleID大的(更新的)对战开始记录,已记录的玩家则不处理
- coll.sort("BattleID", -1)
- playerCollect = userdb[UCN_DBPlayer]
-
- for battleInfo in coll:
-
- battleID = battleInfo.get("BattleID", 0)
- if battleID <= 0:
- continue
-
- winnerID, loserID = GetBattlePlayerID(battleInfo)
-
- # 添加玩家信息,已添加的玩家则不处理
- AddPlayerInfo(playerCollect, winnerID, playerInfoList, playerIDList, battleID, 1)
- AddPlayerInfo(playerCollect, loserID, playerInfoList, playerIDList, battleID, 0)
-
- resultMsg = {"competeID":competeID, "PlayerList":playerInfoList}
-
- # 信息长度不大与word
- if len("%s"%resultMsg) > pow(2, 14):
- return GMCommon.Def_MaxLimit, ""
-
- return GMCommon.Def_Success, resultMsg
-
-
-## 获得胜负的玩家id
-# @param userdb:userdb
-# @param competeID:比赛类型id
-# @return None
-def GetBattlePlayerID(battleInfo):
- playerID1 = battleInfo.get("PlayerID1", 0)
- playerID2 = battleInfo.get("PlayerID2", 0)
-
- result = battleInfo.get("Result")
-
- if result == Def_IDFirstWin:
- return playerID1, playerID2
-
- elif result == Def_IDSecondWin:
- return playerID2, playerID1
-
- return 0, 0
-
-
-## 添加玩家信息
-# @param playerCollect:db玩家表
-# @param playerID:玩家id
-# @param playerInfoList:玩家信息列表
-# @param playerIDList:已添加玩家ID列表
-# @param battleID:对战id
-# @param result:对战结果
-# @return None
-def AddPlayerInfo(playerColl, playerID, playerInfoList, playerIDList, battleID, result):
- if playerID <= 0:
- return
-
- # 玩家信息已添加
- if playerID in playerIDList:
- return
-
- dbPlayer = DataServerPlayerData.tagDBPlayer()
- dbPlayer.IsDeleted = 0
-
- loadOK = dbPlayer.adoLoadCEx(playerColl, {'PlayerID':playerID, 'IsDeleted':dbPlayer.IsDeleted})
- if not loadOK:
- return
-
- # [账号, 玩家名, 玩家等级, 职业, vip等级, 战斗力, 威望, 战场id, 胜负(0负, 1胜)]
- playerInfo = [dbPlayer.AccID, playerID, dbPlayer.PlayerName, dbPlayer.LV, dbPlayer.Job,
- dbPlayer.VIPLv, dbPlayer.FightPower, dbPlayer.ExAttr2, battleID, result]
-
- # 添加玩家信息
- playerInfoList.append(playerInfo)
- # 将玩家id添加到已记录列表中
- playerIDList.append(playerID)
- return
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_MoneyExpiation.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_MoneyExpiation.py
deleted file mode 100644
index 2b3c332..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_MoneyExpiation.py
+++ /dev/null
@@ -1,121 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package GMT_MoneyExpiation.py
-# GM命令玩家金钱补偿
-#
-# @author wdb
-# @date 2012-06-21
-# @version 1.6
-#
-# @note
-# @change: "2012-07-12 18:00" wdb 增加编码属性
-# @change: "2012-07-13 10:00" wdb 修改获得玩家id错误
-# @change: "2012-07-30 11:30" wdb GM回复细化,代码优化
-# @change: "2011-09-21 13:00" whx 修改玩家不在线不补偿
-# @change: "2012-09-25 18:00" whx 修改玩家不存在不补偿
-# @change: "2014-02-28 21:10" hxp 增加MU货币类型-恶魔精华
-#---------------------------------------------------------------------
-"""Version = 2014-02-28 21:10"""
-#---------------------------------------------------------------------
-#导入
-import GMCommon
-from MangoDBCommon import (fix_incomingText, fix_outgoingText)
-from Collections import DataServerPlayerData
-from Common import(mylog, CommFuncEx)
-from MangoDBCommon import seq
-from DBCommon import CommonDefine
-from Collections.CollectionDefine import *
-DBConfig = __import__('Config.DBConfig')
-#---------------------------------------------------------------------
-#全局变量
-
-#---------------------------------------------------------------------
-
-## 收到gm命令执行
-# @param gmCmdDict:gm命令字典
-# @return None
-def OnExec(gmCmdDict):
- playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
- value = GMCommon.ToIntDef(gmCmdDict.get('value', ''), 0)
- moneyType = GMCommon.ToIntDef(gmCmdDict.get('moneyType', ''))
-
- if playerFind == '' or value <= 0 or moneyType <= 0:
- return GMCommon.Def_ParamErr, ''
-
- #数值上限(20亿)
- if value > GMCommon.Def_UpperLimit_DWord:
- return GMCommon.Def_MaxLimit, ''
-
- # 查询玩家PlayerID
- return GMCommon.Def_DoQueryUserDB, ''
-
-
-## 查询logdb返回
-# @param logdb:logdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def LogDBResponse(logdb, data, gmCmdDict):
- return GMCommon.Def_PlayerOfLine, ''
-
-
-## 查询userdb返回
-# @param userdb:userdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def UserDBResponse(userdb, data, gmCmdDict):
- playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
- queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
-
- moneyType = GMCommon.ToIntDef(gmCmdDict.get('moneyType', ''))
- value = GMCommon.ToIntDef(gmCmdDict.get('value', ''))
-
- playerAccID = ''
- if queryType == 'playerName':
- playerAccID = GMCommon.GetPlayerAccID(userdb, {'PlayerName':fix_incomingText(playerFind), 'IsDeleted':0})
-
- elif queryType == 'accID':
- playerAccID = GMCommon.GetPlayerAccID(userdb, {'AccID':fix_incomingText(playerFind), 'IsDeleted':0})
-
- else:
- return GMCommon.Def_ParamErr, ''
-
- if playerAccID == '':
- return GMCommon.Def_NoTag, ''
-
- con = userdb[UCN_Expiation]
- doc = DataServerPlayerData.tagExpiation()
- doc.AccID = playerAccID
- doc.ExpiationTime = CommFuncEx.TDateTime_Now()
- doc.ExpiationIndex = seq(userdb, UCN_Expiation, 'ExpiationIndex',
- DBConfig.tagExpiation_ExpiationIndex_FEED,
- DBConfig.tagExpiation_ExpiationIndex_STEP)
- #/<金子
- if moneyType == CommonDefine.TYPE_Price_Gold_Money:
- doc.Gold = value
- #/<金票
- elif moneyType == CommonDefine.TYPE_Price_Gold_Paper:
- doc.GoldPaper = value
- #/<银子
- elif moneyType == CommonDefine.TYPE_Price_Silver_Money:
- doc.Silver = value
- #/<恶魔精华
- elif moneyType == CommonDefine.TYPE_Price_Silver_Paper:
- doc.SilverPaper = value
- else:
- return GMCommon.Def_MoneyTypeErr, ''
-
- if not doc.adoInsert(con):
- return GMCommon.Def_InsertFail, ''
-
- # 记录流向
- dataDic = {"PlayerID":0, 'AccID':playerAccID}
-
- GMCommon.SendEventPack(gmCmdDict.get(GMCommon.Def_GMKey_Type, ''), dataDic, str(gmCmdDict))
- return GMCommon.Def_Success, ''
-
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_NewGuyCardInfo.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_NewGuyCardInfo.py
deleted file mode 100644
index 2453950..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_NewGuyCardInfo.py
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package GMT_NewGuyCardInfo.py
-# GM命令新手卡信息
-#
-# @author wdb
-# @date 2012-06-21
-# @version 1.0
-#
-# @note
-#---------------------------------------------------------------------
-"""Version = 2012-06-21 15:30"""
-#---------------------------------------------------------------------
-#导入
-import GMCommon
-from MangoDBCommon import fix_incomingText
-from Collections import DataServerPlayerData
-from Collections.CollectionDefine import *
-#---------------------------------------------------------------------
-#全局变量
-#---------------------------------------------------------------------
-
-## 收到gm命令执行
-# @param gmCmdDict:gm命令字典
-# @return None
-def OnExec(gmCmdDict):
-
- if gmCmdDict.get('cardID', '') == '':
- return GMCommon.Def_ParamErr, ''
-
- return GMCommon.Def_DoQueryUserDB, ''
-
-
-## 查询logdb返回
-# @param logdb:logdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def LogDBResponse(logdb, data, gmCmdDict):
- return GMCommon.Def_ParamErr, ''
-
-
-## 查询userdb返回
-# @param userdb:userdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def UserDBResponse(userdb, data, gmCmdDict):
- cardID = gmCmdDict.get('cardID', '')
-
- cardObj = DataServerPlayerData.tagDBNewGuyCardState()
- cardObj.CardIDLen = len(cardID)
- cardObj.CardID = cardID
-
- collection = userdb[UCN_DBNewGuyCardState]
- if not cardObj.adoLoad(collection):
- # 查找失败
- return GMCommon.Def_NoTag, ''
-
- cardInfo = {
- 'cardID':cardObj.CardID,
- 'IsUsed':cardObj.IsUsed,
- 'ValidTime':cardObj.ValidTime,
- 'cardType':cardObj.CardType,
- 'userData':cardObj.UserData,
- }
-
- return GMCommon.Def_Success, cardInfo
-
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_SendGMMail.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_SendGMMail.py
deleted file mode 100644
index dfb5527..0000000
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/PyMongoDB/GMToolLogicProcess/Commands/GMT_SendGMMail.py
+++ /dev/null
@@ -1,116 +0,0 @@
-#!/usr/bin/python
-# -*- coding: GBK -*-
-#---------------------------------------------------------------------
-#
-#---------------------------------------------------------------------
-##@package GMT_SendGMMail
-# 发送GM邮件
-#
-# @author whx
-# @date 2012-07-16
-# @version 1.1
-#
-# @note
-# @change: "2012-07-30 11:30" wdb GM回复细化,代码优化
-#---------------------------------------------------------------------
-"""Version = 2012-07-30 11:30"""
-#---------------------------------------------------------------------
-#导入
-import GMCommon
-from MangoDBCommon import (fix_incomingText, fix_outgoingText)
-from Collections import DataServerPlayerData
-from Common import(mylog, CommFuncEx)
-from Collections.CollectionDefine import *
-import uuid
-#---------------------------------------------------------------------
-#全局变量
-
-#---------------------------------------------------------------------
-
-## 收到gm命令执行
-# @param gmCmdDict:gm命令字典
-# @return None
-def OnExec(gmCmdDict):
- playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, "") #账号或角色名
-
- if playerFind == "":
- return GMCommon.Def_ParamErr, ''
-
- # 回复gm参数错误
- return GMCommon.Def_DoQueryUserDB, ''
-
-
-## 查询logdb返回
-# @param logdb:logdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def LogDBResponse(logdb, data, gmCmdDict):
- return GMCommon.Def_DoQueryUserDB, ''
-
-
-## 查询userdb返回
-# @param userdb:userdb
-# @param data:传入的信息
-# @param gmCmdDict:gm命令字典
-# @return None
-def UserDBResponse(userdb, data, gmCmdDict):
- sendType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
- playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, "") #账号或角色名
- mailTitle = gmCmdDict.get("mailTitle", "") #标题
- mailContent = gmCmdDict.get("content", "") #内容
-
- #长度过长
- if len(mailTitle) > 15 or len(mailContent) > 402:
- return GMCommon.Def_MsgMaxLenLimit, ''
-
- playerID = 0
- dbCollect = userdb[UCN_DBPlayer]
-
- if sendType == "accID":
- queryName = "AccID"
-
- elif sendType == "playerName":
- queryName = "PlayerName"
-
- else:
- return GMCommon.Def_NoTag, ''
-
- coll = dbCollect.find({queryName:fix_incomingText(playerFind)})
-
- if coll.count() <= 0:
- # 回复,未找到玩家
- return GMCommon.Def_NoTag, ''
-
- playerID = coll[0].get('PlayerID', 0)
- playerAccID = fix_outgoingText(coll[0].get('AccID', ''))
-
- if playerID <= 0 or len(playerAccID) <= 0:
- return GMCommon.Def_NoTag, ''
-
- con = userdb[UCN_DBMailList]
- doc = DataServerPlayerData.tagDBMailList()
- doc.SenderID = 0 #gm发件者为0
- doc.ReceverID = playerID
- doc.MailID = str(uuid.uuid1())
- doc.MailType = 3 #gm邮件类型为3
- doc.SenderName = ''
- doc.Title = mailTitle
- doc.LetterType = 0
- doc.Money = 0
- doc.ExistTime = 0
- doc.ContentLen = len(mailContent)
- doc.Content = mailContent
- doc.TitleUseSysMessage = 1
- doc.ContentUseSysMessage = 1
-
- if not doc.adoInsert(con):
- return GMCommon.Def_InsertFail, ''
-
- # 记录流向
- dataDic = {"PlayerID":playerID, 'AccID':playerAccID}
-
- GMCommon.SendEventPack(gmCmdDict.get(GMCommon.Def_GMKey_Type, ''), dataDic, str(gmCmdDict))
- return GMCommon.Def_SendToGameServer, ''
-
-
--
Gitblit v1.8.0