Cleaned up namespaces (still have to do Map Project) and removed references to FFXIV Classic from the code. Removed the Launcher Editor project as it is no longer needed (host file editing is cleaner).

This commit is contained in:
Filip Maj 2019-06-19 00:05:18 -04:00
parent 7587a6e142
commit 0f61c4c0e1
544 changed files with 54548 additions and 55498 deletions

View 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 FFXIVClassic_Map_Server.packets.send.search
{
class ItemSearchClosePacket
{
public const ushort OPCODE = 0x01E1;
public const uint PACKET_SIZE = 0x028;
public static SubPacket BuildPacket(uint sourceActorId, bool isSuccess, string nameToAdd)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -0,0 +1,31 @@
/*
===========================================================================
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/>.
===========================================================================
*/
namespace FFXIVClassic_Map_Server.packets.send.search
{
class ItemSearchResult
{
public uint itemId;
public uint numItems;
}
}

View 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 FFXIVClassic_Map_Server.packets.send.search
{
class ItemSearchResultsBeginPacket
{
public const ushort OPCODE = 0x01D7;
public const uint PACKET_SIZE = 0x028;
public static SubPacket BuildPacket(uint sourceActorId, bool isSuccess, string nameToAdd)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -0,0 +1,63 @@
/*
===========================================================================
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.IO;
using System;
using Meteor.Common;
using System.Collections.Generic;
namespace FFXIVClassic_Map_Server.packets.send.search
{
class ItemSearchResultsBodyPacket
{
public const ushort OPCODE = 0x01D8;
public const uint PACKET_SIZE = 0x228;
public static SubPacket BuildPacket(uint sourceActorId, List<ItemSearchResult> itemSearchResult, ref int listOffset)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
int max;
if (itemSearchResult.Count - listOffset <= 64)
max = itemSearchResult.Count - listOffset;
else
max = 64;
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Write((UInt32)max);
foreach (ItemSearchResult item in itemSearchResult)
binWriter.Write((UInt32)item.itemId);
binWriter.Seek(0x104, SeekOrigin.Begin);
foreach (ItemSearchResult item in itemSearchResult)
binWriter.Write((UInt32)item.numItems);
}
}
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View 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 FFXIVClassic_Map_Server.packets.send.search
{
class ItemSearchResultsEndPacket
{
public const ushort OPCODE = 0x01D9;
public const uint PACKET_SIZE = 0x028;
public static SubPacket BuildPacket(uint sourceActorId, bool isSuccess, string nameToAdd)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -0,0 +1,76 @@
/*
===========================================================================
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.IO;
using System.Text;
using Meteor.Common;
using System;
namespace FFXIVClassic_Map_Server.packets.send.search
{
class PlayerSearchCommentResultPacket
{
public const ushort OPCODE = 0x01E0;
public const uint PACKET_SIZE = 0x288;
public static SubPacket BuildPacket(uint sourceActorId, uint searchSessionId, byte resultCode, PlayerSearchResult[] results, ref int offset)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
byte count = 0;
for (int i = offset; i < results.Length; i++)
{
int size = 3 + (Encoding.ASCII.GetByteCount(results[i].comment) >= 597 ? 596 : Encoding.ASCII.GetByteCount(results[i].comment));
if (size >= 600)
break;
count++;
}
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
for (int i = offset; i < count; i++)
{
binWriter.Write((UInt32)searchSessionId);
binWriter.Write((Byte)count);
binWriter.Seek(1, SeekOrigin.Current);
binWriter.Write((Byte)resultCode);
binWriter.Seek(4, SeekOrigin.Current);
binWriter.Write((Byte)i);
binWriter.Write((UInt16)(Encoding.ASCII.GetByteCount(results[i].comment) >= 597 ? 596 : Encoding.ASCII.GetByteCount(results[i].comment)));
binWriter.Write(Encoding.ASCII.GetBytes(results[i].comment), 0, Encoding.ASCII.GetByteCount(results[i].comment) >= 597 ? 596 : Encoding.ASCII.GetByteCount(results[i].comment));
}
}
}
offset += count;
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -0,0 +1,76 @@
/*
===========================================================================
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.IO;
using System.Text;
using Meteor.Common;
using System;
namespace FFXIVClassic_Map_Server.packets.send.search
{
class PlayerSearchInfoResultPacket
{
public const ushort OPCODE = 0x01DF;
public const uint PACKET_SIZE = 0x3C8;
public static SubPacket BuildPacket(uint sourceActorId, uint searchSessionId, byte resultCode, PlayerSearchResult[] results, ref int offset)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
byte count;
if (results.Length - offset < 8)
count = (byte)(results.Length - offset);
else
count = 8;
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
for (int i = offset; i < count; i++)
{
long start = binWriter.BaseStream.Position;
binWriter.Write((Byte)results[i].preferredClass);
binWriter.Write((Byte)0);
binWriter.Write((Byte)results[i].clientLanguage);
binWriter.Write((UInt16)results[i].currentZone);
binWriter.Write((Byte)results[i].initialTown);
binWriter.Write((Byte)0);
binWriter.Write((Byte)results[i].status);
binWriter.Write((Byte)results[i].currentClass);
binWriter.Write((Byte)0);
binWriter.Write(Encoding.ASCII.GetBytes(results[i].name), 0, Encoding.ASCII.GetByteCount(results[i].name) >= 0x20 ? 0x20 : Encoding.ASCII.GetByteCount(results[i].name));
binWriter.Seek((int)(start + 30), SeekOrigin.Begin);
//classes
binWriter.Seek((int)(start + 30 + 20), SeekOrigin.Begin);
//jobs
}
}
}
offset += count;
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -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/>.
===========================================================================
*/
namespace FFXIVClassic_Map_Server.packets.send.search
{
class PlayerSearchResult
{
public string name;
public string comment;
public byte preferredClass;
public byte clientLanguage;
public byte initialTown;
public byte status;
public byte currentClass;
public ushort currentZone;
}
}

View file

@ -0,0 +1,46 @@
/*
===========================================================================
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.IO;
using Meteor.Common;
namespace FFXIVClassic_Map_Server.packets.send.search
{
class RetainerResultBodyPacket
{
public const ushort OPCODE = 0x01DB;
public const uint PACKET_SIZE = 0x028;
public static SubPacket BuildPacket(uint sourceActorId, bool isSuccess, string nameToAdd)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
}
}
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -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 FFXIVClassic_Map_Server.packets.send.search
{
class RetainerResultEndPacket
{
public const ushort OPCODE = 0x01DA;
public const uint PACKET_SIZE = 0x038;
public static SubPacket BuildPacket(uint sourceActorId, bool isSuccess)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
data[16] = (byte) (isSuccess ? 1 : 0);
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -0,0 +1,37 @@
/*
===========================================================================
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 FFXIVClassic_Map_Server.packets.send.search
{
class RetainerResultUpdatePacket
{
public const ushort OPCODE = 0x01DC;
public const uint PACKET_SIZE = 0x028;
public static SubPacket BuildPacket(uint sourceActorId, bool isSuccess, string nameToAdd)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -0,0 +1,59 @@
/*
===========================================================================
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;
namespace FFXIVClassic_Map_Server.packets.send.search
{
class RetainerSearchHistoryPacket
{
public const ushort OPCODE = 0x01DD;
public const uint PACKET_SIZE = 0x120;
public static SubPacket BuildPacket(uint sourceActorId, byte count, bool hasEnded)
{
byte[] data = new byte[PACKET_SIZE - 0x20];
using (MemoryStream mem = new MemoryStream(data))
{
using (BinaryWriter binWriter = new BinaryWriter(mem))
{
binWriter.Seek(0x12, SeekOrigin.Begin);
binWriter.Write((UInt16)count);
binWriter.Write((Byte)(hasEnded ? 2 : 0));
for (int i = 0; i < count; i++)
{
binWriter.Seek(0x10 + (0x80 * i), SeekOrigin.Begin);
RetainerSearchHistoryResult result = null;
binWriter.Write((UInt32)result.timestamp);
binWriter.Write((UInt16)0);
binWriter.Write((UInt16)result.quanitiy);
binWriter.Write((UInt32)result.gilCostPerItem);
binWriter.Write((Byte)result.numStack);
}
}
}
return new SubPacket(OPCODE, sourceActorId, data);
}
}
}

View file

@ -0,0 +1,31 @@
/*
===========================================================================
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/>.
===========================================================================
*/
namespace FFXIVClassic_Map_Server.packets.send.search
{
class RetainerSearchHistoryResult
{
public uint timestamp;
public ushort quanitiy;
public uint gilCostPerItem;
public byte numStack;
}
}

View file

@ -0,0 +1,36 @@
/*
===========================================================================
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/>.
===========================================================================
*/
namespace FFXIVClassic_Map_Server.packets.send.search
{
class RetainerSearchResult
{
public uint itemId;
public uint marketWard;
public uint gilCostPerItem;
public uint quantity;
public byte numStack;
public byte quality;
public string sellerRetainerName;
public byte[] materiaType = new byte[5];
public byte[] materiaGrade = new byte[5];
}
}