Esempio n. 1
0
 private void OnMapActorLeave(Map map, RolePlayActor actor)
 {
     if (actor is MonsterGroup && this.Spawns.Contains(actor as MonsterGroup))
     {
         this.OnGroupUnSpawned(actor as MonsterGroup);
     }
 }
 public void NotifyInteractiveUseEnded()
 {
     if (UsedBy != null)
     {
         UsedBy.NotifyInteractiveUseEnded();
         UsedBy = null;
     }
 }
Esempio n. 3
0
        private void OnMapActorLeave(Map map, RolePlayActor actor)
        {
            var group = actor as MonsterGroup;

            if (group != null && (Spawns.Contains(group)))
            {
                OnGroupUnSpawned(group);
            }
        }
Esempio n. 4
0
        private static void OnEnterMap(RolePlayActor actor, Map map)
        {
            if (!(actor is Character character))
            {
                return;
            }

            if (!POPUP_MAPS.Contains(map.Id))
            {
                return;
            }

            character.DisplayNotification(POPUP_MESSAGE, NotificationEnum.INFORMATION);
        }
        private void OnChangeSubArea(RolePlayActor actor, SubArea subArea)
        {
            var achievement = subArea.Record.Achievement;

            lock (this.m_lock)
            {
                if (achievement != null)
                {
                    if (!this.m_finishedAchievements.Contains(achievement))
                    {
                        this.CompleteAchievement(achievement);
                    }
                }
            }
        }
Esempio n. 6
0
        void OnFightLeft(RolePlayActor rolePlayActor, Map map)
        {
            if (map != m_fight.Map)
            {
                return;
            }

            RemoveShield(rolePlayActor as Character);

            rolePlayActor.EnterMap -= OnFightLeft;

            if (Interlocked.Decrement(ref m_readyPlayersCount) <= 0)
            {
                m_fight.Map.Area.AddMessage(PrepareFight);
            }
        }
        public void NotifyInteractiveUsed(InteractiveUsedMessage message)
        {
            var actor = Map.GetActor(message.entityId);
            var skill = EnabledSkills.Concat(DisabledSkills).FirstOrDefault(x => x.JobSkill != null && x.JobSkill.id == message.skillId);

            var evnt = Used;

            if (evnt != null)
            {
                evnt(this, actor, skill, message.duration);
            }

            if (actor != null)
            {
                actor.NotifyUseInteractive(this, skill, message.duration);

                if (message.duration > 0)
                {
                    UsedBy = actor;
                }
            }
        }
Esempio n. 8
0
        public override void Execute(TriggerBase trigger)
        {
            Map map = null;

            if (trigger.IsArgumentDefined("map"))
            {
                map = trigger.Get <Map>("map");
            }
            else
            {
                if (trigger is GameTrigger)
                {
                    map = (trigger as GameTrigger).Character.Map;
                }
            }
            if (map == null)
            {
                trigger.ReplyError("Map not defined");
            }
            else
            {
                trigger.ReplyBold("Map {0} (relative : {1})", new object[]
                {
                    map.Id,
                    map.RelativeId
                });
                trigger.ReplyBold("X:{0}, Y:{1}", new object[]
                {
                    map.Position.X,
                    map.Position.Y
                });
                trigger.ReplyBold("SubArea:{0}, Area:{1}, SuperArea:{2}", new object[]
                {
                    map.SubArea.Id,
                    map.Area.Id,
                    map.SuperArea.Id
                });
                RolePlayActor[] array = map.GetActors <RolePlayActor>().ToArray <RolePlayActor>();
                trigger.ReplyBold("Actors ({0}) :", new object[]
                {
                    array.Length
                });
                RolePlayActor[] array2 = array;
                for (int i = 0; i < array2.Length; i++)
                {
                    RolePlayActor rolePlayActor = array2[i];
                    trigger.ReplyBold("- {0} : {1}", new object[]
                    {
                        rolePlayActor.GetType().Name,
                        rolePlayActor
                    });
                }
                trigger.ReplyBold("SpawningPools ({0}) :", new object[]
                {
                    map.SpawningPools.Count
                });
                foreach (SpawningPoolBase current in map.SpawningPools)
                {
                    trigger.ReplyBold("- {0} : State : {1}, Next : {2}s", new object[]
                    {
                        current.GetType().Name,
                        current.State,
                        current.RemainingTime / 1000
                    });
                }
            }
        }
Esempio n. 9
0
 private void OnStopUsingInteractive(RolePlayActor actor, InteractiveObject interactive, InteractiveSkill skill)
 {
     CheckRessources();
 }
Esempio n. 10
0
 private void OnStartUsingInteractive(RolePlayActor actor, InteractiveObject interactive, InteractiveSkill skill, DateTime?usageEndTime)
 {
     DisposeTimer();
 }
Esempio n. 11
0
 private void OnEnterMap(RolePlayActor actor, Map map)
 {
     CheckFavoriteSubAreas();
 }
Esempio n. 12
0
 public static void SendGameRolePlayShowActorMessage(IPacketReceiver client, Character character, RolePlayActor actor)
 {
     client.Send(new GameRolePlayShowActorMessage(actor.GetGameContextActorInformations(character) as GameRolePlayActorInformations));
 }
Esempio n. 13
0
 public bool RemoveActor(RolePlayActor actor)
 {
     return(m_actors.Remove(actor));
 }
Esempio n. 14
0
 public void AddActor(RolePlayActor actor)
 {
     m_actors.Add(actor);
 }
Esempio n. 15
0
 private void OnEnterMap(RolePlayActor character, Map map)
 {
     UpdateMember(character as Character);
 }