diff --git a/FFXIVClassic Lobby Server/ClientConnection.cs b/FFXIVClassic Lobby Server/ClientConnection.cs index 91be70d6..e7c474f2 100644 --- a/FFXIVClassic Lobby Server/ClientConnection.cs +++ b/FFXIVClassic Lobby Server/ClientConnection.cs @@ -40,6 +40,9 @@ namespace FFXIVClassic_Lobby_Server public void QueuePacket(BasePacket packet) { + if (SendPacketQueue.Count == SendPacketQueue.BoundedCapacity - 1) + FlushQueuedSendPackets(); + SendPacketQueue.Add(packet); } diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 150057d0..382d4acd 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -1023,6 +1023,13 @@ namespace FFXIVClassic_Map_Server.Actors resultContainer.CombineLists(); DoBattleAction(0, 0x7c000062, resultContainer.GetList()); + //If new class, init abilties and level + if (charaWork.battleSave.skillLevel[classId - 1] <= 0) + { + UpdateClassLevel(classId, 1); + EquipAbilitiesAtLevel(classId, 1); + } + //Set rested EXP charaWork.parameterSave.state_mainSkill[0] = classId; charaWork.parameterSave.state_mainSkillLevel = charaWork.battleSave.skillLevel[classId-1]; @@ -1033,13 +1040,6 @@ namespace FFXIVClassic_Map_Server.Actors charaWork.commandCategory[i] = 0; } - //If new class, init abilties and level - if (charaWork.battleSave.skillLevel[classId - 1] <= 0) - { - UpdateClassLevel(classId, 1); - EquipAbilitiesAtLevel(classId, 1); - } - ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/stateForAll", this); propertyBuilder.AddProperty("charaWork.parameterSave.state_mainSkill[0]"); @@ -2122,7 +2122,7 @@ namespace FFXIVClassic_Map_Server.Actors public void UnequipAbility(ushort hotbarSlot, bool printMessage = true) { - ushort trueHotbarSlot = (ushort)(hotbarSlot + charaWork.commandBorder); + ushort trueHotbarSlot = (ushort)(hotbarSlot + charaWork.commandBorder - 1); uint commandId = charaWork.command[trueHotbarSlot]; Database.UnequipAbility(this, hotbarSlot); charaWork.command[trueHotbarSlot] = 0; @@ -2480,7 +2480,7 @@ namespace FFXIVClassic_Map_Server.Actors private void EquipAbilitiesAtLevel(byte classId, short level, List actionList = null) { //If there's any abilites that unlocks at this level, equip them. - List commandIds = Server.GetWorldManager().GetBattleCommandIdByLevel(classId, GetLevel()); + List commandIds = Server.GetWorldManager().GetBattleCommandIdByLevel(classId, level); foreach (ushort commandId in commandIds) { EquipAbilityInFirstOpenSlot(classId, commandId, false); diff --git a/FFXIVClassic World Server/DataObjects/ClientConnection.cs b/FFXIVClassic World Server/DataObjects/ClientConnection.cs index 7c3427a8..dfc7b33a 100644 --- a/FFXIVClassic World Server/DataObjects/ClientConnection.cs +++ b/FFXIVClassic World Server/DataObjects/ClientConnection.cs @@ -20,11 +20,17 @@ namespace FFXIVClassic_World_Server public void QueuePacket(BasePacket packet) { + if (SendPacketQueue.Count == SendPacketQueue.BoundedCapacity - 1) + FlushQueuedSendPackets(); + SendPacketQueue.Add(packet); } public void QueuePacket(SubPacket subpacket) { + if (SendPacketQueue.Count == SendPacketQueue.BoundedCapacity - 1) + FlushQueuedSendPackets(); + bool isAuthed = true; bool isEncrypted = false; subpacket.SetTargetId(owner.sessionId); diff --git a/data/scripts/commands/gm/spawnnpc.lua b/data/scripts/commands/gm/spawnnpc.lua index bf8870d1..e17295fc 100644 --- a/data/scripts/commands/gm/spawnnpc.lua +++ b/data/scripts/commands/gm/spawnnpc.lua @@ -12,7 +12,7 @@ yolo local modelIds = { ["titan"] = 2107401, - ["ifrit"] = 2107302, + ["ifrit"] = 2207302, ["ifrithotair"] = 2207310, ["nail"] = 2207307, ["garuda"] = 2209501,