Show
Ignore:
Timestamp:
11/19/08 13:32:10 (17 years ago)
Author:
yumileroy
Message:

[svn] * fixed help for subcommands - source mangos
* Renamed accounts column tbc to expansion and it only took a little over 4 hours o.O

Original author: KingPin?
Date: 2008-10-20 12:23:56-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/CharacterHandler.cpp

    r74 r78  
    180180    std::string name; 
    181181    uint8 race_,class_; 
    182     bool pTbc = this->IsTBC() && sWorld.getConfig(CONFIG_EXPANSION) > 0; 
    183182    recv_data >> name; 
    184183 
     
    213212    } 
    214213 
    215     if (!sChrClassesStore.LookupEntry(class_)|| 
    216         !sChrRacesStore.LookupEntry(race_)) 
     214    ChrClassesEntry const* classEntry = sChrClassesStore.LookupEntry(class_); 
     215    ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(race_); 
     216    if( !classEntry || !raceEntry ) 
    217217    { 
    218218        data << (uint8)CHAR_CREATE_FAILED; 
     
    223223 
    224224    // prevent character creating Expansion race without Expansion account 
    225     if (!pTbc&&(race_>RACE_TROLL)) 
     225    if (raceEntry->addon > Expansion()) 
    226226    { 
    227227        data << (uint8)CHAR_CREATE_EXPANSION; 
    228         sLog.outError("No Expansion Account:[%d] but tried to Create TBC character",GetAccountId()); 
     228        sLog.outError("Not Expansion 1 account:[%d] but tried to Create character with expansion 1 race (%u)",GetAccountId(),race_); 
     229        SendPacket( &data ); 
     230        return; 
     231    } 
     232 
     233    // prevent character creating Expansion class without Expansion account 
     234    // TODO: use possible addon field in ChrClassesEntry in next dbc version 
     235    if (Expansion() < 2 && class_ == CLASS_DEATH_KNIGHT) 
     236    { 
     237        data << (uint8)CHAR_CREATE_EXPANSION; 
     238        sLog.outError("Not Expansion 2 account:[%d] but tried to Create character with expansion 2 class (%u)",GetAccountId(),class_); 
    229239        SendPacket( &data ); 
    230240        return;