GetVal() public static method

public static GetVal ( string text, object objId, string @default ) : string
text string
objId object
@default string
return string
Example #1
0
        public void Set(object value)
        {
            string el1 = value.ToString();

            Override = ParserHelper.GetVal(el1, "override", "100");
            Sitting  = ParserHelper.GetVal(el1, "sitting", "false");
        }
Example #2
0
        public void Set(object obj)
        {
            string el1 = obj.ToString();

            Flag     = 0;
            Flag    |= ParserHelper.GetVal(el1, "noauction", "false") == "true" ? TradeFlag.Noauction : 0;
            Flag    |= ParserHelper.GetVal(el1, "nocart", "false") == "true" ? TradeFlag.Nocart : 0;
            Flag    |= ParserHelper.GetVal(el1, "nodrop", "false") == "true" ? TradeFlag.Nodrop : 0;
            Flag    |= ParserHelper.GetVal(el1, "nogstorage", "false") == "true" ? TradeFlag.Nogstorage : 0;
            Flag    |= ParserHelper.GetVal(el1, "nomail", "false") == "true" ? TradeFlag.Nomail : 0;
            Flag    |= ParserHelper.GetVal(el1, "noselltonpc", "false") == "true" ? TradeFlag.Noselltonpc : 0;
            Flag    |= ParserHelper.GetVal(el1, "nostorage", "false") == "true" ? TradeFlag.Nostorage : 0;
            Flag    |= ParserHelper.GetVal(el1, "notrade", "false") == "true" ? TradeFlag.Notrade : 0;
            Flag    |= ParserHelper.GetVal(el1, "partneroverride", "false") == "true" ? TradeFlag.Partneroverride : 0;
            Override = ParserHelper.GetVal(el1, "\noverride", "100");
        }