mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-22 13:30:06 +00:00
added removing buffs on player exit
This commit is contained in:
parent
c7006b46ed
commit
de99522340
@ -88,6 +88,16 @@ void PlayerManager::removePlayer(CNSocket* key) {
|
||||
// if the player was in a lair, clean it up
|
||||
ChunkManager::destroyInstanceIfEmpty(fromInstance);
|
||||
|
||||
// remove player's buffs from the server
|
||||
auto it = NPCManager::EggBuffs.begin();
|
||||
while (it != NPCManager::EggBuffs.end()) {
|
||||
if (it->first.first == key) {
|
||||
it = NPCManager::EggBuffs.erase(it);
|
||||
}
|
||||
else
|
||||
it++;
|
||||
}
|
||||
|
||||
std::cout << players.size() << " players" << std::endl;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user