Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
 Couple bugs
Today, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, DotBot, Google, Yahoo!, Majestic-12

Members: 0
Guests: 8
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Character class generation pr...
Forum Rules | Mark all | Recent Posts

Character class generation problem
< Newer Topic :: Older Topic > [Fixed]

Pages:<< prev 1 next >>
* #1 Dec 20, 2010, 10:12 am   Last edited Dec 20, 2010, 10:14 am by Aurin
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

It's me again.. heh

Okay, here's my problem:
I've found that our current system has a bit of a flaw when it comes to character creation. That is, you cannot choose the Druid class for our secondclass if going multiclass and the opposing iClass is not selected (in this case, Priest). I've narrowed it down to the below code as the problem--maybe? I'll add it and where it's called in so that everyone can see the whole picture.

/* Check character to see if they can use the iClass with current classes */
bool can_use_class_multi(CHAR_DATA *ch, int iClass, bool silent)
{
  if(iClass == CLASS_PRIEST)
  {
    if(ch->Class == CLASS_DRUID || ch->secondclass == CLASS_DRUID)
    {
      if(!silent)
        send_to_char("\r\nYou can't be a Priest.\r\nPlease select another class.\r\n", ch);
      return FALSE;
    }
  }
  if(iClass == CLASS_DRUID)
  {
    if(ch->Class == CLASS_PRIEST || ch->secondclass == CLASS_PRIEST)
    {
      if(!silent)
        send_to_char("\r\nYou can't be a Druid.\r\nPlease select another class.\r\n", ch);
      return FALSE;
    }
  }


the problem mostly falls somewhere in CON_GET_SECOND_CLASS, but giving as much info as possible for better results. heh
    case CON_GET_NEW_CLASS:
      argument = one_argument(argument, arg);
      if(!str_cmp(arg, "help"))
      {
        for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
        {
          if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && class_table[iClass]->starting)
          {
            if(toupper(argument[0]) ==
               toupper(class_table[iClass]->who_name[0])
               && !str_prefix(argument, class_table[iClass]->who_name) || !str_cmp(argument, "multiclass") || !str_cmp(argument, "classes") || !str_cmp(argument, "multiclass race"))
            {
              do_help(ch, argument);
              write_to_buffer(d, "Please choose a class: [ ", 0);
              write_to_buffer(d, all_classes(d), 0);
              return;
            }
          }
        }
        write_to_buffer(d, "No such help topic.  Please choose a class: [ ", 0);
        write_to_buffer(d, all_classes(d), 0);
        return;
      }
      for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
      {
        if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && class_table[iClass]->starting)
        {
          if(toupper(arg[0]) == toupper(class_table[iClass]->who_name[0]) && !str_prefix(arg, class_table[iClass]->who_name) && str_cmp(class_table[iClass]->who_name, "Ancient"))
          {
            ch->Class = iClass;
            break;
          }
        }
      }

      if(iClass == MAX_PC_CLASS || !class_table[iClass]
         || !class_table[iClass]->starting
         || !VLD_STR(class_table[iClass]->who_name)
         || IS_SET(class_table[iClass]->race_restriction, 1 << ch->race) || !str_cmp(class_table[iClass]->who_name, "unused") || !str_cmp(class_table[iClass]->who_name, "Ancient"))
      {
        write_to_buffer(d, "That's not a class.\r\nWhat IS your class? [ ", 0);
        write_to_buffer(d, all_classes(d), 0);
        return;
      }
      if(check_bans(ch, BAN_CLASS))
      {
        write_to_buffer(d, "That class is not currently available.\r\nWhat IS your class? [ ", 0);
        write_to_buffer(d, all_classes(d), 0);
        return;
      }

      if(xIS_SET(race_table[ch->race]->flags, RACE_ADVANCED))
      {
        ch->secondclass = -1;
        ch->thirdclass = -1;
        write_to_buffer(d, "You may now use your points to increase your stats.\r\nFor example typing wis\r\nThis will increase your wisdom 1 point.", 0);
        name_stamp_stats(ch);
        snprintf(buf, MSL, "\r\nStr: %d  Int: %d  Wis: %d  Dex: %d  Con: %d  Cha: %d  Lck: %d Points: %d",
                 ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con, ch->perm_cha, ch->perm_lck, ch->statpoints);
        write_to_buffer(d, buf, 0);
        d->connected = CON_ROLL_STATS;
      }
      else
      {
        write_to_buffer(d, "\r\nWould you like a second class? Y/N?\r\n", 0);
        d->connected = CON_GET_FIRST_CHOICE;
      }
      return;

    case CON_GET_FIRST_CHOICE:
      switch (argument[0])
      {
        case 'y':
        case 'Y':
        {
          bool                    fclass = TRUE;

          write_to_buffer(d, "\r\nYou may choose from the following classes, or type help [class] to learn more:\r\n[", 0);
          buf[0] = '\0';
          for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
          {
            if(d->character && !can_use_class_multi(d->character, iClass, TRUE))
              continue;
            if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && !IS_SET(class_table[iClass]->race_restriction, 1 << ch->race) && class_table[iClass]->starting && iClass != ch->Class)
            {
              if(!fclass)
                mudstrlcat(buf, " ", MSL);
              fclass = FALSE;
              mudstrlcat(buf, class_table[iClass]->who_name, MSL);
              write_to_buffer(d, buf, 0);
              buf[0] = '\0';
            }
          }
        }
          mudstrlcat(buf, "]\r\n: ", MSL);
          write_to_buffer(d, buf, 0);
          buf[0] = '\0';
          d->connected = CON_GET_SECOND_CLASS;
          return;

        case 'n':
        case 'N':
          ch->secondclass = -1;
          ch->thirdclass = -1;
          write_to_buffer(d, "You may now use your points to increase your stats.\r\nFor example typing wis\r\nThis will increase your wisdom 1 point.", 0);
          name_stamp_stats(ch);
          snprintf(buf, MSL, "\r\nStr: %d  Int: %d  Wis: %d  Dex: %d  Con: %d  Cha: %d  Lck: %d Points: %d",
                   ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con, ch->perm_cha, ch->perm_lck, ch->statpoints);
          write_to_buffer(d, buf, 0);
          d->connected = CON_ROLL_STATS;
          return;

        default:
          write_to_buffer(d, "Yes or No? ", 0);
          return;
      }
      break;

    case CON_GET_SECOND_CLASS:
      argument = one_argument(argument, arg);
      if(!str_cmp(arg, "help"))
      {
        for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
        {
          if(d->character && !can_use_class_multi(d->character, iClass, TRUE))
            continue;

          if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && class_table[iClass]->starting)
          {
            if(toupper(argument[0]) ==
               toupper(class_table[iClass]->who_name[0])
               && !str_prefix(argument, class_table[iClass]->who_name) || !str_cmp(argument, "multiclass") || !str_cmp(argument, "classes") || !str_cmp(argument, "multiclass race"))
            {
              do_help(ch, argument);
              write_to_buffer(d, "Please choose a class: ", 0);
              return;
            }
          }
        }
        write_to_buffer(d, "No such help topic.  Please choose a class: ", 0);
        return;
      }

      for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
      {
        if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && class_table[iClass]->starting)
        {
          if(d->character && !can_use_class_multi(d->character, iClass, TRUE))
            continue;

          if(toupper(arg[0]) == toupper(class_table[iClass]->who_name[0]) && !str_prefix(arg, class_table[iClass]->who_name) && str_cmp(class_table[iClass]->who_name, "Ancient"))
          {
            ch->secondclass = iClass;
            ch->firstlevel = 1;
            ch->secondlevel = 1;
            ch->secondexp = 0;
            ch->firstexpratio = 50;
            ch->secondexpratio = 50;
            break;
          }
        }
      }

      if(iClass == MAX_PC_CLASS || !class_table[iClass]
         || !class_table[iClass]->starting
         || !VLD_STR(class_table[iClass]->who_name)
         || IS_SET(class_table[iClass]->race_restriction, 1 << ch->race) || !str_cmp(class_table[iClass]->who_name, "unused") || !str_cmp(class_table[iClass]->who_name, "Ancient"))
      {
        write_to_buffer(d, "That's not a class.\r\nWhat IS your class? ", 0);
        return;
      }
      if(check_bans(ch, BAN_CLASS))
      {
        write_to_buffer(d, "That class is not currently available.\r\nWhat IS your class? ", 0);
        return;
      }
      if(ch->Class == iClass)
      {
        write_to_buffer(d, "\r\nYou cannot select the same class twice.\r\nPlease select another class.\r\n", 0);
        return;
      }

      if(!can_use_class_multi(ch, iClass, FALSE))
        return;

      write_to_buffer(d, "\r\nWould you like a third class? Y/N?\r\n", 0);
      d->connected = CON_GET_SECOND_CHOICE;
      break;

    case CON_GET_SECOND_CHOICE:
      switch (argument[0])
      {
        case 'y':
        case 'Y':
        {
          bool                    fclass = TRUE;

          write_to_buffer(d, "\r\nYou may choose from the following classes, or type help [class] to learn more:\r\n[", 0);
          buf[0] = '\0';
          for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
          {
            if(d->character && !can_use_class_multi(d->character, iClass, TRUE))
              continue;

            if(class_table[iClass]
               && VLD_STR(class_table[iClass]->who_name)
               && !IS_SET(class_table[iClass]->race_restriction, 1 << ch->race)
               && str_cmp(class_table[iClass]->who_name, "Ancient") && class_table[iClass]->starting && iClass != ch->Class && iClass != ch->secondclass)
            {
              if(!fclass)
                mudstrlcat(buf, " ", MSL);
              fclass = FALSE;
              mudstrlcat(buf, class_table[iClass]->who_name, MSL);
              write_to_buffer(d, buf, 0);
              buf[0] = '\0';
            }
          }
          mudstrlcat(buf, "]\r\n: ", MSL);
          write_to_buffer(d, buf, 0);
          buf[0] = '\0';
          d->connected = CON_GET_THIRD_CLASS;
        }
          return;

        case 'n':
        case 'N':
          ch->thirdclass = -1;
          write_to_buffer(d, "You may now use your points to increase your stats.\r\nFor example typing wis\r\nThis will increase your wisdom 1 point.", 0);
          name_stamp_stats(ch);
          snprintf(buf, MSL, "\r\nStr: %d  Int: %d  Wis: %d  Dex: %d  Con: %d  Cha: %d  Lck: %d Points: %d",
                   ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con, ch->perm_cha, ch->perm_lck, ch->statpoints);
          write_to_buffer(d, buf, 0);
          d->connected = CON_ROLL_STATS;
          return;

        default:
          write_to_buffer(d, "Yes or No? ", 0);
          return;
      }
      return;

    case CON_GET_THIRD_CLASS:
      argument = one_argument(argument, arg);
      if(!str_cmp(arg, "help"))
      {
        for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
        {
          if(d->character && !can_use_class_multi(d->character, iClass, TRUE))
            continue;

          if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && class_table[iClass]->starting)
          {
            if(toupper(argument[0]) ==
               toupper(class_table[iClass]->who_name[0])
               && !str_prefix(argument, class_table[iClass]->who_name) || !str_cmp(argument, "multiclass") || !str_cmp(argument, "classes") || !str_cmp(argument, "multiclass race"))
            {
              do_help(ch, argument);
              write_to_buffer(d, "Please choose a class: ", 0);
              return;
            }
          }
        }
        write_to_buffer(d, "No such help topic.  Please choose a class: ", 0);
        return;
      }

      for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
      {
        if(d->character && !can_use_class_multi(d->character, iClass, TRUE))
          continue;

        if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && class_table[iClass]->starting)
        {
          if(toupper(arg[0]) == toupper(class_table[iClass]->who_name[0]) && !str_prefix(arg, class_table[iClass]->who_name) && str_cmp(class_table[iClass]->who_name, "Ancient"))
          {
            ch->thirdclass = iClass;
            ch->firstlevel = 1;
            ch->secondlevel = 1;
            ch->thirdlevel = 1; // Temporary.
            ch->thirdexp = 0;
            ch->firstexpratio = 50; // Construct expratio defaults.
            // -Taon
            ch->secondexpratio = 30;
            ch->thirdexpratio = 20;
            break;
          }
        }
      }
      if(iClass == MAX_PC_CLASS || !class_table[iClass]
         || !class_table[iClass]->starting
         || !VLD_STR(class_table[iClass]->who_name)
         || IS_SET(class_table[iClass]->race_restriction, 1 << ch->race) || !str_cmp(class_table[iClass]->who_name, "unused") || !str_cmp(class_table[iClass]->who_name, "Ancient"))
      {
        write_to_buffer(d, "That's not a class.\r\nWhat IS your class? ", 0);
        return;
      }
      if(check_bans(ch, BAN_CLASS))
      {
        write_to_buffer(d, "That class is not currently available.\r\nWhat IS your class? ", 0);
        return;
      }
      if(ch->Class == iClass || ch->secondclass == iClass)
      {
        write_to_buffer(d, "\r\nYou cannot select the same class twice. \r\n Please select another class.", 0);
        return;
      }

      if(!can_use_class_multi(ch, iClass, FALSE))
        return;

      /*
       * if (!IS_SET(class_table[iClass]->combo_restriction, 1 << ch->class) ||
       * !IS_SET(class_table[iClass]->combo_restriction, 1 << ch->secondclass)) {
       * write_to_buffer(d, "You can't combine this class with your current
       * classes.\r\n", 0); return; } 
       */
      write_to_buffer(d, "You may now use your points to increase your stats.\r\nFor example typing wis\r\nThis will increase your wisdom 1 point.", 0);
      name_stamp_stats(ch);
      snprintf(buf, MSL, "\r\nStr: %d  Int: %d  Wis: %d  Dex: %d  Con: %d  Cha: %d  Lck: %d Points: %d",
               ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con, ch->perm_cha, ch->perm_lck, ch->statpoints);
      write_to_buffer(d, buf, 0);
      d->connected = CON_ROLL_STATS;
      break;
       
