Well, it is not like everyone knows everything, but you should start with something, almost all your threads you looking for help but there is no progress with yourself. I think you should start there. You are trying to build a wall with no bricks and you dont want to learn how to do bricks.
I also had a tough start just to let you know.
btw. this is where it happens
C++:
for (Creature* spectator : spectators) {
Player* tmpPlayer = spectator->getPlayer();
if (tmpPlayer->getPosition().z != targetPos.z) {
continue;
}
if (tmpPlayer == attackerPlayer && attackerPlayer != targetPlayer) {
ss.str({});
ss << ucfirst(target->getNameDescription()) << " loses " << damageString + " mana due to your attack.";
message.type = MESSAGE_DAMAGE_DEALT;
message.text = ss.str();
} else if (tmpPlayer == targetPlayer) {
ss.str({});
ss << "You lose " << damageString << " mana";
if (!attacker) {
ss << '.';
} else if (targetPlayer == attackerPlayer) {
ss << " due to your own attack.";
} else {
ss << " due to an attack by " << attacker->getNameDescription() << '.';
}
message.type = MESSAGE_DAMAGE_RECEIVED;
message.text = ss.str();
} else {
if (spectatorMessage.empty()) {
ss.str({});
ss << ucfirst(target->getNameDescription()) << " loses " << damageString + " mana";
if (attacker) {
ss << " due to ";
if (attacker == target) {
ss << (targetPlayer->getSex() == PLAYERSEX_FEMALE ? "her own attack" : "his own attack");
} else {
ss << "an attack by " << attacker->getNameDescription();
}
}
ss << '.';
spectatorMessage = ss.str();
}
message.type = MESSAGE_DAMAGE_OTHERS;
message.text = spectatorMessage;
}
also with mana stuff for sure. maybe you should remove the spectators check and just send the message to the damage dealer and the target.