| | |
| | | import IpyGameDataPY
|
| | | import PlayerControl
|
| | | import NPCHurtManager
|
| | | import ChPyNetSendPack
|
| | | import NetPackCommon
|
| | | import IPY_GameWorld
|
| | | import ItemControler
|
| | | import ItemCommon
|
| | |
| | | ipyData = ipyDataMgr.GetAssistThanksGiftByIndex(index)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_GetThanksGiftCount % ipyData.GetGiftID(), 0)
|
| | |
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayAssistMoney, 0)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayAssistMoneySocial, 0)
|
| | | Sync_TodayAssistMoneyInfo(curPlayer)
|
| | | return
|
| | |
|
| | | #// B0 10 请求协助Boss #tagCMRequestAssistBoss
|
| | |
| | |
|
| | | return
|
| | |
|
| | | def AddTodayAssistMoney(curPlayer, moneyType, addMoney, isSocialEx):
|
| | | ''' 增加今日协助货币奖励 |
| | | @param moneyType: 货币类型
|
| | | @param addMoney: 常规增加,有每日上限
|
| | | @param isSocialEx: 是否社交加成,不计入常规上限
|
| | | '''
|
| | | |
| | | todayAssistMoney = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayAssistMoney)
|
| | | socialMoney = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayAssistMoneySocial)
|
| | | todayAssistMoneyMax = IpyGameDataPY.GetFuncCfg("AssistAward", 4)
|
| | | if todayAssistMoney >= todayAssistMoneyMax:
|
| | | return 0
|
| | | |
| | | addValue = min(addMoney, todayAssistMoneyMax - todayAssistMoney)
|
| | | socialEx = 0
|
| | | if isSocialEx:
|
| | | friendAddAssistMoneyPer = IpyGameDataPY.GetFuncCfg("AssistAward", 3)
|
| | | socialEx = int(addValue * friendAddAssistMoneyPer / 100.0)
|
| | | |
| | | realAdd = addValue + socialEx
|
| | | PlayerControl.GiveMoney(curPlayer, moneyType, realAdd)
|
| | | |
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayAssistMoney, todayAssistMoney + addValue)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_TodayAssistMoneySocial, socialMoney + socialEx)
|
| | | |
| | | Sync_TodayAssistMoneyInfo(curPlayer)
|
| | | return realAdd
|
| | |
|
| | | def Sync_TodayAssistMoneyInfo(curPlayer):
|
| | | ## 通知今日已获得协助货币信息
|
| | | infoPack = ChPyNetSendPack.tagMCTodayAssistMoneyInfo()
|
| | | infoPack.TodayAssistMoney = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayAssistMoney)
|
| | | infoPack.SocialMoney = curPlayer.NomalDictGetProperty(ChConfig.Def_PDict_TodayAssistMoneySocial)
|
| | | NetPackCommon.SendFakePack(curPlayer, infoPack)
|
| | | return
|
| | |
|