mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-12-23 11:50:04 +00:00
Switch to getTime() for egg and buff ticking
This commit is contained in:
parent
7135767cc4
commit
4d1d77ceaf
@ -744,7 +744,7 @@ int NPCManager::eggBuffPlayer(CNSocket* sock, int skillId, int duration) {
|
||||
|
||||
// save the buff serverside;
|
||||
// if you get the same buff again, new duration will override the previous one
|
||||
time_t until = getTimestamp() + duration;
|
||||
time_t until = getTime() + (time_t)duration * 1000;
|
||||
EggBuffs[key] = until;
|
||||
|
||||
/*
|
||||
@ -782,7 +782,7 @@ int NPCManager::eggBuffPlayer(CNSocket* sock, int skillId, int duration) {
|
||||
|
||||
void NPCManager::eggStep(CNServer* serv, time_t currTime) {
|
||||
// tick buffs
|
||||
time_t timeStamp = currTime / 1000;
|
||||
time_t timeStamp = currTime;
|
||||
auto it = EggBuffs.begin();
|
||||
while (it != EggBuffs.end()) {
|
||||
// check remaining time
|
||||
@ -1012,7 +1012,7 @@ void NPCManager::eggPickup(CNSocket* sock, CNPacketData* data) {
|
||||
else {
|
||||
removeNPC(egg->currentChunks, eggId);
|
||||
egg->dead = true;
|
||||
egg->deadUntil = getTimestamp() + type->regen;
|
||||
egg->deadUntil = getTime() + (time_t)type->regen * 1000;
|
||||
egg->appearanceData.iHP = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user