| | |
| | | string _content = string.Format("DTC0608_tagNPCDie => S:{0} 死亡. 死亡原因: {1}, 杀死它的是: {2}", vNetData.ObjID, vNetData.Reason, vNetData.KillerID);
|
| | | RuntimeLogUtility.AddLog_Blue(_content, (uint)vNetData.ObjID);
|
| | | #endif
|
| | | GActor _actor = null;
|
| | | GActorFight _actor = null;
|
| | | if (PersonalEnemy.m_SBindCDict.ContainsKey(vNetData.ObjID))
|
| | | {
|
| | | _actor = GAMgr.Instance.GetBySID(PersonalEnemy.m_SBindCDict[vNetData.ObjID]);
|
| | | _actor = GAMgr.Instance.GetBySID(PersonalEnemy.m_SBindCDict[vNetData.ObjID]) as GActorFight;
|
| | | ClientSceneManager.Instance.lastDeadPos = _actor.Pos;
|
| | | GAMgr.Instance.ServerDie(_actor.ServerInstID);
|
| | | _actor.Die();
|
| | |
| | | }
|
| | | else
|
| | | {
|
| | | _actor = GAMgr.Instance.GetBySID(vNetData.ObjID);
|
| | | _actor = GAMgr.Instance.GetBySID(vNetData.ObjID) as GActorFight;
|
| | | }
|
| | |
|
| | | if (_actor == null)
|
| | |
| | |
|
| | | _actor.SetAnimatorSpeed(1);
|
| | |
|
| | | if (_actor is GActorNpcNoFight
|
| | | || !_actor.HasState(GAStaticDefine.State_DeadHash))
|
| | | if (!_actor.HasState(GAStaticDefine.State_DeadHash))
|
| | | {
|
| | | GAMgr.Instance.Release(_actor);
|
| | | }
|
| | | else if (_actor is GActorNpcFight
|
| | | || _actor is GA_NpcFightSgzcZZ)
|
| | | {
|
| | | if (_targetFight != null)
|
| | | if (_actor != null)
|
| | | {
|
| | | GA_Hero _hero = PlayerDatas.Instance.hero;
|
| | |
|
| | | if (_hero != null)
|
| | | {
|
| | | if (_hero.SelectTarget != null && _targetFight.ServerInstID == _hero.SelectTarget.ServerInstID)
|
| | | if (_hero.SelectTarget != null && _actor.ServerInstID == _hero.SelectTarget.ServerInstID)
|
| | | {
|
| | | SelectionManager.Release(SelectionManager.E_Type.Red);
|
| | | }
|
| | |
|
| | | if (_hero.LockTarget == _targetFight)
|
| | | if (_hero.LockTarget == _actor)
|
| | | {
|
| | | _hero.LockTarget = null;
|
| | | }
|
| | | }
|
| | |
|
| | | if (_targetFight.State == E_ActorState.AutoRun)
|
| | | if (_actor.State == E_ActorState.AutoRun)
|
| | | {
|
| | | _targetFight.StopPathFind();
|
| | | _actor.StopPathFind();
|
| | | }
|
| | |
|
| | | _targetFight.ActorInfo.serverDie = true;
|
| | | _targetFight.ReleaseName();
|
| | | _targetFight.ReleaseShadow();
|
| | | _targetFight.SkillMgr.Clear();
|
| | | GAMgr.Instance.DoDelayDie(_targetFight);
|
| | | _actor.ActorInfo.serverDie = true;
|
| | | _actor.ReleaseName();
|
| | | _actor.ReleaseShadow();
|
| | | _actor.SkillMgr.Clear();
|
| | | GAMgr.Instance.DoDelayDie(_actor);
|
| | |
|
| | | GActorFight _killer = GAMgr.Instance.GetBySID(vNetData.KillerID) as GActorFight;
|
| | |
|
| | |
| | |
|
| | | if (_transToMainUser)
|
| | | {
|
| | | _targetFight.Die(vNetData.KillerID / 10);
|
| | | _actor.Die(vNetData.KillerID / 10);
|
| | | }
|
| | | else
|
| | | {
|
| | | _targetFight.Die(vNetData.KillerID);
|
| | | _actor.Die(vNetData.KillerID);
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | _content = string.Format("DTC0608_tagNPCDie => {0} 死亡的时候凶手: {1} 已经将招式: {2} 演示完毕, 这里直接死亡.", vNetData.ObjID, vNetData.KillerID, vNetData.Reason);
|
| | | RuntimeLogUtility.AddLog_Red(_content, (uint)vNetData.ObjID);
|
| | | #endif
|
| | | _targetFight.Die(vNetData.KillerID);
|
| | | _actor.Die(vNetData.KillerID);
|
| | |
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _targetFight.Die(vNetData.KillerID);
|
| | | _actor.Die(vNetData.KillerID);
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | _targetFight.Die();
|
| | | _actor.Die();
|
| | | }
|
| | | }
|
| | | }
|