private void OnSendImpact(CharacterInfo sender, int targetId, int impactId, Vector3 srcPos, float srcDir) { CharacterView senderView = EntityManager.Instance.GetCharacterViewById(sender.GetId()); CharacterView targetView = EntityManager.Instance.GetCharacterViewById(targetId); if (null != senderView && null != targetView) { CharacterInfo target = WorldSystem.Instance.GetCharacterById(targetId); if (null != target) { // 施法者能造成硬直且受击方没有霸体 ImpactInfo impactInfo = target.GetSkillStateInfo().GetImpactInfoById(impactId); if (null == impactInfo) { return; } int forceLogicId = -1; if (sender.CauseStiff && !target.SuperArmor && !target.UltraArmor) { // 正常造成硬直 } else { forceLogicId = 0; impactInfo.m_IsGfxControl = false; } // Npc需要根据体型和类型判定 if (target.IsNpc) { NpcInfo npcInfo = target.CastNpcInfo(); // 场景破坏物体单独处理 if (npcInfo.NpcType == (int)NpcTypeEnum.SceneObject) { forceLogicId = 1; impactInfo.m_IsGfxControl = true; } // 处理体型 if (!impactInfo.ConfigData.TargetFigure.Contains(npcInfo.NpcFigure)) { forceLogicId = 0; impactInfo.m_IsGfxControl = false; } } // 打断技能 if ((null != impactInfo && 0 != impactInfo.ConfigData.ImpactGfxLogicId && forceLogicId < 0) || forceLogicId > 0) { if (null != target.SkillController) { target.SkillController.ForceInterruptCurSkill(); } else { LogSystem.Warn("{0} does't have a skillcontroller", target.GetName()); } } GfxSystem.QueueGfxAction(GfxModule.Impact.GfxImpactSystem.Instance.SendImpactToCharacter, senderView.Actor, targetView.Actor, impactId, srcPos.X, srcPos.Y, srcPos.Z, srcDir, forceLogicId); } } }
private void OnStopAllImpact(CharacterInfo sender, int targetId, int impactId) { CharacterView target = EntityManager.Instance.GetCharacterViewById(targetId); if (null != target) { GfxSystem.QueueGfxAction(GfxModule.Impact.GfxImpactSystem.Instance.StopAllGfxImpact, target.Actor); } }