diff --git a/FFXIVClassic Map Server/actors/chara/player/Player.cs b/FFXIVClassic Map Server/actors/chara/player/Player.cs index 29884a76..12d66122 100644 --- a/FFXIVClassic Map Server/actors/chara/player/Player.cs +++ b/FFXIVClassic Map Server/actors/chara/player/Player.cs @@ -717,11 +717,39 @@ namespace FFXIVClassic_Map_Server.Actors public void doClassChange(byte classId) { + //load hotbars + //Calculate stats + //Calculate hp/mp + + //Get Potenciel ?????? + + //Set HP/MP/TP PARAMS + + //Set mainskill and level + + //Set Parameters + + //Set current EXP + + //Set Hotbar Commands 1 + //Set Hotbar Commands 2 + //Set Hotbar Commands 3 + + //Check if bonus point available... set + + //Set rested EXP + charaWork.parameterSave.state_mainSkill[0] = classId; + playerWork.restBonusExpRate = 0.0f; + ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/stateForAll", this, actorId); + propertyBuilder.addProperty("charaWork.parameterSave.state_mainSkill[0]"); propertyBuilder.addProperty("charaWork.parameterSave.state_mainSkillLevel"); + propertyBuilder.newTarget("playerWork/expBonus"); + propertyBuilder.addProperty("playerWork.restBonusExpRate"); + List packets = propertyBuilder.done(); foreach (SubPacket packet in packets) diff --git a/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs b/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs index 8a06abf3..f99a3640 100644 --- a/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs +++ b/FFXIVClassic Map Server/utils/ActorPropertyPacketUtil.cs @@ -37,6 +37,13 @@ namespace FFXIVClassic_Map_Server.utils } } + public void newTarget(string target) + { + currentActorPropertyPacket.addTarget(); + currentTarget = target; + currentActorPropertyPacket.setTarget(target); + } + public List done() { currentActorPropertyPacket.addTarget(); diff --git a/scripts/commands/EquipCommand.lua b/scripts/commands/EquipCommand.lua index f20f512a..632f6269 100644 --- a/scripts/commands/EquipCommand.lua +++ b/scripts/commands/EquipCommand.lua @@ -77,6 +77,7 @@ function loadGearset(player, classId) gearset = player:getGearset(classId); if gearset == nil then + player:getEquipment():ToggleDBWrite(true); return; end