diff options
| author | megamage <none@none> | 2009-02-24 11:14:28 -0600 | 
|---|---|---|
| committer | megamage <none@none> | 2009-02-24 11:14:28 -0600 | 
| commit | 699bc588b86a5176fce0900804fb7d00425383fe (patch) | |
| tree | 18dde44b0118d86bfeaf294f7917c7ff0310fbbd /src/game/World.cpp | |
| parent | 9d160c855fe950d96386165fe7f6e484b427b89d (diff) | |
    [7330] Code warnings and style cleanups. Some bugs fixes. Author: VladimirMangos
    1) comparison singed and unsigned values
    2) redundent includes
    3) wrong constructor :-part field initilization
    4) unused not-/*name*/-guarded args in template/virtual functions that not required like args.
    5) explicitly list not implemented achievement types.
    Also bugs fixed:
    1) Drop wrong phase mask 0 check in WorldObject::InSamePhase.
    2) ArenaTeamMember::ModifyPersonalRating incorrect work with move points in negative with infinity values in result.
    3) ArenaTeam::SaveToDB code send uint64 value to string with arg format %u.
--HG--
branch : trunk
Diffstat (limited to 'src/game/World.cpp')
| -rw-r--r-- | src/game/World.cpp | 26 | 
1 files changed, 18 insertions, 8 deletions
diff --git a/src/game/World.cpp b/src/game/World.cpp index cb9f2acf396..1c2f448ca1f 100644 --- a/src/game/World.cpp +++ b/src/game/World.cpp @@ -599,7 +599,11 @@ void World::LoadConfigSettings(bool reload)      {          uint32 val = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME);          if(val!=m_configs[CONFIG_SOCKET_SELECTTIME]) +<<<<<<< HEAD:src/game/World.cpp              sLog.outError("SocketSelectTime option can't be changed at Trinityd.conf reload, using current value (%u).",m_configs[DEFAULT_SOCKET_SELECT_TIME]); +======= +            sLog.outError("SocketSelectTime option can't be changed at mangosd.conf reload, using current value (%u).",m_configs[CONFIG_SOCKET_SELECTTIME]); +>>>>>>> 76028880380c6f08320a1b55c2c9882741bf877a:src/game/World.cpp      }      else          m_configs[CONFIG_SOCKET_SELECTTIME] = sConfig.GetIntDefault("SocketSelectTime", DEFAULT_SOCKET_SELECT_TIME); @@ -659,7 +663,7 @@ void World::LoadConfigSettings(bool reload)      }      m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = sConfig.GetIntDefault("HeroicCharactersPerRealm", 1); -    if(m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] < 0 || m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 10) +    if(int32(m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]) < 0 || m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] > 10)      {          sLog.outError("HeroicCharactersPerRealm (%i) must be in range 0..10. Set to 1.",m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM]);          m_configs[CONFIG_HEROIC_CHARACTERS_PER_REALM] = 1; @@ -668,7 +672,7 @@ void World::LoadConfigSettings(bool reload)      m_configs[CONFIG_MIN_LEVEL_FOR_HEROIC_CHARACTER_CREATING] = sConfig.GetIntDefault("MinLevelForHeroicCharacterCreating", 55);      m_configs[CONFIG_SKIP_CINEMATICS] = sConfig.GetIntDefault("SkipCinematics", 0); -    if(m_configs[CONFIG_SKIP_CINEMATICS] < 0 || m_configs[CONFIG_SKIP_CINEMATICS] > 2) +    if(int32(m_configs[CONFIG_SKIP_CINEMATICS]) < 0 || m_configs[CONFIG_SKIP_CINEMATICS] > 2)      {          sLog.outError("SkipCinematics (%i) must be in range 0..2. Set to 0.",m_configs[CONFIG_SKIP_CINEMATICS]);          m_configs[CONFIG_SKIP_CINEMATICS] = 0; @@ -716,7 +720,7 @@ void World::LoadConfigSettings(bool reload)      }      m_configs[CONFIG_START_PLAYER_MONEY] = sConfig.GetIntDefault("StartPlayerMoney", 0); -    if(m_configs[CONFIG_START_PLAYER_MONEY] < 0) +    if(int32(m_configs[CONFIG_START_PLAYER_MONEY]) < 0)      {          sLog.outError("StartPlayerMoney (%i) must be in range 0..%u. Set to %u.",m_configs[CONFIG_START_PLAYER_MONEY],MAX_MONEY_AMOUNT,0);          m_configs[CONFIG_START_PLAYER_MONEY] = 0; @@ -729,14 +733,14 @@ void World::LoadConfigSettings(bool reload)      }      m_configs[CONFIG_MAX_HONOR_POINTS] = sConfig.GetIntDefault("MaxHonorPoints", 75000); -    if(m_configs[CONFIG_MAX_HONOR_POINTS] < 0) +    if(int32(m_configs[CONFIG_MAX_HONOR_POINTS]) < 0)      {          sLog.outError("MaxHonorPoints (%i) can't be negative. Set to 0.",m_configs[CONFIG_MAX_HONOR_POINTS]);          m_configs[CONFIG_MAX_HONOR_POINTS] = 0;      }      m_configs[CONFIG_START_HONOR_POINTS] = sConfig.GetIntDefault("StartHonorPoints", 0); -    if(m_configs[CONFIG_START_HONOR_POINTS] < 0) +    if(int32(m_configs[CONFIG_START_HONOR_POINTS]) < 0)      {          sLog.outError("StartHonorPoints (%i) must be in range 0..MaxHonorPoints(%u). Set to %u.",              m_configs[CONFIG_START_HONOR_POINTS],m_configs[CONFIG_MAX_HONOR_POINTS],0); @@ -750,14 +754,14 @@ void World::LoadConfigSettings(bool reload)      }      m_configs[CONFIG_MAX_ARENA_POINTS] = sConfig.GetIntDefault("MaxArenaPoints", 5000); -    if(m_configs[CONFIG_MAX_ARENA_POINTS] < 0) +    if(int32(m_configs[CONFIG_MAX_ARENA_POINTS]) < 0)      {          sLog.outError("MaxArenaPoints (%i) can't be negative. Set to 0.",m_configs[CONFIG_MAX_ARENA_POINTS]);          m_configs[CONFIG_MAX_ARENA_POINTS] = 0;      }      m_configs[CONFIG_START_ARENA_POINTS] = sConfig.GetIntDefault("StartArenaPoints", 0); -    if(m_configs[CONFIG_START_ARENA_POINTS] < 0) +    if(int32(m_configs[CONFIG_START_ARENA_POINTS]) < 0)      {          sLog.outError("StartArenaPoints (%i) must be in range 0..MaxArenaPoints(%u). Set to %u.",              m_configs[CONFIG_START_ARENA_POINTS],m_configs[CONFIG_MAX_ARENA_POINTS],0); @@ -822,7 +826,7 @@ void World::LoadConfigSettings(bool reload)      m_configs[CONFIG_MAIL_DELIVERY_DELAY] = sConfig.GetIntDefault("MailDeliveryDelay",HOUR);      m_configs[CONFIG_UPTIME_UPDATE] = sConfig.GetIntDefault("UpdateUptimeInterval", 10); -    if(m_configs[CONFIG_UPTIME_UPDATE]<=0) +    if(int32(m_configs[CONFIG_UPTIME_UPDATE])<=0)      {          sLog.outError("UpdateUptimeInterval (%i) must be > 0, set to default 10.",m_configs[CONFIG_UPTIME_UPDATE]);          m_configs[CONFIG_UPTIME_UPDATE] = 10; @@ -1107,9 +1111,15 @@ void World::SetInitialWorldSettings()      }      ///- Loading strings. Getting no records means core load has to be canceled because no error message can be output. +<<<<<<< HEAD:src/game/World.cpp      sLog.outString( "" );      sLog.outString( "Loading Trinity strings..." );      if (!objmgr.LoadTrinityStrings()) +======= +    sLog.outString(); +    sLog.outString("Loading MaNGOS strings..."); +    if (!objmgr.LoadMangosStrings()) +>>>>>>> 76028880380c6f08320a1b55c2c9882741bf877a:src/game/World.cpp          exit(1);                                            // Error message displayed in function already      ///- Update the realm entry in the database with the realm type from the config file  | 
