mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[9132] Fixed crash at loading from player_classlevelstats level 0 data.
Added check that prevent loading data for unexpected level 0.
This commit is contained in:
parent
51cb5b356a
commit
1da5166c3c
2 changed files with 7 additions and 2 deletions
|
|
@ -2611,7 +2611,12 @@ void ObjectMgr::LoadPlayerInfo()
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 current_level = fields[1].GetUInt32();
|
uint32 current_level = fields[1].GetUInt32();
|
||||||
if(current_level > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
if(current_level == 0)
|
||||||
|
{
|
||||||
|
sLog.outErrorDb("Wrong level %u in `player_classlevelstats` table, ignoring.",current_level);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else if(current_level > sWorld.getConfig(CONFIG_MAX_PLAYER_LEVEL))
|
||||||
{
|
{
|
||||||
if(current_level > STRONG_MAX_LEVEL) // hardcoded level maximum
|
if(current_level > STRONG_MAX_LEVEL) // hardcoded level maximum
|
||||||
sLog.outErrorDb("Wrong (> %u) level %u in `player_classlevelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
|
sLog.outErrorDb("Wrong (> %u) level %u in `player_classlevelstats` table, ignoring.",STRONG_MAX_LEVEL,current_level);
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "9131"
|
#define REVISION_NR "9132"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue