| | |
| | | warPlayer = GetFamilyWarPlayer(playerID)
|
| | | warPlayer.calcFightTimeTick = tick
|
| | |
|
| | | faction = curPlayer.GetFaction()
|
| | | if not faction:
|
| | | GameWorld.Log("还未设置阵营的玩家暂不处理!可能是DoEnter中!", playerID)
|
| | | continue
|
| | | # 检查坐标,防止作弊
|
| | | factionIndex = GetFactionIndex(curPlayer.GetFaction())
|
| | | factionIndex = GetFactionIndex(faction)
|
| | | centrePosX, centrePosY, radius = factionAreaInfo[factionIndex]
|
| | | curPosX, curPosY = curPlayer.GetPosX(), curPlayer.GetPosY()
|
| | | dist = GameWorld.GetDist(curPosX, curPosY, centrePosX, centrePosY)
|
| | |
| | | if dist > maxDist:
|
| | | posPoint = GameMap.GetEmptyPlaceInArea(centrePosX, centrePosY, radius)
|
| | | curPlayer.ResetPos(posPoint.GetPosX(), posPoint.GetPosY())
|
| | | GameWorld.DebugLog("玩家不在营地范围内,强制拉回!curPos=(%s,%s),centerPos=(%s,%s), dist=%s > maxDist=%s" |
| | | % (curPosX, curPosY, centrePosX, centrePosY, dist, maxDist))
|
| | | GameWorld.Log("玩家不在营地范围内,强制拉回!faction=%s,curPos=(%s,%s),centerPos=(%s,%s), dist=%s > maxDist=%s" |
| | | % (faction, curPosX, curPosY, centrePosX, centrePosY, dist, maxDist), playerID)
|
| | | return
|
| | |
|
| | | def __DoLogic_FB_Fighting(tick):
|
| | |
| | | awardPer = awardPerList[-1]
|
| | | else:
|
| | | awardPer = awardPerList[groupID - 1]
|
| | | rankAwardDictCopy = copy.deepcopy(rankAwardDict)
|
| | | for itemList in rankAwardDictCopy.values():
|
| | | for itemInfo in itemList:
|
| | | itemInfo[1] = max(1, int(itemInfo[1] * awardPer / 100.0))
|
| | | rankAwardDictCopy = {}
|
| | | for rank, itemList in rankAwardDict.items():
|
| | | copyItemList = []
|
| | | for itemID, itemCount, isBind, isPer in itemList:
|
| | | if isPer: # 奖励个数是否受百分比影响, 默认受影响
|
| | | copyItemList.append([itemID, max(1, int(itemCount * awardPer / 100.0)), isBind])
|
| | | else:
|
| | | copyItemList.append([itemID, itemCount, isBind])
|
| | | rankAwardDictCopy[rank] = copyItemList
|
| | |
|
| | | # 最高级别联赛第一名额外奖励
|
| | | winnerFirstAwardEx = [] # 获胜方第一名额外奖励
|