| | |
| | | heroAttrDict = {}
|
| | | if lineupPlayerID:
|
| | | heroAttrDict.update({
|
| | | ShareDefine.Def_Effect_Atk:500000000,
|
| | | ShareDefine.Def_Effect_Def:50000000,
|
| | | ShareDefine.Def_Effect_MaxHP:3000000000,
|
| | | ChConfig.AttrID_Atk:500000000,
|
| | | ChConfig.AttrID_Def:50000000,
|
| | | ChConfig.AttrID_MaxHP:3000000000,
|
| | | })
|
| | | else:
|
| | | npcDataEx = GetNPCDataEx(curNPC.GetNPCID())
|
| | | if not npcDataEx:
|
| | | return
|
| | | heroAttrDict.update({
|
| | | ShareDefine.Def_Effect_Atk:npcDataEx.GetAtk(),
|
| | | ShareDefine.Def_Effect_Def:npcDataEx.GetDef(),
|
| | | ShareDefine.Def_Effect_MaxHP:npcDataEx.GetMaxHP(),
|
| | | ChConfig.AttrID_Atk:npcDataEx.GetAtk(),
|
| | | ChConfig.AttrID_Def:npcDataEx.GetDef(),
|
| | | ChConfig.AttrID_MaxHP:npcDataEx.GetMaxHP(),
|
| | | })
|
| | |
|
| | | GameWorld.DebugLog("heroAttrDict: ID:%s,NPCID:%s,%s" % (curNPC.GetID(), curNPC.GetNPCID(), heroAttrDict))
|
| | |
| | | curNPC.ResetNPCBattleState()
|
| | |
|
| | | # 设置属性
|
| | | curNPC.SetMinAtk(heroAttrDict.get(ShareDefine.Def_Effect_Atk, 1))
|
| | | curNPC.SetMaxAtk(heroAttrDict.get(ShareDefine.Def_Effect_Atk, 1))
|
| | | curNPC.SetDef(heroAttrDict.get(ShareDefine.Def_Effect_Def, 1))
|
| | | GameObj.SetMaxHP(curNPC, heroAttrDict.get(ShareDefine.Def_Effect_MaxHP, 1))
|
| | | curNPC.SetMinAtk(heroAttrDict.get(ChConfig.AttrID_Atk, 1))
|
| | | curNPC.SetMaxAtk(heroAttrDict.get(ChConfig.AttrID_Atk, 1))
|
| | | curNPC.SetDef(heroAttrDict.get(ChConfig.AttrID_Def, 1))
|
| | | GameObj.SetMaxHP(curNPC, heroAttrDict.get(ChConfig.AttrID_MaxHP, 1))
|
| | | return
|
| | |
|
| | | ## 刷新NPC属性
|