| | |
| | | self.fighterIDList.pop(0)
|
| | | if not self.fighterIDList:
|
| | | return 0
|
| | | nextGuardID = self.fighterIDList
|
| | | nextGuardID = self.fighterIDList[0]
|
| | | if self.IsGuardNPC(nextGuardID):
|
| | | self.guardNPC.hp = self.guardNPC.hpMax
|
| | | GameWorld.DebugLog(" 切换下一个NPC守卫: %s, %s/%s" % (nextGuardID, self.guardNPC.hp, self.guardNPC.hpMax))
|
| | |
| | | updCampLV = campLV
|
| | |
|
| | | # 满级了也不限制捐献,让玩家可以继续消耗多余的道具
|
| | | campIpyData = IpyGameDataPY.GetIpyGameData("CrossActFamilyGCZCampLV", campLV)
|
| | | if campIpyData and campIpyData.GetLVUPNeedExp():
|
| | | lvupNeedExp = campIpyData.GetLVUPNeedExp()
|
| | | if updCampExp >= lvupNeedExp and IpyGameDataPY.GetIpyGameDataNotLog("CrossActFamilyGCZCampLV", campLV + 1):
|
| | | updCampExp -= lvupNeedExp
|
| | | updCampLV = campLV + 1
|
| | | |
| | | campIpyData = IpyGameDataPY.GetIpyGameData("CrossActFamilyGCZCampLV", updCampLV)
|
| | | lvupNeedExp = campIpyData.GetLVUPNeedExp() if campIpyData else 0
|
| | | nextIpyData = IpyGameDataPY.GetIpyGameDataNotLog("CrossActFamilyGCZCampLV", updCampLV + 1)
|
| | | GameWorld.DebugLog("增加大本营经验: familyID=%s,playerID=%s,addCampExp=%s,campLV-Exp=%s-%s,updLV-Exp=%s-%s,lvupNeedExp=%s" |
| | | % (self.familyID, playerID, addCampExp, campLV, campExp, updCampLV, updCampExp, lvupNeedExp))
|
| | | while lvupNeedExp > 0 and updCampExp >= lvupNeedExp and nextIpyData:
|
| | | updCampLV += 1
|
| | | updCampExp -= lvupNeedExp
|
| | | campIpyData = IpyGameDataPY.GetIpyGameData("CrossActFamilyGCZCampLV", updCampLV)
|
| | | lvupNeedExp = campIpyData.GetLVUPNeedExp() if campIpyData else 0
|
| | | nextIpyData = IpyGameDataPY.GetIpyGameDataNotLog("CrossActFamilyGCZCampLV", updCampLV + 1)
|
| | | GameWorld.DebugLog(" 大本营升级: updCampLV=%s,updCampExp=%s,lvupNeedExp=%s" % (updCampLV, updCampExp, lvupNeedExp))
|
| | | |
| | | self.campLV = updCampLV
|
| | | self.campExp = updCampExp
|
| | | self.memAddCampExpInfo[playerID] = self.memAddCampExpInfo.get(playerID, 0) + addCampExp
|
| | | |
| | | GameWorld.DebugLog("增加大本营经验: familyID=%s,playerID=%s,addCampExp=%s,campLV-Exp=%s-%s,updLV-Exp=%s-%s,playerAddExpTotal=%s" |
| | | % (self.familyID, playerID, addCampExp, campLV, campExp, updCampLV, updCampExp, self.memAddCampExpInfo[playerID]))
|
| | |
|
| | | # 升级了
|
| | | defMemIDList = [] # 加经验默认不通知防守成员属性
|
| | | isLVUP = False
|
| | | if campLV != updCampLV:
|
| | | isLVUP = True
|
| | | GameWorld.DebugLog("大本营升级了! familyID=%s,campLV=%s to %s" % (self.familyID, campLV, updCampLV))
|
| | | GameWorld.DebugLog("大本营等级变更! familyID=%s,campLV=%s to %s" % (self.familyID, campLV, updCampLV))
|
| | | if self.RefreshFamilyAttr(False):
|
| | | defMemIDList = None # 升级后成功刷成员属性后,额外附带所有防守成员信息,战斗阶段属性是锁定的
|
| | |
|
| | |
| | | if not onlinePlayerIDDict:
|
| | | return
|
| | |
|
| | | guradID = cityWall.GetCurGuardID()
|
| | | if cityWall.IsGuardNPC(guradID):
|
| | | curGuard = cityWall.guardNPC
|
| | | else:
|
| | | curGuard = zone.GetZoneJoinMember(guradID)
|
| | | guardHP, guradHPMax = 0, 0
|
| | | if curGuard:
|
| | | guardHP, guradHPMax = curGuard.hp, curGuard.hpMax
|
| | | clientPack = ChPyNetSendPack.tagGCFamilyGCZBatCityInfo()
|
| | | clientPack.CityID = cityID
|
| | | clientPack.CityLV = cityWall.cityLV
|
| | | clientPack.FamilyID = cityWall.familyID
|
| | | clientPack.GuardID = cityWall.GetCurGuardID()
|
| | | clientPack.HP = cityWall.hp % ChConfig.Def_PerPointValue
|
| | | clientPack.HPEx = cityWall.hp / ChConfig.Def_PerPointValue
|
| | | clientPack.HPMax = cityWall.hpMax % ChConfig.Def_PerPointValue
|
| | | clientPack.HPMaxEx = cityWall.hpMax / ChConfig.Def_PerPointValue
|
| | | clientPack.GuardID = guradID
|
| | | clientPack.HP = guardHP % ChConfig.Def_PerPointValue
|
| | | clientPack.HPEx = guardHP / ChConfig.Def_PerPointValue
|
| | | clientPack.HPMax = guradHPMax % ChConfig.Def_PerPointValue
|
| | | clientPack.HPMaxEx = guradHPMax / ChConfig.Def_PerPointValue
|
| | | clientPack.AtkPlayerID = atkPlayerID
|
| | | clientPack.AtkRet = atkRet
|
| | | clientPack.KillCnt = killCnt
|
| | |
| | | __clientServer_GetAward_Ret(zoneID, playerID, serverGroupID, actID, awardType, playerAwardID, awardItemList)
|
| | | return
|
| | |
|
| | | # 点赞奖励
|
| | | if awardType == AwwardType_Like:
|
| | | awardItemList = IpyGameDataPY.GetFuncEvalCfg("FamilyGCZGuess", 4)
|
| | | __clientServer_GetAward_Ret(zoneID, playerID, serverGroupID, actID, awardType, 0, awardItemList)
|
| | | return
|
| | | |
| | | gczMgr = GetFamilyGCZMgr()
|
| | | zone = gczMgr.GetActZone(zoneID)
|
| | | joinMember = zone.GetZoneJoinMember(playerID)
|
| | |
| | | billboardType = ShareDefine.Def_CBT_FamilyGCZScore
|
| | | awardTemplateID = ipyDataInfo.get("FamilyTemplateID", 0)
|
| | |
|
| | | # 点赞奖励
|
| | | elif awardType == AwwardType_Like:
|
| | | awardItemList = IpyGameDataPY.GetFuncEvalCfg("FamilyGCZGuess", 4)
|
| | | __clientServer_GetAward_Ret(zoneID, playerID, serverGroupID, actID, awardType, 0, awardItemList)
|
| | | return
|
| | | |
| | | else:
|
| | | return
|
| | |
|
| | |
| | | for playerID, pActInfo in playerActInfo.items():
|
| | | if not PlayerControl.GetDBPlayerAccIDByID(playerID):
|
| | | # 非本服玩家
|
| | | return
|
| | | continue
|
| | | curPlayer = playerManager.FindPlayerByID(playerID)
|
| | | if curPlayer:
|
| | | MapServer_QueryPlayerResult(curPlayer, "FamilyGCZPlayerActInfo", pActInfo)
|