| | |
| | |
|
| | | if isFight and ipyData.GetHelpBattleNotify():
|
| | | curTime = int(time.time())
|
| | | playerName = curPlayer.GetPlayerName()
|
| | | notifyKey, notifyParamList, notifyCD = ipyData.GetHelpBattleNotify()
|
| | | lastNotifyTime = g_helpBattleNotifyTimeDict.get(dogzID, 0)
|
| | | if curTime - lastNotifyTime >= notifyCD * 60:
|
| | | PlayerControl.WorldNotify(0, notifyKey, notifyParamList)
|
| | | PlayerControl.WorldNotify(0, notifyKey, [playerName] + notifyParamList)
|
| | | g_helpBattleNotifyTimeDict[dogzID] = curTime
|
| | | return
|
| | |
|
| | |
| | | GameWorld.DebugLog("购买神兽助战位! updBuyCount=%s" % updBuyCount, playerID)
|
| | |
|
| | | Sync_DogzInfo(curPlayer)
|
| | | PlayerControl.WorldNotify(0, "DogzNumberUp", [curPlayer.GetPlayerName(), needItemID, curHelpFightCount + 1])
|
| | | return
|
| | |
|
| | |
|
| | |
| | | PlayerSuccess.DoAddSuccessProgress(curPlayer, ShareDefine.SuccType_DogzEquipPlus, totalPlusLv)
|
| | | return
|
| | |
|
| | | def GetFightDogzTotalPlusLv(curPlayer):
|
| | | #出战的神兽装备总强化等级
|
| | | totalPlusLv = 0
|
| | | dogzEquipPack = curPlayer.GetItemManager().GetPack(ShareDefine.rptDogzEquip)
|
| | | equipPackCount = dogzEquipPack.GetCount()
|
| | | ipyDataMgr = IpyGameDataPY.IPY_Data()
|
| | | for dogzIndex in xrange(ipyDataMgr.GetDogzCount()):
|
| | | if not GameWorld.GetDictValueByBit(curPlayer, ChConfig.Def_PDict_DogzFightState, dogzIndex):
|
| | | continue
|
| | | ipyData = ipyDataMgr.GetDogzByIndex(dogzIndex)
|
| | | dogzID = ipyData.GetDogzID()
|
| | | startIndex = (dogzID - 1) * DogzEquipCount
|
| | | for equipIndex in range(startIndex, startIndex + DogzEquipCount):
|
| | | if equipIndex < 0 or equipIndex >= equipPackCount:
|
| | | break
|
| | | curEquip = dogzEquipPack.GetAt(equipIndex) |
| | | if curEquip.IsEmpty():
|
| | | continue
|
| | | curPlusLV = curEquip.GetUserAttrByIndex(ShareDefine.Def_IudetDogzEquipPlus, 0)
|
| | | totalPlusLv += curPlusLV
|
| | | return totalPlusLv
|
| | |
|
| | | # 助战神兽技能属性,必须在 SetDogzIsHelpFight后调用
|
| | | def CalcDogzBattleSkillAttr(curPlayer):
|