| | |
| | | return ChConfig.Type_Relation_Friend, ChConfig.Def_PASysMessage_None
|
| | |
|
| | | defenderCampType = NPCCommon.GetFaction(curNormalNPC)
|
| | | tagFaction = curTagPlayer.GetFaction()
|
| | | if tagFaction and defenderCampType:
|
| | | if tagFaction == defenderCampType:
|
| | | return ChConfig.Type_Relation_Friend , ChConfig.Def_PASysMessage_None
|
| | | return ChConfig.Type_Relation_Enemy , ChConfig.Def_PASysMessage_None
|
| | | #正义的 不攻击玩家 宠物以及玩家的召唤兽
|
| | | if defenderCampType == ChConfig.CampType_Justice:
|
| | | elif defenderCampType == ChConfig.CampType_Justice:
|
| | | return ChConfig.Type_Relation_Friend, ChConfig.Def_PASysMessage_None
|
| | |
|
| | | return ChConfig.Type_Relation_Enemy , ChConfig.Def_PASysMessage_None
|
| | |
| | | lastHP = curNPCBeHP - GameObj.GetHP(curNormalNPC)
|
| | | if lastHP > 0 :
|
| | | #添加伤血列表
|
| | | AttackCommon.NPCAddObjInHurtList(curTagPlayer, curNormalNPC, curNPCBeHP, lastHP)
|
| | | AttackCommon.NPCAddObjInHurtList(curTagPlayer, curNormalNPC, curNPCBeHP, lastHP, True)
|
| | | #给这个玩家的召唤兽增加仇恨
|
| | | AttackCommon.SummonAddAngryByOwner(curNormalNPC, curTagPlayer, hurtHP)
|
| | | #添加技能伤害通知列表,(用于攻击结束,统一通知客户端)
|
| | |
| | | def AttackResult(curNormalNPC, curTagPlayer, skill, tick):
|
| | |
|
| | | #玩家活着
|
| | | if curTagPlayer.GetHP() > 0:
|
| | | if GameObj.GetHP(curTagPlayer) > 0:
|
| | | #被攻击玩家进入战斗状态
|
| | | AttackCommon.OnNPCHitPlayer(curNormalNPC, curTagPlayer, tick)
|
| | | AttackCommon.SetPlayerBattleState(curTagPlayer, tick)
|