Stats Enumerators

Results 1 to 1 of 1
  1. #1
    Apprentice quasaralpha is offline
    MemberRank
    Sep 2015 Join Date
    United KingdomLocation
    21Posts

    thumbs up Stats Enumerators

    Hello there.

    I would like to ask if anyone knows anything about the package enums in every Aion Java emulator server.I am referring to "gameserver\utils\stats\enums" .

    The files inside are not being called by any other class (currently testing on 5.8 server).
    After doing a call hierarchy ,the files don't seem to be called by anything nor call anything.

    Just to make sure I changed the int values inside files such as MAXHP.java / MAXMP.java ,however that didn't lead to any change in game.

    If they are not being used can't we just get rid of them ?
    On top of that ,even after tweaking stats like crit_spell inside xml files didn't change the stats of the player.
    However ! : Changing MaxHP or MaxMP and some other stats in the xml files does change the stats of the player in game. So I just got confused now.Are some stats hardcoded in the client (if there is such thing at all)?


    Any help in clearing this confusion would be much appreciated.




    UPDATE
    I managed to find the file that is controlling Crit Spell stat (not the bonus,but the white flat value). For anyone who want's to play with that stat ,the file is here :
    src/com/aionemu/gameserver/model/stats/container/PlayerGameStats.java:580 ~ 584


    @Override
    public Stat2 getMCritical(){
    return getStat(StatEnum.MAGICAL_CRITICAL, 50);
    }

    I was wrong though ,about the old stat enums not being called from other files ,they are (whether they are used somewhere ,that's a different topic),for some reason eclipse is not showing me the call hierarchy.

    Anyhow.
    Let's say ,you want the stats from your template to be used (because the above code is just setting all classes' crit spell to 50 and that's it),what you need to do is this:

    @Override
    public Stat2 getMCritical() {
    PlayerStatsTemplate pst = DataManager.PLAYER_STATS_DATA.getTemplate(owner.getPlayerClass(), owner.getLevel());
    return getStat(StatEnum.MAGICAL_CRITICAL, pst.getMCritical());
    }

    In return, this change will trigger (pardon my language,I don't know the java terminology):

    src/com/aionemu/gameserver/model/templates/stats/StatsTemplate.java:172~174

    public int getMCritical() { return critSpell; }

    and this file serves as accessor file ,it's accessing xml files (somehow :D),
    so it will basically use these lines (which access data/static_data/stats/player/*.xml - all templates within this folder) :

    @XmlAttribute(name = "crit_spell") private int critSpell;
    Last edited by quasaralpha; 23-04-20 at 02:35 AM. Reason: Solution found.




Advertisement