Fix trainer time variance

This commit is contained in:
Bluzume 2021-11-05 17:35:49 -04:00
parent db9450e0e5
commit 76abadcfa0
4 changed files with 7 additions and 7 deletions

View file

@ -209,7 +209,10 @@ namespace HISP.Game.Events
{ {
foreach(Participent participent in Participents) foreach(Participent participent in Participents)
{ {
if (participent == null)
continue;
if (participent.Quit) if (participent.Quit)
continue; continue;

View file

@ -1,8 +1,4 @@
using System; using System.Collections.Generic;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace HISP.Game.Services namespace HISP.Game.Services
{ {

View file

@ -108,6 +108,7 @@ namespace HISP.Server
kickTimer.Dispose(); kickTimer.Dispose();
// Call OnDisconnect // Call OnDisconnect
connectedClients.Remove(this); connectedClients.Remove(this);
GameServer.OnDisconnect(this); GameServer.OnDisconnect(this);
LoggedIn = false; LoggedIn = false;

View file

@ -1424,7 +1424,7 @@ namespace HISP.Server
break; break;
} }
trainHorseInst.BasicStats.Experience += trainer.ExperienceGained; trainHorseInst.BasicStats.Experience += trainer.ExperienceGained;
if (sender.LoggedinUser.Subscribed) if (!sender.LoggedinUser.Subscribed)
trainHorseInst.TrainTimer = 1440; trainHorseInst.TrainTimer = 1440;
else else
trainHorseInst.TrainTimer = 720; trainHorseInst.TrainTimer = 720;