Fixed bug where DB writing for equipment would be toggled off if gearset was nil for some reason. Added in a property change to get the bottom class icon to refresh showing the new class.

This commit is contained in:
Filip Maj 2016-03-12 10:01:41 -05:00
parent e409d3792c
commit f71b4ef031
3 changed files with 36 additions and 0 deletions

View File

@ -717,11 +717,39 @@ namespace FFXIVClassic_Map_Server.Actors
public void doClassChange(byte classId) 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; charaWork.parameterSave.state_mainSkill[0] = classId;
playerWork.restBonusExpRate = 0.0f;
ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/stateForAll", this, actorId); ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/stateForAll", this, actorId);
propertyBuilder.addProperty("charaWork.parameterSave.state_mainSkill[0]"); propertyBuilder.addProperty("charaWork.parameterSave.state_mainSkill[0]");
propertyBuilder.addProperty("charaWork.parameterSave.state_mainSkillLevel"); propertyBuilder.addProperty("charaWork.parameterSave.state_mainSkillLevel");
propertyBuilder.newTarget("playerWork/expBonus");
propertyBuilder.addProperty("playerWork.restBonusExpRate");
List<SubPacket> packets = propertyBuilder.done(); List<SubPacket> packets = propertyBuilder.done();
foreach (SubPacket packet in packets) foreach (SubPacket packet in packets)

View File

@ -37,6 +37,13 @@ namespace FFXIVClassic_Map_Server.utils
} }
} }
public void newTarget(string target)
{
currentActorPropertyPacket.addTarget();
currentTarget = target;
currentActorPropertyPacket.setTarget(target);
}
public List<SubPacket> done() public List<SubPacket> done()
{ {
currentActorPropertyPacket.addTarget(); currentActorPropertyPacket.addTarget();

View File

@ -77,6 +77,7 @@ function loadGearset(player, classId)
gearset = player:getGearset(classId); gearset = player:getGearset(classId);
if gearset == nil then if gearset == nil then
player:getEquipment():ToggleDBWrite(true);
return; return;
end end