mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10397] Fixed wrong difficulty selection and possible crash.
This commit is contained in:
parent
34421e5eb8
commit
927e9d77f0
2 changed files with 4 additions and 4 deletions
|
|
@ -208,14 +208,14 @@ bool Creature::InitEntry(uint32 Entry, uint32 team, const CreatureData *data )
|
||||||
// and if more high version not exist must be used lesser version
|
// and if more high version not exist must be used lesser version
|
||||||
// for raid order different:
|
// for raid order different:
|
||||||
// 10 man normal version must be used instead not existed 10 man heroic version
|
// 10 man normal version must be used instead not existed 10 man heroic version
|
||||||
// 25 man normal version must be used instead not existed 24 man heroic version
|
// 25 man normal version must be used instead not existed 25 man heroic version
|
||||||
CreatureInfo const *cinfo = normalInfo;
|
CreatureInfo const *cinfo = normalInfo;
|
||||||
for (uint8 diff = uint8(GetMap()->GetDifficulty()); diff > 0;)
|
for (uint8 diff = uint8(GetMap()->GetDifficulty()); diff > 0;)
|
||||||
{
|
{
|
||||||
// we already have valid Map pointer for current creature!
|
// we already have valid Map pointer for current creature!
|
||||||
if (normalInfo->DifficultyEntry[diff])
|
if (normalInfo->DifficultyEntry[diff - 1])
|
||||||
{
|
{
|
||||||
cinfo = ObjectMgr::GetCreatureTemplate(normalInfo->DifficultyEntry[diff]);
|
cinfo = ObjectMgr::GetCreatureTemplate(normalInfo->DifficultyEntry[diff - 1]);
|
||||||
if (cinfo)
|
if (cinfo)
|
||||||
break; // template found
|
break; // template found
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "10396"
|
#define REVISION_NR "10397"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue