Merge branch 'master' of https://github.com/EQEmu/Server into Mercs

Conflicts:
	changelog.txt
This commit is contained in:
badcaptain 2013-03-19 00:57:15 -04:00
commit f5e58e0125
28 changed files with 1977 additions and 167 deletions

View File

@ -1,9 +1,15 @@
EQEMu Changelog (Started on Sept 24, 2003 15:50)
-------------------------------------------------------
<<<<<<< HEAD
== 03/18/2013 ==
Bad_Captain: Fixed zone crash due to merc focus effects & tribute.
Bad_Captain: Fixed merc aggro issues when client in melee range & spell recast timers.
Bad_Captain: Added melee DPS spells/disciplines & support.
=======
== 03/17/2013 ==
Secrets: Fixed that pesky merc memleak.
Secrets: Bit of code cleanup regarding mercs.
>>>>>>> 5c9f2c0d50ca6920305999d9d3e1127be44238a4
== 03/15/2013 ==
Derision: RoF: Added ENCODE for Resurrect_struct (Accepting a rez should now work).

View File

@ -27,6 +27,9 @@
//#include "../common/item_struct.h"
static const uint32 BUFF_COUNT = 25;
static const uint32 MAX_MERC = 100;
static const uint32 MAX_MERC_GRADES = 10;
static const uint32 MAX_MERC_STANCES = 10;
static const uint32 BLOCKED_BUFF_COUNT = 20;
#include "eq_constants.h"
@ -4871,11 +4874,28 @@ struct ItemPreview_Struct
/*026*/ uint8 unknown026[54];
};
//Not an EQ packet, just a single int for the mercenary merchant structure.
struct MercenaryGrade_Struct {
uint32 GradeCountEntry;
// Used by specific packets
struct MercenaryList_Struct {
/*0000*/ uint32 MercID; // ID unique to each type of mercenary (probably a DB id)
/*0004*/ uint32 MercType; // From dbstr_us.txt - Apprentice (330000100), Journeyman (330000200), Master (330000300)
/*0008*/ uint32 MercSubType; // From dbstr_us.txt - 330020105^23^Race: Guktan<br>Type: Healer<br>Confidence: High<br>Proficiency: Apprentice, Tier V...
/*0012*/ uint32 PurchaseCost; // Purchase Cost (in gold)
/*0016*/ uint32 UpkeepCost; // Upkeep Cost (in gold)
/*0020*/ uint32 Status; // Required Account Status (Free = 0, Silver = 1, Gold = 2) at merchants - Seen 0 (suspended) or 1 (unsuspended) on hired mercs ?
/*0024*/ uint32 AltCurrencyCost; // Alternate Currency Purchase Cost? (all seen costs show N/A Bayle Mark) - Seen 0
/*0028*/ uint32 AltCurrencyUpkeep; // Alternate Currency Upkeep Cost? (all seen costs show 1 Bayle Mark) - Seen 1
/*0032*/ uint32 AltCurrencyType; // Alternate Currency Type? - 19^17^Bayle Mark^0 - Seen 19
/*0036*/ uint8 MercUnk01; // Unknown (always see 0)
/*0037*/ int32 TimeLeft; // Unknown (always see -1 at merchant) - Seen 900000 (15 minutes in ms for newly hired merc)
/*0041*/ uint32 MerchantSlot; // Merchant Slot? Increments, but not always by 1 - May be for Merc Window Options (Seen 5, 36, 1 for active mercs)?
/*0045*/ uint32 MercUnk02; // Unknown (normally see 1, but sometimes 2 or 0)
/*0049*/ uint32 StanceCount; // Iterations of MercenaryStance_Struct - Normally 2 to 4 seen
/*0053*/ int32 MercUnk03; // Unknown (always 0 at merchant) - Seen on active merc: 93 a4 03 77, b8 ed 2f 26, 88 d5 8b c3, and 93 a4 ad 77
/*0057*/ uint8 MercUnk04; // Seen 1
/*0058*/ char MercName[1]; // Null Terminated Mercenary Name (00 at merchants)
};
// Used by MercenaryMerchantList_Struct
struct MercenaryListEntry_Struct {
/*0000*/ uint32 MercID; // ID unique to each type of mercenary (probably a DB id)
@ -4895,7 +4915,7 @@ struct MercenaryListEntry_Struct {
/*0053*/ int32 MercUnk03; // Unknown (always 0 at merchant) - Seen on active merc: 93 a4 03 77, b8 ed 2f 26, 88 d5 8b c3, and 93 a4 ad 77
/*0057*/ uint8 MercUnk04; // Seen 1
/*0058*/ char MercName[1]; // Null Terminated Mercenary Name (00 at merchants)
/*0000*/ MercenaryStance_Struct* Stances; // Count Varies, but hard set to 5 max for now - From dbstr_us.txt - 1^24^Passive^0, 2^24^Balanced^0, etc (1 to 9 as of April 2012)
/*0000*/ MercenaryStance_Struct Stances[MAX_MERC_STANCES]; // Count Varies, but hard set to 5 max for now - From dbstr_us.txt - 1^24^Passive^0, 2^24^Balanced^0, etc (1 to 9 as of April 2012)
};
// [OPCode: 0x27ac OP_MercenaryDataResponse] On Live as of April 2 2012 [Server->Client]
@ -4903,9 +4923,9 @@ struct MercenaryListEntry_Struct {
// Sent by the server when browsing the Mercenary Merchant
struct MercenaryMerchantList_Struct {
/*0000*/ uint32 MercTypeCount; // Number of Merc Types to follow
/*0004*/ MercenaryGrade_Struct* MercGrades; // Count varies, but hard set to 3 max for now - From dbstr_us.txt - Apprentice (330000100), Journeyman (330000200), Master (330000300)
/*0004*/ uint32 MercGrades[MAX_MERC_GRADES]; // Count varies, but hard set to 3 max for now - From dbstr_us.txt - Apprentice (330000100), Journeyman (330000200), Master (330000300)
/*0016*/ uint32 MercCount; // Number of MercenaryInfo_Struct to follow
/*0020*/ MercenaryListEntry_Struct* Mercs; // Data for individual mercenaries in the Merchant List
/*0020*/ MercenaryListEntry_Struct Mercs[MAX_MERC]; // Data for individual mercenaries in the Merchant List
};
// [OPCode: 0x4dd9 OP_MercenaryDataRequest] On Live as of April 2 2012 [Client->Server]
@ -4935,7 +4955,7 @@ struct MercenaryData_Struct {
/*0053*/ int32 MercUnk03; // Unknown (always 0 at merchant) - Seen on active merc: 93 a4 03 77, b8 ed 2f 26, 88 d5 8b c3, and 93 a4 ad 77
/*0057*/ uint8 MercUnk04; // Seen 1
/*0058*/ char MercName[64]; // Null Terminated Mercenary Name (00 at merchants)
/*0000*/ MercenaryStance_Struct* Stances; // Count Varies, but hard set to 2 for now - From dbstr_us.txt - 1^24^Passive^0, 2^24^Balanced^0, etc (1 to 9 as of April 2012)
/*0000*/ MercenaryStance_Struct Stances[MAX_MERC_STANCES]; // Count Varies, but hard set to 2 for now - From dbstr_us.txt - 1^24^Passive^0, 2^24^Balanced^0, etc (1 to 9 as of April 2012)
/*0000*/ uint32 MercUnk05; // Seen 1 - Extra Merc Data field that differs from MercenaryListEntry_Struct
// MercUnk05 may be a field that is at the end of the packet only, even if multiple mercs are listed (haven't seen examples of multiple mercs owned at once)
};
@ -4947,7 +4967,7 @@ struct MercenaryData_Struct {
struct MercenaryDataUpdate_Struct {
/*0000*/ int32 MercStatus; // Seen 0 with merc and -1 with no merc hired
/*0004*/ uint32 MercCount; // Seen 1 with 1 merc hired and 0 with no merc hired
/*0008*/ MercenaryData_Struct* MercData; // Data for individual mercenaries in the Merchant List
/*0008*/ MercenaryData_Struct MercData[MAX_MERC]; // Data for individual mercenaries in the Merchant List
};
// [OPCode: 0x6537] On Live as of April 2 2012 [Server->Client]

View File

@ -2099,7 +2099,7 @@ ENCODE(OP_MercenaryDataResponse) {
for(r = 0; r < emu->MercTypeCount; r++)
{
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercGrades[r].GradeCountEntry);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercGrades[r]);
}
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercCount);

View File

@ -1289,7 +1289,7 @@ ENCODE(OP_MercenaryDataResponse) {
{
if(emu->MercTypeCount > 0)
{
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercGrades[r].GradeCountEntry);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercGrades[r]);
}
}
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercCount);

View File

@ -1297,7 +1297,7 @@ ENCODE(OP_MercenaryDataResponse) {
for(r = 0; r < emu->MercTypeCount; r++)
{
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercGrades[r].GradeCountEntry);
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercGrades[r]);
}
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->MercCount);

39
utils/EQExtractor2/.gitignore vendored Normal file
View File

@ -0,0 +1,39 @@
# Object files
*.o
*.obj
# Libraries
*.lib
*.a
# Shared objects
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
# CMake
CMakeCache.txt
CMakeFiles
Makefile
cmake_install.cmake
install_manifest.txt
Build/
build/
Build32/
build32/
Build64/
build64/
Build_32/
build_32/
Build_64/
build_64/
log/
logs/
bin/
obj/
*.suo

View File

@ -1,5 +1,11 @@
EQExtractor2 Changelog. All changes since the 1.0 release.
==03/17/2013==
Derision: Added SQL generation support to current Live client decoder.
==03/16/2013==
Derision: Added decoder to support packet dumps from current Live client. SQL generation NOT SUPPORTED YET.
==02/13/2013==
Derision: Added decoder to support packet dumps from current Live client. SQL generation NOT SUPPORTED YET.
Derision: Added boolean to patch decoders to indicate if they support SQL generation or not.

View File

@ -102,6 +102,8 @@ namespace EQApplicationLayer
PatchList.Add(new PatchTestServerFebruary52013Decoder());
PatchList.Add(new PatchFebruary112013Decoder());
PatchList.Add(new PatchMarch132013Decoder());
PatchList.Add(new PatchSoD());

View File

@ -92,6 +92,7 @@
<Compile Include="PatchJuly13-2012.cs" />
<Compile Include="PatchJune25-2012.cs" />
<Compile Include="PatchMar15-2012.cs" />
<Compile Include="PatchMarch13-2013.cs" />
<Compile Include="PatchMarch15-2011.cs" />
<Compile Include="PatchMay12-2010.cs" />
<Compile Include="PatchMay12-2011.cs" />
@ -163,6 +164,9 @@
<None Include="patch_June25-2012.conf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="patch_Mar13-2013.conf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="patch_Mar15-2012.conf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>

View File

