예제 #1
0
        public CItem GetItem(SQLiteCommand ZQuery)    // Liefert ein Item anhand eines aktuellen Datensatzes
        {
            CItem item = new CItem();

            item.Init();

            item.Name         = ZQuery.FieldByName("name").AsString;
            item.NameOriginal = ZQuery.FieldByName("nameoriginal").AsString;
            item.Origin       = ZQuery.FieldByName("origin").AsString;
            item.Description  = ZQuery.FieldByName("description").AsString;
            item.OnlineURL    = ZQuery.FieldByName("onlineurl").AsString;
            item.Extension    = ZQuery.FieldByName("extension").AsString;
            item.Provider     = ZQuery.FieldByName("provider").AsString;
            item.SetClassRestrictionStr(ZQuery.FieldByName("classrestrictions").AsString);
            item.SetEffectStr(ZQuery.FieldByName("effects").AsString);
            item.Realm      = ZQuery.FieldByName("realm").AsInteger;
            item.Position   = ZQuery.FieldByName("position").AsInteger;
            item.Type       = (EItemType)ZQuery.FieldByName("type").AsInteger;
            item.Level      = ZQuery.FieldByName("level").AsInteger;
            item.Quality    = ZQuery.FieldByName("quality").AsInteger;
            item.Bonus      = ZQuery.FieldByName("bonus").AsInteger;
            item.Class      = ZQuery.FieldByName("class").AsInteger;
            item.SubClass   = ZQuery.FieldByName("subclass").AsInteger;
            item.Material   = ZQuery.FieldByName("material").AsInteger;
            item.AF         = ZQuery.FieldByName("af").AsInteger;
            item.DPS        = ZQuery.FieldByName("dps").AsInteger;
            item.Speed      = ZQuery.FieldByName("speed").AsInteger;
            item.DamageType = ZQuery.FieldByName("damagetype").AsInteger;
            item.MaxLevel   = ZQuery.FieldByName("maxlevel").AsInteger;
            if (item.MaxLevel > 0)
            {
                item.CurLevel = item.MaxLevel;
            }
            item.LastUpdate = Utils.UnixToDateTime(ZQuery.FieldByName("lastupdate").AsInteger);

            return(item);
        }