• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

OTClient Show Manabar to All

_Aion_

Nothing Else
Joined
Jan 19, 2010
Messages
400
Solutions
4
Reaction score
10
Location
Jequie,Bahia,Brazil
I'm trying to implement g_game.enableFeature(GameCreaturesMana), I've already done the packet part, but I believe it needs something in the OTC.
If I change from (IsLocalPlayer) to Player, it works, but it's just visual, my mana is mirrored to whoever is on the map.
Does anyone know how to solve it?

Lua:
            int8 manaPercent = m_manaPercent;
            if (isPlayer()) //changed here isLocalPlayer to isPlayer
            {
                LocalPlayerPtr player = g_game.getLocalPlayer();
                if (player) {
                    double maxMana = player->getMaxMana();
                    if (maxMana == 0) {
                        manaPercent = 100;
                    } else {
                        manaPercent = (player->getMana() * 100) / maxMana;
                    }
                }
            }

 
Back
Top