@ -18,7 +18,7 @@ namespace EQExtractor2
{
public partial class EQExtractor2Form1 : Form
{
string Version = "EQExtractor2 Version 2.6.0 SVN";
string Version = "EQExtractor2 Version 2.6.2 SVN";
static int PacketsSeen = 0;
static long BytesRead = 0;

Binary file not shown.

View File

@ -546,7 +546,10 @@ namespace EQExtractor2.Patches
public void DecodeItemPacket(StreamWriter OutputStream, ByteStream Buffer, PacketDirection Direction)
{
String UnkString = Buffer.ReadString(false);
Buffer.SkipBytes(88);
//Buffer.SkipBytes(88);
Buffer.SkipBytes(35);
UInt32 RecastTimer = Buffer.ReadUInt32();
Buffer.SkipBytes(49);
String ItemName = Buffer.ReadString(false);
String ItemLore = Buffer.ReadString(false);
String ItemIDFile = Buffer.ReadString(false);
@ -554,6 +557,7 @@ namespace EQExtractor2.Patches
UInt32 ItemID = Buffer.ReadUInt32();
OutputStream.WriteLine("ItemName: {0}, IDFile: {1}", ItemName, ItemIDFile);
OutputStream.WriteLine("Recast Time: {0:X}", RecastTimer);
Buffer.SkipBytes(251);

View File

@ -17,7 +17,759 @@ namespace EQExtractor2.Patches
PatchConfFileName = "patch_Feb11-2013.conf";
PacketsToMatch = new PacketToMatch[] {
new PacketToMatch { OPCodeName = "OP_ZoneEntry", Direction = PacketDirection.ClientToServer, RequiredSize = 76, VersionMatched = false },
new PacketToMatch { OPCodeName = "OP_PlayerProfile", Direction = PacketDirection.ServerToClient, RequiredSize = -1, VersionMatched = true },
};
SupportsSQLGeneration = false;
}
}
public override void RegisterExplorers()
{
//OpManager.RegisterExplorer("OP_PlayerProfile", ExplorePlayerProfile);
//OpManager.RegisterExplorer("OP_CharInventory", ExploreInventory);
}
public void DecodeItemPacket(StreamWriter OutputStream, ByteStream Buffer, PacketDirection Direction)
{
String UnkString = Buffer.ReadString(false);
//Buffer.SkipBytes(88);
Buffer.SkipBytes(35);
UInt32 RecastTimer = Buffer.ReadUInt32();
Buffer.SkipBytes(49);
String ItemName = Buffer.ReadString(false);
String ItemLore = Buffer.ReadString(false);
String ItemIDFile = Buffer.ReadString(false);
Buffer.ReadString(false);
UInt32 ItemID = Buffer.ReadUInt32();
OutputStream.WriteLine("ItemName: {0}, IDFile: {1}", ItemName, ItemIDFile);
OutputStream.WriteLine("Recast Time: {0:X}", RecastTimer);
Buffer.SkipBytes(251);
String CharmFile = Buffer.ReadString(false);
OutputStream.WriteLine("CharmFile: {0}", CharmFile);
Buffer.SkipBytes(74); // Secondary BS
String FileName = Buffer.ReadString(false);
OutputStream.WriteLine("FileName: {0}", CharmFile);
Buffer.SkipBytes(76); // Tertiary BS
UInt32 ClickEffect = Buffer.ReadUInt32();
//Buffer.SkipBytes(26); // ClickEffect Struct
//OutputStream.WriteLine("Click Effect - effect : {0}", Buffer.ReadUInt32());
OutputStream.WriteLine("Click Effect - level2 : {0}", Buffer.ReadByte());
OutputStream.WriteLine("Click Effect - Type : {0}", Buffer.ReadUInt32());
OutputStream.WriteLine("Click Effect - level : {0}", Buffer.ReadByte());
OutputStream.WriteLine("Click Effect - Max Charges : {0}", Buffer.ReadUInt32());
OutputStream.WriteLine("Click Effect - Cast Time : {0}", Buffer.ReadUInt32());
OutputStream.WriteLine("Click Effect - Recast : {0}", Buffer.ReadUInt32());
OutputStream.WriteLine("Click Effect - Recast Type: {0}", Buffer.ReadUInt32());
OutputStream.WriteLine("Click Effect - Unk5: {0}", Buffer.ReadUInt32());
String ClickName = Buffer.ReadString(false);
OutputStream.WriteLine("ClickEffect = {0}, ClickName = {1}", ClickEffect, ClickName);
Buffer.ReadUInt32();
ClickEffect = Buffer.ReadUInt32();
Buffer.SkipBytes(26); // ClickEffect Struct
ClickName = Buffer.ReadString(false);
OutputStream.WriteLine("ClickEffect = {0}, ClickName = {1}", ClickEffect, ClickName);
Buffer.ReadUInt32();
ClickEffect = Buffer.ReadUInt32();
Buffer.SkipBytes(26); // ClickEffect Struct
ClickName = Buffer.ReadString(false);
OutputStream.WriteLine("ClickEffect = {0}, ClickName = {1}", ClickEffect, ClickName);
Buffer.ReadUInt32();
ClickEffect = Buffer.ReadUInt32();
Buffer.SkipBytes(26); // ClickEffect Struct
ClickName = Buffer.ReadString(false);
OutputStream.WriteLine("ClickEffect = {0}, ClickName = {1}", ClickEffect, ClickName);
Buffer.ReadUInt32();
ClickEffect = Buffer.ReadUInt32();
Buffer.SkipBytes(26); // ClickEffect Struct
ClickName = Buffer.ReadString(false);
OutputStream.WriteLine("ClickEffect = {0}, ClickName = {1}", ClickEffect, ClickName);
Buffer.ReadUInt32();
ClickEffect = Buffer.ReadUInt32();
Buffer.SkipBytes(26); // ClickEffect Struct
ClickName = Buffer.ReadString(false);
OutputStream.WriteLine("ClickEffect = {0}, ClickName = {1}", ClickEffect, ClickName);
Buffer.ReadUInt32();
//Buffer.SkipBytes(167);
Buffer.SkipBytes(125);
//Byte UnkByte = Buffer.ReadByte();
//OutputStream.WriteLine("Unk byte is {0:X}", UnkByte);
OutputStream.WriteLine("At String ? Pos is {0}", Buffer.GetPosition());
UnkString = Buffer.ReadString(false);
OutputStream.WriteLine("Unk String is {0}", UnkString);
Buffer.SkipBytes(41);
UInt32 SubItemCount = Buffer.ReadUInt32();
OutputStream.WriteLine("Buffer Pos: {0}, SubItemCount = {1}", Buffer.GetPosition(), SubItemCount);
for (int j = 0; j < SubItemCount; ++j)
{
Buffer.ReadUInt32();
DecodeItemPacket(OutputStream, Buffer, Direction);
}
}
public void ExploreInventory(StreamWriter OutputStream, ByteStream Buffer, PacketDirection Direction)
{
if (Buffer.Length() < 4)
return;
UInt32 Count = Buffer.ReadUInt32();
for (int i = 0; i < Count; ++i)
{
try
{
DecodeItemPacket(OutputStream, Buffer, Direction);
}
catch
{
return;
}
}
}
public void ExplorePlayerProfile(StreamWriter OutputStream, ByteStream Buffer, PacketDirection Direction)
{
OutputStream.WriteLine("{0, -5}: Checksum = {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: ChecksumSize = {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("");
OutputStream.WriteLine("{0, -5}: Gender = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Race = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Class = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Level = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Level1 = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("");
UInt32 BindCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: BindCount = {1}", Buffer.GetPosition() - 4, BindCount);
for (int i = 0; i < BindCount; ++i)
{
OutputStream.WriteLine("{0, -5}: Bind: {1} Zone: {2} XYZ: {3},{4},{5} Heading: {6}",
Buffer.GetPosition(), i, Buffer.ReadUInt32(), Buffer.ReadSingle(), Buffer.ReadSingle(), Buffer.ReadSingle(), Buffer.ReadSingle());
}
OutputStream.WriteLine("");
OutputStream.WriteLine("{0, -5}: Deity = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Intoxication = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("");
//Buffer.SkipBytes(8); // Deity, intoxication
UInt32 UnknownCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown Count = {1}", Buffer.GetPosition() - 4, UnknownCount);
for (int i = 0; i < UnknownCount; ++i)
{
OutputStream.WriteLine("{0, -5}: Unknown : {1}, Value = {2}", Buffer.GetPosition(), i, Buffer.ReadUInt32());
//Buffer.SkipBytes(4);
}
UInt32 EquipmentCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: EquipmentCount = {1}", Buffer.GetPosition() - 4, EquipmentCount);
for (int i = 0; i < EquipmentCount; ++i)
{
OutputStream.Write("{0, -5}: Equip: {1} Values: ", Buffer.GetPosition(), i);
for (int j = 0; j < 5; ++j)
OutputStream.Write("{0} ", Buffer.ReadUInt32());
OutputStream.WriteLine("");
//Buffer.SkipBytes(20);
}
UInt32 EquipmentCount2 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: EquipmentCount2 = {1}", Buffer.GetPosition() - 4, EquipmentCount2);
for (int i = 0; i < EquipmentCount2; ++i)
{
OutputStream.Write("{0, -5}: Equip2: {1} Values: ", Buffer.GetPosition(), i);
for (int j = 0; j < 5; ++j)
OutputStream.Write("{0} ", Buffer.ReadUInt32());
OutputStream.WriteLine("");
//Buffer.SkipBytes(20);
}
UInt32 TintCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: TintCount = {1}", Buffer.GetPosition() - 4, TintCount);
for (int i = 0; i < TintCount; ++i)
{
OutputStream.WriteLine("{0, -5}: TintCount : {1}, Value = {2}", Buffer.GetPosition(), i, Buffer.ReadUInt32());
//Buffer.SkipBytes(4);
}
UInt32 TintCount2 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: TintCount2 = {1}", Buffer.GetPosition() - 4, TintCount2);
for (int i = 0; i < TintCount; ++i)
{
OutputStream.WriteLine("{0, -5}: TintCount2 : {1}, Value = {2}", Buffer.GetPosition(), i, Buffer.ReadUInt32());
//Buffer.SkipBytes(4);
}
OutputStream.WriteLine("{0, -5}: Hair Color = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Beard Color = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Eye1 Color = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Eye2 Color = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Hairstyle = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Beard = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Face = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Drakkin Heritage = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Drakkin Tattoo = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Drakkin Details = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Height = {1}", Buffer.GetPosition(), Buffer.ReadSingle());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadSingle());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadSingle());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadSingle());
OutputStream.WriteLine("{0, -5}: Primary = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Secondary = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
//Buffer.SkipBytes(52); // Per SEQ, this looks like face, haircolor, beardcolor etc.
OutputStream.WriteLine("{0, -5}: Unspent Skill Points = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Mana = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Current HP = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
//UInt32 Points = Buffer.ReadUInt32();
//UInt32 Mana = Buffer.ReadUInt32();
//UInt32 CurHP = Buffer.ReadUInt32();
//OutputStream.WriteLine("Points, Mana, CurHP = {0}, {1}, {2}", Points, Mana, CurHP);
OutputStream.WriteLine("{0, -5}: STR = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: STA = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: CHA = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: DEX = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: INT = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: AGI = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: WIS = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
//Buffer.SkipBytes(28);
//Buffer.SkipBytes(28);
UInt32 AACount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: AA Count = {1}", Buffer.GetPosition() - 4, AACount);
for (int i = 0; i < AACount; ++i)
{
OutputStream.WriteLine(" AA: {0}, Value: {1}, Unknown08: {2}", Buffer.ReadUInt32(), Buffer.ReadUInt32(), Buffer.ReadUInt32());
//Buffer.SkipBytes(12);
}
UInt32 SkillCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Skill Count = {1}", Buffer.GetPosition() - 4, SkillCount);
for (int i = 0; i < SkillCount; ++i)
{
Buffer.SkipBytes(4);
}
UInt32 SomethingCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Something Count = {1}", Buffer.GetPosition() - 4, SomethingCount);
for (int i = 0; i < SomethingCount; ++i)
{
//Buffer.SkipBytes(4);
OutputStream.WriteLine("Something {0} : {1}", i, Buffer.ReadUInt32());
}
UInt32 DisciplineCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Discipline Count = {1}", Buffer.GetPosition() - 4, DisciplineCount);
for (int i = 0; i < DisciplineCount; ++i)
{
Buffer.SkipBytes(4);
}
UInt32 TimeStampCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: TimeStamp Count = {1}", Buffer.GetPosition() - 4, TimeStampCount);
for (int i = 0; i < TimeStampCount; ++i)
{
//Buffer.SkipBytes(4);
OutputStream.WriteLine("Timestamp {0} : {1}", i, Buffer.ReadUInt32());
}
System.DateTime dateTime;
UInt32 RecastCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Recast Count = {1}", Buffer.GetPosition() - 4, RecastCount);
for (int i = 0; i < RecastCount; ++i)
{
//Buffer.SkipBytes(4);
UInt32 TimeStamp = Buffer.ReadUInt32();
dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
dateTime = dateTime.AddSeconds(TimeStamp);
OutputStream.WriteLine("Recast {0} : {1} {2}", i, TimeStamp, dateTime.ToString());
}
UInt32 TimeStamp2Count = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: TimeStamp2 Count = {1}", Buffer.GetPosition() - 4, TimeStamp2Count);
for (int i = 0; i < TimeStamp2Count; ++i)
{
//Buffer.SkipBytes(4);
UInt32 TimeStamp = Buffer.ReadUInt32();
dateTime = new System.DateTime(1970, 1, 1, 0, 0, 0, 0);
dateTime = dateTime.AddSeconds(TimeStamp);
OutputStream.WriteLine("Timestamp {0} : {1} {2}", i, TimeStamp, dateTime.ToString());
}
UInt32 SpellBookSlots = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: SpellBookSlot Count = {1}", Buffer.GetPosition() - 4, SpellBookSlots);
for (int i = 0; i < SpellBookSlots; ++i)
{
Buffer.SkipBytes(4);
}
UInt32 SpellMemSlots = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Spell Mem Count = {1}", Buffer.GetPosition() - 4, SpellMemSlots);
for (int i = 0; i < SpellMemSlots; ++i)
{
Buffer.SkipBytes(4);
}
SomethingCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown Count = {1}", Buffer.GetPosition() - 4, SomethingCount);
for (int i = 0; i < SomethingCount; ++i)
{
//Buffer.SkipBytes(4);
OutputStream.WriteLine("Unknown {0} : {1}", i, Buffer.ReadUInt32());
}
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadByte());
UInt32 BuffCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Buff Count = {1}", Buffer.GetPosition() - 4, BuffCount);
for (int i = 0; i < BuffCount; ++i)
{
Buffer.ReadByte();
float UnkFloat = Buffer.ReadSingle();
UInt32 PlayerID = Buffer.ReadUInt32();
Byte UnkByte = Buffer.ReadByte();
UInt32 Counters1 = Buffer.ReadUInt32();
UInt32 Duration = Buffer.ReadUInt32();
Byte Level = Buffer.ReadByte();
UInt32 SpellID = Buffer.ReadUInt32();
UInt32 SlotID = Buffer.ReadUInt32();
Buffer.SkipBytes(5);
UInt32 Counters2 = Buffer.ReadUInt32();
OutputStream.WriteLine("Sl: {0}, UF: {1}, PID: {2}, UByte: {3}, Cnt1: {4}, Dur: {5}, Lvl: {6} SpellID: {7}, SlotID: {8}, Cnt2: {9}",
i, UnkFloat, PlayerID, UnkByte, Counters1, Duration, Level, SpellID, SlotID, Counters2);
Buffer.SkipBytes(44);
}
OutputStream.WriteLine("{0, -5}: Plat = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Gold = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Silver = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Copper = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Plat Cursor = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Gold Cursor = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Silver Cursor = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Copper Cursor = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Toxicity? = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Thirst? = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Hunger? = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
//Buffer.SkipBytes(20);
OutputStream.WriteLine("{0, -5}: AA Spent = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: AA Point Count? = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: AA Assigned = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: AA Spent General = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: AA Spent Archetype = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: AA Spent Class = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: AA Spent Special = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: AA Unspent = {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown", Buffer.GetPosition(), Buffer.ReadUInt16());
//Buffer.SkipBytes(30);
UInt32 BandolierCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Bandolier Count = {1}", Buffer.GetPosition() - 4, BandolierCount);
for (int i = 0; i < BandolierCount; ++i)
{
Buffer.ReadString(false);
Buffer.ReadString(false);
Buffer.SkipBytes(8);
Buffer.ReadString(false);
Buffer.SkipBytes(8);
Buffer.ReadString(false);
Buffer.SkipBytes(8);
Buffer.ReadString(false);
Buffer.SkipBytes(8);
}
UInt32 PotionCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Potion Count = {1}", Buffer.GetPosition() - 4, PotionCount);
for (int i = 0; i < PotionCount; ++i)
{
Buffer.ReadString(false);
Buffer.SkipBytes(8);
}
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadInt32());
OutputStream.WriteLine("{0, -5}: Item HP Total? {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Endurance Total? {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Mana Total? {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Expansion Count {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
UInt32 NameLength = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Name Length: {1}", Buffer.GetPosition() - 4, NameLength);
int CurrentPosition = Buffer.GetPosition();
OutputStream.WriteLine("{0, -5}: Name: {1}", Buffer.GetPosition(), Buffer.ReadString(false));
Buffer.SetPosition(CurrentPosition + (int)NameLength);
UInt32 LastNameLength = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: LastName Length: {1}", Buffer.GetPosition() - 4, LastNameLength);
CurrentPosition = Buffer.GetPosition();
OutputStream.WriteLine("{0, -5}: Last Name: {1}", Buffer.GetPosition(), Buffer.ReadString(false));
Buffer.SetPosition(CurrentPosition + (int)LastNameLength);
OutputStream.WriteLine("{0, -5}: Birthday {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Account Start Date {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Last Login Date {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Time Played Minutes {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Time Entitled On Account {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Expansions {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
UInt32 LanguageCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Language Count = {1}", Buffer.GetPosition() - 4, LanguageCount);
for (int i = 0; i < LanguageCount; ++i)
{
Buffer.SkipBytes(1);
}
OutputStream.WriteLine("{0, -5}: Zone ID {1}", Buffer.GetPosition(), Buffer.ReadUInt16());
OutputStream.WriteLine("{0, -5}: Zone Instance {1}", Buffer.GetPosition(), Buffer.ReadUInt16());
OutputStream.WriteLine("{0, -5}: Y,X,Z {1},{2},{3} Heading: {4}",
Buffer.GetPosition(), Buffer.ReadSingle(), Buffer.ReadSingle(), Buffer.ReadSingle(), Buffer.ReadSingle());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: GuildID? {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Experience {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Bank Plat {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Bank Gold {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Bank Silver {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Bank Copper {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
UInt32 Unknown42 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown, value 42? {1}", Buffer.GetPosition() - 4, Unknown42);
Buffer.SkipBytes((int)(Unknown42 * 8));
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Career Tribute Favour {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Current Tribute Favour {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
UInt32 PersonalTributeCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Personal Tribute Count {1}", Buffer.GetPosition() - 4, PersonalTributeCount);
Buffer.SkipBytes((int)(PersonalTributeCount * 8));
UInt32 GuildTributeCount = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Guild Tribute Count {1}", Buffer.GetPosition() - 4, GuildTributeCount);
Buffer.SkipBytes((int)(GuildTributeCount * 8));
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("Skipping 121 bytes starting at offset {0}", Buffer.GetPosition());
Buffer.SkipBytes(121);
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("Position now {0}", Buffer.GetPosition());
UInt32 Unknown64 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown64 {1}", Buffer.GetPosition() - 4, Unknown64);
Buffer.SkipBytes((int)Unknown64);
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
Unknown64 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown64 {1}", Buffer.GetPosition() - 4, Unknown64);
Buffer.SkipBytes((int)Unknown64);
Unknown64 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown64 {1}", Buffer.GetPosition() - 4, Unknown64);
Buffer.SkipBytes((int)Unknown64);
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("Skipping 320 bytes starting at offset {0}", Buffer.GetPosition());
Buffer.SkipBytes(320);
OutputStream.WriteLine("Skipping 343 bytes starting at offset {0}", Buffer.GetPosition());
Buffer.SkipBytes(343);
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
UInt32 Unknown6 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown6 {1} LDON Stuff ?", Buffer.GetPosition() - 4, Unknown6);
for (int i = 0; i < Unknown6; ++i)
OutputStream.WriteLine("{0, -5}: Unknown LDON? {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
Unknown64 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown64 {1}", Buffer.GetPosition() - 4, Unknown64);
Buffer.SkipBytes((int)Unknown64 * 4);
// Air remaining ?
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
// Next 7 could be PVP stats,
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
// PVP LastKill struct ?
OutputStream.WriteLine("Skipping string + 24 bytes starting at offset {0}", Buffer.GetPosition());
//Buffer.SkipBytes(25);
Byte b;
do
{
b = Buffer.ReadByte();
} while (b != 0);
Buffer.SkipBytes(24);
// PVP LastDeath struct ?
OutputStream.WriteLine("Skipping string + 24 bytes starting at offset {0}", Buffer.GetPosition());
//Buffer.SkipBytes(25);
do
{
b = Buffer.ReadByte();
} while (b != 0);
Buffer.SkipBytes(24);
// PVP Number of Kills in Last 24 hours ?
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
UInt32 Unknown50 = Buffer.ReadUInt32();
OutputStream.WriteLine("{0, -5}: Unknown50 {1}", Buffer.GetPosition() - 4, Unknown50);
// PVP Recent Kills ?
OutputStream.WriteLine("Skipping 50 x (String + 24 bytes) starting at offset {0}", Buffer.GetPosition());
//Buffer.SkipBytes(1338);
for (int i = 0; i < 50; ++i)
{
do
{
b = Buffer.ReadByte();
} while (b != 0);
Buffer.SkipBytes(24);
}
//
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Group autoconsent? {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Raid autoconsent? {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Guild autoconsent? {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: Level3? {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Showhelm? {1}", Buffer.GetPosition(), Buffer.ReadByte());
OutputStream.WriteLine("{0, -5}: RestTimer? {1}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("Skipping 1028 bytes starting at offset {0}", Buffer.GetPosition());
Buffer.SkipBytes(1028);
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("{0, -5}: Unknown {1:X}", Buffer.GetPosition(), Buffer.ReadUInt32());
OutputStream.WriteLine("Pointer is {0} bytes from end.", Buffer.Length() - Buffer.GetPosition());
}
}
}

View File

@ -0,0 +1,335 @@
using System;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;
using EQExtractor2.InternalTypes;
using EQExtractor2.OpCodes;
using EQPacket;
using MyUtils;
namespace EQExtractor2.Patches
{
class PatchMarch132013Decoder : PatchFebruary112013Decoder
{
public PatchMarch132013Decoder()
{
Version = "EQ Client Build Date March 13 2013.";
PatchConfFileName = "patch_Mar13-2013.conf";
SupportsSQLGeneration = true;
}
override public List<Door> GetDoors()
{
List<Door> DoorList = new List<Door>();
List<byte[]> SpawnDoorPacket = GetPacketsOfType("OP_SpawnDoor", PacketDirection.ServerToClient);
if ((SpawnDoorPacket.Count == 0) || (SpawnDoorPacket[0].Length == 0))
return DoorList;
int DoorCount = SpawnDoorPacket[0].Length / 100;
ByteStream Buffer = new ByteStream(SpawnDoorPacket[0]);
for (int d = 0; d < DoorCount; ++d)
{
string DoorName = Buffer.ReadFixedLengthString(32, false);
float YPos = Buffer.ReadSingle();
float XPos = Buffer.ReadSingle();
float ZPos = Buffer.ReadSingle();
float Heading = Buffer.ReadSingle();
UInt32 Incline = Buffer.ReadUInt32();
Int32 Size = Buffer.ReadInt32();
Buffer.SkipBytes(4); // Skip Unknown
Byte DoorID = Buffer.ReadByte();
Byte OpenType = Buffer.ReadByte();
Byte StateAtSpawn = Buffer.ReadByte();
Byte InvertState = Buffer.ReadByte();
Int32 DoorParam = Buffer.ReadInt32();
// Skip past the trailing unknowns in the door struct, moving to the next door in the packet.
Buffer.SkipBytes(32);
string DestZone = "NONE";
Door NewDoor = new Door(DoorName, YPos, XPos, ZPos, Heading, Incline, Size, DoorID, OpenType, StateAtSpawn, InvertState,
DoorParam, DestZone, 0, 0, 0, 0);
DoorList.Add(NewDoor);
}
return DoorList;
}
override public List<ZoneEntryStruct> GetSpawns()
{
List<ZoneEntryStruct> ZoneSpawns = new List<ZoneEntryStruct>();
List<byte[]> SpawnPackets = GetPacketsOfType("OP_ZoneEntry", PacketDirection.ServerToClient);
foreach (byte[] SpawnPacket in SpawnPackets)
{
ZoneEntryStruct NewSpawn = new ZoneEntryStruct();
ByteStream Buffer = new ByteStream(SpawnPacket);
NewSpawn.SpawnName = Buffer.ReadString(true);
NewSpawn.SpawnName = Utils.MakeCleanName(NewSpawn.SpawnName);
NewSpawn.SpawnID = Buffer.ReadUInt32();
NewSpawn.Level = Buffer.ReadByte();
float UnkSize = Buffer.ReadSingle();
NewSpawn.IsNPC = Buffer.ReadByte();
UInt32 Bitfield = Buffer.ReadUInt32();
NewSpawn.Gender = (Bitfield & 3);
Byte OtherData = Buffer.ReadByte();
Buffer.SkipBytes(8); // Skip 8 unknown bytes
NewSpawn.DestructableString1 = "";
NewSpawn.DestructableString2 = "";
NewSpawn.DestructableString3 = "";
if ((NewSpawn.IsNPC > 0) && ((OtherData & 1) > 0))
{
// Destructable Objects
NewSpawn.DestructableString1 = Buffer.ReadString(false);
NewSpawn.DestructableString2 = Buffer.ReadString(false);
NewSpawn.DestructableString3 = Buffer.ReadString(false);
Buffer.SkipBytes(53);
}
if ((OtherData & 4) > 0)
{
// Auras
Buffer.ReadString(false);
Buffer.ReadString(false);
Buffer.SkipBytes(54);
}
NewSpawn.PropCount = Buffer.ReadByte();
if (NewSpawn.PropCount > 0)
NewSpawn.BodyType = Buffer.ReadUInt32();
else
NewSpawn.BodyType = 0;
for (int j = 1; j < NewSpawn.PropCount; ++j)
Buffer.SkipBytes(4);
Buffer.SkipBytes(1); // Skip HP %
NewSpawn.HairColor = Buffer.ReadByte();
NewSpawn.BeardColor = Buffer.ReadByte();
NewSpawn.EyeColor1 = Buffer.ReadByte();
NewSpawn.EyeColor2 = Buffer.ReadByte();
NewSpawn.HairStyle = Buffer.ReadByte();
NewSpawn.Beard = Buffer.ReadByte();
NewSpawn.DrakkinHeritage = Buffer.ReadUInt32();
NewSpawn.DrakkinTattoo = Buffer.ReadUInt32();
NewSpawn.DrakkinDetails = Buffer.ReadUInt32();
NewSpawn.EquipChest2 = Buffer.ReadByte();
bool UseWorn = (NewSpawn.EquipChest2 == 255);
Buffer.SkipBytes(2); // 2 Unknown bytes;
NewSpawn.Helm = Buffer.ReadByte();
NewSpawn.Size = Buffer.ReadSingle();
NewSpawn.Face = Buffer.ReadByte();
NewSpawn.WalkSpeed = Buffer.ReadSingle();
NewSpawn.RunSpeed = Buffer.ReadSingle();
NewSpawn.Race = Buffer.ReadUInt32();
Buffer.SkipBytes(1); // Skip Holding
NewSpawn.Deity = Buffer.ReadUInt32();
Buffer.SkipBytes(8); // Skip GuildID and GuildRank
NewSpawn.Class = Buffer.ReadByte();
Buffer.SkipBytes(4); // Skip PVP, Standstate, Light, Flymode
NewSpawn.LastName = Buffer.ReadString(true);
Buffer.SkipBytes(6);
NewSpawn.PetOwnerID = Buffer.ReadUInt32();
Buffer.SkipBytes(25);
NewSpawn.MeleeTexture1 = 0;
NewSpawn.MeleeTexture2 = 0;
if ((NewSpawn.IsNPC == 0) || NPCType.IsPlayableRace(NewSpawn.Race))
{
for (int ColourSlot = 0; ColourSlot < 9; ++ColourSlot)
NewSpawn.SlotColour[ColourSlot] = Buffer.ReadUInt32();
for (int i = 0; i < 9; ++i)
{
NewSpawn.Equipment[i] = Buffer.ReadUInt32();
UInt32 Equip3 = Buffer.ReadUInt32();
UInt32 Equip2 = Buffer.ReadUInt32();
UInt32 Equip1 = Buffer.ReadUInt32();
UInt32 Equip0 = Buffer.ReadUInt32();
}
if (NewSpawn.Equipment[Constants.MATERIAL_CHEST] > 0)
{
NewSpawn.EquipChest2 = (byte)NewSpawn.Equipment[Constants.MATERIAL_CHEST];
}
NewSpawn.ArmorTintRed = (byte)((NewSpawn.SlotColour[Constants.MATERIAL_CHEST] >> 16) & 0xff);
NewSpawn.ArmorTintGreen = (byte)((NewSpawn.SlotColour[Constants.MATERIAL_CHEST] >> 8) & 0xff);
NewSpawn.ArmorTintBlue = (byte)(NewSpawn.SlotColour[Constants.MATERIAL_CHEST] & 0xff);
if (NewSpawn.Equipment[Constants.MATERIAL_PRIMARY] > 0)
NewSpawn.MeleeTexture1 = NewSpawn.Equipment[Constants.MATERIAL_PRIMARY];
if (NewSpawn.Equipment[Constants.MATERIAL_SECONDARY] > 0)
NewSpawn.MeleeTexture2 = NewSpawn.Equipment[Constants.MATERIAL_SECONDARY];
if (UseWorn)
NewSpawn.Helm = (byte)NewSpawn.Equipment[Constants.MATERIAL_HEAD];
else
NewSpawn.Helm = 0;
}
else
{
// Non playable race
Buffer.SkipBytes(20);
NewSpawn.MeleeTexture1 = Buffer.ReadUInt32();
Buffer.SkipBytes(16);
NewSpawn.MeleeTexture2 = Buffer.ReadUInt32();
Buffer.SkipBytes(16);
}
if (NewSpawn.EquipChest2 == 255)
NewSpawn.EquipChest2 = 0;
if (NewSpawn.Helm == 255)
NewSpawn.Helm = 0;
UInt32 Position1 = Buffer.ReadUInt32();
UInt32 Position2 = Buffer.ReadUInt32();
UInt32 Position3 = Buffer.ReadUInt32();
UInt32 Position4 = Buffer.ReadUInt32();
UInt32 Position5 = Buffer.ReadUInt32();
UInt32 Position6 = Buffer.ReadUInt32();
NewSpawn.YPos = Utils.EQ19ToFloat((Int32)((Position5) & 0x7FFFF));
NewSpawn.ZPos = Utils.EQ19ToFloat((Int32)(Position3) & 0x7FFFF);
NewSpawn.XPos = Utils.EQ19ToFloat((Int32)(Position4) & 0x7FFFF);
NewSpawn.Heading = Utils.EQ19ToFloat((Int32)(Position2 >> 13) & 0xFFF);
if ((OtherData & 16) > 0)
{
NewSpawn.Title = Buffer.ReadString(false);
}
if ((OtherData & 32) > 0)
{
NewSpawn.Suffix = Buffer.ReadString(false);
}
// unknowns
Buffer.SkipBytes(8);
NewSpawn.IsMercenary = Buffer.ReadByte();
Buffer.SkipBytes(54);
Debug.Assert(Buffer.GetPosition() == Buffer.Length(), "Length mismatch while parsing zone spawns");
ZoneSpawns.Add(NewSpawn);
}
return ZoneSpawns;
}
override public PositionUpdate Decode_OP_MobUpdate(byte[] MobUpdatePacket)
{
PositionUpdate PosUpdate = new PositionUpdate();
ByteStream Buffer = new ByteStream(MobUpdatePacket);
PosUpdate.SpawnID = Buffer.ReadUInt16();
Buffer.SkipBytes(2);
UInt32 Word1 = Buffer.ReadUInt32();
UInt32 Word2 = Buffer.ReadUInt32();
UInt16 Word3 = Buffer.ReadUInt16();
PosUpdate.p.y = Utils.EQ19ToFloat((Int32)(Word1 & 0x7FFFF));
// Z is in the top 13 bits of Word1 and the bottom 6 of Word2
UInt32 ZPart1 = Word1 >> 19; // ZPart1 now has low order bits of Z in bottom 13 bits
UInt32 ZPart2 = Word2 & 0x3F; // ZPart2 now has high order bits of Z in bottom 6 bits
ZPart2 = ZPart2 << 13;
PosUpdate.p.z = Utils.EQ19ToFloat((Int32)(ZPart1 | ZPart2));
PosUpdate.p.x = Utils.EQ19ToFloat((Int32)(Word2 >> 13) & 0x7FFFF);
PosUpdate.p.heading = Utils.EQ19ToFloat((Int32)((Word3) & 0xFFF));
PosUpdate.HighRes = false;
return PosUpdate;
}
}
}

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,653 @@
# ShowEQ Import Notes:
# ZERO THE FILE first
# perl -pi -e 's/0x[0-9a-fA-F]{4}/0x0000/g' opcodes.conf
# Unknown Mapping:
# OP_Action2 -> OP_Damage
# OP_EnvDamage -> OP_Damage ---> might have been a one time mistake
# Name Differences:
# OP_CancelInvite -> OP_GroupCancelInvite
# OP_GMFind -> OP_FindPersonRequest
# OP_CommonMessage -> OP_ChannelMessage
OP_Unknown=0x0000
OP_ExploreUnknown=0x0000 used for unknown explorer
# world packets
# Required to reach Char Select:
OP_SendLoginInfo=0x4c47
OP_ApproveWorld=0x0fba
OP_LogServer=0x147e
OP_SendCharInfo=0x3501
OP_ExpansionInfo=0x5529
OP_GuildsList=0x1eb4
OP_EnterWorld=0x5148
OP_PostEnterWorld=0x138c
OP_World_Client_CRC1=0x5c81
OP_World_Client_CRC2=0x68ba
OP_SendSpellChecksum=0x0000
OP_SendSkillCapsChecksum=0x0000
# Character Select Related:
OP_SendMaxCharacters=0x6c2c
OP_SendMembership=0x489a
OP_SendMembershipDetails=0x5f73
OP_CharacterCreateRequest=0x7d54
OP_CharacterCreate=0x43cb
OP_DeleteCharacter=0x7974
OP_RandomNameGenerator=0x36b8
OP_ApproveName=0x3cb0
OP_MOTD=0x1e9b
OP_SetChatServer=0x7d67
OP_SetChatServer2=0x072c
OP_ZoneServerInfo=0x5e3b
OP_WorldComplete=0x230b
OP_WorldUnknown001=0xa5af
OP_FloatListThing=0x42e1
# Reasons for Disconnect:
OP_ZoneUnavail=0x1b4a
OP_WorldClientReady=0x36b2
OP_CharacterStillInZone=0x0000
OP_WorldChecksumFailure=0x0000
OP_WorldLoginFailed=0x0000
OP_WorldLogout=0x0000
OP_WorldLevelTooHigh=0x0000
OP_CharInacessable=0x0000
OP_UserCompInfo=0x0000
OP_SendExeChecksum=0x0000
OP_SendBaseDataChecksum=0x0000
# Zone in opcodes
OP_AckPacket=0x2e94
OP_ZoneEntry=0x9e82
OP_ReqNewZone=0x1536
OP_NewZone=0x23ef
OP_ZoneSpawns=0x0325
OP_PlayerProfile=0x48b7
OP_TimeOfDay=0x6665
OP_LevelUpdate=0x1048
OP_Stamina=0x1fb1
OP_RequestClientZoneChange=0x2521
OP_ZoneChange=0x6976
OP_LockoutTimerInfo=0x0000
OP_ZoneServerReady=0x0000
OP_ZoneInUnknown=0x0000
OP_LogoutReply=0x0000
OP_PreLogoutReply=0x0000
# Required to fully log in
OP_SpawnAppearance=0x3fe5
OP_ChangeSize=0x095f
OP_TributeUpdate=0x61af
OP_TributeTimer=0x7f61
OP_SendTributes=0x765f
OP_SendGuildTributes=0x7fde
OP_TributeInfo=0x7869
OP_Weather=0x6f63
OP_ReqClientSpawn=0x1fd2
OP_SpawnDoor=0x5ab7
OP_GroundSpawn=0x6410
OP_SendZonepoints=0x2694
OP_BlockedBuffs=0x5d12
OP_RemoveBlockedBuffs=0x6b1a
OP_ClearBlockedBuffs=0x5c27
OP_WorldObjectsSent=0x3f24
OP_SendExpZonein=0x39ef
OP_SendAATable=0x2aed
OP_RespondAA=0x6375
OP_UpdateAA=0x7ae9
OP_SendAAStats=0x4215
OP_AAExpUpdate=0x7c0b
OP_ExpUpdate=0x25cf
OP_HPUpdate=0x462c
OP_ManaChange=0x7db5
OP_TGB=0x4111
OP_SpecialMesg=0x0000
OP_GuildMemberList=0x4f53
OP_GuildMOTD=0x5906
OP_CharInventory=0x3efe
OP_WearChange=0x18ea
OP_ClientUpdate=0x1ad3
OP_ClientReady=0x5b91 # 0x422d
OP_SetServerFilter=0x6d02
# Guild Opcodes - Disabled until crashes are resolved in RoF
OP_GetGuildMOTD=0x26d9 # Was 0x35dc
OP_GetGuildMOTDReply=0x4a78 # Was 0x4586
OP_GuildMemberUpdate=0x5809 # Was 0x5643
OP_GuildInvite=0x6327
OP_GuildRemove=0x4b63
OP_GuildPeace=0x1fa2
OP_SetGuildMOTD=0x0024
OP_GuildList=0x0000
OP_GuildWar=0x2366
OP_GuildLeader=0x70f6
OP_GuildDelete=0x50d7
OP_GuildInviteAccept=0x6f2e
OP_GuildDemote=0x02b3
OP_GuildPublicNote=0x5b86
OP_GuildManageBanker=0x714f # Was 0x0737
OP_GuildBank=0x033e # Was 0x10c3
OP_SetGuildRank=0x04f1
OP_GuildUpdateURLAndChannel=0x3d53
OP_GuildStatus=0x54a2
OP_GuildCreate=0x23b5 # or maybe 0x086e
OP_GuildMemberLevelUpdate=0x0000 # Unused?
OP_ZoneGuildList=0x0000 # Unused?
OP_GetGuildsList=0x0000 # Unused?
OP_LFGuild=0x0000
OP_GuildManageRemove=0x0000
OP_GuildManageAdd=0x0000
OP_GuildManageStatus=0x0000
# GM/Guide Opcodes
OP_GMServers=0x19ee
OP_GMBecomeNPC=0x6f5e
OP_GMZoneRequest=0x64c6
OP_GMZoneRequest2=0x3271
OP_GMGoto=0x6d39
OP_GMSearchCorpse=0x026a
OP_GMHideMe=0x3195
OP_GMDelCorpse=0x696f
OP_GMApproval=0x639b
OP_GMToggle=0x4c77
OP_GMSummon=0x3ff2 # Was 0x684f
OP_GMEmoteZone=0x722a # Was 0x0655
OP_GMEmoteWorld=0x77a6 # Was 0x1935
OP_GMFind=0x572d
OP_GMKick=0x1d1b
OP_GMKill=0x68c0
OP_GMNameChange=0x075d # Was 0x4434
OP_GMLastName=0x362a # Was 0x3077
# Misc Opcodes
OP_InspectRequest=0x3e82
OP_InspectAnswer=0x5168
OP_InspectMessageUpdate=0x420b
OP_BeginCast=0x436d
OP_BuffFadeMsg=0x46b9
OP_ConsentResponse=0x38d7
OP_MemorizeSpell=0x4d4b
OP_SwapSpell=0x21d2
OP_CastSpell=0x56ab
OP_Consider=0x476f
OP_FormattedMessage=0x69aa
OP_SimpleMessage=0x0e87
OP_Buff=0x2acd
OP_Illusion=0x739c
OP_MoneyOnCorpse=0x43c4
OP_RandomReply=0x467d
OP_DenyResponse=0x2eba
OP_SkillUpdate=0x3b99
OP_GMTrainSkillConfirm=0x24d4 # 0x3960
OP_RandomReq=0x3599
OP_Death=0x43a6
OP_GMTraining=0x0aa1
OP_GMEndTraining=0x5dd1
OP_GMTrainSkill=0x5823
OP_Animation=0x7487
OP_Begging=0x2bac
OP_Consent=0x5ccb
OP_ConsentDeny=0x1a5d
OP_AutoFire=0x6bfd
OP_PetCommands=0x0e7a
OP_DeleteSpell=0x3587
OP_Surname=0x378f
OP_ClearSurname=0x23c5
OP_FaceChange=0x7fc4
OP_SenseHeading=0x54cf
OP_Action=0x4965
OP_ConsiderCorpse=0x1294
OP_HideCorpse=0x5141
OP_CorpseDrag=0x14bb
OP_CorpseDrop=0x66e8
OP_Bug=0x055c
OP_Feedback=0x6cb3
OP_Report=0x28a6
OP_Damage=0x0002e
OP_ChannelMessage=0x1f4e
OP_Assist=0x2612
OP_AssistGroup=0x2ebc
OP_MoveCoin=0x7611
OP_ZonePlayerToBind=0x4284
OP_KeyRing=0x7d31
OP_WhoAllRequest=0x05f2
OP_WhoAllResponse=0x396c
OP_FriendsWho=0x40dd
OP_ConfirmDelete=0x065f
OP_Logout=0x0b31
OP_Rewind=0x15f2
OP_TargetCommand=0x15b5
OP_Hide=0x0ba4
OP_Jump=0x3622
OP_Camp=0x2181
OP_Emote=0x4773
OP_SetRunMode=0x6cdb
OP_BankerChange=0x1289
OP_TargetMouse=0x698f
OP_MobHealth=0x0294
OP_InitialMobHealth=0x0000 # Unused?
OP_TargetHoTT=0x72b0
OP_XTargetResponse=0x38c9
OP_XTargetRequest=0x616b
OP_XTargetAutoAddHaters=0x0ef7
OP_TargetBuffs=0x0aa5
OP_BuffCreate=0x3e45
OP_BuffRemoveRequest=0x063f
OP_DeleteSpawn=0x49e0
OP_AutoAttack=0x18e2
OP_AutoAttack2=0x6af7
OP_Consume=0x6388
OP_MoveItem=0x2bf6
OP_DeleteItem=0x388a
OP_DeleteCharge=0x6d3e
OP_ItemPacket=0x608e
OP_ItemLinkResponse=0x08af
OP_ItemLinkClick=0x5564
OP_ItemPreview=0x57e3
OP_NewSpawn=0x0009
OP_Track=0x1261
OP_TrackTarget=0x3a0a
OP_TrackUnknown=0x7c61
OP_ClickDoor=0x718e
OP_MoveDoor=0x3953
OP_RemoveAllDoors=0x4ca7
OP_EnvDamage=0x71bc
OP_BoardBoat=0x3bf8
OP_Forage=0x1c5b
OP_LeaveBoat=0x136c
OP_ControlBoat=0x0686
OP_SafeFallSuccess=0x001c
OP_RezzComplete=0x105a
OP_RezzRequest=0x546d
OP_RezzAnswer=0x58b4
OP_Shielding=0x747c
OP_RequestDuel=0x1a3a
OP_MobRename=0x6732
OP_AugmentItem=0x269c # Was 0x37cb
OP_WeaponEquip1=0x0232
OP_WeaponEquip2=0x6f0c # Was 0x6022
OP_WeaponUnequip2=0x1310 # Was 0x0110
OP_ApplyPoison=0x319c
OP_Save=0x2ab5
OP_TestBuff=0x0a40 # Was 0x3772
OP_CustomTitles=0x3fab
OP_Split=0x6f03
OP_YellForHelp=0x79c5
OP_LoadSpellSet=0x520e
OP_Bandolier=0x1b9f
OP_PotionBelt=0xb71d # Was 0x4d3b
OP_DuelResponse=0x51cd
OP_DuelResponse2=0x5b83
OP_SaveOnZoneReq=0x2a94
OP_ReadBook=0x1fbe
OP_Dye=0x6158
OP_InterruptCast=0x1ed1
OP_AAAction=0x7515
OP_LeadershipExpToggle=0x6005
OP_LeadershipExpUpdate=0x6527
OP_PurchaseLeadershipAA=0x7a2e
OP_UpdateLeadershipAA=0x05c4
OP_MarkNPC=0x7d33
OP_ClearNPCMarks=0x34ca
OP_DelegateAbility=0x57eb
OP_SetGroupTarget=0x2eff
OP_Charm=0x1d9e
OP_Stun=0x1a1a
OP_SendFindableNPCs=0x6788
OP_FindPersonRequest=0x6ccd
OP_FindPersonReply=0x1f1c
OP_Sound=0x6957
OP_PetBuffWindow=0x66a7
OP_LevelAppearance=0x3714
OP_Translocate=0x4613
OP_Sacrifice=0x1502
OP_PopupResponse=0x53e9
OP_OnLevelMessage=0x1b75
OP_AugmentInfo=0x7afb
OP_Petition=0x5f39
OP_SomeItemPacketMaybe=0x5357
OP_PVPStats=0x1dbf # Unsure
OP_PVPLeaderBoardRequest=0x60fa
OP_PVPLeaderBoardReply=0x9639
OP_PVPLeaderBoardDetailsRequest=0x02a0
OP_PVPLeaderBoardDetailsReply=0x628f
OP_RestState=0x3f4c
OP_RespawnWindow=0x311b
OP_LDoNButton=0x528a
OP_SetStartCity=0x7d25 # Was 0x2d1b
OP_VoiceMacroIn=0x5a9f
OP_VoiceMacroOut=0xbaab
OP_ItemViewUnknown=0x0285
OP_VetRewardsAvaliable=0x05e1
OP_VetClaimRequest=0x18c9
OP_VetClaimReply=0x22d7
OP_DisciplineUpdate=0x2bf1 # Was 0x2f05
OP_DisciplineTimer=0x3f01 # Was 0x5e3f
OP_BecomeCorpse=0x0000 # Unused?
OP_Action2=0x0000 # Unused?
OP_MobUpdate=0x3c0e
OP_NPCMoveUpdate=0x1df9
OP_CameraEffect=0x7b49
OP_SpellEffect=0x655c
OP_RemoveNimbusEffect=0x3d58
OP_AltCurrency=0x1df7
OP_AltCurrencyMerchantRequest=0x1c52
OP_AltCurrencyMerchantReply=0x5976
OP_AltCurrencyPurchase=0x2322
OP_AltCurrencySell=0x34d8
OP_AltCurrencySellSelection=0x39ca
OP_AltCurrencyReclaim=0x5f85
OP_CrystalCountUpdate=0x6b56 # Was 0x3f60
OP_CrystalCreate=0x1b2a # Was 0x5a82
OP_CrystalReclaim=0x19cb # Was 0x7616
OP_Untargetable=0x442c
OP_IncreaseStats=0x502f
OP_Weblink=0x70c8
#OP_OpenInventory=0x0000 # Likely does not exist in RoF -U
OP_OpenContainer=0x0000
OP_DzQuit=0x6dc9
OP_DzListTimers=0x59b4
OP_DzAddPlayer=0x0cc4
OP_DzRemovePlayer=0x5421
OP_DzSwapPlayer=0x0260
OP_DzMakeLeader=0x18cf
OP_DzPlayerList=0x2767
OP_DzJoinExpeditionConfirm=0x25a4
OP_DzJoinExpeditionReply=0x0dd1
OP_DzExpeditionInfo=0x74b5
OP_DzExpeditionList=0x2270
OP_DzMemberStatus=0x1952
OP_DzLeaderStatus=0x0c68
OP_DzExpeditionEndsWarning=0x2443
OP_DzMemberList=0x0000
OP_DzCompass=0x3dfd # Was 0x4f09
OP_DzChooseZone=0x0000 # Maybe 0x29d6
# New Opcodes
OP_SpawnPositionUpdate=0x0000 # Actually OP_MobUpdate ?
OP_ManaUpdate=0x48e4
OP_EnduranceUpdate=0x47d6
OP_MobManaUpdate=0x752a
OP_MobEnduranceUpdate=0x244c
# Mercenary Opcodes
OP_MercenaryDataUpdateRequest=0x5fdf
OP_MercenaryDataUpdate=0x7f41
OP_MercenaryDataRequest=0x565b
OP_MercenaryDataResponse=0x14b8
OP_MercenaryHire=0x2455
OP_MercenaryDismiss=0x1455
OP_MercenaryTimerRequest=0x2afe
OP_MercenaryTimer=0x2972
OP_MercenaryUnknown1=0x71dd
OP_MercenaryCommand=0x10d3
OP_MercenarySuspendRequest=0x096d
OP_MercenarySuspendResponse=0x1d94
OP_MercenaryUnsuspendResponse=0x2f6b
# Looting
OP_LootRequest=0x64e9
OP_EndLootRequest=0x4542
OP_LootItem=0x2cf8
OP_LootComplete=0x60fe
# bazaar trader stuff:
OP_BazaarSearch=0x3b59
OP_TraderDelItem=0x0000
OP_BecomeTrader=0x2a43
OP_TraderShop=0x2b3b
OP_Trader=0x1e94 # Was 0x6790
OP_TraderBuy=0x0000
OP_Barter=0x5df5
OP_ShopItem=0x0000
OP_BazaarInspect=0x0000
OP_Bazaar=0x0000
OP_TraderItemUpdate=0x0000
# pc/npc trading
OP_TradeRequest=0x7506
OP_TradeAcceptClick=0x2d41
OP_TradeRequestAck=0x619d
OP_TradeCoins=0x6e22
OP_FinishTrade=0x4676
OP_CancelTrade=0x2e79
OP_TradeMoneyUpdate=0x29df
OP_MoneyUpdate=0x6ef4
OP_TradeBusy=0x73c4
# Sent after canceling trade or after closing tradeskill object
OP_FinishWindow=0x4c2b
OP_FinishWindow2=0x0830
# Sent on Live for what seems to be item existance verification
# Ex. Before Right Click Effect happens from items
OP_ItemVerifyRequest=0x2977
OP_ItemVerifyReply=0x7640
# merchant stuff
OP_ShopPlayerSell=0x396d
OP_ShopRequest=0x6717
OP_ShopEnd=0x0bf6
OP_ShopEndConfirm=0x7b50
OP_ShopPlayerBuy=0x5013
OP_ShopDelItem=0x1658
# tradeskill stuff:
OP_ClickObject=0x00c6
OP_ClickObjectAction=0x49ed
OP_ClearObject=0x22c2
OP_RecipeDetails=0x120d
OP_RecipesFavorite=0x40bd
OP_RecipesSearch=0x5bc1
OP_RecipeReply=0x37ca
OP_RecipeAutoCombine=0x741a
OP_TradeSkillCombine=0x7272
# Tribute Packets:
OP_OpenGuildTributeMaster=0x57a8
OP_OpenTributeMaster=0x48e8 # Was 0x40f5
OP_SelectTribute=0x1b89
OP_TributeItem=0x0434
OP_TributeMoney=0x032b # Was 0x6fed
OP_TributeToggle=0x5c5e
OP_TributePointUpdate=0x13ab
OP_TributeNPC=0x0000
OP_GuildTributeInfo=0x0000
OP_OpenTributeReply=0x0000
OP_GuildTributeStatus=0x0000
# Adventure packets:
OP_LeaveAdventure=0x0b93
OP_AdventureFinish=0x6f69
OP_AdventureInfoRequest=0x6ecf
OP_AdventureInfo=0x5463
OP_AdventureRequest=0x4715
OP_AdventureDetails=0x43f0
OP_AdventureData=0x9515
OP_AdventureUpdate=0x372a
OP_AdventureMerchantRequest=0x4fb7 # Was 654d
OP_AdventureMerchantResponse=0x2988 # Was 7949
OP_AdventureMerchantPurchase=0x15a8 # Was 155a
OP_AdventureMerchantSell=0x486c # Was 389c
OP_AdventurePointsUpdate=0x677c # Was 7589
OP_AdventureStatsRequest=0x0130
OP_AdventureStatsReply=0x0b8d
OP_AdventureLeaderboardRequest=0x1437
OP_AdventureLeaderboardReply=0x3c78
# Group Opcodes
OP_GroupDisband=0x34d7
OP_GroupInvite=0x4533
OP_GroupFollow=0x6e8f
OP_GroupUpdate=0x2b6a
OP_GroupUpdateB=0x4c76
OP_GroupCancelInvite=0x0000
OP_GroupAcknowledge=0x465d
OP_GroupDelete=0x0fa1
OP_CancelInvite=0x2fb6
OP_GroupFollow2=0x2e85
OP_GroupInvite2=0x1a45
OP_GroupDisbandYou=0x5c5a
OP_GroupDisbandOther=0x39f0
OP_GroupLeaderChange=0x00f0
OP_GroupRoles=0x228a
OP_GroupMakeLeader=0x6050
OP_DoGroupLeadershipAbility=0x42aa
OP_GroupLeadershipAAUpdate=0x5b21
# LFG/LFP Opcodes
OP_LFGCommand=0x79f1
OP_LFGGetMatchesRequest=0x7069
OP_LFGGetMatchesResponse=0x6fd7
OP_LFPGetMatchesRequest=0x6276
OP_LFPGetMatchesResponse=0x3008
OP_LFPCommand=0x087e
OP_LFGAppearance=0x0000
OP_LFGResponse=0x0000
# Raid Opcodes
OP_RaidInvite=0x6988
OP_RaidUpdate=0x09f9
OP_RaidJoin=0x0000
# Button-push commands
OP_Taunt=0x751f
OP_CombatAbility=0x02aa
OP_SenseTraps=0x2d68 # Was 0x2ee0
OP_PickPocket=0x6d4b
OP_DisarmTraps=0x0000
OP_Disarm=0x49ca
OP_Sneak=0x1975
OP_Fishing=0x6b72
OP_InstillDoubt=0x2bd1
OP_FeignDeath=0x574e
OP_Mend=0x219f
OP_Bind_Wound=0x10d5
OP_LDoNOpen=0x57e2
# Task packets
OP_TaskDescription=0x2b71
OP_TaskActivity=0x53b3
OP_CompletedTasks=0x7c6b
OP_TaskActivityComplete=0x16c5
OP_AcceptNewTask=0x1e7a
OP_CancelTask=0x1798
OP_TaskMemberList=0x4844 # Was 0x1656
OP_OpenNewTasksWindow=0x67b4 # Was 0x11de
OP_AvaliableTask=0x0a3f # Was 0x2377
OP_TaskHistoryRequest=0x4c34
OP_TaskHistoryReply=0x593e
OP_DeclineAllTasks=0x0000
# Title opcodes
OP_NewTitlesAvailable=0x1104
OP_RequestTitles=0x71b2
OP_SendTitleList=0x6d31
OP_SetTitle=0x7ade
OP_SetTitleReply=0x23f0
# mail opcodes
OP_Command=0x0000
OP_MailboxHeader=0x0000
OP_MailHeader=0x0000
OP_MailBody=0x0000
OP_NewMail=0x0000
OP_SentConfirm=0x0000
########### Below this point should not be needed ###########
# This section are all unknown in Titanium
OP_ForceFindPerson=0x0000
OP_LocInfo=0x0000
OP_ReloadUI=0x0000
OP_ItemName=0x0000
OP_ItemLinkText=0x0000
OP_MultiLineMsg=0x0000
OP_MendHPUpdate=0x0000
OP_TargetReject=0x0000
OP_SafePoint=0x0000
OP_ApproveZone=0x0000
OP_ZoneComplete=0x0000
OP_ClientError=0x0000
OP_DumpName=0x0000
OP_Heartbeat=0x0000
OP_CrashDump=0x0000
OP_LoginComplete=0x0000
# discovered opcodes not yet used:
OP_PickLockSuccess=0x0000
OP_PlayMP3=0x0000
OP_ReclaimCrystals=0x0000
OP_DynamicWall=0x0000
OP_OpenDiscordMerchant=0x0000
OP_DiscordMerchantInventory=0x0000
OP_GiveMoney=0x0000
OP_RequestKnowledgeBase=0x0000
OP_KnowledgeBase=0x0000
OP_SlashAdventure=0x0000 # /adventure
OP_BecomePVPPrompt=0x0000
OP_MoveLogRequest=0x0000 # gone I think
OP_MoveLogDisregard=0x0000 # gone I think
# named unknowns, to make looking for real unknown easier
OP_AnnoyingZoneUnknown=0x0000
OP_Some6ByteHPUpdate=0x0000 seems to happen when you target group members
OP_QueryResponseThing=0x0000
# realityincarnate: these are just here to stop annoying several thousand byte packet dumps
#OP_LoginUnknown1=0x46d3 # OP_SendSpellChecksum
#OP_LoginUnknown2=0x040b # OP_SendSkillCapsChecksum
# Petition Opcodes
OP_PetitionSearch=0x0000 search term for petition
OP_PetitionSearchResults=0x0000 (list of?) matches from search
OP_PetitionSearchText=0x0000 text results of search
OP_PetitionUpdate=0x0000
OP_PetitionCheckout=0x0000
OP_PetitionCheckIn=0x0000
OP_PetitionQue=0x0000
OP_PetitionUnCheckout=0x0000
OP_PetitionDelete=0x0000
OP_DeletePetition=0x0000
OP_PetitionResolve=0x0000
OP_PDeletePetition=0x0000
OP_PetitionBug=0x0000
OP_PetitionRefresh=0x0000
OP_PetitionCheckout2=0x0000
OP_PetitionViewPetition=0x0000
# Login opcodes
OP_SessionReady=0x0000
OP_Login=0x0000
OP_ServerListRequest=0x0000
OP_PlayEverquestRequest=0x0000
OP_PlayEverquestResponse=0x0000
OP_ChatMessage=0x0000
OP_LoginAccepted=0x0000
OP_ServerListResponse=0x0000
OP_Poll=0x0000
OP_EnterChat=0x0000
OP_PollResponse=0x0000
# raw opcodes
OP_RAWSessionRequest=0x0000
OP_RAWSessionResponse=0x0000
OP_RAWCombined=0x0000
OP_RAWSessionDisconnect=0x0000
OP_RAWKeepAlive=0x0000
OP_RAWSessionStatRequest=0x0000
OP_RAWSessionStatResponse=0x0000
OP_RAWPacket=0x0000
OP_RAWFragment=0x0000
OP_RAWOutOfOrderAck=0x0000
OP_RAWAck=0x0000
OP_RAWAppCombined=0x0000
OP_RAWOutOfSession=0x0000
# we need to document the differences between these packets to make identifying them easier
OP_Some3ByteHPUpdate=0x0000 # initial HP update for mobs
OP_InitialHPUpdate=0x0000

Binary file not shown.

View File

@ -1476,7 +1476,6 @@ void Client::SendSound(){//Makes a sound.
memset(&x[64],0xffffffff,sizeof(uint32));
memcpy(outapp->pBuffer,x,outapp->size);
QueuePacket(outapp);
DumpPacket(outapp);
safe_delete(outapp);
}
@ -7141,73 +7140,91 @@ void Client::SendMercPersonalInfo()
if (GetClientVersion() >= EQClientRoF)
{
MercenaryDataUpdate_Struct* mdus = new MercenaryDataUpdate_Struct;
MercTemplate *mercData = &zone->merc_templates[GetMercInfo().MercTemplateID];
if (mercData)
{
int i = 0;
int stancecount = 0;
stancecount += zone->merc_stance_list[GetMercInfo().MercTemplateID].size();
if(stancecount > MAX_MERC_STANCES || mercCount > MAX_MERC || mercTypeCount > MAX_MERC_GRADES)
{
SendMercMerchantResponsePacket(0);
return;
}
if (mercCount > 0 && mercCount)
{
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryDataUpdate, sizeof(MercenaryDataUpdate_Struct));
MercenaryDataUpdate_Struct* mdus = (MercenaryDataUpdate_Struct*)outapp->pBuffer;
mdus->MercStatus = 0;
mdus->MercCount = mercCount;
if (mercCount > 0)
mdus->MercData[i].MercID = mercData->MercTemplateID;
mdus->MercData[i].MercType = mercData->MercType;
mdus->MercData[i].MercSubType = mercData->MercSubType;
mdus->MercData[i].PurchaseCost = Merc::CalcPurchaseCost(mercData->MercTemplateID, GetLevel(), 0);
mdus->MercData[i].UpkeepCost = Merc::CalcUpkeepCost(mercData->MercTemplateID, GetLevel(), 0);
mdus->MercData[i].Status = 0;
mdus->MercData[i].AltCurrencyCost = Merc::CalcPurchaseCost(mercData->MercTemplateID, GetLevel(), altCurrentType);
mdus->MercData[i].AltCurrencyUpkeep = Merc::CalcPurchaseCost(mercData->MercTemplateID, GetLevel(), altCurrentType);
mdus->MercData[i].AltCurrencyType = altCurrentType;
mdus->MercData[i].MercUnk01 = 0;
mdus->MercData[i].TimeLeft = GetMercInfo().MercTimerRemaining; //GetMercTimer().GetRemainingTime();
mdus->MercData[i].MerchantSlot = i + 1;
mdus->MercData[i].MercUnk02 = 1;
mdus->MercData[i].StanceCount = zone->merc_stance_list[mercData->MercTemplateID].size();
mdus->MercData[i].MercUnk03 = 0;
mdus->MercData[i].MercUnk04 = 1;
strn0cpy(mdus->MercData[i].MercName, GetMercInfo().merc_name , sizeof(mdus->MercData[i].MercName));
uint32 stanceindex = 0;
if (mdus->MercData[i].StanceCount != 0)
{
mdus->MercData = new MercenaryData_Struct[mercCount];
mdus->MercData[i].MercID = mercData->MercTemplateID;
mdus->MercData[i].MercType = mercData->MercType;
mdus->MercData[i].MercSubType = mercData->MercSubType;
mdus->MercData[i].PurchaseCost = Merc::CalcPurchaseCost(mercData->MercTemplateID, GetLevel(), 0);
mdus->MercData[i].UpkeepCost = Merc::CalcUpkeepCost(mercData->MercTemplateID, GetLevel(), 0);
mdus->MercData[i].Status = 0;
mdus->MercData[i].AltCurrencyCost = Merc::CalcPurchaseCost(mercData->MercTemplateID, GetLevel(), altCurrentType);
mdus->MercData[i].AltCurrencyUpkeep = Merc::CalcPurchaseCost(mercData->MercTemplateID, GetLevel(), altCurrentType);
mdus->MercData[i].AltCurrencyType = altCurrentType;
mdus->MercData[i].MercUnk01 = 0;
mdus->MercData[i].TimeLeft = GetMercInfo().MercTimerRemaining; //GetMercTimer().GetRemainingTime();
mdus->MercData[i].MerchantSlot = i + 1;
mdus->MercData[i].MercUnk02 = 1;
mdus->MercData[i].StanceCount = zone->merc_stance_list[mercData->MercTemplateID].size();
mdus->MercData[i].MercUnk03 = 0;
mdus->MercData[i].MercUnk04 = 1;
strn0cpy(mdus->MercData[i].MercName, GetMercInfo().merc_name , sizeof(mdus->MercData[i].MercName));
uint32 stanceindex = 0;
if (mdus->MercData[i].StanceCount != 0)
list<MercStanceInfo>::iterator iter = zone->merc_stance_list[mercData->MercTemplateID].begin();
while(iter != zone->merc_stance_list[mercData->MercTemplateID].end())
{
mdus->MercData[i].Stances = new MercenaryStance_Struct[mdus->MercData[i].StanceCount];
list<MercStanceInfo>::iterator iter = zone->merc_stance_list[mercData->MercTemplateID].begin();
while(iter != zone->merc_stance_list[mercData->MercTemplateID].end())
{
mdus->MercData[i].Stances[stanceindex].StanceIndex = stanceindex;
mdus->MercData[i].Stances[stanceindex].Stance = (iter->StanceID);
stanceindex++;
iter++;
}
mdus->MercData[i].Stances[stanceindex].StanceIndex = stanceindex;
mdus->MercData[i].Stances[stanceindex].Stance = (iter->StanceID);
stanceindex++;
iter++;
}
}
mdus->MercData[i].MercUnk05 = 1;
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryDataUpdate, 1); //Packet sizes are handled by the encoder.
outapp->pBuffer = (unsigned char*)mdus;
//DumpPacket(outapp);
FastQueuePacket(&outapp);
mdus->MercData[i].MercUnk05 = 1;
FastQueuePacket(&outapp);
return;
}
}
}
else
{
MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct;
int stancecount = 0;
stancecount += zone->merc_stance_list[GetMercInfo().MercTemplateID].size();
if(mercCount > MAX_MERC || mercTypeCount > MAX_MERC_GRADES)
{
if (GetClientVersion() == EQClientSoD)
{
SendMercMerchantResponsePacket(0);
}
return;
}
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryDataResponse, sizeof(MercenaryMerchantList_Struct));
MercenaryMerchantList_Struct* mml = (MercenaryMerchantList_Struct*)outapp->pBuffer;
MercTemplate *mercData = &zone->merc_templates[GetMercInfo().MercTemplateID];
if(mercData)
{
if(mercTypeCount > 0)
{
mml->MercTypeCount = mercTypeCount; //We only should have one merc entry.
mml->MercGrades = new MercenaryGrade_Struct[mercTypeCount]; // DBStringID for Type
mml->MercGrades[i] = 1;
}
mml->MercCount = mercCount;
if(mercCount > 0)
{
mml->Mercs = new MercenaryListEntry_Struct[mercCount];
mml->Mercs[i].MercID = mercData->MercTemplateID;
mml->Mercs[i].MercType = mercData->MercType;
mml->Mercs[i].MercSubType = mercData->MercSubType;
@ -7228,7 +7245,6 @@ void Client::SendMercPersonalInfo()
int stanceindex = 0;
if(mml->Mercs[i].StanceCount != 0)
{
mml->Mercs[i].Stances = new MercenaryStance_Struct[mml->Mercs[i].StanceCount];
list<MercStanceInfo>::iterator iter = zone->merc_stance_list[mercData->MercTemplateID].begin();
while(iter != zone->merc_stance_list[mercData->MercTemplateID].end())
{
@ -7238,17 +7254,31 @@ void Client::SendMercPersonalInfo()
iter++;
}
}
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryDataResponse, 1); //Packet sizes are handled by the encoder.
outapp->pBuffer = (unsigned char*)mml;
// DumpPacket(outapp);
FastQueuePacket(&outapp);
}
else
{
safe_delete(outapp);
if (GetClientVersion() == EQClientSoD)
{
SendMercMerchantResponsePacket(0);
}
return;
}
if (GetClientVersion() == EQClientSoD)
{
SendMercMerchantResponsePacket(0);
}
}
else
{
safe_delete(outapp);
if (GetClientVersion() == EQClientSoD)
{
SendMercMerchantResponsePacket(0);
}
return;
}
}
}
@ -7259,8 +7289,6 @@ void Client::SendClearMercInfo()
nmhs->MercStatus = -1;
nmhs->MercCount = 0;
nmhs->MercID = 1;
DumpPacket(outapp);
FastQueuePacket(&outapp);
}

View File

@ -3540,13 +3540,11 @@ void Client::Handle_OP_WearChange(const EQApplicationPacket *app)
{
if (app->size != sizeof(WearChange_Struct)) {
cout << "Wrong size: OP_WearChange, size=" << app->size << ", expected " << sizeof(WearChange_Struct) << endl;
//DumpPacket(app);
DumpPacket(app);
return;
}
WearChange_Struct* wc=(WearChange_Struct*)app->pBuffer;
//printf("Wearchange:\n");
//DumpPacket(app);
if(wc->spawn_id != GetID())
return;
@ -3597,7 +3595,7 @@ void Client::Handle_OP_WhoAllRequest(const EQApplicationPacket *app)
{
if (app->size != sizeof(Who_All_Struct)) {
cout << "Wrong size on OP_WhoAll. Got: " << app->size << ", Expected: " << sizeof(Who_All_Struct) << endl;
//DumpPacket(app);
DumpPacket(app);
return;
}
Who_All_Struct* whoall = (Who_All_Struct*) app->pBuffer;
@ -3696,7 +3694,6 @@ void Client::Handle_OP_EndLootRequest(const EQApplicationPacket *app)
Entity* entity = entity_list.GetID(*((uint16*)app->pBuffer));
if (entity == 0) {
//DumpPacket(app);
Message(13, "Error: OP_EndLootRequest: Corpse not found (ent = 0)");
if(GetClientVersion() >= EQClientSoD)
Corpse::SendEndLootErrorPacket(this);
@ -7388,27 +7385,6 @@ void Client::Handle_OP_Emote(const EQApplicationPacket *app)
memcpy(out->message, name, len_name);
memcpy(&out->message[len_name], in->message, len_msg);
//cout << "######### Outgoing emote packet" << endl;
//DumpPacket(outapp);
/*
if (target && target->IsClient()) {
entity_list.QueueCloseClients(this, outapp, false, 100, target);
cptr = outapp->pBuffer + 2;
// not sure if live does this or not. thought it was a nice feature, but would take a lot to
// clean up grammatical and other errors. Maybe with a regex parser...
replacestr((char *)cptr, target->GetName(), "you");
replacestr((char *)cptr, " he", " you");
replacestr((char *)cptr, " she", " you");
replacestr((char *)cptr, " him", " you");
replacestr((char *)cptr, " her", " you");
target->CastToClient()->QueuePacket(outapp);
}
else
*/
entity_list.QueueCloseClients(this, outapp, true, 100,0,true,FilterSocials);
safe_delete(outapp);
@ -7429,7 +7405,6 @@ void Client::Handle_OP_Animation(const EQApplicationPacket *app)
//might verify spawn ID, but it wouldent affect anything
// an emote (i.e., waving arm to say hello)
DoAnim(s->action, s->value);
return;
@ -7853,7 +7828,6 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
if(Buyer) {
Trader_EndTrader();
Message(13, "You cannot be a Trader and Buyer at the same time.");
DumpPacket(app);
return;
}
@ -7892,7 +7866,6 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
if(!TradeItemsValid) {
Trader_EndTrader();
DumpPacket(app);
return;
}
@ -7948,7 +7921,6 @@ void Client::Handle_OP_Trader(const EQApplicationPacket *app)
return;
}
DumpPacket(app);
return;
}
@ -8127,8 +8099,6 @@ void Client::Handle_OP_ClientError(const EQApplicationPacket *app)
ClientError_Struct* error = (ClientError_Struct*)app->pBuffer;
LogFile->write(EQEMuLog::Error, "Client error: %s", error->character_name);
LogFile->write(EQEMuLog::Error, "Error message:%s", error->message);
//if (EQDEBUG>=5)
// DumpPacket(app);
return;
}
@ -13495,8 +13465,6 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
//send info about your current merc(s)
}
DumpPacket(app);
if(!RuleB(Mercs, AllowMercs)) {
return;
}
@ -13514,24 +13482,35 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
return;
}
MercenaryMerchantList_Struct* mml = new MercenaryMerchantList_Struct;
mercTypeCount = tar->GetNumMercTypes(GetClientVersion());
mercCount = tar->GetNumMercs(GetClientVersion());
if(mercCount > MAX_MERC)
return;
std::list<MercType> mercTypeList = tar->GetMercTypesList(GetClientVersion());
std::list<MercData> mercDataList = tar->GetMercsList(GetClientVersion());
mml->MercTypeCount = mercTypeCount;
int i = 0;
int StanceCount = 0;
for(std::list<MercData>::iterator mercListItr = mercDataList.begin(); mercListItr != mercDataList.end(); mercListItr++)
{
list<MercStanceInfo>::iterator siter = zone->merc_stance_list[mercListItr->MercTemplateID].begin();
for(siter = zone->merc_stance_list[mercListItr->MercTemplateID].begin(); siter != zone->merc_stance_list[mercListItr->MercTemplateID].end(); siter++)
{
StanceCount++;
}
}
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryDataResponse, sizeof(MercenaryMerchantList_Struct));
MercenaryMerchantList_Struct* mml = (MercenaryMerchantList_Struct*)outapp->pBuffer;
mml->MercTypeCount = mercTypeCount;
if(mercTypeCount > 0)
{
mml->MercGrades = new MercenaryGrade_Struct[mercTypeCount];
for(std::list<MercType>::iterator mercTypeListItr = mercTypeList.begin(); mercTypeListItr != mercTypeList.end(); mercTypeListItr++) {
mml->MercGrades[i].GradeCountEntry = mercTypeListItr->Type; // DBStringID for Type
mml->MercGrades[i] = mercTypeListItr->Type; // DBStringID for Type
i++;
}
}
@ -13539,50 +13518,48 @@ void Client::Handle_OP_MercenaryDataRequest(const EQApplicationPacket *app)
if(mercCount > 0)
{
mml->Mercs = new MercenaryListEntry_Struct[mercCount];
i = 0;
for(std::list<MercData>::iterator mercListItr = mercDataList.begin(); mercListItr != mercDataList.end(); mercListItr++)
for(std::list<MercData>::iterator mercListIter = mercDataList.begin(); mercListIter != mercDataList.end(); mercListIter++)
{
mml->Mercs[i].MercID = mercListItr->MercTemplateID;
mml->Mercs[i].MercType = mercListItr->MercType;
mml->Mercs[i].MercSubType = mercListItr->MercSubType;
mml->Mercs[i].PurchaseCost = RuleB(Mercs, ChargeMercPurchaseCost) ? Merc::CalcPurchaseCost(mercListItr->MercTemplateID, GetLevel(), 0): 0;
mml->Mercs[i].UpkeepCost = RuleB(Mercs, ChargeMercUpkeepCost) ? Merc::CalcUpkeepCost(mercListItr->MercTemplateID, GetLevel(), 0): 0;
mml->Mercs[i].MercID = mercListIter->MercTemplateID;
mml->Mercs[i].MercType = mercListIter->MercType;
mml->Mercs[i].MercSubType = mercListIter->MercSubType;
mml->Mercs[i].PurchaseCost = RuleB(Mercs, ChargeMercPurchaseCost) ? Merc::CalcPurchaseCost(mercListIter->MercTemplateID, GetLevel(), 0): 0;
mml->Mercs[i].UpkeepCost = RuleB(Mercs, ChargeMercUpkeepCost) ? Merc::CalcUpkeepCost(mercListIter->MercTemplateID, GetLevel(), 0): 0;
mml->Mercs[i].Status = 0;
mml->Mercs[i].AltCurrencyCost = RuleB(Mercs, ChargeMercPurchaseCost) ? Merc::CalcPurchaseCost(mercListItr->MercTemplateID, GetLevel(), altCurrentType): 0;
mml->Mercs[i].AltCurrencyUpkeep = RuleB(Mercs, ChargeMercUpkeepCost) ? Merc::CalcUpkeepCost(mercListItr->MercTemplateID, GetLevel(), altCurrentType): 0;
mml->Mercs[i].AltCurrencyCost = RuleB(Mercs, ChargeMercPurchaseCost) ? Merc::CalcPurchaseCost(mercListIter->MercTemplateID, GetLevel(), altCurrentType): 0;
mml->Mercs[i].AltCurrencyUpkeep = RuleB(Mercs, ChargeMercUpkeepCost) ? Merc::CalcUpkeepCost(mercListIter->MercTemplateID, GetLevel(), altCurrentType): 0;
mml->Mercs[i].AltCurrencyType = altCurrentType;
mml->Mercs[i].MercUnk01 = 0;
mml->Mercs[i].TimeLeft = -1;
mml->Mercs[i].MerchantSlot = i + 1;
mml->Mercs[i].MercUnk02 = 1;
mml->Mercs[i].StanceCount = zone->merc_stance_list[mercListItr->MercTemplateID].size();
int mercStanceCount = 0;
list<MercStanceInfo>::iterator iter = zone->merc_stance_list[mercListIter->MercTemplateID].begin();
for(iter = zone->merc_stance_list[mercListIter->MercTemplateID].begin(); iter != zone->merc_stance_list[mercListIter->MercTemplateID].end(); iter++)
{
mercStanceCount++;
}
mml->Mercs[i].StanceCount = mercStanceCount;
mml->Mercs[i].MercUnk03 = 519044964;
mml->Mercs[i].MercUnk04 = 1;
//mml->Mercs[i].MercName;
int stanceindex = 0;
if(mml->Mercs[i].StanceCount != 0)
if(mercStanceCount > 0)
{
mml->Mercs[i].Stances = new MercenaryStance_Struct[mml->Mercs[i].StanceCount];
list<MercStanceInfo>::iterator iter = zone->merc_stance_list[mercListItr->MercTemplateID].begin();
while(iter != zone->merc_stance_list[mercListItr->MercTemplateID].end())
list<MercStanceInfo>::iterator iter2 = zone->merc_stance_list[mercListIter->MercTemplateID].begin();
while(iter2 != zone->merc_stance_list[mercListIter->MercTemplateID].end())
{
mml->Mercs[i].Stances[stanceindex].StanceIndex = stanceindex;
mml->Mercs[i].Stances[stanceindex].Stance = (iter->StanceID);
mml->Mercs[i].Stances[stanceindex].Stance = (iter2->StanceID);
stanceindex++;
iter++;
iter2++;
}
}
i++;
}
}
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryDataResponse, 1); //Packet sizes are handled by the encoder.
outapp->pBuffer = (unsigned char*)mml;
// DumpPacket(outapp);
FastQueuePacket(&outapp);
}
}
@ -13604,8 +13581,6 @@ void Client::Handle_OP_MercenaryHire(const EQApplicationPacket *app)
uint32 merc_unk1 = mmrq->MercUnk01;
uint32 merc_unk2 = mmrq->MercUnk02;
DumpPacket(app);
if(MERC_DEBUG > 0)
Message(7, "Mercenary Debug: Template ID (%i), Merchant ID (%i), Unknown1 (%i), Unknown2 (%i)", merc_template_id, merchant_id, merc_unk1, merc_unk2);
@ -13667,8 +13642,6 @@ void Client::Handle_OP_MercenarySuspendRequest(const EQApplicationPacket *app)
SuspendMercenary_Struct* sm = (SuspendMercenary_Struct*) app->pBuffer;
uint32 merc_suspend = sm->SuspendMerc; // Seen 30 for suspending or unsuspending
DumpPacket(app);
if(MERC_DEBUG > 0)
Message(7, "Mercenary Debug: Suspend ( %i ) received.", merc_suspend);
@ -13693,8 +13666,6 @@ void Client::Handle_OP_MercenaryCommand(const EQApplicationPacket *app)
uint32 merc_command = mc->MercCommand; // Seen 0 (zone in with no merc or suspended), 1 (dismiss merc), 5 (normal state), 20 (unknown), 36 (zone in with merc)
int32 option = mc->Option; // Seen -1 (zone in with no merc), 0 (setting to passive stance), 1 (normal or setting to balanced stance)
DumpPacket(app);
if(MERC_DEBUG > 0)
Message(7, "Mercenary Debug: Command %i, Option %i received.", merc_command, option);
@ -13747,8 +13718,6 @@ void Client::Handle_OP_MercenaryDataUpdateRequest(const EQApplicationPacket *app
return;
}
DumpPacket(app);
if(MERC_DEBUG > 0)
Message(7, "Mercenary Debug: Data Update Request Received.");
@ -13769,8 +13738,6 @@ void Client::Handle_OP_MercenaryDismiss(const EQApplicationPacket *app)
return;
}
DumpPacket(app);
uint8 Command = 0;
if(app->size > 0)
{
@ -13789,7 +13756,7 @@ void Client::Handle_OP_MercenaryDismiss(const EQApplicationPacket *app)
merc->Dismiss();
}
// Unsure if there is a server response to this packet
SendMercMerchantResponsePacket(10);
}
@ -13804,8 +13771,6 @@ void Client::Handle_OP_MercenaryTimerRequest(const EQApplicationPacket *app)
return;
}
DumpPacket(app);
if(MERC_DEBUG > 0)
Message(7, "Mercenary Debug: Timer Request received.");

View File

@ -930,7 +930,6 @@ void Client::BulkSendInventoryItems() {
ptr += length;
}
}
//DumpPacket(outapp);
QueuePacket(outapp);
safe_delete(outapp);
}
@ -1309,8 +1308,6 @@ void Client::OPMoveCoin(const EQApplicationPacket* app)
int32 *from_bucket = 0, *to_bucket = 0;
Mob* trader = trade->With();
//DumpPacket(app);
// could just do a range, but this is clearer and explicit
if
(

View File

@ -148,7 +148,7 @@ void Doors::HandleClick(Client* sender, uint8 trigger)
EQApplicationPacket* outapp = new EQApplicationPacket(OP_MoveDoor, sizeof(MoveDoor_Struct));
MoveDoor_Struct* md = (MoveDoor_Struct*)outapp->pBuffer;
//DumpPacket(app);
md->doorid = door_id;
/////////////////////////////////////////////////////////////////
//used_pawn: Locked doors! Rogue friendly too =)

View File

@ -1980,7 +1980,6 @@ void Client::SendItemPacket(int16 slot_id, const ItemInst* inst, ItemPacketType
#if EQDEBUG >= 9
DumpPacket(outapp);
#endif
//DumpPacket(outapp);
FastQueuePacket(&outapp);
}

View File

@ -2300,7 +2300,10 @@ bool Merc::AICastSpell(int8 iChance, int32 iSpellTypes) {
//we don't need spam of bots healing themselves
MakeAnyLenString(&gmsg, "Casting %s on %s.", spells[selectedMercSpell.spellid].name, tar->GetCleanName());
if(gmsg)
{
MercGroupSay(this, gmsg);
safe_delete_array(gmsg);
}
}
}
@ -5644,7 +5647,7 @@ bool Merc::Unsuspend(bool setMaxStats) {
if(!mercOwner->IsGrouped())
{
Group *g = new Group(mercOwner);
if(AddMercToGroup(this, g))
if(g && AddMercToGroup(this, g))
{
entity_list.AddGroup(g);
database.SetGroupLeaderName(g->GetID(), mercOwner->GetName());
@ -5655,6 +5658,15 @@ bool Merc::Unsuspend(bool setMaxStats) {
loaded = true;
}
else
{
if(MERC_DEBUG > 0)
mercOwner->Message(7, "Mercenary failed to join the group - Suspending");
Suspend();
safe_delete(g);
return false;
}
}
else if (AddMercToGroup(this, mercOwner->GetGroup()))
{
@ -5894,24 +5906,18 @@ void Client::SendMercMerchantResponsePacket(int32 response_type) {
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryHire, sizeof(MercenaryMerchantResponse_Struct));
MercenaryMerchantResponse_Struct* mmr = (MercenaryMerchantResponse_Struct*)outapp->pBuffer;
mmr->ResponseType = response_type; // send specified response type
DumpPacket(outapp);
FastQueuePacket(&outapp);
}
void Client::SendMercenaryUnknownPacket(uint8 type) {
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryUnknown1, 1);
outapp->WriteUInt8(type);
DumpPacket(outapp);
FastQueuePacket(&outapp);
}
void Client::SendMercenaryUnsuspendPacket(uint8 type) {
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenaryUnsuspendResponse, 1);
outapp->WriteUInt8(type);
DumpPacket(outapp);
FastQueuePacket(&outapp);
}
@ -5919,8 +5925,6 @@ void Client::SendMercSuspendResponsePacket(uint32 suspended_time) {
EQApplicationPacket *outapp = new EQApplicationPacket(OP_MercenarySuspendResponse, sizeof(SuspendMercenaryResponse_Struct));
SuspendMercenaryResponse_Struct* smr = (SuspendMercenaryResponse_Struct*)outapp->pBuffer;
smr->SuspendTime = suspended_time; // Seen 0 (not suspended) or c9 c2 64 4f (suspended on Sat Mar 17 11:58:49 2012) - Unix Timestamp
DumpPacket(outapp);
FastQueuePacket(&outapp);
}
@ -5938,8 +5942,6 @@ void Client::SendMercTimerPacket(int32 entity_id, int32 merc_state, int32 suspen
mss->MercUnk01 = unk01; // Seen 180000 - 3 minutes in ms - Used for the unsuspend button refresh timer
mss->MercState = merc_state; // Seen 5 (normal) or 1 (suspended)
mss->SuspendedTime = suspended_time; // Seen 0 for not suspended or Unix Timestamp for suspended merc
DumpPacket(outapp);
FastQueuePacket(&outapp);
}