Post is unread #2 Dec 20, 2010, 4:38 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

Well that isn't a problem really, Vladaar wanted it set that way so ask him about it lol. If it keeps you from choosing priest and druid at the same time it is doing what it should.

If I'm wrong on your question feel free to correct me.

The only other possible way I understand your question is that maybe you choose a class and not picking another class (just hitting enter I guess) it gives the message in a mistaking way because (priest or druid) is the default.
       
Post is unread #3 Dec 20, 2010, 6:23 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

yeah, sorry...guess I didn't explain that too well. heh

Scenario 1 is where the problem is.

okay, here's the scenario 1:
character creation, on to choosing first class:
all classes available...I choose warrior for my first class (Priest and Druid available)
I choose 'yes' for a second class
ignoring the exclusions for warrior as expected, only Priest is available (not Druid as well, this is not expected); I'll choose Mage here
I choose 'yes' for a third class
Priest AND Druid once again available.


scenario 2:
character creation, on to choosing first class:
all classes available...I choose Priest for my first class (both Priest and Druid available)
I choose 'yes' for a second class
Druid not present (as expected) ..I choose warrior for my second class
I choose 'yes' for a third class
Druid not present (as expected)


scenario 3:
character creation, on to choosing first class:
all classes available..I choose Druid for my first class (both Priest and Druid available)
I choose 'yes' for a second class
Priest not present (as expected) ..I choose warrior for my second class
I choose 'yes' for a third class
Priest not present (as expected)


