Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Maple2.Server.Game/Manager/StatsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,20 @@
Values.Reset(metadata, character.Job.Code());
} else {
Log.Logger.Error("Failed to refresh stats for {Job} level {Level}.", character.Job.Code(), character.Level);
Values.Reset(character.Job.Code(), character.Level);

Check warning on line 136 in Maple2.Server.Game/Manager/StatsManager.cs

View workflow job for this annotation

GitHub Actions / build

'Stats.Reset(JobCode, short)' is obsolete: 'Use Reset(UserStatMetadata, JobCode) instead.'
}

AddEquips(player);
AddBuffs(player);
Values.Total();
StatConversion(player);

// Stat rebuild via AddBase/AddTotal restores Current to Total,
// but a dead player must stay at 0 HP until revived.
if (player.IsDead) {
Values[BasicAttribute.Health].Current = 0;
}

Actor.Field.Broadcast(StatsPacket.Init(player));
Actor.Field.Broadcast(StatsPacket.Update(player), player.Session);

Expand Down
Loading