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

[svn] Added sanity checks in loading player cache to prevent crashing upon corrupted player data.

Original author: w12x
Date: 2008-10-22 04:05:15-05:00

Files:
1 modified

Legend:

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

    r88 r95  
    1362713627uint32 Player::GetUInt32ValueFromDB(uint16 index, uint64 guid) 
    1362813628{ 
    13629     //rognar optimization 
    13630     //must be improved!! "if" and "switch" - it's very not aesthetically :))) 
    13631     //but we should know whith data is cached 
    13632     //PLAYER_FIELD_ARENA_TEAM_INFO* very is often using with pvp&arena patch :) 
    13633     if(       index == PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + 0 * 6 + 5 
     13629    // todo: cleanup in this, move to a separate function. 
     13630    if(    index == PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + 0 * 6 + 5 
    1363413631        || index == PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + 1 * 6 + 5 
    1363513632        || index == PLAYER_FIELD_ARENA_TEAM_INFO_1_1 + 2 * 6 + 5