TOL as DefaultExpansion - missing code

Bug reports and feature requests. New features can only be added to the current development version. Bug-fixes may be back-ported.

Current release: 099 / Current development: 100
Post Reply
gh0sterZA
Neophyte Poster
Posts: 35
Joined: Thu Nov 19, 2015 11:36 am
Location: Cape Town

TOL as DefaultExpansion - missing code

Post by gh0sterZA »

Hi

TOL support is enabled (in account.cpp) but you cannot set it as the defaultExpansion.

https://github.com/polserver/polserver/ ... scrobj.cpp

Code: Select all

  ///
  /// account.Set_UO_Expansion( string ) : recognized values: ML, SE, AOS, LBR, T2A (default)
  ///  this determines what flag is sent with packet 0xB9 during login.
  ///
  case MTH_SET_UO_EXPANSION:
    if ( ex.numParams() != 1 )
      return new BError( "account.Set_UO_Expansion(string) requires a parameter." );

    const String* expansion_str;
    if ( ex.getStringParam( 0, expansion_str ) )
    {
      if ( expansion_str->value().empty() || ( expansion_str->value() == "HSA" ) ||
           ( expansion_str->value() == "SA" ) || ( expansion_str->value() == "KR" ) ||
           ( expansion_str->value() == "ML" ) || ( expansion_str->value() == "SE" ) ||
           ( expansion_str->value() == "AOS" ) || ( expansion_str->value() == "LBR" ) ||
           ( expansion_str->value() == "T2A" ) )
      {
        obj_->uo_expansion_ = obj_->convert_uo_expansion( expansion_str->value() );
        for ( unsigned short i = 0; i < Plib::systemstate.config.character_slots; i++ )
        {
          Mobile::Character* chr = obj_->get_character( i );
          if ( chr && chr->has_active_client() )
            Core::send_feature_enable( chr->client );
        }
      }
      else
        return new BError(
            "Invalid Parameter Value. Supported Values: \"\", T2A, LBR, AOS, SE, ML, KR, SA, HSA" );
    }
    else
      return new BError( "Invalid Parameter Type" );
    break;
I can set up to HSA as default in the accounts\config\settings.cfg, but because of above the core ignores TOL and defaults to T2A

regards
boberski
Grandmaster Poster
Posts: 275
Joined: Tue Oct 15, 2013 12:00 pm

Re: TOL as DefaultExpansion - missing code

Post by boberski »

I think that when I was adding TOL support for core I done this like, when you have default expansion set to TOL and client sends correct package it will stay as it is. But when package is wront it sets expansion to T2A. It will probably we wise to add something to file you posted.
Post Reply