mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-12 07:24:37 +02:00
Merge branch 'database_work' into scripting
# Conflicts: # FFXIVClassic Map Server/actors/chara/Character.cs # FFXIVClassic Map Server/actors/chara/npc/Npc.cs # FFXIVClassic Map Server/actors/chara/player/Player.cs
This commit is contained in:
commit
db62b05fdc
40 changed files with 1838 additions and 849 deletions
|
@ -1,11 +1,9 @@
|
|||
using FFXIVClassic_Lobby_Server;
|
||||
using FFXIVClassic_Lobby_Server.common;
|
||||
using FFXIVClassic_Lobby_Server.dataobjects;
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.dataobjects.chara;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using FFXIVClassic_Map_Server.packets.send.Actor;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
@ -24,14 +22,14 @@ 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 float positionX = SetActorPositionPacket.INNPOS_X, positionY = SetActorPositionPacket.INNPOS_Y, positionZ = SetActorPositionPacket.INNPOS_Z, rotation = SetActorPositionPacket.INNPOS_ROT;
|
||||
public ushort currentMainState = SetActorStatePacket.MAIN_STATE_PASSIVE;
|
||||
public ushort currentSubState = SetActorStatePacket.SUB_STATE_NONE;
|
||||
public float positionX, positionY, positionZ, rotation;
|
||||
public float oldPositionX, oldPositionY, oldPositionZ, oldRotation;
|
||||
public ushort moveState, oldMoveState;
|
||||
|
||||
public uint currentZoneId;
|
||||
|
||||
public uint zoneId;
|
||||
public Zone zone = null;
|
||||
public bool isZoning = false;
|
||||
|
||||
public bool spawnedFirstTime = false;
|
||||
|
@ -102,7 +100,7 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, classParams);
|
||||
}
|
||||
|
||||
public virtual BasePacket getInitPackets(uint playerActorId)
|
||||
public virtual BasePacket getSpawnPackets(uint playerActorId)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
|
@ -114,7 +112,14 @@ namespace FFXIVClassic_Map_Server.dataobjects
|
|||
subpackets.Add(createScriptBindPacket(playerActorId));
|
||||
return BasePacket.createPacket(subpackets, true, false);
|
||||
}
|
||||
|
||||
|
||||
public virtual BasePacket getInitPackets(uint playerActorId)
|
||||
{
|
||||
SetActorPropetyPacket initProperties = new SetActorPropetyPacket("/_init");
|
||||
initProperties.addTarget();
|
||||
return BasePacket.createPacket(initProperties.buildPacket(playerActorId, actorId), true, false);
|
||||
}
|
||||
|
||||
public override bool Equals(Object obj)
|
||||
{
|
||||
Actor actorObj = obj as Actor;
|
||||
|
|
231
FFXIVClassic Map Server/actors/area/Zone.cs
Normal file
231
FFXIVClassic Map Server/actors/area/Zone.cs
Normal file
|
@ -0,0 +1,231 @@
|
|||
using FFXIVClassic_Lobby_Server.common;
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server
|
||||
{
|
||||
class Zone : Actor
|
||||
{
|
||||
public string zoneName;
|
||||
public ushort regionId;
|
||||
public bool canStealth, isInn, canRideChocobo, isInstanceRaid;
|
||||
public ushort weatherNormal, weatherCommon, weatherRare;
|
||||
public ushort bgmDay, bgmNight, bgmBattle;
|
||||
|
||||
public int boundingGridSize = 50;
|
||||
public int minX = -100, minY = -100, maxX = 100, maxY = 100;
|
||||
private int numXBlocks, numYBlocks;
|
||||
private int halfWidth, halfHeight;
|
||||
private List<Actor>[,] actorBlock;
|
||||
|
||||
public Zone(uint id, string zoneName, ushort regionId, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool canStealth, bool isInn, bool canRideChocobo, bool isInstanceRaid)
|
||||
: base(id)
|
||||
{
|
||||
|
||||
this.zoneName = zoneName;
|
||||
this.regionId = regionId;
|
||||
this.canStealth = canStealth;
|
||||
this.isInn = isInn;
|
||||
this.canRideChocobo = canRideChocobo;
|
||||
this.isInstanceRaid = isInstanceRaid;
|
||||
|
||||
this.bgmDay = bgmDay;
|
||||
this.bgmNight = bgmNight;
|
||||
this.bgmBattle = bgmBattle;
|
||||
|
||||
this.displayNameId = 0;
|
||||
this.customDisplayName = "_areaMaster";
|
||||
this.actorName = String.Format("_areaMaster@{0:X5}",id<<8);
|
||||
|
||||
this.className = "ZoneMasterPrvI0";
|
||||
|
||||
numXBlocks = (maxX - minX) / boundingGridSize;
|
||||
numYBlocks = (maxY - minY) / boundingGridSize;
|
||||
actorBlock = new List<Actor>[numXBlocks, numYBlocks];
|
||||
halfWidth = numXBlocks / 2;
|
||||
halfHeight = numYBlocks / 2;
|
||||
|
||||
for (int y = 0; y < numYBlocks; y++)
|
||||
{
|
||||
for (int x = 0; x < numXBlocks; x++ )
|
||||
{
|
||||
actorBlock[x, y] = new List<Actor>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override SubPacket createScriptBindPacket(uint playerActorId)
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
lParams = LuaUtils.createLuaParamList("/Area/Zone/ZoneMasterPrvI0", false, true, zoneName, "", 0xFFFFFFFF, false, false, canStealth, isInn, false, false, false, false, false, false);
|
||||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
public override BasePacket getSpawnPackets(uint playerActorId)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
subpackets.Add(createSpeedPacket(playerActorId));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1));
|
||||
subpackets.Add(createNamePacket(playerActorId));
|
||||
subpackets.Add(createStatePacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
subpackets.Add(createScriptBindPacket(playerActorId));
|
||||
return BasePacket.createPacket(subpackets, true, false);
|
||||
}
|
||||
|
||||
#region Actor Management
|
||||
|
||||
public void addActorToZone(Actor actor)
|
||||
{
|
||||
int gridX = (int)actor.positionX / boundingGridSize;
|
||||
int gridY = (int)actor.positionZ / boundingGridSize;
|
||||
|
||||
gridX += halfWidth;
|
||||
gridY += halfHeight;
|
||||
|
||||
//Boundries
|
||||
if (gridX < 0)
|
||||
gridX = 0;
|
||||
if (gridX >= numXBlocks)
|
||||
gridX = numXBlocks - 1;
|
||||
if (gridY < 0)
|
||||
gridY = 0;
|
||||
if (gridY >= numYBlocks)
|
||||
gridY = numYBlocks - 1;
|
||||
|
||||
lock (actorBlock)
|
||||
actorBlock[gridX, gridY].Add(actor);
|
||||
}
|
||||
|
||||
public void removeActorToZone(Actor actor)
|
||||
{
|
||||
int gridX = (int)actor.positionX / boundingGridSize;
|
||||
int gridY = (int)actor.positionZ / boundingGridSize;
|
||||
|
||||
gridX += halfWidth;
|
||||
gridY += halfHeight;
|
||||
|
||||
//Boundries
|
||||
if (gridX < 0)
|
||||
gridX = 0;
|
||||
if (gridX >= numXBlocks)
|
||||
gridX = numXBlocks - 1;
|
||||
if (gridY < 0)
|
||||
gridY = 0;
|
||||
if (gridY >= numYBlocks)
|
||||
gridY = numYBlocks - 1;
|
||||
|
||||
lock (actorBlock)
|
||||
actorBlock[gridX, gridY].Remove(actor);
|
||||
}
|
||||
|
||||
public void updateActorPosition(Actor actor)
|
||||
{
|
||||
int gridX = (int)actor.positionX / boundingGridSize;
|
||||
int gridY = (int)actor.positionZ / boundingGridSize;
|
||||
|
||||
gridX += halfWidth;
|
||||
gridY += halfHeight;
|
||||
|
||||
//Boundries
|
||||
if (gridX < 0)
|
||||
gridX = 0;
|
||||
if (gridX >= numXBlocks)
|
||||
gridX = numXBlocks - 1;
|
||||
if (gridY < 0)
|
||||
gridY = 0;
|
||||
if (gridY >= numYBlocks)
|
||||
gridY = numYBlocks - 1;
|
||||
|
||||
int gridOldX = (int)actor.oldPositionX / boundingGridSize;
|
||||
int gridOldY = (int)actor.oldPositionZ / boundingGridSize;
|
||||
|
||||
gridOldX += halfWidth;
|
||||
gridOldY += halfHeight;
|
||||
|
||||
//Boundries
|
||||
if (gridOldX < 0)
|
||||
gridOldX = 0;
|
||||
if (gridOldX >= numXBlocks)
|
||||
gridOldX = numXBlocks - 1;
|
||||
if (gridOldY < 0)
|
||||
gridOldY = 0;
|
||||
if (gridOldY >= numYBlocks)
|
||||
gridOldY = numYBlocks - 1;
|
||||
|
||||
//Still in same block
|
||||
if (gridX == gridOldX && gridY == gridOldY)
|
||||
return;
|
||||
|
||||
lock (actorBlock)
|
||||
actorBlock[gridOldX, gridOldY].Remove(actor);
|
||||
lock (actorBlock)
|
||||
actorBlock[gridX, gridY].Add(actor);
|
||||
}
|
||||
|
||||
public List<Actor> getActorsAroundPoint(float x, float y, int checkDistance)
|
||||
{
|
||||
int gridX = (int)x/boundingGridSize;
|
||||
int gridY = (int)y/boundingGridSize;
|
||||
|
||||
gridX += halfWidth;
|
||||
gridY += halfHeight;
|
||||
|
||||
//Boundries
|
||||
if (gridX < 0)
|
||||
gridX = 0;
|
||||
if (gridX >= numXBlocks)
|
||||
gridX = numXBlocks - 1;
|
||||
if (gridY < 0)
|
||||
gridY = 0;
|
||||
if (gridY >= numYBlocks)
|
||||
gridY = numYBlocks - 1;
|
||||
|
||||
List<Actor> result = new List<Actor>();
|
||||
|
||||
for (int gx = gridX - checkDistance; gx <= gridX + checkDistance; gx++)
|
||||
{
|
||||
for (int gy = gridY - checkDistance; gy <= gridY + checkDistance; gy++)
|
||||
{
|
||||
result.AddRange(actorBlock[gx, gy]);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<Actor> getActorsAroundActor(Actor actor, int checkDistance)
|
||||
{
|
||||
int gridX = (int)actor.positionX / boundingGridSize;
|
||||
int gridY = (int)actor.positionZ / boundingGridSize;
|
||||
|
||||
gridX += halfWidth;
|
||||
gridY += halfHeight;
|
||||
|
||||
|
||||
|
||||
List<Actor> result = new List<Actor>();
|
||||
|
||||
for (int gy = ((gridY - checkDistance) < 0 ? 0 : (gridY - checkDistance)); gy <= ((gridY + checkDistance) >= numYBlocks ? numYBlocks - 1 : (gridY + checkDistance)); gy++)
|
||||
{
|
||||
for (int gx = ((gridX - checkDistance) < 0 ? 0 : (gridX - checkDistance)); gx <= ((gridX + checkDistance) >= numXBlocks ? numXBlocks - 1 : (gridX + checkDistance)); gx++)
|
||||
{
|
||||
result.AddRange(actorBlock[gx, gy]);
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
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;
|
||||
}
|
||||
}
|
|
@ -8,11 +8,12 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
{
|
||||
class BattleSave
|
||||
{
|
||||
public float potencial;
|
||||
public int skillLevel;
|
||||
public int skillLevelCap;
|
||||
public int[] skillPoint;
|
||||
public float potencial = 6.6f;
|
||||
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];
|
||||
|
|
|
@ -8,27 +8,29 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
{
|
||||
class BattleTemp
|
||||
{
|
||||
public const uint NAMEPLATE_SHOWN = 0xFBFBCFB1;
|
||||
public const uint TARGETABLE = 0x2138FD71;
|
||||
public const uint NAMEPLATE_SHOWN = 0;
|
||||
public const uint TARGETABLE = 1;
|
||||
//public const uint NAMEPLATE_SHOWN2 = 2;
|
||||
public const uint NAMEPLATE_SHOWN2 = 3;
|
||||
|
||||
public const uint STAT_STRENGTH = 4;
|
||||
public const uint STAT_VITALITY = 5;
|
||||
public const uint STAT_DEXTERITY = 6;
|
||||
public const uint STAT_INTELLIGENCE = 7;
|
||||
public const uint STAT_MIND = 8;
|
||||
public const uint STAT_PIETY = 9;
|
||||
public const uint STAT_STRENGTH = 3;
|
||||
public const uint STAT_VITALITY = 4;
|
||||
public const uint STAT_DEXTERITY = 5;
|
||||
public const uint STAT_INTELLIGENCE = 6;
|
||||
public const uint STAT_MIND = 7;
|
||||
public const uint STAT_PIETY = 8;
|
||||
|
||||
public const uint STAT_RESISTANCE_FIRE = 10;
|
||||
public const uint STAT_RESISTANCE_ICE = 11;
|
||||
public const uint STAT_RESISTANCE_WIND = 12;
|
||||
public const uint STAT_RESISTANCE_LIGHTNING = 3;
|
||||
public const uint STAT_RESISTANCE_EARTH = 14;
|
||||
public const uint STAT_RESISTANCE_WATER = 15;
|
||||
public const uint STAT_RESISTANCE_FIRE = 9;
|
||||
public const uint STAT_RESISTANCE_ICE = 10;
|
||||
public const uint STAT_RESISTANCE_WIND = 11;
|
||||
public const uint STAT_RESISTANCE_LIGHTNING = 12;
|
||||
public const uint STAT_RESISTANCE_EARTH = 13;
|
||||
public const uint STAT_RESISTANCE_WATER = 14;
|
||||
|
||||
public const uint STAT_ATTACK = 18;
|
||||
public const uint STAT_ACCURACY = 16;
|
||||
public const uint STAT_NORMALDEFENSE = 19;
|
||||
public const uint STAT_EVASION = 17;
|
||||
public const uint STAT_ATTACK = 17;
|
||||
public const uint STAT_ACCURACY = 15;
|
||||
public const uint STAT_NORMALDEFENSE = 18;
|
||||
public const uint STAT_EVASION = 16;
|
||||
public const uint STAT_ATTACK_MAGIC = 24;
|
||||
public const uint STAT_HEAL_MAGIC = 25;
|
||||
public const uint STAT_ENCHANCEMENT_MAGIC_POTENCY = 26;
|
||||
|
@ -45,8 +47,8 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
public const uint STAT_HARVEST_LIMIT = 34;
|
||||
public const uint STAT_HARVEST_RATE = 35;
|
||||
|
||||
public int[] castGauge_speed = new int[2];
|
||||
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 int[] command = new int[64];
|
||||
public int[] commandCategory = new int[64];
|
||||
public int commandBorder = 0x20;
|
||||
public bool commandAcquired = false;
|
||||
public bool[] additionalCommandAcquired = new bool[1];
|
||||
public uint[] command = new uint[64]; //ACTORS
|
||||
public byte[] commandCategory = new byte[64];
|
||||
public byte commandBorder = 0x20;
|
||||
public bool[] commandAcquired = new bool[4096];
|
||||
public bool[] additionalCommandAcquired = new bool[36];
|
||||
|
||||
public uint currentContentGroup;
|
||||
public uint depictionJudge = 0xa0f50911;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,12 +46,15 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
public uint currentLockedTarget = 0xC0000000;
|
||||
|
||||
public uint currentActorIcon = 0;
|
||||
|
||||
public CharaWork charaWork = new CharaWork();
|
||||
public PlayerWork playerWork = new PlayerWork();
|
||||
|
||||
public Character(uint actorId) : base(actorId)
|
||||
{
|
||||
public Work work = new Work();
|
||||
public CharaWork charaWork = new CharaWork();
|
||||
|
||||
public Character(uint actorID) : base(actorID)
|
||||
{
|
||||
//Init timer array to "notimer"
|
||||
for (int i = 0; i < charaWork.statusShownTime.Length; i++)
|
||||
charaWork.statusShownTime[i] = 0xFFFFFFFF;
|
||||
}
|
||||
|
||||
public SubPacket createAppearancePacket(uint playerActorId)
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
class EventSave
|
||||
{
|
||||
public bool bazaar;
|
||||
public float bazaarTax;
|
||||
public int repairType;
|
||||
public byte bazaarTax;
|
||||
public byte repairType;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,19 +8,30 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
{
|
||||
class ParameterSave
|
||||
{
|
||||
public int[] hp = new int[1];
|
||||
public int[] hpMax = new int[1];
|
||||
public int mp;
|
||||
public int mpMax;
|
||||
public short[] hp = new short[8];
|
||||
public short[] hpMax = new short[8];
|
||||
public short mp;
|
||||
public short mpMax;
|
||||
|
||||
public int[] state_mainSkill = new int[4];
|
||||
public int state_mainSkillLevel;
|
||||
public byte[] state_mainSkill = new byte[4];
|
||||
public ushort state_mainSkillLevel;
|
||||
|
||||
public int[] state_boostPointForSkill;
|
||||
public byte[] state_boostPointForSkill = new byte[4];
|
||||
|
||||
public uint[] commandSlot_recastTime = new uint[40];
|
||||
public bool[] commandSlot_compatibility = new bool[40];
|
||||
|
||||
public int[] commandSlot_compatibility;
|
||||
public int[] commandSlot_recastTime;
|
||||
public ushort[] giftCommandSlot_commandId = new ushort[10];
|
||||
|
||||
public int[] giftCommandSlot_commandId;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,16 +8,16 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
{
|
||||
class ParameterTemp
|
||||
{
|
||||
public int tp = 0;
|
||||
public short tp = 0;
|
||||
|
||||
public int targetInformation = 0;
|
||||
|
||||
public int[] maxCommandRecastTime = new int[40];
|
||||
public ushort[] maxCommandRecastTime = new ushort[40];
|
||||
|
||||
public float[] forceControl_float_forClientSelf = new float[4];
|
||||
public short[] forceControl_int16_forClientSelf = new short[2];
|
||||
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];
|
||||
}
|
||||
}
|
||||
|
|
19
FFXIVClassic Map Server/actors/chara/Work.cs
Normal file
19
FFXIVClassic Map Server/actors/chara/Work.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
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 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];
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
using FFXIVClassic_Lobby_Server;
|
||||
using FFXIVClassic_Lobby_Server.common;
|
||||
using FFXIVClassic_Lobby_Server.dataobjects;
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
|
@ -30,35 +29,6 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara.npc
|
|||
if (initParams.Length != 0)
|
||||
this.classParams = LuaUtils.readLuaParams(initParams);
|
||||
|
||||
setPlayerAppearance();
|
||||
}
|
||||
|
||||
public void setPlayerAppearance()
|
||||
{
|
||||
DBAppearance appearance = Database.getAppearance(false, actorId);
|
||||
|
||||
if (appearance == null)
|
||||
return;
|
||||
|
||||
modelId = DBAppearance.getTribeModel(appearance.tribe);
|
||||
appearanceIds[SIZE] = appearance.size;
|
||||
appearanceIds[COLORINFO] = (uint)(appearance.skinColor | (appearance.hairColor << 10) | (appearance.eyeColor << 20));
|
||||
appearanceIds[FACEINFO] = PrimitiveConversion.ToUInt32(appearance.getFaceInfo());
|
||||
appearanceIds[HIGHLIGHT_HAIR] = (uint)(appearance.hairHighlightColor | appearance.hairStyle << 10);
|
||||
appearanceIds[VOICE] = appearance.voice;
|
||||
appearanceIds[WEAPON1] = appearance.mainHand;
|
||||
appearanceIds[WEAPON2] = appearance.offHand;
|
||||
appearanceIds[HEADGEAR] = appearance.head;
|
||||
appearanceIds[BODYGEAR] = appearance.body;
|
||||
appearanceIds[LEGSGEAR] = appearance.legs;
|
||||
appearanceIds[HANDSGEAR] = appearance.hands;
|
||||
appearanceIds[FEETGEAR] = appearance.feet;
|
||||
appearanceIds[WAISTGEAR] = appearance.waist;
|
||||
appearanceIds[R_EAR] = appearance.rightEar;
|
||||
appearanceIds[L_EAR] = appearance.leftEar;
|
||||
appearanceIds[R_FINGER] = appearance.rightFinger;
|
||||
appearanceIds[L_FINGER] = appearance.leftFinger;
|
||||
|
||||
}
|
||||
|
||||
public override BasePacket getInitPackets(uint playerActorId)
|
||||
|
|
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;
|
||||
}
|
||||
}
|
|
@ -1,10 +1,11 @@
|
|||
using FFXIVClassic_Lobby_Server;
|
||||
using FFXIVClassic_Lobby_Server.common;
|
||||
using FFXIVClassic_Lobby_Server.dataobjects;
|
||||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.dataobjects.database;
|
||||
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;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -39,7 +40,23 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
|
||||
public uint[] timers = new uint[20];
|
||||
|
||||
PlayerWork playerWork = new PlayerWork();
|
||||
public ushort currentJob;
|
||||
|
||||
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;
|
||||
|
||||
public PlayerWork playerWork = new PlayerWork();
|
||||
|
||||
public Player(uint actorID) : base(actorID)
|
||||
{
|
||||
|
@ -47,58 +64,54 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
className = "Player";
|
||||
currentSubState = SetActorStatePacket.SUB_STATE_PLAYER;
|
||||
|
||||
DBStats stats = Database.getCharacterStats(actorID);
|
||||
|
||||
charaWork.property[0] = 1;
|
||||
charaWork.property[1] = 1;
|
||||
charaWork.property[2] = 1;
|
||||
charaWork.property[4] = 1;
|
||||
charaWork.property[4] = 1;
|
||||
|
||||
charaWork.parameterSave.hp[0] = stats.hp;
|
||||
charaWork.parameterSave.hpMax[0] = stats.hpMax;
|
||||
charaWork.parameterSave.mp = stats.mp;
|
||||
charaWork.parameterSave.mpMax = stats.mpMax;
|
||||
charaWork.command[0] = 0xA0F00000 | 21001;
|
||||
charaWork.command[1] = 0xA0F00000 | 21002;
|
||||
charaWork.command[2] = 0xA0F00000 | 12003;
|
||||
charaWork.command[3] = 0xA0F00000 | 12004;
|
||||
charaWork.command[4] = 0xA0F00000 | 21005;
|
||||
charaWork.command[5] = 0xA0F00000 | 21006;
|
||||
charaWork.command[6] = 0xA0F00000 | 21007;
|
||||
charaWork.command[7] = 0xA0F00000 | 12009;
|
||||
charaWork.command[8] = 0xA0F00000 | 12010;
|
||||
charaWork.command[9] = 0xA0F00000 | 12005;
|
||||
charaWork.command[10] = 0xA0F00000 | 12007;
|
||||
charaWork.command[11] = 0xA0F00000 | 12011;
|
||||
charaWork.command[12] = 0xA0F00000 | 22012;
|
||||
charaWork.command[13] = 0xA0F00000 | 22013;
|
||||
charaWork.command[14] = 0xA0F00000 | 29497;
|
||||
charaWork.command[15] = 0xA0F00000 | 22015;
|
||||
|
||||
charaWork.parameterSave.state_mainSkill[0] = 3;
|
||||
charaWork.parameterSave.state_mainSkillLevel = 1;
|
||||
charaWork.command[32] = 0xA0F00000 | 27155;
|
||||
//charaWork.command[33] = 0xA0F00000 | 27150;
|
||||
charaWork.command[34] = 0xA0F00000 | 27300;
|
||||
|
||||
charaWork.battleSave.skillLevel = 1;
|
||||
charaWork.battleSave.skillLevelCap = 2;
|
||||
charaWork.battleSave.potencial = 0.5f;
|
||||
charaWork.battleSave.physicalExp = 1;
|
||||
charaWork.battleSave.negotiationFlag[0] = false;
|
||||
charaWork.battleSave.negotiationFlag[1] = false;
|
||||
charaWork.commandAcquired[27150 - 26000] = true;
|
||||
|
||||
for (int i = 0; i < 20; i++)
|
||||
charaWork.statusShownTime[i] = 0xFFFFFFFF;
|
||||
playerWork.questScenarioComplete[110001 - 110001] = true;
|
||||
playerWork.questGuildleveComplete[120050 - 120001] = true;
|
||||
|
||||
for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++ )
|
||||
charaWork.additionalCommandAcquired[i] = true;
|
||||
|
||||
setPlayerAppearance();
|
||||
for (int i = 0; i < charaWork.commandCategory.Length; i++)
|
||||
charaWork.commandCategory[i] = 1;
|
||||
|
||||
charaWork.battleTemp.generalParameter[3] = 1;
|
||||
|
||||
|
||||
charaWork.eventSave.bazaarTax = 5;
|
||||
charaWork.battleSave.potencial = 6.6f;
|
||||
|
||||
charaWork.commandBorder = 0x20;
|
||||
|
||||
Database.loadPlayerCharacter(this);
|
||||
}
|
||||
|
||||
public void setPlayerAppearance()
|
||||
{
|
||||
DBAppearance appearance = Database.getAppearance(true, actorId);
|
||||
|
||||
modelId = DBAppearance.getTribeModel(appearance.tribe);
|
||||
appearanceIds[SIZE] = appearance.size;
|
||||
appearanceIds[COLORINFO] = (uint)(appearance.skinColor | (appearance.hairColor << 10) | (appearance.eyeColor << 20));
|
||||
appearanceIds[FACEINFO] = PrimitiveConversion.ToUInt32(appearance.getFaceInfo());
|
||||
appearanceIds[HIGHLIGHT_HAIR] = (uint)(appearance.hairHighlightColor | appearance.hairStyle << 10);
|
||||
appearanceIds[VOICE] = appearance.voice;
|
||||
appearanceIds[WEAPON1] = appearance.mainHand;
|
||||
appearanceIds[WEAPON2] = appearance.offHand;
|
||||
appearanceIds[HEADGEAR] = appearance.head;
|
||||
appearanceIds[BODYGEAR] = appearance.body;
|
||||
appearanceIds[LEGSGEAR] = appearance.legs;
|
||||
appearanceIds[HANDSGEAR] = appearance.hands;
|
||||
appearanceIds[FEETGEAR] = appearance.feet;
|
||||
appearanceIds[WAISTGEAR] = appearance.waist;
|
||||
appearanceIds[R_EAR] = appearance.rightEar;
|
||||
appearanceIds[L_EAR] = appearance.leftEar;
|
||||
appearanceIds[R_FINGER] = appearance.rightFinger;
|
||||
appearanceIds[L_FINGER] = appearance.leftFinger;
|
||||
}
|
||||
|
||||
|
||||
public List<SubPacket> create0x132Packets(uint playerActorId)
|
||||
{
|
||||
List<SubPacket> packets = new List<SubPacket>();
|
||||
|
@ -125,7 +138,7 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
public override BasePacket getInitPackets(uint playerActorId)
|
||||
public override BasePacket getSpawnPackets(uint playerActorId)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
|
@ -141,14 +154,214 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
subpackets.Add(createInitStatusPacket(playerActorId));
|
||||
subpackets.Add(createSetActorIconPacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
subpackets.Add(createScriptBindPacket(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(Database.getLatestAchievements(this));
|
||||
subpackets.Add(Database.getAchievementsPacket(this));
|
||||
|
||||
/*
|
||||
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);
|
||||
|
||||
propPacketUtil.addProperty("charaWork.eventSave.bazaarTax");
|
||||
propPacketUtil.addProperty("charaWork.battleSave.potencial");
|
||||
|
||||
//Properties
|
||||
for (int i = 0; i < charaWork.property.Length; i++)
|
||||
{
|
||||
if (charaWork.property[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.property[{0}]", i));
|
||||
}
|
||||
|
||||
//Parameters
|
||||
propPacketUtil.addProperty("charaWork.parameterSave.hp[0]");
|
||||
propPacketUtil.addProperty("charaWork.parameterSave.hpMax[0]");
|
||||
propPacketUtil.addProperty("charaWork.parameterSave.mp");
|
||||
propPacketUtil.addProperty("charaWork.parameterSave.mpMax");
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.tp");
|
||||
propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkill[0]");
|
||||
propPacketUtil.addProperty("charaWork.parameterSave.state_mainSkillLevel");
|
||||
|
||||
//Status Times
|
||||
for (int i = 0; i < charaWork.statusShownTime.Length; i++)
|
||||
{
|
||||
if (charaWork.statusShownTime[i] != 0xFFFFFFFF)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.statusShownTime[{0}]", i));
|
||||
}
|
||||
|
||||
//General Parameters
|
||||
for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++)
|
||||
{
|
||||
if (charaWork.battleTemp.generalParameter[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
||||
}
|
||||
|
||||
propPacketUtil.addProperty("charaWork.battleTemp.castGauge_speed[0]");
|
||||
propPacketUtil.addProperty("charaWork.battleTemp.castGauge_speed[1]");
|
||||
|
||||
//Battle Save Skillpoint
|
||||
|
||||
//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));
|
||||
}
|
||||
*/
|
||||
|
||||
//System
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[0]");
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_float_forClientSelf[1]");
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[0]");
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.forceControl_int16_forClientSelf[1]");
|
||||
|
||||
charaWork.parameterTemp.otherClassAbilityCount[0] = 4;
|
||||
charaWork.parameterTemp.otherClassAbilityCount[1] = 5;
|
||||
charaWork.parameterTemp.giftCount[1] = 5;
|
||||
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.otherClassAbilityCount[0]");
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.otherClassAbilityCount[1]");
|
||||
propPacketUtil.addProperty("charaWork.parameterTemp.giftCount[1]");
|
||||
|
||||
propPacketUtil.addProperty("charaWork.depictionJudge");
|
||||
|
||||
//Scenario
|
||||
for (int i = 0; i < playerWork.questScenario.Length; i++)
|
||||
{
|
||||
if (playerWork.questScenario[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("playerWork.questScenario[{0}]", i));
|
||||
}
|
||||
|
||||
//Guildleve - Local
|
||||
for (int i = 0; i < playerWork.questGuildleve.Length; i++)
|
||||
{
|
||||
if (playerWork.questGuildleve[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("playerWork.questGuildleve[{0}]", i));
|
||||
}
|
||||
|
||||
//Guildleve - Regional
|
||||
for (int i = 0; i < work.guildleveId.Length; i++)
|
||||
{
|
||||
if (work.guildleveId[i] != 0)
|
||||
propPacketUtil.addProperty(String.Format("work.guildleveId[{0}]", i));
|
||||
if (work.guildleveDone[i] != false)
|
||||
propPacketUtil.addProperty(String.Format("work.guildleveDone[{0}]", i));
|
||||
if (work.guildleveChecked[i] != false)
|
||||
propPacketUtil.addProperty(String.Format("work.guildleveChecked[{0}]", i));
|
||||
}
|
||||
|
||||
//NPC Linkshell
|
||||
for (int i = 0; i < playerWork.npcLinkshellChatCalling.Length; i++)
|
||||
{
|
||||
if (playerWork.npcLinkshellChatCalling[i] != false)
|
||||
propPacketUtil.addProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", i));
|
||||
if (playerWork.npcLinkshellChatExtra[i] != false)
|
||||
propPacketUtil.addProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", i));
|
||||
}
|
||||
|
||||
propPacketUtil.addProperty("playerWork.restBonusExpRate");
|
||||
|
||||
//Profile
|
||||
propPacketUtil.addProperty("playerWork.tribe");
|
||||
propPacketUtil.addProperty("playerWork.guardian");
|
||||
propPacketUtil.addProperty("playerWork.birthdayMonth");
|
||||
propPacketUtil.addProperty("playerWork.birthdayDay");
|
||||
propPacketUtil.addProperty("playerWork.initialTown");
|
||||
|
||||
return propPacketUtil.done();
|
||||
}
|
||||
|
||||
public bool isMyPlayer(uint otherActorId)
|
||||
{
|
||||
return actorId == otherActorId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,19 +8,19 @@ 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 float restBonusExpRate = 1.5f;
|
||||
|
||||
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;
|
||||
public bool[] questScenarioComplete = new bool[2048];
|
||||
public bool[] questGuildleveComplete = new bool[2048];
|
||||
|
||||
public bool isContentsCommand;
|
||||
|
||||
|
@ -28,24 +28,24 @@ namespace FFXIVClassic_Map_Server.dataobjects.chara
|
|||
public int castEndClient;
|
||||
|
||||
public int[] comboNextCommandId = new int[2];
|
||||
public int comboCostBonusRate;
|
||||
public float comboCostBonusRate;
|
||||
|
||||
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;
|
||||
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;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
47
FFXIVClassic Map Server/actors/debug/Debug.cs
Normal file
47
FFXIVClassic Map Server/actors/debug/Debug.cs
Normal file
|
@ -0,0 +1,47 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.actors.debug
|
||||
{
|
||||
class DebugProg : Actor
|
||||
{
|
||||
|
||||
public DebugProg()
|
||||
: base(0x5FF80002)
|
||||
{
|
||||
this.displayNameId = 0;
|
||||
this.customDisplayName = "debug";
|
||||
|
||||
this.actorName = "debug";
|
||||
this.className = "Debug";
|
||||
}
|
||||
|
||||
public override SubPacket createScriptBindPacket(uint playerActorId)
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
lParams = LuaUtils.createLuaParamList("/System/Debug.prog", false, false, false, false, true, 0xC51F, true, true);
|
||||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
public override BasePacket getSpawnPackets(uint playerActorId)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
subpackets.Add(createSpeedPacket(playerActorId));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1));
|
||||
subpackets.Add(createNamePacket(playerActorId));
|
||||
subpackets.Add(createStatePacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
subpackets.Add(createScriptBindPacket(playerActorId));
|
||||
return BasePacket.createPacket(subpackets, true, false);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
49
FFXIVClassic Map Server/actors/director/WeatherDirector.cs
Normal file
49
FFXIVClassic Map Server/actors/director/WeatherDirector.cs
Normal file
|
@ -0,0 +1,49 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.actors.director
|
||||
{
|
||||
class WeatherDirector : Actor
|
||||
{
|
||||
private uint weatherId;
|
||||
|
||||
public WeatherDirector(uint weatherId, Zone zone)
|
||||
: base(0x5FF80002)
|
||||
{
|
||||
this.weatherId = weatherId;
|
||||
|
||||
this.displayNameId = 0;
|
||||
this.customDisplayName = String.Format("weatherDire_{0}", zone.zoneName, zone.actorId);
|
||||
|
||||
this.actorName = String.Format("weatherDire_{0}@{0:04x}", zone.zoneName, zone.actorId);
|
||||
this.className = "Debug";
|
||||
}
|
||||
|
||||
public override SubPacket createScriptBindPacket(uint playerActorId)
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
lParams = LuaUtils.createLuaParamList("/Director/Weather/WeatherDirector", false, false, false, false, weatherId);
|
||||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
public override BasePacket getSpawnPackets(uint playerActorId)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
subpackets.Add(createSpeedPacket(playerActorId));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1));
|
||||
subpackets.Add(createNamePacket(playerActorId));
|
||||
subpackets.Add(createStatePacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
subpackets.Add(createScriptBindPacket(playerActorId));
|
||||
return BasePacket.createPacket(subpackets, true, false);
|
||||
}
|
||||
}
|
||||
}
|
44
FFXIVClassic Map Server/actors/world/WorldMaster.cs
Normal file
44
FFXIVClassic Map Server/actors/world/WorldMaster.cs
Normal file
|
@ -0,0 +1,44 @@
|
|||
using FFXIVClassic_Lobby_Server.packets;
|
||||
using FFXIVClassic_Map_Server.dataobjects;
|
||||
using FFXIVClassic_Map_Server.lua;
|
||||
using FFXIVClassic_Map_Server.packets.send.actor;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace FFXIVClassic_Map_Server.actors.world
|
||||
{
|
||||
class WorldMaster : Actor
|
||||
{
|
||||
public WorldMaster() : base(0x5FF80001)
|
||||
{
|
||||
this.displayNameId = 0;
|
||||
this.customDisplayName = "worldMaster";
|
||||
|
||||
this.actorName = "worldMaster";
|
||||
this.className = "WorldMaster";
|
||||
}
|
||||
|
||||
public override SubPacket createScriptBindPacket(uint playerActorId)
|
||||
{
|
||||
List<LuaParam> lParams;
|
||||
lParams = LuaUtils.createLuaParamList("/World/WorldMaster_event", false, false, false, false, false, null);
|
||||
return ActorInstantiatePacket.buildPacket(actorId, playerActorId, actorName, className, lParams);
|
||||
}
|
||||
|
||||
public override BasePacket getSpawnPackets(uint playerActorId)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
subpackets.Add(createAddActorPacket(playerActorId));
|
||||
subpackets.Add(createSpeedPacket(playerActorId));
|
||||
subpackets.Add(createSpawnPositonPacket(playerActorId, 0x1));
|
||||
subpackets.Add(createNamePacket(playerActorId));
|
||||
subpackets.Add(createStatePacket(playerActorId));
|
||||
subpackets.Add(createIsZoneingPacket(playerActorId));
|
||||
subpackets.Add(createScriptBindPacket(playerActorId));
|
||||
return BasePacket.createPacket(subpackets, true, false);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue