Ejemplo n.º 1
0
 public OutfitForm(Outfit outfit)
 {
     this.outfit = outfit;
     InitializeComponent();
 }
Ejemplo n.º 2
0
 private static Outfit registerOutfit(Outfit h)
 {
     if (h == null) return null;
     lock (SpellLock) {
         if (_outfitIdMap.ContainsKey(h.id)) {
             for (int i = 0; i <= 3; i++) {
                 if (h.maleImages[i] != null) h.maleImages[i].Dispose();
                 if (h.femaleImages[i] != null) h.femaleImages[i].Dispose();
             }
             return _outfitIdMap[h.id];
         }
         _outfitIdMap.Add(h.id, h);
         string name = h.name.ToLower();
         if (!_outfitNameMap.ContainsKey(name)) {
             _outfitNameMap.Add(h.name.ToLower(), h);
         }
     }
     return h;
 }
Ejemplo n.º 3
0
        private static Outfit createOutfit(SQLiteDataReader reader)
        {
            SQLiteCommand command;
            if (!reader.Read()) {
                return null;
            }

            Outfit outfit = new Outfit();
            outfit.permanent = true;
            outfit.id = reader.GetInt32(0);
            outfit.title = reader.GetString(1);
            outfit.name = reader.GetString(2);
            outfit.premium = reader.GetBoolean(3);
            outfit.tibiastore = reader.GetBoolean(4);

            // Outfit Images
            command = new SQLiteCommand(String.Format("SELECT male, addon, image FROM OutfitImages WHERE outfitid={0}", outfit.id), mainForm.conn);
            reader = command.ExecuteReader();
            while (reader.Read()) {
                bool male = reader.GetBoolean(0);
                int addon = reader.GetInt32(1);
                Image image = Image.FromStream(reader.GetStream(2));

                if (male) {
                    outfit.maleImages[addon] = image;
                } else {
                    outfit.femaleImages[addon] = image;
                }
            }

            command = new SQLiteCommand(String.Format("SELECT questid FROM QuestOutfits WHERE outfitid={0}", outfit.id), mainForm.conn);
            reader = command.ExecuteReader();
            while (reader.Read()) {
                outfit.questid = reader.GetInt32(0);
            }

            return outfit;
        }
Ejemplo n.º 4
0
        public static void ShowOutfitNotification(Outfit outfit, string comm)
        {
            OutfitForm f = new OutfitForm(outfit);

            ShowNotification(f, comm);
        }
Ejemplo n.º 5
0
        private void ShowOutfitNotification(Outfit outfit, string comm)
        {
            OutfitForm f = new OutfitForm(outfit);

            ShowNotification(f, comm);
        }
Ejemplo n.º 6
0
        public static void ShowOutfitNotification(Outfit outfit, string comm)
        {
            OutfitForm f = new OutfitForm(outfit);

            ShowNotification(f, comm);
        }