scenario 4:
character creation, on to choosing first class:
all classes available...I choose warrior for my first class (both Priest and Druid available)
I choose 'yes' for a second class
only Priest available (Druid not present, not expected) ...I choose Priest for my second class.
I choose 'yes' for a third class
Druid not present (as expected)


Does this help to explain the problem? heh
       
Post is unread #4 Dec 21, 2010, 1:40 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

Ok I logged on and took a look at where the classes were and all and I would think the problem is no where before the point where it starts to show the classes for multi it sets the secondclass to -1 so it defaults to 0 which is priest and that is why it doesn't show druid on the list. Try setting their secondclass to -1 somewhere before and you should be good to go.
       
Post is unread #5 Dec 21, 2010, 4:26 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Thanks for that, Remcon. heh Hate it when it's that simple of a fix, yet I was :headbang: for weeks before I gave up on it. *shows his noobness* :P Placed it just before the CON_GET_NEW_CLASS so there was no confusion. heh
       
Post is unread #6 Dec 21, 2010, 4:38 pm   Last edited Dec 21, 2010, 4:39 pm by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

    case CON_GET_NEW_CLASS:

I hope you didn't put it just above that. It needs to be inside one of the cases I would do it like this
    case CON_GET_NEW_CLASS:
      argument = one_argument(argument, arg);
      if(!str_cmp(arg, "help";))
      {
        for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
        {
          if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && class_table[iClass]->starting)
          {
            if(toupper(argument[0]) ==
               toupper(class_table[iClass]->who_name[0])
               && !str_prefix(argument, class_table[iClass]->who_name) || !str_cmp(argument, "multiclass";) || !str_cmp(argument, "classes";) || !str_cmp(argument, "multiclass race";))
            {
              do_help(ch, argument);
              write_to_buffer(d, "Please choose a class: [ ", 0);
              write_to_buffer(d, all_classes(d), 0);
              return;
            }
          }
        }
        write_to_buffer(d, "No such help topic.  Please choose a class: [ ", 0);
        write_to_buffer(d, all_classes(d), 0);
        return;
      }
      for(iClass = 0; iClass < MAX_PC_CLASS; iClass++)
      {
        if(class_table[iClass] && VLD_STR(class_table[iClass]->who_name) && class_table[iClass]->starting)
        {
          if(toupper(arg[0]) == toupper(class_table[iClass]->who_name[0]) && !str_prefix(arg, class_table[iClass]->who_name) && str_cmp(class_table[iClass]->who_name, "Ancient";))
          {
            ch->Class = iClass;
            break;
          }
        }
      }

      if(iClass == MAX_PC_CLASS || !class_table[iClass]
         || !class_table[iClass]->starting
         || !VLD_STR(class_table[iClass]->who_name)
         || IS_SET(class_table[iClass]->race_restriction, 1 << ch->race) || !str_cmp(class_table[iClass]->who_name, "unused";) || !str_cmp(class_table[iClass]->who_name, "Ancient";))
      {
        write_to_buffer(d, "That's not a class.\r\nWhat IS your class? [ ", 0);
        write_to_buffer(d, all_classes(d), 0);
        return;
      }
      if(check_bans(ch, BAN_CLASS))
      {
        write_to_buffer(d, "That class is not currently available.\r\nWhat IS your class? [ ", 0);
        write_to_buffer(d, all_classes(d), 0);
        return;
      }

      /* Moved these out of the following if check */
      ch->secondclass = -1;
      ch->thirdclass = -1;

      if(xIS_SET(race_table[ch->race]->flags, RACE_ADVANCED))
      {
        write_to_buffer(d, "You may now use your points to increase your stats.\r\nFor example typing wis\r\nThis will increase your wisdom 1 point.", 0);
        name_stamp_stats(ch);
        snprintf(buf, MSL, "\r\nStr: %d  Int: %d  Wis: %d  Dex: %d  Con: %d  Cha: %d  Lck: %d Points: %d",
                 ch->perm_str, ch->perm_int, ch->perm_wis, ch->perm_dex, ch->perm_con, ch->perm_cha, ch->perm_lck, ch->statpoints);
        write_to_buffer(d, buf, 0);
        d->connected = CON_ROLL_STATS;
      }
      else
      {
        write_to_buffer(d, "\r\nWould you like a second class? Y/N?\r\n", 0);
        d->connected = CON_GET_FIRST_CHOICE;
      }
      return;

