Let ServerPacket Handle the writting of packet data.

This commit is contained in:
hondacrx
2017-07-06 11:01:31 -04:00
parent a6b30c73e4
commit 210a2958ff
18 changed files with 73 additions and 80 deletions
+4 -4
View File
@@ -982,9 +982,9 @@ namespace Game.Entities
new PlayerAI GetAI() { return (PlayerAI)i_AI; }
//Network
public void SendPacket(ServerPacket data, bool writePacket = true)
public void SendPacket(ServerPacket data)
{
Session.SendPacket(data, writePacket);
Session.SendPacket(data);
}
//Time
@@ -5298,6 +5298,8 @@ namespace Game.Entities
if (WorldConfig.GetBoolValue(WorldCfg.AlwaysMaxskill)) // Max weapon skill when leveling up
UpdateSkillsToMaxSkillsForLevel();
_ApplyAllLevelScaleItemMods(true); // Moved to above SetFullHealth so player will have full health from Heirlooms
// set current level health and mana/energy to maximum after applying all mods.
SetFullHealth();
SetPower(PowerType.Mana, GetMaxPower(PowerType.Mana));
@@ -5306,8 +5308,6 @@ namespace Game.Entities
SetPower(PowerType.Rage, GetMaxPower(PowerType.Rage));
SetPower(PowerType.Focus, 0);
_ApplyAllLevelScaleItemMods(true);
// update level to hunter/summon pet
Pet pet = GetPet();
if (pet)