_Aion_
Nothing Else
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?
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;
}
}
}