Beispiel #1
0
    protected override void Execute()
    {
        SqlCommand sqcmd = new SqlCommand();

        sqcmd.CommandType = CommandType.StoredProcedure;
        sqcmd.CommandText = "WZ_GetShopInfo1";

        if (!CallWOApi(sqcmd))
        {
            return;
        }

        // "SHO1"
        byte[] itemHdr = new byte[4] {
            83, 72, 79, 49
        };

        MemoryStream ms = new MemoryStream();

        ms.Write(itemHdr, 0, 4);

        // all items
        while (reader.Read())
        {
            OutShopItem(ms);
        }

        ms.Write(itemHdr, 0, 4);

        GResponse.Write("WO_0");
        GResponse.BinaryWrite(ms.ToArray());
    }
    protected override void Execute()
    {
        SqlCommand sqcmd = new SqlCommand();

        sqcmd.CommandType = CommandType.StoredProcedure;
        sqcmd.CommandText = "WO_GetShopInfo5";

        if (!CallWOApi(sqcmd))
        {
            return;
        }

        // "SHO3"
        byte[] itemHdr = new byte[4] {
            83, 72, 79, 51
        };

        MemoryStream ms = new MemoryStream();

        ms.Write(itemHdr, 0, 4);

        OutSkillPrices2(ms);
        ms.Write(itemHdr, 0, 4);

        // common items
        reader.NextResult();
        while (reader.Read())
        {
            OutShopItem(ms);
        }

        // packages - must be SAME as item for now
        reader.NextResult();
        while (reader.Read())
        {
            // package can be disabled
            if (getInt("IsEnabled") == 0)
            {
                continue;
            }
            OutShopItem(ms);
        }

        ms.Write(itemHdr, 0, 4);

        GResponse.Write("WO_0");
        GResponse.BinaryWrite(ms.ToArray());
    }