mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Merged in skeletonhorn/ffxiv-classic-server (pull request #63)
Add packet flush when packet queue is full to Lobby and World servers
This commit is contained in:
commit
187d8300b0
@ -40,6 +40,9 @@ namespace FFXIVClassic_Lobby_Server
|
||||
|
||||
public void QueuePacket(BasePacket packet)
|
||||
{
|
||||
if (SendPacketQueue.Count == SendPacketQueue.BoundedCapacity - 1)
|
||||
FlushQueuedSendPackets();
|
||||
|
||||
SendPacketQueue.Add(packet);
|
||||
}
|
||||
|
||||
|
@ -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<CommandResult> actionList = null)
|
||||
{
|
||||
//If there's any abilites that unlocks at this level, equip them.
|
||||
List<ushort> commandIds = Server.GetWorldManager().GetBattleCommandIdByLevel(classId, GetLevel());
|
||||
List<ushort> commandIds = Server.GetWorldManager().GetBattleCommandIdByLevel(classId, level);
|
||||
foreach (ushort commandId in commandIds)
|
||||
{
|
||||
EquipAbilityInFirstOpenSlot(classId, commandId, false);
|
||||
|
@ -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);
|
||||
|
@ -12,7 +12,7 @@ yolo
|
||||
local modelIds =
|
||||
{
|
||||
["titan"] = 2107401,
|
||||
["ifrit"] = 2107302,
|
||||
["ifrit"] = 2207302,
|
||||
["ifrithotair"] = 2207310,
|
||||
["nail"] = 2207307,
|
||||
["garuda"] = 2209501,
|
||||
|
Loading…
Reference in New Issue
Block a user