예제 #1
0
        public static bool MeetsCondition(
            NoNpcsOnMapCondition condition,
            Player player,
            Event eventInstance,
            QuestBase questBase
            )
        {
            var map = MapInstance.Get(eventInstance?.MapId ?? Guid.Empty);

            if (map == null)
            {
                map = MapInstance.Get(player.MapId);
            }

            if (map != null)
            {
                var entities = map.GetEntities();
                foreach (var en in entities)
                {
                    if (en.GetType() == typeof(Npc))
                    {
                        return(false);
                    }
                }

                return(true);
            }

            return(false);
        }
예제 #2
0
 private void SaveFormValues(NoNpcsOnMapCondition condition)
 {
     //Nothing to do but we need this here so the dynamic will work :)
 }