From 1c116fb0c4e6248ed2dfb8cad626147906cda255 Mon Sep 17 00:00:00 2001 From: EmosewaMC <39972741+EmosewaMC@users.noreply.github.com> Date: Sun, 20 Feb 2022 19:23:17 -0800 Subject: [PATCH] Sending rewards works fully --- dGame/dComponents/CharacterComponent.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dGame/dComponents/CharacterComponent.cpp b/dGame/dComponents/CharacterComponent.cpp index d7a41a8b..3daa437e 100644 --- a/dGame/dComponents/CharacterComponent.cpp +++ b/dGame/dComponents/CharacterComponent.cpp @@ -208,6 +208,8 @@ void CharacterComponent::HandleLevelUp() { return; } + // Tell the client we beginning to send level rewards. + if(rewardingItem) GameMessages::NotifyLevelRewards(parent->GetObjectID(), parent->GetSystemAddress(), m_Level, rewardingItem); for (auto* reward : rewards) { @@ -232,7 +234,8 @@ void CharacterComponent::HandleLevelUp() break; } } - GameMessages::NotifyLevelRewards(parent->GetObjectID(), parent->GetSystemAddress(), m_Level, rewardingItem); + // Tell the client we have finished sending level rewards. + if(rewardingItem) GameMessages::NotifyLevelRewards(parent->GetObjectID(), parent->GetSystemAddress(), m_Level, !rewardingItem); } void CharacterComponent::SetGMLevel(int gmlevel) {