Vitrex
Moderator
Hello, today i met a problem, i wan't to make player base mana and base hp for level 80+ starting from 100.000 but that doesn't seems to work.
i did the following changes :
Changed type of columns basehp & basemana in player_classlevelstats to INT and added values i wanna have.
Next i changed in objectmngr.cpp following lines :
from GetUInt8
but still my values in game displays and works only up to 100.000. is there anything else i have to edit? or i did something wrong?
When i hit level where i should have more than 100k of the hp or mana value goes incorrect in game.
i did the following changes :
Changed type of columns basehp & basemana in player_classlevelstats to INT and added values i wanna have.
Code:
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (1, 110, 921680, 0);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (2, 110, 880180, 1795000);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (3, 110, 929620, 2065300);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (4, 110, 965880, 0);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (5, 110, 833060, 1562000);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (6, 110, 833060, 0);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (7, 110, 823380, 1795400);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (8, 110, 883860, 1309700);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (9, 110, 873680, 1560600);
INSERT INTO `player_classlevelstats` (`class`, `level`, `basehp`, `basemana`) VALUES (11, 110, 942120, 1418500);
Next i changed in objectmngr.cpp following lines :
Code:
// Loading levels data (class only dependent)
TC_LOG_INFO("server.loading", "Loading Player Create Level HP/Mana Data...");
{
uint32 oldMSTime = getMSTime();
// 0 1 2 3
QueryResult result = WorldDatabase.Query("SELECT class, level, basehp, basemana FROM player_classlevelstats");
if (!result)
{
TC_LOG_ERROR("server.loading", ">> Loaded 0 level health/mana definitions. DB table `player_classlevelstats` is empty.");
exit(1);
}
uint32 count = 0;
do
{
Field* fields = result->Fetch();
uint32 current_class = fields[0].GetUInt8();
if (current_class >= MAX_CLASSES)
{
TC_LOG_ERROR("sql.sql", "Wrong class %u in `player_classlevelstats` table, ignoring.", current_class);
continue;
}
uint8 current_level = fields[1].GetUInt8(); // Can't be > than STRONG_MAX_LEVEL (hardcoded level maximum) due to var type
if (current_level > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL))
{
TC_LOG_INFO("misc", "Unused (> MaxPlayerLevel in worldserver.conf) level %u in `player_classlevelstats` table, ignoring.", current_level);
++count; // make result loading percent "expected" correct in case disabled detail mode for example.
continue;
}
PlayerClassInfo* info = _playerClassInfo[current_class];
if (!info)
{
info = new PlayerClassInfo();
info->levelInfo = new PlayerClassLevelInfo[sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)];
_playerClassInfo[current_class] = info;
}
PlayerClassLevelInfo& levelInfo = info->levelInfo[current_level-1];
[U][B] levelInfo.basehealth = fields[2].GetUInt32();[/B][/U]
[U][B] levelInfo.basemana = fields[3].GetUInt32();[/B][/U]
++count;
}
from GetUInt8
but still my values in game displays and works only up to 100.000. is there anything else i have to edit? or i did something wrong?
When i hit level where i should have more than 100k of the hp or mana value goes incorrect in game.
Last edited: