ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Player/PlayerCoin.py
@@ -64,6 +64,8 @@
def OnLogin(curPlayer):
    if not DoResetCTGCountByTime(curPlayer):
        Sync_CoinToGoldCountInfo(curPlayer)
    if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DayFreeGoldGiftState):
        Sync_DayFreeGoldGiftState(curPlayer)
    return
def DoResetCTGCountByTime(curPlayer):
@@ -115,6 +117,8 @@
def OnDay(curPlayer):
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCoinTotal, 0)
    syncRecordIDList = []
    ipyDataMgr = IpyGameDataPY.IPY_Data()
    for i in xrange(ipyDataMgr.GetCTGCount()):
@@ -128,6 +132,10 @@
        syncRecordIDList.append(recordID)
    if syncRecordIDList:
        Sync_CoinToGoldCountInfo(curPlayer, syncRecordIDList)
    if curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DayFreeGoldGiftState):
        PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DayFreeGoldGiftState, 0)
        Sync_DayFreeGoldGiftState(curPlayer)
    return
## 创角赠送
@@ -301,10 +309,13 @@
    curPlayer.SetChangeCoinPointTotal(changeCoinPointBefore + orderCoin, 0)
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_FirstGoldTry, 0)
    
    todayCTGCoinTotal = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayCTGCoinTotal) + orderCoin
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayCTGCoinTotal, todayCTGCoinTotal)
    goldAfter = curPlayer.GetGold()
    changeCoinPointAfter = curPlayer.GetChangeCoinPointTotal()
    bourseMoneyAfter = PlayerControl.GetMoney(curPlayer, ShareDefine.TYPE_Price_BourseMoney)
    addDRDict.update({"gold":[goldBefore, goldAfter], "changeCoinPoint":[changeCoinPointBefore, changeCoinPointAfter],
    addDRDict.update({"gold":[goldBefore, goldAfter], "changeCoinPoint":[changeCoinPointBefore, changeCoinPointAfter], "todayCTGCoinTotal":todayCTGCoinTotal,
                      "bourseMoney":[bourseMoneyBefore, bourseMoneyAfter], "addGold":addGold, "prizeGold":prizeGold, "giveItemList":giveItemList})
    
    DataRecordPack.DR_CTGOK(curPlayer, addDRDict)
@@ -316,8 +327,10 @@
    PlayerGoldGift.DayChargeRedPackAward(curPlayer)
    #累积充值X元
    PlayerActTotalRecharge.AddTotalRechargeGold(curPlayer, orderCoin/100)
    PlayerFairyCeremony.AddFCCTGRMB(curPlayer, orderCoin/100)
    PlayerNewFairyCeremony.AddFCCostGold(curPlayer, orderCoin/100)
    #开服活动
    OpenServerCampaign.AddOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_Recharge, orderCoin)
    #OpenServerCampaign.AddOpenServerCampaignRecordData(curPlayer, ShareDefine.Def_Campaign_Type_Recharge, orderCoin)
    PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Recharge, addVIPExp)
    #投资
    if ipyData:
@@ -415,3 +428,42 @@
    NetPackCommon.SendFakePack(curPlayer, countInfoPack)
    return
## ---------- 每日免费直购礼包 ----------------
def OnGetDayFreeGoldGift(curPlayer):
    ''' 领取每日免费直购礼包
    '''
    isGet = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DayFreeGoldGiftState)
    if isGet:
        #GameWorld.DebugLog("已经领取过每日免费直购礼包!")
        return
    rewardItemList = IpyGameDataPY.GetFuncEvalCfg("DayFreeGoldGift", 1)
    if not rewardItemList:
        return
    needSpace = len(rewardItemList)
    packSpace = ItemCommon.GetItemPackSpace(curPlayer, IPY_GameWorld.rptItem, needSpace)
    if needSpace > packSpace:
        PlayerControl.NotifyCode(curPlayer, "GeRen_chenxin_998371")
        return
    PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_DayFreeGoldGiftState, 1)
    # 给物品
    isAuctionItem = False
    for itemID, itemCount in rewardItemList:
        ItemControler.GivePlayerItem(curPlayer, itemID, itemCount, isAuctionItem, [IPY_GameWorld.rptItem])
    # 通知客户端
    Sync_DayFreeGoldGiftState(curPlayer)
    return
def Sync_DayFreeGoldGiftState(curPlayer):
    clientPack = ChPyNetSendPack.tagMCDayFreeGoldGiftState()
    clientPack.DayFreeGoldGiftState = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_DayFreeGoldGiftState)
    NetPackCommon.SendFakePack(curPlayer, clientPack)
    return
## ------------------------------------------