1
Fork 0
mirror of https://bitbucket.org/Ioncannon/project-meteor-server.git synced 2025-04-20 11:47:48 +00:00

ReAdding Azia's fixes that got removed when I fucked up on the license change.

This commit is contained in:
Yogurt 2019-06-08 21:11:51 -07:00 committed by Filip Maj
parent afd056d82d
commit d3027c3b26
4 changed files with 25 additions and 2 deletions

View file

@ -62,6 +62,9 @@ namespace Meteor.Lobby
public void QueuePacket(BasePacket packet) public void QueuePacket(BasePacket packet)
{ {
if (SendPacketQueue.Count == SendPacketQueue.BoundedCapacity - 1)
FlushQueuedSendPackets();
SendPacketQueue.Add(packet); SendPacketQueue.Add(packet);
} }

View file

@ -1044,6 +1044,13 @@ namespace Meteor.Map.Actors
resultContainer.CombineLists(); resultContainer.CombineLists();
DoBattleAction(0, 0x7c000062, resultContainer.GetList()); 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 //Set rested EXP
charaWork.parameterSave.state_mainSkill[0] = classId; charaWork.parameterSave.state_mainSkill[0] = classId;
charaWork.parameterSave.state_mainSkillLevel = charaWork.battleSave.skillLevel[classId-1]; charaWork.parameterSave.state_mainSkillLevel = charaWork.battleSave.skillLevel[classId-1];
@ -2143,7 +2150,7 @@ namespace Meteor.Map.Actors
public void UnequipAbility(ushort hotbarSlot, bool printMessage = true) 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]; uint commandId = charaWork.command[trueHotbarSlot];
Database.UnequipAbility(this, hotbarSlot); Database.UnequipAbility(this, hotbarSlot);
charaWork.command[trueHotbarSlot] = 0; charaWork.command[trueHotbarSlot] = 0;

View file

@ -1044,6 +1044,13 @@ namespace Meteor.Map.Actors
resultContainer.CombineLists(); resultContainer.CombineLists();
DoBattleAction(0, 0x7c000062, resultContainer.GetList()); 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 //Set rested EXP
charaWork.parameterSave.state_mainSkill[0] = classId; charaWork.parameterSave.state_mainSkill[0] = classId;
charaWork.parameterSave.state_mainSkillLevel = charaWork.battleSave.skillLevel[classId-1]; charaWork.parameterSave.state_mainSkillLevel = charaWork.battleSave.skillLevel[classId-1];
@ -2143,7 +2150,7 @@ namespace Meteor.Map.Actors
public void UnequipAbility(ushort hotbarSlot, bool printMessage = true) 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]; uint commandId = charaWork.command[trueHotbarSlot];
Database.UnequipAbility(this, hotbarSlot); Database.UnequipAbility(this, hotbarSlot);
charaWork.command[trueHotbarSlot] = 0; charaWork.command[trueHotbarSlot] = 0;

View file

@ -42,11 +42,17 @@ namespace Meteor.World
public void QueuePacket(BasePacket packet) public void QueuePacket(BasePacket packet)
{ {
if (SendPacketQueue.Count == SendPacketQueue.BoundedCapacity - 1)
FlushQueuedSendPackets();
SendPacketQueue.Add(packet); SendPacketQueue.Add(packet);
} }
public void QueuePacket(SubPacket subpacket) public void QueuePacket(SubPacket subpacket)
{ {
if (SendPacketQueue.Count == SendPacketQueue.BoundedCapacity - 1)
FlushQueuedSendPackets();
bool isAuthed = true; bool isAuthed = true;
bool isEncrypted = false; bool isEncrypted = false;
subpacket.SetTargetId(owner.sessionId); subpacket.SetTargetId(owner.sessionId);