mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-08-04 00:31:55 +02:00
Fixed the crash when class change is to a level 0 class. Now autosets to level 1.
This commit is contained in:
parent
0b13b590a0
commit
880b1f3066
2 changed files with 92 additions and 0 deletions
|
@ -990,6 +990,8 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
public void PrepareClassChange(byte classId)
|
||||
{
|
||||
//If new class, init abilties and level
|
||||
if (charaWork.battleSave.skillLevel[classId - 1] <= 0)
|
||||
UpdateClassLevel(classId, 1);
|
||||
|
||||
SendCharaExpInfo();
|
||||
}
|
||||
|
@ -1038,6 +1040,16 @@ namespace FFXIVClassic_Map_Server.Actors
|
|||
Database.SavePlayerCurrentClass(this);
|
||||
}
|
||||
|
||||
public void UpdateClassLevel(byte classId, short level)
|
||||
{
|
||||
Database.PlayerCharacterUpdateClassLevel(this, classId, level);
|
||||
charaWork.battleSave.skillLevel[classId - 1] = level;
|
||||
ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/exp", this);
|
||||
propertyBuilder.AddProperty(String.Format("charaWork.battleSave.skillLevel[{0}]", classId-1));
|
||||
List<SubPacket> packets = propertyBuilder.Done();
|
||||
QueuePackets(packets);
|
||||
}
|
||||
|
||||
public void GraphicChange(int slot, InventoryItem invItem)
|
||||
{
|
||||
if (invItem == null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue