コード例 #1
0
        public void Save()
        {
            Stump.ORM.Database database = ServerBase <WorldServer> .Instance.DBAccessor.Database;
            using (System.Collections.Generic.IEnumerator <System.Collections.Generic.KeyValuePair <int, AccountRelation> > enumerator = this.m_relations.GetEnumerator())
            {
                while (enumerator.MoveNext())
                {
                    System.Collections.Generic.KeyValuePair <int, AccountRelation> current = enumerator.Current;
                    database.Save(current);
                }
                goto IL_63;
            }
IL_49:
            AccountRelation poco;

            if (this.m_relationsToRemove.TryPop(out poco))
            {
                database.Delete(poco);
            }
IL_63:
            if (this.m_relationsToRemove.Count == 0)
            {
                return;
            }
            goto IL_49;
        }
コード例 #2
0
        public void Save()
        {
            lock (this.m_locker)
            {
                Stump.ORM.Database database = ServerBase <WorldServer> .Instance.DBAccessor.Database;
                foreach (System.Collections.Generic.KeyValuePair <int, ItemShortcut> current in this.m_itemShortcuts)
                {
                    if (current.Value.IsDirty || current.Value.IsNew)
                    {
                        database.Save(current.Value);
                    }
                }
                using (System.Collections.Generic.Dictionary <int, SpellShortcut> .Enumerator enumerator2 = this.m_spellShortcuts.GetEnumerator())
                {
                    while (enumerator2.MoveNext())
                    {
                        System.Collections.Generic.KeyValuePair <int, SpellShortcut> current2 = enumerator2.Current;
                        if (current2.Value.IsDirty || current2.Value.IsNew)
                        {
                            database.Save(current2.Value);
                        }
                    }
                    goto IL_FD;
                }
IL_E3:
                Stump.Server.WorldServer.Database.Shortcuts.Shortcut shortcut = this.m_shortcutsToDelete.Dequeue();
                if (shortcut != null)
                {
                    database.Delete(shortcut);
                }
IL_FD:
                if (this.m_shortcutsToDelete.Count > 0)
                {
                    goto IL_E3;
                }
            }
        }
コード例 #3
0
        public void Save()
        {
            lock (this.m_locker)
            {
                Stump.ORM.Database database = ServerBase <WorldServer> .Instance.DBAccessor.Database;
                using (System.Collections.Generic.Dictionary <int, CharacterSpell> .Enumerator enumerator = this.m_spells.GetEnumerator())
                {
                    while (enumerator.MoveNext())
                    {
                        System.Collections.Generic.KeyValuePair <int, CharacterSpell> current = enumerator.Current;
                        database.Save(current.Value.Record);
                    }
                    goto IL_79;
                }
IL_65:
                CharacterSpellRecord poco = this.m_spellsToDelete.Dequeue();
                database.Delete(poco);
IL_79:
                if (this.m_spellsToDelete.Count > 0)
                {
                    goto IL_65;
                }
            }
        }