View File

@ -840,7 +840,6 @@ void ClientTaskState::EnableTask(int CharID, int TaskCount, int *TaskList) {
_log(TASKS__UPDATE, "New enabled task list ");
for(unsigned int i=0; i<EnabledTasks.size(); i++)
_log(TASKS__UPDATE, "%i ", EnabledTasks[i]);
fflush(stdout);
if(TasksEnabled.size() == 0 ) return;
@ -901,7 +900,6 @@ void ClientTaskState::DisableTask(int CharID, int TaskCount, int *TaskList) {
_log(TASKS__UPDATE, "New enabled task list ");
for(unsigned int i=0; i<EnabledTasks.size(); i++)
_log(TASKS__UPDATE, "%i ", EnabledTasks[i]);
fflush(stdout);
if(TasksDisabled.size() == 0) return;
@ -2561,7 +2559,7 @@ void Client::SendTaskFailed(int TaskID, int TaskIndex) {
tac->unknown5 = 0; // 0 for task complete or failed.
_log(TASKS__UPDATE, "TaskFailed");
//DumpPacket(outapp); fflush(stdout);
_pkt(TASKS__PACKETS, outapp);
QueuePacket(outapp);

View File

@ -517,7 +517,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
outp->reply_code = 0x00000000; //success for finding it...
user->QueuePacket(outapp);
//DumpPacket(outapp);
safe_delete(outapp);
@ -665,7 +665,6 @@ void Client::TradeskillSearchResults(const char *query, unsigned long qlen,
reply->trivial = trivial;
strn0cpy(reply->recipe_name, name, sizeof(reply->recipe_name));
//DumpPacket(outapp);
FastQueuePacket(&outapp);
}
mysql_free_result(result);
@ -1520,4 +1519,4 @@ bool Client::CanIncreaseTradeskill(SkillType tradeskill) {
break; //Other skills unchecked and ability to increase assumed true
}
return true;
}
}

View File

@ -392,7 +392,6 @@ void WorldServer::Process() {
_log(ZONE__WORLD, "Error: WhoAllReturnStruct did not point to a valid client! "
"id=%i, playerineqstring=%i, playersinzonestring=%i. Dumping WhoAllReturnStruct:",
wars->id, wars->playerineqstring, wars->playersinzonestring);
//DumpPacket(pack);
#endif
}
}
@ -495,7 +494,7 @@ void WorldServer::Process() {
if (!(Zone::Bootup(zst->zoneid, zst->instanceid, zst->makestatic))) {
SendChannelMessage(0, 0, 10, 0, 0, "%s:%i Zone::Bootup failed: %s", net.GetZoneAddress(), net.GetZonePort(), database.GetZoneName(zst->zoneid));
}
// Moved annoucement to ZoneBootup() - Quagmire
// Moved annoucement to ZoneBootup()
// else
// SendEmoteMessage(0, 0, 15, "Zone bootup: %s", zone->GetLongName());
break;
@ -1822,7 +1821,6 @@ void WorldServer::Process() {
default: {
cout << " Unknown ZSopcode:" << (int)pack->opcode;
cout << " size:" << pack->size << endl;
//DumpPacket(pack->pBuffer, pack->size);
break;
}
}

View File

@ -1748,7 +1748,7 @@ bool ZoneDatabase::SaveMerc(Merc *merc) {
}
}
safe_delete(Query);
safe_delete_array(Query);
if(!errorMessage.empty() || (Result && affectedRows != 1)) {
if(owner && !errorMessage.empty())
@ -1884,15 +1884,14 @@ void ZoneDatabase::LoadMercBuffs(Merc *merc) {
BuffsLoaded = true;
}
safe_delete(Query);
safe_delete_array(Query);
Query = 0;
if(errorMessage.empty() && BuffsLoaded) {
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "DELETE FROM merc_buffs WHERE MercId = %u", merc->GetMercID()), TempErrorMessageBuffer)) {
errorMessage = std::string(TempErrorMessageBuffer);
safe_delete(Query);
Query = 0;
}
safe_delete_array(Query);
}
if(!errorMessage.empty()) {
@ -1917,12 +1916,16 @@ bool ZoneDatabase::DeleteMerc(uint32 merc_id) {
else
TempCounter++;
safe_delete_array(Query);
if(!database.RunQuery(Query, MakeAnyLenString(&Query, "DELETE FROM mercs WHERE MercID = '%u'", merc_id), TempErrorMessageBuffer)) {
errorMessage = std::string(TempErrorMessageBuffer);
}
else
TempCounter++;
safe_delete_array(Query);
if(TempCounter == 2)
Result = true;
}
@ -2202,7 +2205,7 @@ uint8 ZoneDatabase::GetZoneWeather(uint32 zoneid, uint32 version) {
MYSQL_RES *result;
MYSQL_ROW row;
if (RunQuery(query, MakeAnyLenString(&query, "SELECT weather FROM zone WHERE zoneidnumber=%i AND (version=%i OR version=0) ORDER BY version DESC", zoneid), errbuf, &result))
if (RunQuery(query, MakeAnyLenString(&query, "SELECT weather FROM zone WHERE zoneidnumber=%i AND (version=%i OR version=0) ORDER BY version DESC", zoneid, version), errbuf, &result))
{
safe_delete_array(query);
if (mysql_num_rows(result) > 0) {