static int GetBullFightConsume(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        BullFightConfig  obj  = (BullFightConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "BullFightConfig");
        uint             arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        BullFightConsume o    = obj.GetBullFightConsume(arg0);

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    public void ReadConsume()
    {
        string text = ResourceLoadManager.Instance.GetConfigText(name2);

        if (text == null)
        {
            Debug.LogError("LoadConfig failed: " + name2);
            return;
        }

        bullFightConsumes.Clear();

        XmlDocument xmlDoc   = CommonFunction.LoadXmlConfig(GlobalConst.DIR_XML_BULLFIGHT_CONSUME, text);
        XmlNodeList nodelist = xmlDoc.SelectSingleNode("Data").ChildNodes;

        foreach (XmlElement xe in nodelist)
        {
            XmlNode comment = xe.SelectSingleNode(GlobalConst.CONFIG_SWITCH_COLUMN);
            if (comment != null && comment.InnerText == GlobalConst.CONFIG_SWITCH)
            {
                continue;
            }
            BullFightConsume consume = new BullFightConsume();
            foreach (XmlElement xel in xe)
            {
                if (xel.Name == "buy_times")
                {
                    uint.TryParse(xel.InnerText, out consume.buy_times);
                }
                else if (xel.Name == "consume_type")
                {
                    uint.TryParse(xel.InnerText, out consume.consume_type);
                }
                else if (xel.Name == "consume_value")
                {
                    uint.TryParse(xel.InnerText, out consume.consume_value);
                }
            }

            bullFightConsumes.Add(consume);
        }
    }