Пример #1
0
        public virtual void CompleteToAll(DungeonScene _this, FubenResult result, int seconds = 20)
        {
            _this.PushActionToAllPlayer(player =>
            {
                if (player != null)
                {
                    _this.Complete(player.ObjId, result);
                }
            });

            _this.EnterAutoClose(seconds);
        }
Пример #2
0
        public void NotifyDungeonTime(DungeonScene _this, eDungeonTimerType type)
        {
            var trigger = _this.Trggers[(int)type];

            if (trigger != null && trigger.T != null)
            {
                _this.PushActionToAllPlayer(
                    player =>
                {
                    player.Proxy.NotifyDungeonTime((int)_this.State, (ulong)trigger.Time.ToBinary());
                });
            }
        }
Пример #3
0
        public void OnNpcDie(DungeonScene _this, ObjNPC npc, ulong characterId)
        {
            var idx = _this.MapNpcRecords.FindIndex(r => r.NpcID == npc.TypeId);

            if (idx == -1)
            {
                return;
            }
            var info = _this.MapNpcInfo.Data[idx];

            info.Alive = false;
            var data = new MapNpcInfos();

            data.Data.Add(info);
            _this.PushActionToAllPlayer(p =>
            {
                if (p.Proxy == null)
                {
                    return;
                }
                p.Proxy.NotifyNpcStatus(data);
            });
        }