Voici un patch à appliquer sur sources Mangos Nue pour débloquer le lvl maximum.
Ceci avec le support de l'xp personnalisé pour les niveaux supérieurs à 80.
[code=diff]diff --git a/src/game/DBCEnums.h b/src/game/DBCEnums.h
index e5833cf..309a85b 100644
--- a/src/game/DBCEnums.h
+++ b/src/game/DBCEnums.h
@@ -22,11 +22,11 @@
// Client expected level limitation, like as used in DBC item max levels for "until max player level"
// use as default max player level, must be fit max level for used client
// also see MAX_LEVEL and STRONG_MAX_LEVEL define
-#define DEFAULT_MAX_LEVEL 80
+#define DEFAULT_MAX_LEVEL 255
// client supported max level for player/pets/etc. Avoid overflow or client stability affected.
// also see GT_MAX_LEVEL define
-#define MAX_LEVEL 100
+#define MAX_LEVEL 255
// Server side limitation. Base at used code requirements.
// also see MAX_LEVEL and GT_MAX_LEVEL define
diff --git a/src/game/DBCStores.h b/src/game/DBCStores.h
index ad07b05..4db04f0 100644
--- a/src/game/DBCStores.h
+++ b/src/game/DBCStores.h
@@ -50,7 +50,11 @@ enum ContentLevels
{
CONTENT_1_60 = 0,
CONTENT_61_70,
- CONTENT_71_80
+ CONTENT_71_80,
+ CONTENT_81_100,
+ CONTENT_101_150,
+ CONTENT_151_200,
+ CONTENT_201_255
};
ContentLevels GetContentLevelsForMapAndZone(uint32 mapid, uint32 zoneId);
diff --git a/src/game/Formulas.h b/src/game/Formulas.h
index 46c5800..7e8bc11 100644
--- a/src/game/Formulas.h
+++ b/src/game/Formulas.h
@@ -84,6 +84,11 @@ namespace MaNGOS
case CONTENT_1_60: nBaseExp = 45; break;
case CONTENT_61_70: nBaseExp = 235; break;
case CONTENT_71_80: nBaseExp = 580; break;
+ case CONTENT_81_100: nBaseExp = 1100; break;
+ case CONTENT_101_150: nBaseExp = 2200; break;
+ case CONTENT_151_200: nBaseExp = 4400; break;
+ case CONTENT_201_255: nBaseExp = 8800; break;
+
default:
sLog.outError("BaseGain: Unsupported content level %u",content);
nBaseExp = 45; break;
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index d39a96b..11506de 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1572,7 +1572,7 @@ bool Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
uint32 playerBytes2 = fields[6].GetUInt32();
*p_data << uint8(playerBytes2 & 0xFF); // facial hair
- *p_data << uint8(fields[7].GetUInt8()); // level
+ *p_data << uint8(fields[7].GetUInt32()); // level
*p_data << uint32(fields[8].GetUInt32()); // zone
*p_data << uint32(fields[9].GetUInt32()); // map
@@ -15308,7 +15308,7 @@ bool Player::LoadFromDB(ObjectGuid guid, SqlQueryHolder *holder )
uint8 gender = fields[5].GetUInt8() & 0x01; // allowed only 1 bit values male/female cases (for fit drunk gender part)
SetByteValue(UNIT_FIELD_BYTES_0,2,gender); // gender
- SetUInt32Value(UNIT_FIELD_LEVEL, fields[6].GetUInt8());
+ SetUInt32Value(UNIT_FIELD_LEVEL, fields[6].GetUInt32());
SetUInt32Value(PLAYER_XP, fields[7].GetUInt32());
_LoadIntoDataField(fields[60].GetString(), PLAYER_EXPLORED_ZONES_1, PLAYER_EXPLORED_ZONES_SIZE);
[/code]
Have Fun !
Cordialement,
MacWarrior.