Don't add buff if player dead

This commit is contained in:
gsemaj 2023-07-23 10:13:22 -04:00 committed by gsemaj
parent 49fa6d65c4
commit bd1abcef72

View File

@ -21,6 +21,9 @@ std::map<int32_t, std::map<int8_t, Bullet>> Combat::Bullets;
#pragma region Player
bool Player::addBuff(int buffId, BuffCallback<int, BuffStack*> onUpdate, BuffCallback<time_t> onTick, BuffStack* stack) {
if(!isAlive())
return false;
EntityRef self = PlayerManager::getSockFromID(iID);
if(!hasBuff(buffId)) {