protected override void ProcessAction_Die(GameStruct.Action act) { PlayerObject play = act.GetObject(0) as PlayerObject; BaseObject baseobj = act.GetObject(0) as BaseObject; if (play == null && baseobj.type == OBJECTTYPE.EUDEMON) { play = (baseobj as EudemonObject).GetOwnerPlay(); } //根据打出的伤害获得经验值 uint injured = (uint)act.GetObject(1); NetMsg.MsgMonsterDieInfo info = new NetMsg.MsgMonsterDieInfo(); info.roleid = baseobj.GetTypeId(); info.role_x = baseobj.GetCurrentX(); info.role_y = baseobj.GetCurrentY(); info.injuredvalue = 0; info.monsterid = this.GetTypeId(); byte[] msg = info.GetBuffer(); //掉落道具 this.DropItem(baseobj); //RefreshVisibleObject(); //if (mRefreshList.Count > 0) //{ // this.GetGameMap().BroadcastBuffer(this,msg); // //掉落道具 // this.DropItem(play); //} this.BrocatBuffer(msg); LastDieTime = System.Environment.TickCount; if (play == null && baseobj.type != OBJECTTYPE.EUDEMON) { return; } //计算经验 play.AddExp((int)injured, play.GetLevel(), this.GetLevel()); //死亡的幻兽加灵气值复活 play.GetEudemonSystem().Eudemon_Alive(this); this.GetAi().Die(); this.GetAi().SetAttackTarget(null); mAliveTime.Update(); //执行死亡脚本- 最后一击的击杀者执行该脚本 if (mInfo.die_scripte_id > 0 && play != null) { ScripteManager.Instance().ExecuteAction(mInfo.die_scripte_id, play); } }