Core/Unit: Implement more helper methods

Port From (https://github.com/TrinityCore/TrinityCore/commit/104ec7a81a5bb782f81fd05b872bf664e4de1c89)
This commit is contained in:
hondacrx
2021-12-26 20:04:34 -05:00
parent 55189b9395
commit 08678c970e
4 changed files with 15 additions and 10 deletions
+4 -1
View File
@@ -1674,10 +1674,13 @@ namespace Game.Entities
}
//Unit
public void SetLevel(uint lvl)
public void SetLevel(uint lvl, bool sendUpdate = true)
{
SetUpdateFieldValue(m_values.ModifyValue(m_unitData).ModifyValue(m_unitData.Level), lvl);
if (!sendUpdate)
return;
Player player = ToPlayer();
if (player != null)
{