Exemplo n.º 1
0
    public static int SetLuaTableField(IntPtr l)
    {
        string  tableName = lua_.ToString(1);
        WDBData dbData    = CDataMgr.Instance.GetOrCreateDB(tableName);

        lua_.GetGlobal("WDB_" + tableName);
        foreach (KeyValuePair <string, int> kv in dbData.mFieldName)
        {
            lua_.PushInteger(dbData.GetFieldByName(kv.Key));
            lua_.SetField(-2, kv.Key);
        }
        lua_.Pop(2);

        return(0);
    }
Exemplo n.º 2
0
    static WDB_Item()
    {
        WDBData db = CDataMgr.Item;

        if (db != null)
        {
            db.GetFieldByName("Id", out Id);
            db.GetFieldByName("Name", out Name);
            db.GetFieldByName("Desc", out Desc);
            db.GetFieldByName("Body", out Body);
            db.GetFieldByName("Body_Drop", out Body_Drop);
            db.GetFieldByName("Drop_Effect", out Drop_Effect);
            db.GetFieldByName("Quality", out Quality);
            db.GetFieldByName("Bag", out Bag);
            db.GetFieldByName("Use", out Use);
            db.GetFieldByName("AutuGein", out AutuGein);
            db.GetFieldByName("StackSum", out StackSum);
            db.GetFieldByName("IsResolve", out IsResolve);
            db.GetFieldByName("IsSold", out IsSold);
            db.GetFieldByName("Price", out Price);
            db.GetFieldByName("IsAffirmSold", out IsAffirmSold);
            db.GetFieldByName("Icon", out Icon);
            db.GetFieldByName("IconType", out IconType);
            db.GetFieldByName("Function", out Function);
            db.GetFieldByName("BuffId", out BuffId);
            db.GetFieldByName("Drop", out Drop);
            db.GetFieldByName("TrunAround", out TrunAround);
            db.GetFieldByName("GainEffect", out GainEffect);
        }
    }