mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-07-25 03:48:23 +02:00
Added some new work parameters. Fixed GC Packet (wrong sized data). Connected player data packets to DB. Cleaned up login code.
This commit is contained in:
parent
2bf532a6db
commit
f7702bca13
16 changed files with 209 additions and 123 deletions
28
FFXIVClassic Map Server/actors/chara/AetheryteWork.cs
Normal file
28
FFXIVClassic Map Server/actors/chara/AetheryteWork.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.dataobjects.chara
|
||||
{
|
||||
class AetheryteWork
|
||||
{
|
||||
public int iconGil;
|
||||
public short guildleveId;
|
||||
public short clearTime;
|
||||
public int missionBonus;
|
||||
public int difficultyBonus;
|
||||
|
||||
public byte factionNumber;
|
||||
public int factionBonus;
|
||||
public byte factionCredit;
|
||||
|
||||
public int glRewardItem;
|
||||
public int glRewardNumber;
|
||||
public int glRewardSubItem;
|
||||
public int glRewardSubNumber;
|
||||
|
||||
public byte difficulty;
|
||||
}
|
||||
}
|
|
@ -9,10 +9,11 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
class BattleSave
|
||||
{
|
||||
public float potencial = 6.6f;
|
||||
public int skillLevel;
|
||||
public int skillLevelCap;
|
||||
public int[] skillPoint;
|
||||
public short[] skillLevel = new short[52];
|
||||
public short[] skillLevelCap = new short[52];
|
||||
public short[] skillPoint = new short[52];
|
||||
|
||||
public short physicalLevel;
|
||||
public int physicalExp;
|
||||
|
||||
public bool[] negotiationFlag= new bool[2];
|
||||
|
|
|
@ -49,6 +49,6 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
|
||||
public float[] castGauge_speed = { 1.0f, 0.25f};
|
||||
public bool[] timingCommandFlag = new bool[4];
|
||||
public ushort[] generalParameter = new ushort[32];
|
||||
public ushort[] generalParameter = new ushort[35];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,17 +18,21 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
public EventSave eventSave = new EventSave();
|
||||
public EventTemp eventTemp = new EventTemp();
|
||||
|
||||
public bool gameParameter = false;
|
||||
|
||||
|
||||
public byte[] property = new byte[32];
|
||||
|
||||
public ushort[] status = new ushort[20];
|
||||
public uint[] statusShownTime = new uint[20];
|
||||
|
||||
public uint[] command = new uint[64];
|
||||
public uint[] command = new uint[64]; //ACTORS
|
||||
public byte[] commandCategory = new byte[64];
|
||||
public byte commandBorder = 0x20;
|
||||
public bool commandAcquired = false;
|
||||
public bool[] additionalCommandAcquired = new bool[32];
|
||||
public bool[] commandAcquired = new bool[4096];
|
||||
public bool[] additionalCommandAcquired = new bool[36];
|
||||
|
||||
public uint currentContentGroup;
|
||||
public uint depictionJudge = 0xa0f50911;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,6 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
{
|
||||
public bool bazaar;
|
||||
public byte bazaarTax;
|
||||
public int repairType;
|
||||
public byte repairType;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,19 +8,30 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
{
|
||||
class ParameterSave
|
||||
{
|
||||
public short[] hp = new short[1];
|
||||
public short[] hpMax = new short[1];
|
||||
public short[] hp = new short[8];
|
||||
public short[] hpMax = new short[8];
|
||||
public short mp;
|
||||
public short mpMax;
|
||||
|
||||
public byte[] state_mainSkill = new byte[4];
|
||||
public ushort state_mainSkillLevel;
|
||||
|
||||
public int[] state_boostPointForSkill;
|
||||
|
||||
public bool[] commandSlot_compatibility = new bool[40];
|
||||
public byte[] state_boostPointForSkill = new byte[4];
|
||||
|
||||
public uint[] commandSlot_recastTime = new uint[40];
|
||||
public bool[] commandSlot_compatibility = new bool[40];
|
||||
|
||||
public int[] giftCommandSlot_commandId;
|
||||
public ushort[] giftCommandSlot_commandId = new ushort[10];
|
||||
|
||||
public ushort[] constanceCommandSlot_commandId = new ushort[10];
|
||||
|
||||
public byte abilityCostPoint_used;
|
||||
public byte abilityCostPoint_max;
|
||||
|
||||
public byte giftCostPoint_used;
|
||||
public byte giftCostPoint_max;
|
||||
|
||||
public byte constanceCostPoint_used;
|
||||
public byte constanceCostPoint_max;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,12 +12,12 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
|
||||
public int targetInformation = 0;
|
||||
|
||||
public int[] maxCommandRecastTime = new int[40];
|
||||
public ushort[] maxCommandRecastTime = new ushort[40];
|
||||
|
||||
public float[] forceControl_float_forClientSelf = { 1.0f, 1.0f};
|
||||
public float[] forceControl_float_forClientSelf = { 1.0f, 1.0f, 0.0f, 0.0f};
|
||||
public short[] forceControl_int16_forClientSelf = { -1, -1 };
|
||||
|
||||
public int[] otherClassAbilityCount = new int[2];
|
||||
public int[] giftCount = new int[2];
|
||||
public byte[] otherClassAbilityCount = new byte[2];
|
||||
public byte[] giftCount = new byte[2];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,9 @@ namespace FFXIVClassic_Map_Server.actors.chara
|
|||
public ushort[] guildleveId = new ushort[16];
|
||||
public bool[] guildleveDone = new bool[16];
|
||||
public bool[] guildleveChecked = new bool[16];
|
||||
|
||||
public bool betacheck = false;
|
||||
|
||||
public bool[] event_achieve_aetheryte = new bool[512];
|
||||
}
|
||||
}
|
||||
|
|
16
FFXIVClassic Map Server/actors/chara/npc/NpcWork.cs
Normal file
16
FFXIVClassic Map Server/actors/chara/npc/NpcWork.cs
Normal file
|
@ -0,0 +1,16 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.dataobjects.chara
|
||||
{
|
||||
class NpcWork
|
||||
{
|
||||
public short pushCommand;
|
||||
public int pushCommandSub;
|
||||
public byte pushCommandPriority;
|
||||
public byte hateType;
|
||||
}
|
||||
}
|
|
@ -3,6 +3,7 @@ using FFXIVClassic_Lobby_Server.common;
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using FFXIVClassic_Map_Server.packets.send.player;
|
||||
using FFXIVClassic_Map_Server.utils;
|
||||
using MySql.Data.MySqlClient;
|
||||
using System;
|
||||
|
@ -39,6 +40,8 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
|
||||
public uint[] timers = new uint[20];
|
||||
|
||||
public ushort currentJob;
|
||||
|
||||
public uint currentTitle;
|
||||
|
||||
public byte gcCurrent;
|
||||
|
@ -52,7 +55,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
public string chocoboName;
|
||||
|
||||
public uint achievementPoints;
|
||||
public ushort[] latestAchievements = new ushort[5];
|
||||
public uint[] latestAchievements = new uint[5];
|
||||
|
||||
public PlayerWork playerWork = new PlayerWork();
|
||||
|
||||
|
@ -85,25 +88,19 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
charaWork.command[15] = 0xA0F00000 | 22015;
|
||||
|
||||
charaWork.command[32] = 0xA0F00000 | 27155;
|
||||
charaWork.command[33] = 0xA0F00000 | 27150;
|
||||
//charaWork.command[33] = 0xA0F00000 | 27150;
|
||||
charaWork.command[34] = 0xA0F00000 | 27300;
|
||||
charaWork.command[61] = 0xA0F00000 | 27300;
|
||||
charaWork.command[36] = 0xA0F00000 | 27300;
|
||||
|
||||
//charaWork.command[35] = 0xA0F00000 | 27300;
|
||||
//charaWork.command[35] = 0xA0F00000 | 27300;
|
||||
charaWork.commandAcquired[27150 - 26000] = true;
|
||||
|
||||
/*
|
||||
charaWork.additionalCommandAcquired[0] = true;
|
||||
charaWork.additionalCommandAcquired[12] = true;
|
||||
charaWork.additionalCommandAcquired[22] = true;
|
||||
charaWork.additionalCommandAcquired[25] = true;
|
||||
charaWork.additionalCommandAcquired[28] = true;
|
||||
charaWork.additionalCommandAcquired[30] = true;
|
||||
playerWork.questScenarioComplete[110001 - 110001] = true;
|
||||
playerWork.questGuildleveComplete[120050 - 120001] = true;
|
||||
|
||||
charaWork.commandCategory[0] = 1;
|
||||
charaWork.commandCategory[1] = 1;
|
||||
*/
|
||||
for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++ )
|
||||
charaWork.additionalCommandAcquired[i] = true;
|
||||
|
||||
for (int i = 0; i < charaWork.commandCategory.Length; i++)
|
||||
charaWork.commandCategory[i] = 1;
|
||||
|
||||
charaWork.battleTemp.generalParameter[3] = 1;
|
||||
|
||||
|
@ -111,8 +108,10 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
charaWork.battleSave.potencial = 6.6f;
|
||||
|
||||
charaWork.commandBorder = 0x20;
|
||||
|
||||
|
||||
Database.loadPlayerCharacter(this);
|
||||
|
||||
Database.getLatestAchievements(this);
|
||||
}
|
||||
|
||||
public List<SubPacket> create0x132Packets(uint playerActorId)
|
||||
|
@ -158,10 +157,62 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
subpackets.Add(createInitStatusPacket(playerActorId));
|
||||
subpackets.Add(createSetActorIconPacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
subpackets.AddRange(createPlayerRelatedPackets(playerActorId));
|
||||
subpackets.Add(createScriptBindPacket(playerActorId));
|
||||
return BasePacket.createPacket(subpackets, true, false);
|
||||
}
|
||||
|
||||
public List<SubPacket> createPlayerRelatedPackets(uint playerActorId)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
|
||||
if (gcCurrent != 0)
|
||||
subpackets.Add(SetGrandCompanyPacket.buildPacket(actorId, playerActorId, gcCurrent, gcRankLimsa, gcRankGridania, gcRankUldah));
|
||||
|
||||
if (currentTitle != 0)
|
||||
subpackets.Add(SetPlayerTitlePacket.buildPacket(actorId, playerActorId, currentTitle));
|
||||
|
||||
if (currentJob != 0)
|
||||
subpackets.Add(SetCurrentJobPacket.buildPacket(actorId, playerActorId, currentJob));
|
||||
|
||||
if (isMyPlayer(playerActorId))
|
||||
{
|
||||
subpackets.Add(_0x196Packet.buildPacket(playerActorId, playerActorId));
|
||||
|
||||
if (hasChocobo && chocoboName != null && !chocoboName.Equals(""))
|
||||
{
|
||||
subpackets.Add(SetChocoboNamePacket.buildPacket(actorId, playerActorId, chocoboName));
|
||||
subpackets.Add(SetHasChocoboPacket.buildPacket(playerActorId, hasChocobo));
|
||||
}
|
||||
|
||||
if (hasGoobbue)
|
||||
subpackets.Add(SetHasGoobbuePacket.buildPacket(playerActorId, hasGoobbue));
|
||||
|
||||
subpackets.Add(SetAchievementPointsPacket.buildPacket(playerActorId, achievementPoints));
|
||||
subpackets.Add(SetLatestAchievementsPacket.buildPacket(playerActorId, latestAchievements));
|
||||
|
||||
SetCompletedAchievementsPacket cheevos = new SetCompletedAchievementsPacket();
|
||||
for (int i = 0; i < cheevos.achievementFlags.Length; i++)
|
||||
cheevos.achievementFlags[i] = true;
|
||||
subpackets.Add(cheevos.buildPacket(playerActorId));
|
||||
|
||||
/*
|
||||
if (isInn)
|
||||
{
|
||||
SetCutsceneBookPacket book = new SetCutsceneBookPacket();
|
||||
for (int i = 0; i < book.cutsceneFlags.Length; i++)
|
||||
book.cutsceneFlags[i] = true;
|
||||
client.queuePacket(book.buildPacket(player.actorID), true, false);
|
||||
|
||||
//
|
||||
//subpackets.Add(SetPlayerDreamPacket.buildPacket(playerActorId, );
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
return subpackets;
|
||||
}
|
||||
|
||||
public override BasePacket getInitPackets(uint playerActorId)
|
||||
{
|
||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("/_init", this, playerActorId);
|
||||
|
@ -191,13 +242,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
if (charaWork.statusShownTime[i] != 0xFFFFFFFF)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.statusShownTime[{0}]", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++)
|
||||
{
|
||||
if (charaWork.additionalCommandAcquired[i] != false)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.additionalCommandAcquired[{0}]", i));
|
||||
}
|
||||
|
||||
|
||||
//General Parameters
|
||||
for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++)
|
||||
{
|
||||
|
@ -213,32 +258,48 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
//Commands
|
||||
propPacketUtil.addProperty("charaWork.commandBorder");
|
||||
|
||||
|
||||
for (int i = 0; i < charaWork.command.Length; i++)
|
||||
{
|
||||
if (charaWork.command[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.command[{0}]", i));
|
||||
}
|
||||
|
||||
/*
|
||||
for (int i = 0; i < charaWork.commandCategory.Length; i++)
|
||||
{
|
||||
charaWork.commandCategory[i] = 1;
|
||||
if (charaWork.commandCategory[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.commandCategory[{0}]", i));
|
||||
}
|
||||
|
||||
|
||||
|
||||
for (int i = 0; i < charaWork.commandAcquired.Length; i++)
|
||||
{
|
||||
if (charaWork.commandAcquired[i] != false)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.commandAcquired[{0}]", i));
|
||||
}
|
||||
*/
|
||||
|
||||
for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++)
|
||||
{
|
||||
if (charaWork.additionalCommandAcquired[i] != false)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.additionalCommandAcquired[{0}]", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < charaWork.parameterSave.commandSlot_compatibility.Length; i++)
|
||||
{
|
||||
charaWork.parameterSave.commandSlot_compatibility[i] = true;
|
||||
if (charaWork.parameterSave.commandSlot_compatibility[i])
|
||||
propPacketUtil.addProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < charaWork.parameterSave.commandSlot_recastTime.Length; i++)
|
||||
{
|
||||
if (charaWork.parameterSave.commandSlot_recastTime[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i));
|
||||
}
|
||||
*/
|
||||
/*
|
||||
for (int i = 0; i < charaWork.parameterSave.commandSlot_recastTime.Length; i++)
|
||||
{
|
||||
if (charaWork.parameterSave.commandSlot_recastTime[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i));
|
||||
}
|
||||
*/
|
||||
|
||||
//System
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[0]");
|
||||
|
|
|
@ -14,13 +14,13 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
public byte birthdayDay;
|
||||
public byte initialTown;
|
||||
|
||||
public int restBonusExpRate;
|
||||
public float restBonusExpRate = 1.5f;
|
||||
|
||||
public uint[] questScenario = new uint[16];
|
||||
public uint[] questGuildleve = new uint[8];
|
||||
|
||||
public int questScenarioComplete;
|
||||
public int questGuildleveComplete;
|
||||
public bool[] questScenarioComplete = new bool[2048];
|
||||
public bool[] questGuildleveComplete = new bool[2048];
|
||||
|
||||
public bool isContentsCommand;
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
public int castEndClient;
|
||||
|
||||
public int[] comboNextCommandId = new int[2];
|
||||
public int comboCostBonusRate;
|
||||
public float comboCostBonusRate;
|
||||
|
||||
public bool isRemainBonusPoint;
|
||||
|
||||
|
@ -36,15 +36,15 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
public bool[] npcLinkshellChatExtra = new bool[64];
|
||||
|
||||
public int variableCommandConfirmWarp;
|
||||
public int variableCommandConfirmWarpSender;
|
||||
public string variableCommandConfirmWarpSender;
|
||||
public int variableCommandConfirmWarpSenderByID;
|
||||
public int variableCommandConfirmWarpSenderSex;
|
||||
public byte variableCommandConfirmWarpSenderSex;
|
||||
public int variableCommandConfirmWarpPlace;
|
||||
|
||||
public int variableCommandConfirmRaise;
|
||||
public int variableCommandConfirmRaiseSender;
|
||||
public string variableCommandConfirmRaiseSender;
|
||||
public int variableCommandConfirmRaiseSenderByID;
|
||||
public int variableCommandConfirmRaiseSenderSex;
|
||||
public byte variableCommandConfirmRaiseSenderSex;
|
||||
public int variableCommandConfirmRaisePlace;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue