Welcome to AC Web.
Results 1 to 4 of 4
  1. #1

    player_levelstats beyond value of 255


    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    Can someone tell me the core edits that's needed to increase the player_levelstats beyond 255?

    I've done it in the past, but I can't remember where to change uint8 to uint16.

    + rep for help

    Trinity 3.3.5

  2. #2
    Teacher of everything

    Join Date
    Sep 2011
    Location
    Wernerland
    Posts
    2,526
    player level stats? u maybe simply change the database column data type from tinyint length 3 to like smallint 5 or int 10 pending on stats u wanna put inside. if u plan using beyond 65k aswell, go for bigint 60.

    Like so.


  3. #3
    Quote Originally Posted by Psykko View Post
    player level stats? u maybe simply change the database column data type from tinyint length 3 to like smallint 5 or int 10 pending on stats u wanna put inside. if u plan using beyond 65k aswell, go for bigint 60.

    Like so.

    That’s not going to work, the stats will still cap at 255. You can test it yourself.

    What you’re saying is not incorrect and it’s part of what’s needed. But it’s not enough.

    Core edits are required to pull the data from the DB correctly.

  4. #4

    REGISTER! (FREE)
    Registered members see less ads
    and also gain access to other great features.
    In src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp find:
    pLevelInfo->stats[i] = fields[i + 4].GetUInt16(); Change to:
    pLevelInfo->stats[i] = fields[i + 4].GetUInt32();
    levelInfo.stats[i] = fields[i + 3].GetUInt8(); Change to:
    levelInfo.stats[i] = fields[i + 3].GetUInt16();
    In src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h find :
    uint8 stats[MAX_STATS] = { }; Change to:
    uint16 stats[MAX_STATS] = { };

    Also you can do for all other things like health armor mana damage of player and mobs.

    In a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp

    - pLevelInfo->health = fields[2].GetUInt16();
    - pLevelInfo->mana = fields[3].GetUInt16();
    + pLevelInfo->health = fields[2].GetUInt32();
    + pLevelInfo->mana = fields[3].GetUInt32();

    - levelInfo.basehealth = fields[2].GetUInt16();
    - levelInfo.basemana = fields[3].GetUInt16();
    + levelInfo.basehealth = fields[2].GetUInt32();
    + levelInfo.basemana = fields[3].GetUInt32();

    - stats.BaseMana = fields[5].GetUInt16();
    - stats.BaseArmor = fields[6].GetUInt16();
    + stats.BaseMana = fields[5].GetUInt32();
    + stats.BaseArmor = fields[6].GetUInt32();

    - stats.AttackPower = fields[7].GetUInt16();
    - stats.RangedAttackPower = fields[8].GetUInt16();
    + stats.AttackPower = fields[7].GetUInt32();
    + stats.RangedAttackPower = fields[8].GetUInt32();

    In src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h

    - uint16 basehealth = 0;
    - uint16 basemana = 0;
    + uint32 basehealth = 0;
    + uint32 basemana = 0;

    - uint16 stats[MAX_STATS];
    - uint16 health;
    - uint16 mana;
    + uint32 stats[MAX_STATS];
    + uint32 health;
    + uint32 mana;
    Last edited by Parkan; 10-20-2020 at 06:24 PM.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •