Exemple #1
0
        public Weenie GetWeenie(string token, uint weenieClassId)
        {
            Weenie result = null;

            Weenies.TryGetValue(weenieClassId, out result);
            return(result);
        }
Exemple #2
0
        public override void ClearDirtyFlags()
        {
            base.ClearDirtyFlags();

            AssociatedContent.ForEach(c => c.ClearDirtyFlags());
            ExternalResources.ForEach(r => r.ClearDirtyFlags());
            Weenies.ForEach(w => w.ClearDirtyFlags());
            AssociatedLandblocks.ForEach(l => l.ClearDirtyFlags());
        }
Exemple #3
0
        public bool DeleteWeenie(string token, uint weenieClassId)
        {
            try
            {
                Weenie weenie = null;
                if (Weenies.TryRemove(weenieClassId, out weenie))
                {
                    string path = Path.Combine(ContentPath, "weenies", $"{weenieClassId}.json");
                    File.Delete(path);
                }

                return(true);
            }
            catch
            {
                return(false);
            }
        }