6341 【后端】【2.0】境界改版开发单(经验buff)
| | |
| | | list AddAttrType; //境界加成属性类型
|
| | | list AddAttrNum; //境界加成属性值
|
| | | DWORD BossID; //渡劫bossid
|
| | | DWORD BuffID; //给全服在线玩家增加buff
|
| | | };
|
| | |
|
| | | //神兵表 #tagGodWeapon
|
| | |
| | | sendMsg = str(sendInfo)
|
| | | curPlayer.MapServer_QueryPlayerResult(0, 0, 'DuJieHelpInfo', sendMsg, len(sendMsg))
|
| | | return
|
| | |
|
| | | def DoRealmUpAddBuff(sendMsg):
|
| | | #境界提升给全服在线玩家加经验BUFF
|
| | | minRealmLVLimit = IpyGameDataPY.GetFuncCfg('RadioExpRealm')
|
| | | playerManager = GameWorld.GetPlayerManager()
|
| | | for i in xrange(playerManager.GetActivePlayerCount()):
|
| | | curPlayer = playerManager.GetActivePlayerAt(i)
|
| | | if curPlayer == None or not curPlayer.GetInitOK():
|
| | | continue
|
| | | if PlayerControl.GetIsTJG(curPlayer):
|
| | | continue
|
| | | if curPlayer.GetOfficialRank() < minRealmLVLimit:
|
| | | continue
|
| | | curPlayer.MapServer_QueryPlayerResult(0, 0, 'AddBuff', sendMsg, len(sendMsg))
|
| | | return |
| | |
| | | if callName =="DuJieFBOver":
|
| | | PlayerDuJie.DoDuJieFBOver(eval(resultName))
|
| | | return
|
| | | #境界提升全服buff
|
| | | if callName =="RealmUpAddBuff":
|
| | | PlayerDuJie.DoRealmUpAddBuff(resultName)
|
| | | return
|
| | |
|
| | | # 组队副本队长请求进入询问结果
|
| | | if callName == "EnterFBTeamAsk":
|
| | |
| | | Def_ViewExpType_Sit , #打坐获取经验 3
|
| | | Def_ViewExpType_KillNPCSuper, #杀怪获得经验暴击 4
|
| | | Def_ViewExpType_Sys , #系统给经验-需要展示倍率,实际不享受 5
|
| | | ) = range(0, 6)
|
| | | Def_ViewExpType_RealmBuff, #境界全服福利经验(玄女天花) 6
|
| | | ) = range(0, 7)
|
| | |
|
| | |
|
| | | #物品相关操作类型
|
| | |
| | | Def_SkillID_PetSignDay = 47111 # 灵宠签到属性技能, 单次签到的加成
|
| | | Def_SkillID_LFZ = 47100 # 龙凤镯技能(打怪概率经验加成)
|
| | | Def_SkillID_HorsePetRobBossKillCntBuff = 21020 # 骑宠的怨念buff
|
| | |
|
| | | Def_SkillID_RealmBuff = 6100 # 境界经验buff
|
| | |
|
| | | Def_SkillID_FamilyWar_CWinBuff = 22101 # 仙盟联赛 - 连胜buff, 由连胜次数决定等级
|
| | | Def_SkillID_FamilyWar_JoinBuff = 22131 # 仙盟联赛 - 参与buff, 由人数决定等级
|
| | |
| | | ("list", "AddAttrType", 0),
|
| | | ("list", "AddAttrNum", 0),
|
| | | ("DWORD", "BossID", 0),
|
| | | ("DWORD", "BuffID", 0),
|
| | | ),
|
| | |
|
| | | "GodWeapon":(
|
| | |
| | | self.NeedItemCnt = 0
|
| | | self.AddAttrType = []
|
| | | self.AddAttrNum = []
|
| | | self.BossID = 0 |
| | | self.BossID = 0
|
| | | self.BuffID = 0 |
| | | return |
| | | |
| | | def GetLv(self): return self.Lv # 境界等级
|
| | |
| | | def GetNeedItemCnt(self): return self.NeedItemCnt # 消耗的道具数量
|
| | | def GetAddAttrType(self): return self.AddAttrType # 境界加成属性类型
|
| | | def GetAddAttrNum(self): return self.AddAttrNum # 境界加成属性值
|
| | | def GetBossID(self): return self.BossID # 渡劫bossid |
| | | def GetBossID(self): return self.BossID # 渡劫bossid
|
| | | def GetBuffID(self): return self.BuffID # 给全服在线玩家增加buff |
| | | |
| | | # 神兵表 |
| | | class IPY_GodWeapon(): |
| | |
| | | #注意2:
|
| | | #玩家移动的时候, 如果玩家有马匹 , 则允许玩家移动
|
| | | ################################################
|
| | | Def_HorseEquipIndex = 5
|
| | |
|
| | | ## 玩家骑马脚本(封包参数)
|
| | | # @param index 玩家索引
|
| | |
| | |
|
| | | #检查是否装备指定ID物品
|
| | | playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | itemRideHorse = playerEquip.GetAt(ShareDefine.retHorse)
|
| | | itemRideHorse = playerEquip.GetAt(Def_HorseEquipIndex)
|
| | | #无指定道具
|
| | | if itemRideHorse.IsEmpty():
|
| | | #PlayerControl.NotifyCode(curPlayer, "NotPrepareSteed")
|
| | |
| | | #
|
| | | # #---执行玩家换装逻辑---
|
| | | # tick = GameWorld.GetGameWorld().GetTick()
|
| | | # ChEquip.DoPlayerEquipItem(curPlayer, curHorse, ShareDefine.retHorse, tick)
|
| | | # ChEquip.DoPlayerEquipItem(curPlayer, curHorse, Def_HorseEquipIndex, tick)
|
| | | #
|
| | | # __HorseLearnSkill(curPlayer, 0)
|
| | | # # 计算属性 防止给第一只坐骑后,客户端坐骑战斗力为0
|
| | |
| | | PlayerWeekParty.AddWeekPartyActionCnt(curPlayer, ChConfig.Def_WPAct_Horse, horseID, False)
|
| | |
|
| | | playerEquip = curPlayer.GetItemManager().GetPack(IPY_GameWorld.rptEquip)
|
| | | itemRideHorse = playerEquip.GetAt(ShareDefine.retHorse)
|
| | | itemRideHorse = playerEquip.GetAt(Def_HorseEquipIndex)
|
| | | #无指定道具
|
| | | if itemRideHorse.IsEmpty():
|
| | | DoChangeHorse(curPlayer, horseID, tick)
|
| | |
| | | # tick = GameWorld.GetGameWorld().GetTick()
|
| | | # PlayerRideHorseDown(curPlayer, False)
|
| | | # # 执行玩家换装逻辑
|
| | | # if ChEquip.DoPlayerEquipItem(curPlayer, curHorseSkin, ShareDefine.retHorse, tick):
|
| | | # if ChEquip.DoPlayerEquipItem(curPlayer, curHorseSkin, Def_HorseEquipIndex, tick):
|
| | | # PlayerRideHorseUp(curPlayer, False)
|
| | |
|
| | |
|
| | |
| | | import DataRecordPack
|
| | |
|
| | | #------------------------------------------------------------------------------
|
| | | (
|
| | | StopSitType1, #离线中断
|
| | | StopSitType2, #主动中断
|
| | | StopSitType3, #被采集打断
|
| | | )=range(1,4)
|
| | |
|
| | |
|
| | | def DoOfficialOpen(curPlayer):
|
| | |
| | | curPlayer.SetOfficialRank(nextRealmLv)
|
| | | PlayerControl.NomalDictSetProperty(curPlayer, ChConfig.Def_PDict_RealmFBIsOpen, 0)
|
| | | if needSys:
|
| | | PlayerControl.WorldNotify(0, 'RealmUpSuccess', [curPlayer.GetName(), nextRealmLv])
|
| | | addBuffID = nextRealmIpyData.GetBuffID()
|
| | | if addBuffID:
|
| | | PlayerControl.WorldNotify(0, 'BigRealmUpSuccess', [curPlayer.GetName(), nextRealmLv, IpyGameDataPY.GetFuncCfg('RadioExpRealm')])
|
| | | msgStr = str(addBuffID)
|
| | | GameWorld.GetPlayerManager().GameServer_QueryPlayerResult(0, 0, 0, 'RealmUpAddBuff', msgStr, len(msgStr))
|
| | | else:
|
| | | PlayerControl.WorldNotify(0, 'RealmUpSuccess', [curPlayer.GetName(), nextRealmLv])
|
| | | |
| | | RefreshOfficialAttr(curPlayer)
|
| | | GameFuncComm.DoFuncOpenLogic(curPlayer)
|
| | | SyncRealmFBState(curPlayer)
|
New file |
| | |
| | | #!/usr/bin/python
|
| | | # -*- coding: GBK -*-
|
| | | #---------------------------------------------------------------------
|
| | | #
|
| | | #---------------------------------------------------------------------
|
| | | ##@package GY_Query_AddBuff
|
| | | # @todo: 增加buff
|
| | | #
|
| | | # @author: xdh
|
| | | # @date 2019-03-19 21:00
|
| | | # @version 1.0
|
| | | #
|
| | | # @note: 增加buff
|
| | | #---------------------------------------------------------------------
|
| | | #"""Version = 2019-03-19 21:00""" |
| | | #---------------------------------------------------------------------
|
| | | import GameWorld
|
| | | import SkillCommon
|
| | | import BuffSkill
|
| | | #---------------------------------------------------------------------
|
| | |
|
| | | ## XX
|
| | | # @param query_Type 请求类型
|
| | | # @param query_ID 请求的玩家ID
|
| | | # @param packCMDList 发包命令
|
| | | # @param tick 当前时间
|
| | | # @return "True" or "False" or ""
|
| | | def DoLogic(query_Type, query_ID, packCMDList, tick):
|
| | | return ''
|
| | |
|
| | |
|
| | | ## 登陆信息
|
| | | # @param curPlayer 发出请求的玩家
|
| | | # @param callFunName 功能名称
|
| | | # @param funResult 查询的结果
|
| | | # @param tick 当前时间
|
| | | # @return None
|
| | | def DoResult(curPlayer, callFunName, funResult, tick):
|
| | | playerID = curPlayer.GetPlayerID()
|
| | | GameWorld.DebugLog("GY_Query_AddBuff funResult=%s" % funResult, playerID)
|
| | | buffID = GameWorld.ToIntDef(funResult, 0)
|
| | | if not buffID:
|
| | | return
|
| | | |
| | | skillBuff = GameWorld.GetGameData().GetSkillBySkillID(buffID)
|
| | | if not skillBuff:
|
| | | GameWorld.Log("GY_Query_AddBuff 找不到技能%s" % buffID, playerID)
|
| | | return
|
| | |
|
| | | buffType = SkillCommon.GetBuffType(skillBuff)
|
| | | BuffSkill.DoAddBuff(curPlayer, buffType, skillBuff, tick)
|
| | | return
|
| | |
|
| | |
|
| | |
| | | Def_ViewExpType_Sit , #打坐获取经验 3
|
| | | Def_ViewExpType_KillNPCSuper, #杀怪获得经验暴击 4
|
| | | Def_ViewExpType_Sys , #系统给经验-需要展示倍率,实际不享受 5
|
| | | ) = range(0, 6)
|
| | | Def_ViewExpType_RealmBuff, #境界全服福利经验(玄女天花) 6
|
| | | ) = range(0, 7)
|
| | |
|
| | |
|
| | | #物品相关操作类型
|
| | |
| | | import IPY_GameWorld
|
| | | import GameWorld
|
| | | import PlayerControl
|
| | | import ShareDefine
|
| | | import ChConfig
|
| | | #---------------------------------------------------------------------
|
| | | #全局变量
|
| | | #---------------------------------------------------------------------
|
| | |
| | | def ProcessBuff(defender, curBuff, curEffect, processBuffTick, tick):
|
| | | #---检查Buff可行性---
|
| | | curObjType = defender.GetGameObjType()
|
| | |
|
| | | # 给予经验,只支持玩家对象
|
| | | if curObjType != IPY_GameWorld.gotPlayer:
|
| | |
|
| | |
| | | return
|
| | |
|
| | | # 玩家最小等级限制
|
| | | if defender.GetLV() < curEffect.GetEffectValue(1):
|
| | | if defender.GetLV() < curEffect.GetEffectValue(2):
|
| | | return
|
| | |
|
| | | reExp = PlayerControl.GetPlayerReExp(defender)
|
| | | giveExp = int(curEffect.GetEffectValue(0)*reExp)
|
| | | giveExp = int(curEffect.GetEffectValue(0)*reExp+curEffect.GetEffectValue(1))
|
| | |
|
| | | if giveExp <= 0:
|
| | | return
|
| | |
|
| | | playerControl = PlayerControl.PlayerControl(defender)
|
| | | playerControl.AddExp(giveExp) |
| | | if curBuff.GetSkill().GetSkillTypeID() == ChConfig.Def_SkillID_RealmBuff:
|
| | | playerControl.AddExp(giveExp, ShareDefine.Def_ViewExpType_RealmBuff)
|
| | | else:
|
| | | playerControl.AddExp(giveExp)
|
| | | return
|