Tbol
Well-Known Member
- Joined
- Apr 7, 2019
- Messages
- 592
- Reaction score
- 64
So in player.cpp im using a
would it be possible to achieve different critical effects depending on vacation id, without hurting performance a lot because considering it might hit performance quite a lot beause every if on attack will be have another if statement which in my logic is quite a truck hit in performance.
LUA:
void Player::sendCritical(const Creature* target) const
{
if (target) {
g_game.addMagicEffect(target->getPosition(), 10);
}
g_game.addAnimatedText("Critical", getPosition(), TEXTCOLOR_RED);
}