mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-05-20 08:26:59 -04:00
Updated Map Server namespace. Moved all other data folders (www and sql) to data folder. Renamed boot name to Project Meteor.
This commit is contained in:
38
Map Server/Packets/Send/Player/AchievementEarnedPacket.cs
Normal file
38
Map Server/Packets/Send/Player/AchievementEarnedPacket.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class AchievementEarnedPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x019E;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint achievementID)
|
||||
{
|
||||
return new SubPacket(OPCODE, sourceActorId, BitConverter.GetBytes((UInt64)achievementID));
|
||||
}
|
||||
}
|
||||
}
|
50
Map Server/Packets/Send/Player/GenericDataPacket.cs
Normal file
50
Map Server/Packets/Send/Player/GenericDataPacket.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Map.lua;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class GenericDataPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0133;
|
||||
public const uint PACKET_SIZE = 0xE0;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, List<LuaParam> luaParams)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
LuaUtils.WriteLuaParams(binWriter, luaParams);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
51
Map Server/Packets/Send/Player/SendAchievementRatePacket.cs
Normal file
51
Map Server/Packets/Send/Player/SendAchievementRatePacket.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SendAchievementRatePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x019F;
|
||||
public const uint PACKET_SIZE = 0x30;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint achievementId, uint progressCount, uint progressFlags)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt32)achievementId);
|
||||
binWriter.Write((UInt32)progressCount);
|
||||
binWriter.Write((UInt32)progressFlags);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
38
Map Server/Packets/Send/Player/SetAchievementPointsPacket.cs
Normal file
38
Map Server/Packets/Send/Player/SetAchievementPointsPacket.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetAchievementPointsPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x019C;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint numAchievementPoints)
|
||||
{
|
||||
return new SubPacket(OPCODE, sourceActorId, BitConverter.GetBytes((UInt64) numAchievementPoints));
|
||||
}
|
||||
}
|
||||
}
|
40
Map Server/Packets/Send/Player/SetChocoboNamePacket.cs
Normal file
40
Map Server/Packets/Send/Player/SetChocoboNamePacket.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System.Text;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetChocoboNamePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0198;
|
||||
public const uint PACKET_SIZE = 0x40;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, string name)
|
||||
{
|
||||
if (Encoding.Unicode.GetByteCount(name) >= 0x20)
|
||||
name = "ERR: Too Long";
|
||||
return new SubPacket(OPCODE, sourceActorId, Encoding.ASCII.GetBytes(name));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Common;
|
||||
using System.IO;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetCompletedAchievementsPacket
|
||||
{
|
||||
//Achievenments are +1 and up, except for Quests and GCs which is +2
|
||||
public const int CATEGORY_BATTLE = 000;
|
||||
public const int CATEGORY_CHARACTER = 050;
|
||||
public const int CATEGORY_CURRENCY = 200;
|
||||
public const int CATEGORY_ITEMS = 250;
|
||||
public const int CATEGORY_SYNTHESIS = 300;
|
||||
public const int CATEGORY_GATHERING = 400;
|
||||
public const int CATEGORY_MATERIA = 550;
|
||||
public const int CATEGORY_QUESTS = 600;
|
||||
public const int CATEGORY_SEASONAL_EVENTS = 700;
|
||||
public const int CATEGORY_DUNGEONS = 750;
|
||||
public const int CATEGORY_EXPLORATION = 800;
|
||||
public const int CATEGORY_GRAND_COMPANY = 820;
|
||||
|
||||
public const ushort OPCODE = 0x019A;
|
||||
public const uint PACKET_SIZE = 0xA0;
|
||||
|
||||
public bool[] achievementFlags = new bool[1024];
|
||||
|
||||
public SubPacket BuildPacket(uint sourceActorId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
byte[] binStream = Utils.ConvertBoolArrayToBinaryStream(achievementFlags);
|
||||
if (binStream.Length <= PACKET_SIZE - 0x20)
|
||||
binWriter.Write(binStream);
|
||||
else
|
||||
Program.Log.Error("Failed making SetCompletedAchievements packet. Bin Stream was too big!");
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
38
Map Server/Packets/Send/Player/SetCurrentJobPacket.cs
Normal file
38
Map Server/Packets/Send/Player/SetCurrentJobPacket.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetCurrentJobPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x01A4;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint jobId)
|
||||
{
|
||||
return new SubPacket(OPCODE, sourceActorId, BitConverter.GetBytes((uint)jobId));
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetCurrentMountChocoboPacket
|
||||
{
|
||||
public const int CHOCOBO_NORMAL = 0;
|
||||
|
||||
public const int CHOCOBO_LIMSA1 = 0x1;
|
||||
public const int CHOCOBO_LIMSA2 = 0x2;
|
||||
public const int CHOCOBO_LIMSA3 = 0x3;
|
||||
public const int CHOCOBO_LIMSA4 = 0x4;
|
||||
|
||||
public const int CHOCOBO_GRIDANIA1 = 0x1F;
|
||||
public const int CHOCOBO_GRIDANIA2 = 0x20;
|
||||
public const int CHOCOBO_GRIDANIA3 = 0x21;
|
||||
public const int CHOCOBO_GRIDANIA4 = 0x22;
|
||||
|
||||
public const int CHOCOBO_ULDAH1 = 0x3D;
|
||||
public const int CHOCOBO_ULDAH2 = 0x3E;
|
||||
public const int CHOCOBO_ULDAH3 = 0x3F;
|
||||
public const int CHOCOBO_ULDAH4 = 0x40;
|
||||
|
||||
public const ushort OPCODE = 0x0197;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, int appearanceId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
data[5] = (byte)(appearanceId & 0xFF);
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetCurrentMountGoobbuePacket
|
||||
{
|
||||
|
||||
public const ushort OPCODE = 0x01a0;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, int appearanceId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
data[0] = (byte)(appearanceId & 0xFF);
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
117
Map Server/Packets/Send/Player/SetCutsceneBookPacket.cs
Normal file
117
Map Server/Packets/Send/Player/SetCutsceneBookPacket.cs
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Common;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetCutsceneBookPacket
|
||||
{
|
||||
//Main Story
|
||||
public const int CATEGORY_MAINSTORY = 072;
|
||||
public const int CATEGORY_SIDEQUESTS1 = 672;
|
||||
public const int CATEGORY_SIDEQUESTS2 = 892;
|
||||
public const int CATEGORY_INSTANCED = 888;
|
||||
|
||||
//Other
|
||||
public const int OTHER_UGHAMARO = 005;
|
||||
public const int OTHER_NATALAN = 006;
|
||||
public const int OTHER_Z = 007;
|
||||
public const int OTHER_CASTRUMNOVUM = 008;
|
||||
public const int OTHER_NIGHTMARE = 014;
|
||||
|
||||
//Class Cutscenes
|
||||
public const int CATEGORY_PUG_QUESTS = 128;
|
||||
public const int CATEGORY_GLA_QUESTS = 148;
|
||||
public const int CATEGORY_MRD_QUESTS = 168;
|
||||
public const int CATEGORY_ARC_QUESTS = 188;
|
||||
public const int CATEGORY_LNC_QUESTS = 208;
|
||||
public const int CATEGORY_THM_QUESTS = 228;
|
||||
public const int CATEGORY_CNJ_QUESTS = 248;
|
||||
|
||||
//DoH/DoL Cutscenes
|
||||
public const int CATEGORY_CRP_QUESTS = 268;
|
||||
public const int CATEGORY_BSM_QUESTS = 288;
|
||||
public const int CATEGORY_GSM_QUESTS = 308;
|
||||
public const int CATEGORY_LTW_QUESTS = 328;
|
||||
public const int CATEGORY_WVR_QUESTS = 348;
|
||||
public const int CATEGORY_ALC_QUESTS = 368;
|
||||
public const int CATEGORY_CUL_QUESTS = 388;
|
||||
public const int CATEGORY_MIN_QUESTS = 408;
|
||||
public const int CATEGORY_BTN_QUESTS = 428;
|
||||
public const int CATEGORY_FSH_QUESTS = 448;
|
||||
|
||||
//Job Cutscenes
|
||||
public const int CATEGORY_WAR_QUESTS = 1272;
|
||||
public const int CATEGORY_MNK_QUESTS = 1292;
|
||||
public const int CATEGORY_WHM_QUESTS = 1312;
|
||||
public const int CATEGORY_BLM_QUESTS = 1332;
|
||||
public const int CATEGORY_PLD_QUESTS = 1352;
|
||||
public const int CATEGORY_BRD_QUESTS = 1372;
|
||||
public const int CATEGORY_DRG_QUESTS = 1392;
|
||||
|
||||
//GC Cutscenes
|
||||
public const int CATEGORY_MAELSTROM = 1472;
|
||||
public const int CATEGORY_ADDERS = 1672;
|
||||
public const int CATEGORY_FLAMES = 1872;
|
||||
|
||||
public const ushort OPCODE = 0x01A3;
|
||||
public const uint PACKET_SIZE = 0x150;
|
||||
|
||||
public bool[] cutsceneFlags = new bool[2048];
|
||||
|
||||
public SubPacket BuildPacket(uint sourceActorId, string sNpcName, short sNpcActorIdOffset, byte sNpcSkin, byte sNpcPersonality)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
byte[] binStream = Utils.ConvertBoolArrayToBinaryStream(cutsceneFlags);
|
||||
|
||||
//Temp Path Companion SNPC Stuff
|
||||
binWriter.Seek(0x01 ,SeekOrigin.Begin);
|
||||
binWriter.Write((Int16)2);
|
||||
binWriter.Write((Byte)0);
|
||||
binWriter.Write((Int16)sNpcActorIdOffset);
|
||||
binWriter.Write((Byte)sNpcSkin);
|
||||
binWriter.Write((Byte)sNpcPersonality);
|
||||
|
||||
if (binStream.Length <= PACKET_SIZE - 0x20)
|
||||
binWriter.Write(binStream);
|
||||
else
|
||||
Program.Log.Error("Failed making SetCutsceneBook packet. Bin Stream was too big!");
|
||||
|
||||
binWriter.Seek(0x109, SeekOrigin.Begin);
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(sNpcName), 0, Encoding.ASCII.GetByteCount(sNpcName) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(sNpcName));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
53
Map Server/Packets/Send/Player/SetGrandCompanyPacket.cs
Normal file
53
Map Server/Packets/Send/Player/SetGrandCompanyPacket.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.actor
|
||||
{
|
||||
class SetGrandCompanyPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0194;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, ushort currentAllegiance, ushort rankLimsa, ushort rankGridania, ushort rankUldah)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((Byte)currentAllegiance);
|
||||
binWriter.Write((Byte)rankLimsa);
|
||||
binWriter.Write((Byte)rankGridania);
|
||||
binWriter.Write((Byte)rankUldah);
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
38
Map Server/Packets/Send/Player/SetHasChocoboPacket.cs
Normal file
38
Map Server/Packets/Send/Player/SetHasChocoboPacket.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetHasChocoboPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0199;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, bool hasChocobo)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
data[0] = (byte)(hasChocobo ? 1 : 0);
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
38
Map Server/Packets/Send/Player/SetHasGoobbuePacket.cs
Normal file
38
Map Server/Packets/Send/Player/SetHasGoobbuePacket.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetHasGoobbuePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x01A1;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, bool hasGoobbue)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
data[0] = (byte)(hasGoobbue ? 1 : 0);
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetLatestAchievementsPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x019B;
|
||||
public const uint PACKET_SIZE = 0x40;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint[] latestAchievementIDs)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
//Had less than 5
|
||||
if (i > latestAchievementIDs.Length)
|
||||
break;
|
||||
binWriter.Write((UInt32)latestAchievementIDs[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
38
Map Server/Packets/Send/Player/SetPlayerDreamPacket.cs
Normal file
38
Map Server/Packets/Send/Player/SetPlayerDreamPacket.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Common;
|
||||
using System;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetPlayerDreamPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x01A7;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint dreamID)
|
||||
{
|
||||
dreamID += 0x20E;
|
||||
return new SubPacket(OPCODE, sourceActorId, BitConverter.GetBytes((uint)dreamID));
|
||||
}
|
||||
}
|
||||
}
|
47
Map Server/Packets/Send/Player/SetPlayerItemStoragePacket.cs
Normal file
47
Map Server/Packets/Send/Player/SetPlayerItemStoragePacket.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Common;
|
||||
using System.IO;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetPlayerItemStoragePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x01A5;
|
||||
public const uint PACKET_SIZE = 0x50;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x3F}); //All items enabled
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
38
Map Server/Packets/Send/Player/SetPlayerTitlePacket.cs
Normal file
38
Map Server/Packets/Send/Player/SetPlayerTitlePacket.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetPlayerTitlePacket
|
||||
{
|
||||
public const ushort OPCODE = 0x019D;
|
||||
public const uint PACKET_SIZE = 0x28;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint titleID)
|
||||
{
|
||||
return new SubPacket(OPCODE, sourceActorId, BitConverter.GetBytes((UInt64)titleID));
|
||||
}
|
||||
}
|
||||
}
|
50
Map Server/Packets/Send/Player/SetSpecialEventWorkPacket.cs
Normal file
50
Map Server/Packets/Send/Player/SetSpecialEventWorkPacket.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
using Meteor.Common;
|
||||
|
||||
namespace Meteor.Map.packets.send.player
|
||||
{
|
||||
class SetSpecialEventWorkPacket
|
||||
{
|
||||
public const ushort OPCODE = 0x0196;
|
||||
public const uint PACKET_SIZE = 0x38;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
using (MemoryStream mem = new MemoryStream(data))
|
||||
{
|
||||
using (BinaryWriter binWriter = new BinaryWriter(mem))
|
||||
{
|
||||
binWriter.Write((UInt16)0x00);
|
||||
binWriter.Write((UInt16)18); //Just set it to Bomb Festival to unlock Bombdance
|
||||
}
|
||||
}
|
||||
|
||||
return new SubPacket(OPCODE, sourceActorId, data);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user