mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-26 15:00:06 +00:00
oops
This commit is contained in:
parent
761581afd7
commit
3d22103113
@ -23,7 +23,7 @@ void Buff::onTick() {
|
|||||||
if(stack.durationTicks > 0) stack.durationTicks--;
|
if(stack.durationTicks > 0) stack.durationTicks--;
|
||||||
if(stack.durationTicks == 0) {
|
if(stack.durationTicks == 0) {
|
||||||
it = stacks.erase(it);
|
it = stacks.erase(it);
|
||||||
stack.onExpire(self, &stack);
|
if(stack.onExpire != nullptr) stack.onExpire(self, &stack);
|
||||||
} else it++;
|
} else it++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -496,7 +496,7 @@ static void itemUseHandler(CNSocket* sock, CNPacketData* data) {
|
|||||||
eCSB,
|
eCSB,
|
||||||
durationMilliseconds / MS_PER_PLAYER_TICK,
|
durationMilliseconds / MS_PER_PLAYER_TICK,
|
||||||
sock,
|
sock,
|
||||||
BuffClass::CONSUMABLE,
|
BuffClass::CASH_ITEM, // or BuffClass::ITEM?
|
||||||
Buffs::timeBuffUpdateAdd,
|
Buffs::timeBuffUpdateAdd,
|
||||||
nullptr,
|
nullptr,
|
||||||
Buffs::timeBuffUpdateDelete,
|
Buffs::timeBuffUpdateDelete,
|
||||||
|
@ -71,16 +71,6 @@ void PlayerManager::removePlayer(CNSocket* key) {
|
|||||||
// if the player was in a lair, clean it up
|
// if the player was in a lair, clean it up
|
||||||
Chunking::destroyInstanceIfEmpty(fromInstance);
|
Chunking::destroyInstanceIfEmpty(fromInstance);
|
||||||
|
|
||||||
// remove player's buffs from the server
|
|
||||||
auto it = Eggs::EggBuffs.begin();
|
|
||||||
while (it != Eggs::EggBuffs.end()) {
|
|
||||||
if (it->first.first == key) {
|
|
||||||
it = Eggs::EggBuffs.erase(it);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
it++;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << players.size() << " players" << std::endl;
|
std::cout << players.size() << " players" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user