hch
2018-09-18 ac5692cc20ce3c4d3cc9c10719149270571e7e66
1558 【后台】兑换码后台开发
2个文件已修改
47 ■■■■■ 已修改文件
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_MediaCard.py 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTMediaCard.py 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ServerPython/CoreServerGroup/GameServer/Script/GM/Commands/GMT_MediaCard.py
@@ -9,7 +9,7 @@
# @date 2017-05-26
# @version 1.0
#
# 详细描述: 媒体卡
# 详细描述: 奖励由邮件发放,这里只做不可领取提示
#
#-------------------------------------------------------------------------------
#"""Version = 2017-05-26 14:00"""
@@ -18,6 +18,7 @@
import GMCommon
import GameWorld
import ChConfig
import PlayerControl
#---------------------------------------------------------------------
## 执行逻辑
@@ -28,9 +29,7 @@
def OnExec(orderId, gmCmdDict):
    queryType = gmCmdDict.get(GMCommon.Def_GMKey_QueryType, '')
    playerFind = gmCmdDict.get(GMCommon.Def_GMKey_PlayerFind, '')
    cardType = GameWorld.ToIntDef(gmCmdDict.get('cardType', ''))
    cardCode = gmCmdDict.get('cardCode', '')
    cardState = GameWorld.ToIntDef(gmCmdDict.get('cardState', ''))
    notifyMsg = gmCmdDict.get('notifyMsg', '')
    
    if queryType == GMCommon.Def_GMKey_PlayerAccID:
        queryType = ChConfig.queryType_sqtPlayerByAccID
@@ -40,9 +39,19 @@
        GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_ParamErr)
        return
    
    sendCMD = [cardType, cardCode, cardState]
    GMCommon.GMTool_MapServer_Query(queryType, orderId, playerFind, gmCmdDict, 'GMTMediaCard', sendCMD)
    return
    playerManager = GameWorld.GetPlayerManager()
    #目标玩家
    tagPlayer = None
    if queryType == ChConfig.queryType_sqtPlayerByAccID:
        tagPlayer = playerManager.FindPlayerByAccID(playerFind)
    if not tagPlayer:
        GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success)
        return
    PlayerControl.NotifyCode(tagPlayer, notifyMsg)
    return GMCommon.GMCommandResult(orderId, gmCmdDict, GMCommon.Def_Success)
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/RemoteQuery/GY_Query_GMTMediaCard.py
@@ -32,17 +32,19 @@
#  @return "True" or "False" or ""
#  @remarks 函数详细说明.
def DoLogic(query_Type, query_ID, packCMDList, tick):
    curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(query_ID)
    if not curPlayer or curPlayer.IsEmpty():
        return
    cardType, cardCode, cardState = packCMDList
    GameWorld.Log("GMT_MediaCard, cardType=%s,cardCode=%s,cardState=%s"
                  % (cardType, cardCode, cardState), curPlayer.GetPlayerID())
    PlayerNewGuyCard.OnGMTGiveMediaCardAwardItem(curPlayer, cardType, cardCode, cardState)
    #流向, 可使用时才记录使用记录流向
    if cardState == 1:
        drMsg = {"cardType":cardType, "cardCode":cardCode, "cardState":cardState}
        DataRecordPack.DR_ToolGMOperate(query_ID, curPlayer.GetPlayerName(), curPlayer.GetAccID(), 'GMT_MediaCard', drMsg)
    #===========================================================================
    # curPlayer = GameWorld.GetPlayerManager().FindPlayerByID(query_ID)
    # if not curPlayer or curPlayer.IsEmpty():
    #    return
    # cardType, cardCode, cardState = packCMDList
    # GameWorld.Log("GMT_MediaCard, cardType=%s,cardCode=%s,cardState=%s"
    #              % (cardType, cardCode, cardState), curPlayer.GetPlayerID())
    # PlayerNewGuyCard.OnGMTGiveMediaCardAwardItem(curPlayer, cardType, cardCode, cardState)
    # #流向, 可使用时才记录使用记录流向
    # if cardState == 1:
    #    drMsg = {"cardType":cardType, "cardCode":cardCode, "cardState":cardState}
    #    DataRecordPack.DR_ToolGMOperate(query_ID, curPlayer.GetPlayerName(), curPlayer.GetAccID(), 'GMT_MediaCard', drMsg)
    #===========================================================================
    return
#---------------------------------------------------------------------