From 57f3de66f822bde8ba71f7c13d0c73200e33346a Mon Sep 17 00:00:00 2001 From: Yogurt Date: Sun, 9 Jun 2019 15:34:31 -0700 Subject: [PATCH] Fix level 0 stuff --- .../actors/chara/player/Player.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 150057d0..a9327ec7 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]"); @@ -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);