Changeset 78 for trunk/src/game/CharacterHandler.cpp
- Timestamp:
- 11/19/08 13:32:10 (17 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/game/CharacterHandler.cpp
r74 r78 180 180 std::string name; 181 181 uint8 race_,class_; 182 bool pTbc = this->IsTBC() && sWorld.getConfig(CONFIG_EXPANSION) > 0;183 182 recv_data >> name; 184 183 … … 213 212 } 214 213 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 ) 217 217 { 218 218 data << (uint8)CHAR_CREATE_FAILED; … … 223 223 224 224 // prevent character creating Expansion race without Expansion account 225 if ( !pTbc&&(race_>RACE_TROLL))225 if (raceEntry->addon > Expansion()) 226 226 { 227 227 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_); 229 239 SendPacket( &data ); 230 240 return;