Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

Lithium v1.11 [REBORN ISSUE] URGENT*~

Initiate Mage
Joined
Dec 4, 2010
Messages
10
Reaction score
0
Reborn function in Maplecharacter
PHP:
  public void doReborn() {
        Map<MapleStat, Integer> stat = new EnumMap<>(MapleStat.class);
        this.reborns += 1;
        setLevel((short) 12); // = 11
        setExp(0);
        resetStats(4, 4, 4, 4); 
        setRemainingAp((short) 0);
        List<Pair<MapleStat, Integer>> reborn = new ArrayList<Pair<MapleStat, Integer>>(4);
        // final int oriStats = stats.getStr() + stats.getDex() + stats.getLuk() + stats.getInt();

        // final int str = Randomizer.rand(25, stats.getStr());
        //  final int dex = Randomizer.rand(25, stats.getDex());
        // final int int_ = Randomizer.rand(25, stats.getInt());
        // final int luk = Randomizer.rand(25, stats.getLuk());

        //final int afterStats = str + dex + int_ + luk;

        // final int MAS = (oriStats - afterStats) + getRemainingAp();
        //   client.getPlayer().gainAPS(MAS);

        //  stats.recalcLocalStats(this);
        // stats.setStr((short) str, client.getPlayer());
        // stats.setDex((short) dex, client.getPlayer());
        // stats.setInt((short) int_, client.getPlayer());
        // stats.setLuk((short) luk, client.getPlayer());
        //  stat.put(MapleStat.STR, str);
        // stat.put(MapleStat.DEX, dex);
        // stat.put(MapleStat.INT, int_);
        // stat.put(MapleStat.LUK, luk);
        /// stat.put(MapleStat.AVAILABLEAP, 0);
        updateSingleStat(MapleStat.LEVEL, 1);
        updateSingleStat(MapleStat.JOB, 0); // check in Command instead. @rb, @rbd, @rbc.. whatever..
        updateSingleStat(MapleStat.EXP, 0);
        updateSingleStat(MapleStat.STR, 4);
        updateSingleStat(MapleStat.DEX, 4);
        updateSingleStat(MapleStat.INT, 4);
        updateSingleStat(MapleStat.LUK, 4);
        client.getPlayer().saveToDB(true, true);
        client.getSession().write(CWvsContext.updatePlayerStats(stat, false, this));
    }
When my players reborn , RANDOMLY at random reborns it resets it to 0
in the SQL. and then wen u get up to a certain amount of reborns it resets to 0 .

id love to know were to begin to look.






Edited : And MY sql colum is set too "reborns INT(11) " default value 0 if that matters.​
 
Last edited:
Junior Spellweaver
Joined
Apr 30, 2012
Messages
100
Reaction score
40
Did you update MapleCharacter's save with rebirths? It might not save to the database if your MapleCharacter doesn't match MySQL properly.
 
Upvote 0
Initiate Mage
Joined
Dec 4, 2010
Messages
10
Reaction score
0
Well i found the Issue but dunno how to Fix it, Everytime a player Changes channels The reborns Reset to 0 ......... If someone could help me id appreciate it.
 
Upvote 0
Back
Top