Added a load player character function to the database class. As I went through, changed the various properties to their correct datatype. Also added Work object to Character.

This commit is contained in:
Filip Maj 2016-01-09 23:22:10 -05:00
parent c9f35a207b
commit 4dec77aa69
8 changed files with 353 additions and 16 deletions

View file

@ -24,8 +24,8 @@ namespace FFXIVClassic_Map_Server.dataobjects
public uint displayNameId = 0xFFFFFFFF;
public string customDisplayName;
public uint currentMainState = SetActorStatePacket.MAIN_STATE_PASSIVE;
public uint currentSubState = SetActorStatePacket.SUB_STATE_NONE;
public ushort currentMainState = SetActorStatePacket.MAIN_STATE_PASSIVE;
public ushort currentSubState = SetActorStatePacket.SUB_STATE_NONE;
public float positionX = SetActorPositionPacket.INNPOS_X, positionY = SetActorPositionPacket.INNPOS_Y, positionZ = SetActorPositionPacket.INNPOS_Z, rotation = SetActorPositionPacket.INNPOS_ROT;
public float oldPositionX, oldPositionY, oldPositionZ, oldRotation;
public ushort moveState, oldMoveState;

View file

@ -23,7 +23,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
public ushort[] status = new ushort[20];
public uint[] statusShownTime = new uint[20];
public int[] command = new int[64];
public uint[] command = new uint[64];
public int[] commandCategory = new int[64];
public int commandBorder = 0x20;
public bool commandAcquired = false;

View file

@ -1,4 +1,5 @@
using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.actors.chara;
using FFXIVClassic_Map_Server.packets.send.actor;
using System;
using System.Collections.Generic;
@ -45,7 +46,8 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
public uint currentLockedTarget = 0xC0000000;
public uint currentActorIcon = 0;
public Work work = new Work();
public CharaWork charaWork = new CharaWork();
public PlayerWork playerWork = new PlayerWork();

View file

@ -19,7 +19,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
public int[] state_boostPointForSkill;
public int[] commandSlot_compatibility;
public int[] commandSlot_recastTime;
public uint[] commandSlot_recastTime = new uint[40];
public int[] giftCommandSlot_commandId;
}

View file

@ -0,0 +1,15 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FFXIVClassic_Map_Server.actors.chara
{
class Work
{
public bool[] guildleveDone = new bool[16];
public bool[] guildleveChecked = new bool[16];
public bool betacheck = false;
}
}

View file

@ -5,6 +5,7 @@ using FFXIVClassic_Lobby_Server.packets;
using FFXIVClassic_Map_Server.dataobjects.database;
using FFXIVClassic_Map_Server.lua;
using FFXIVClassic_Map_Server.packets.send.actor;
using MySql.Data.MySqlClient;
using System;
using System.Collections.Generic;
using System.Linq;
@ -39,6 +40,20 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
public uint[] timers = new uint[20];
public uint currentTitle;
public byte gcCurrent;
public byte gcRankLimsa;
public byte gcRankGridania;
public byte gcRankUldah;
public bool hasChocobo;
public bool hasGoobbue;
public byte chocoboAppearance;
public string chocoboName;
public uint achievementPoints;
PlayerWork playerWork = new PlayerWork();
public Player(uint actorID) : base(actorID)
@ -150,6 +165,9 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
public bool isMyPlayer(uint otherActorId)
{
return actorId == otherActorId;
}
}
}
}

View file

@ -8,16 +8,16 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
{
class PlayerWork
{
public int tribe;
public int guardian;
public int birthdayMonth;
public int birthdayDay;
public int initialTown;
public byte tribe;
public byte guardian;
public byte birthdayMonth;
public byte birthdayDay;
public byte initialTown;
public int restBonusExpRate;
public int[] questScenario = new int[16];
public int[] questGuildLeve = new int[8];
public uint[] questScenario = new uint[16];
public uint[] questGuildLeve = new uint[8];
public int questScenarioComplete;
public int questGuildleveComplete;
@ -32,8 +32,8 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
public bool isRemainBonusPoint;
public int[] npcLinkshellChatCalling = new int[64];
public int[] npcLinkshellChatExtra = new int[64];
public bool[] npcLinkshellChatCalling = new bool[64];
public bool[] npcLinkshellChatExtra = new bool[64];
public int variableCommandConfirmWarp;
public int variableCommandConfirmWarpSender;
@ -46,6 +46,6 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
public int variableCommandConfirmRaiseSenderByID;
public int variableCommandConfirmRaiseSenderSex;
public int variableCommandConfirmRaisePlace;
}
}