From fd6fd0602d6dffa638bdd9bdcb46445a9430520e Mon Sep 17 00:00:00 2001
From: xdh <xiefantasy@qq.com>
Date: 星期二, 23 十月 2018 19:10:36 +0800
Subject: [PATCH] 4283 增加法宝经验物品删除处理
---
ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py | 38 +++++++++++++++-----------------------
1 files changed, 15 insertions(+), 23 deletions(-)
diff --git a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
index 9dd33bc..8fa3d9f 100644
--- a/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
+++ b/ServerPython/ZoneServerGroup/map1_8G/MapServer/MapServerData/Script/Skill/SkillShell.py
@@ -1501,7 +1501,8 @@
if relation[0] == ChConfig.Type_Relation_Enemy :
return True
- AttackCommon.PlayerAttackFailSysMessanage(curPlayer, relation[1])
+ if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_FbSkill:
+ AttackCommon.PlayerAttackFailSysMessanage(curPlayer, relation[1])
return False
##玩家释放有目标技能, 检查目标对象是否符合要求, 可攻击怪物
@@ -1534,7 +1535,8 @@
if relation[0] == ChConfig.Type_Relation_Friend :
return True
- AttackCommon.PlayerAttackFailSysMessanage(curPlayer, relation[1])
+ if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_FbSkill:
+ AttackCommon.PlayerAttackFailSysMessanage(curPlayer, relation[1])
return False
#---------------------------------------------------------------------
@@ -1782,7 +1784,11 @@
if curSkill.GetFuncType() == ChConfig.Def_SkillFuncType_HorseSkill and SkillCommon.isPassiveAttr(curSkill):
PlayerHorse.RefreshHorseAttr(curPlayer)
else:
- PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer, curSkill.GetSkillID())
+ if SkillCommon.isPassiveAttr(curSkill):
+ curControl = PlayerControl.PlayerControl(curPlayer)
+ curControl.RefreshPlayerAttrState()
+ else:
+ PassiveBuffEffMng.GetPassiveEffManager().RegistPassiveEff(curPlayer, curSkill.GetSkillID())
#curControl = PlayerControl.PlayerControl(curPlayer)
#curControl.CalcPassiveBuffAttr()
#curControl.RefreshAllState()
@@ -1806,27 +1812,7 @@
return True
#---------------------------------------------------------------------
-##技能升级消耗逻辑
-# @param curPlayer 玩家实例
-# @param curSkill 技能实例
-# @param curSkillID 技能ID
-# @return BOOL 是否扣除消耗成功
-def DoLogic_PlayerSkillLVUpCost(curPlayer, curSkill, curSkillID):
- #GameWorld.Log("尝试升级技能名 = %s, 当前等级 = %s"%(curSkill.GetSkillName(),curSkill.GetSkillLV()) , curPlayer.GetPlayerID())
-
- curSkillLV = curSkill.GetSkillLV()
-
- if curSkillLV == curSkill.GetSkillMaxLV():
- #已经是最高等级
- PlayerControl.NotifyCode(curPlayer, "UseMagicLost16")
- return False
-
- #--获得下一级技能---
- curSkillTypeID = curSkill.GetSkillTypeID()
-
- return DoLogic_PlayerSkillLvUpCost(curPlayer, curSkillTypeID, curSkillID, curSkillLV + 1, curSkill)
-
##学习技能消耗逻辑
# @param curPlayer 玩家实例
# @param curSkillTypeID 技能类型ID
@@ -3440,6 +3426,12 @@
if skillAim == ChConfig.Def_UseSkillAim_None:
if curSkill.GetSkillType() in ChConfig.Def_CanAttackSkill_List:
+ if target and target.GetGameObjType() == IPY_GameWorld.gotNPC and target.GetGameNPCObjType() == IPY_GameWorld.gnotSummon:
+ owner = NPCCommon.GetNpcObjOwnerDetail(target)
+ if owner and owner.GetID() == attacker.GetID():
+ # 有害技能特殊处理,不能对自己的召唤物释放
+ target = None
+
result = DoLogic_UseSkill(attacker, target, curSkill, tick, attacker.GetPosX(), attacker.GetPosY(), isEnhanceSkill=isEnhanceSkill)
else:
result = DoLogic_UseSkill(attacker, attacker, curSkill, tick, isEnhanceSkill=isEnhanceSkill)
--
Gitblit v1.8.0