| | |
| | | objID = helpBattleNPC.GetID()
|
| | | GameWorld.Log("召唤助战成功: calledPlayerID=%s,objID=%s,fightPower=%s" % (calledPlayerID, objID, fightPower), playerID)
|
| | | gameFB.SetGameFBDict(ChConfig.Def_FB_HelpBattleFBObjID % calledPlayerID, objID)
|
| | | helpBattleNPC.SetDict(ChConfig.Def_NPC_Dict_AtkDelayTick, calledCount * 1000) # 按转换顺序每个延长1秒攻击,防止动作一致
|
| | | calledCount += 1
|
| | | # 设置助战属性
|
| | | npcControl = NPCCommon.NPCControl(helpBattleNPC)
|
| | |
| | | PlayerControl.AddTodayXianyuanCoin(curPlayer, coinAddReal)
|
| | |
|
| | | # 通知自己获得仙缘币
|
| | | Sync_AddXianyuanCoinMsg(curPlayer, mapID, lineID, coinAddReal, relationPlayerID, relationPlayerName)
|
| | | msgPack = ChPyNetSendPack.tagMCAddXianyuanCoinMsg()
|
| | | msgPack.MapID = mapID
|
| | | msgPack.FuncLineID = lineID
|
| | | msgPack.XianyuanCoinAdd = coinAddReal
|
| | | msgPack.CallPlayerID = relationPlayerID
|
| | | msgPack.CallPlayerName = relationPlayerName
|
| | | msgPack.NameLen = len(msgPack.CallPlayerName)
|
| | | msgPack.Reason = reason
|
| | | NetPackCommon.SendFakePack(curPlayer, msgPack)
|
| | | return coinAddReal, reason
|
| | |
|
| | | def __GetTeamFBMemRelationInfo(curPlayer, relationCoinAddDict, isHelp):
|
| | |
| | | break
|
| | | if checkRelation == 2:
|
| | | for memPlayerID, memFamilyID in memFamilyIDDict.items():
|
| | | if playerID != memPlayerID and familyID == memFamilyID:
|
| | | if playerID != memPlayerID and familyID and familyID == memFamilyID:
|
| | | memRelation = checkRelation
|
| | | relationPlayerID = memPlayerID
|
| | | break
|
| | |
| | | if [playerID, memPlayerID] in friendList:
|
| | | memRelation = checkRelation
|
| | | break
|
| | | if playerID != memPlayerID and familyID == memFamilyID:
|
| | | if playerID != memPlayerID and familyID and familyID == memFamilyID:
|
| | | memRelation = checkRelation
|
| | | break
|
| | | if not memRelation:
|
| | |
| | | relationAdd += relationAddList[0] if len(relationAddList) == 2 else 0
|
| | |
|
| | | return relationAdd, relationPlayerID, relationPlayerName
|
| | |
|
| | | def Sync_AddXianyuanCoinMsg(curPlayer, mapID, funcLineID, addXianyuanCoin, callPlayerID=0, callPlayerName=""):
|
| | | '''同步自己主动战斗获得仙缘币信息
|
| | | 1. 主动发起通关镜像助战副本,此时 callPlayerID 及 name 为空
|
| | | 2. 参与通关真实助战的副本,次数如果自己是助战的,则 callPlayer 及 name 有值
|
| | | @param addXianyuanCoin: 增加的仙缘币,可能为0,代表已达本日上限,但是前端扔需要展示记录
|
| | | @param callPlayerID: 助战别人时,对方玩家的playerID
|
| | | @param callPlayerName: 助战别人时,对方玩家的名字 |
| | | '''
|
| | | msgPack = ChPyNetSendPack.tagMCAddXianyuanCoinMsg()
|
| | | msgPack.MapID = mapID
|
| | | msgPack.FuncLineID = funcLineID
|
| | | msgPack.XianyuanCoinAdd = addXianyuanCoin
|
| | | msgPack.CallPlayerID = callPlayerID
|
| | | msgPack.CallPlayerName = callPlayerName
|
| | | msgPack.NameLen = len(msgPack.CallPlayerName)
|
| | | NetPackCommon.SendFakePack(curPlayer, msgPack)
|
| | | return
|
| | |
|