look for this in that
      /* Moved these out of the following if check */
      ch->secondclass = -1;
      ch->thirdclass = -1;
       
Post is unread #7 Dec 21, 2010, 5:16 pm   Last edited Dec 21, 2010, 5:54 pm by Aurin
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

err...yeah, I did. Is there a reason not to? Since I'm not setting ch->Class = -1, it shouldn't have any effect during character creation (didn't when I tested, anyways)

(I DID change it to the way you suggested.. heh Trust in the power of Remcon!)
       
Post is unread #8 Dec 21, 2010, 5:31 pm   Last edited Dec 21, 2010, 5:32 pm by Remcon
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

Well if it isn't in a case like if its like this
   case something:
      do stuff
      break/return;

   ch->secondclass = -1;
   ch->thirdclass = -1;

   case CON_GET_NEW_CLASS:
      do stuff
      break/return;

It for one just makes it harder to follow etc... and any time they get in there past the case above it it will reset there second and third class. Inside the case CON_GET_NEW_CLASS it will only set them when they are in that case. make sense?
       
Post is unread #9 Dec 21, 2010, 6:02 pm   Last edited Dec 21, 2010, 6:05 pm by Aurin
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Ahh..I get that...but where I placed it was here:
      else
      {
// This is where it WAS, but moved to where you suggested just in case
        ch->secondclass = -1;
        ch->thirdclass = -1;
        write_to_buffer(d, "\r\nYou may choose from the following classes, or type help [class] to learn more: \r\n[", 0);
        write_to_buffer(d, all_classes(d), 0);
        d->connected = CON_GET_NEW_CLASS;
        break;
      }
      return;
    
    case CON_GET_NEW_CLASS:

If you'll notice, you're directed to CON_GET_NEW_CLASS as the next step, so no possible way for what you suggest wouldn't work. This is the ONLY instance of CON_GET_NEW_CLASS under CON_GET_NEW_RACE, so, again, a safe bet to have it here.

But yeah, I understand what you're saying about only wanting them to have second/thirdclass set if they get to CON_GET_NEW_CLASS.

Thinking on it further...wouldn't all the other ch->second/thirdclass = -1 settings in the other CON_GET_CLASS's be redundant if it's set where I set it?
       
Post is unread #10 Dec 21, 2010, 6:22 pm
Go to the top of the page
Go to the bottom of the page

Remcon
Geomancer
GroupAdministrators
Posts1,858
JoinedJul 26, 2005

Some might be but it varies. It pre-sets some of them in the process and has to be set back to -1 if for some reason they can't use that class etc... So I would probably just let them stay there.
       
Post is unread #11 Dec 21, 2010, 7:04 pm
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

Ahh..that makes sense.
       
Pages:<< prev 1 next >>