Faenor engine question

    Share
    avatar
    Karakan

    Posts : 403
    Join date : 2013-10-04

    Faenor engine question

    Post  Karakan on 7th September 2015, 15:31

    Is there a way to make it possible to use "," commas on Faenor engine ?

    What i want is to make few item dropchance lower then 1%.

    S.t. like this
    Code:

      <Droplist>
          <AllDrop Items="6393" Count="1,1" Chance="0.01%" />
      </Droplist>


    Ive found these lines ...

    Code:
    double chance = getPercent(attribute(drop, "Chance"));

    Code:
        public static double getPercent(String percent)
        {
            return (Double.parseDouble(percent.split("%")[0]) / 100.0);


    I guess problem is the -> double ?

    DnR
    Admin
    Admin

    Posts : 985
    Join date : 2012-12-03

    Re: Faenor engine question

    Post  DnR on 7th September 2015, 20:19

    Double supports decimal numbers.
    You should have got no problems.
    avatar
    Karakan

    Posts : 403
    Join date : 2013-10-04

    Re: Faenor engine question

    Post  Karakan on 7th September 2015, 21:30

    Hmm i could swear i had an error when using -> 0.1% value.
    I should drink less when working with xml tables. lol

    Thx^^

    Sponsored content

    Re: Faenor engine question

    Post  Sponsored content


      Current date/time is 23rd July 2017, 11:50