realityincarnate
04-19-2009, 11:28 PM
These are a couple of small changes to the structure and encoding files that fix the option to show or not show helmet graphics. With these changes, the client's selection will persist through zoning and camping, rather than reseting like it currently does.
Index: common/eq_constants.h
================================================== =================
--- common/eq_constants.h (revision 437)
+++ common/eq_constants.h (working copy)
@@ -148,6 +148,7 @@
#define AT_Split 28 // 0 = normal, 1 = autosplit on
#define AT_Size 29 // spawn's size
#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name
+#define AT_ShowHelmet 43 // 0 = do not show helmet graphic, 1 = show graphic
//#define AT_Trader 300 // Bazzar Trader Mode
// solar: animations for AT_Anim
Index: common/eq_packet_structs.h
================================================== =================
--- common/eq_packet_structs.h (revision 437)
+++ common/eq_packet_structs.h (working copy)
@@ -880,7 +880,7 @@
/*7204*/ uint32 career_tribute_points;
/*7208*/ uint32 unknown6056;
/*7212*/ uint32 tribute_points;
-/*7216*/ uint32 unknown6064;
+/*7216*/ uint32 showhelm; //0=don't show helmet graphics, 1=
/*7220*/ uint32 tribute_active; //1=active
/*7224*/ Tribute_Struct tributes[MAX_PLAYER_TRIBUTES];
/*7264*/ Disciplines_Struct disciplines; //fathernitwit: 10-06-04
Index: common/patches/SoF.cpp
================================================== =================
--- common/patches/SoF.cpp (revision 437)
+++ common/patches/SoF.cpp (working copy)
@@ -586,8 +586,7 @@
OUT(raidAutoconsent);
OUT(guildAutoconsent);
// OUT(unknown19575[5]);
-// OUT(showhelm);
- eq->showhelm = 1;
+ eq->showhelm = emu->showhelm;
OUT(RestTimer);
// OUT(unknown19584[4]);
// OUT(unknown19588);
Index: common/patches/Titanium.cpp
================================================== =================
--- common/patches/Titanium.cpp (revision 437)
+++ common/patches/Titanium.cpp (working copy)
@@ -382,8 +382,7 @@
OUT(raidAutoconsent);
OUT(guildAutoconsent);
// OUT(unknown19575[5]);
-// OUT(showhelm);
- eq->showhelm = 1;
+ eq->showhelm = emu->showhelm;
// OUT(unknown19584[4]);
// OUT(unknown19588);
@@ -470,7 +469,7 @@
// eq->padding0070 = emu->padding0070;
eq->eyecolor1 = emu->eyecolor1;
// eq->unknown0115[24] = emu->unknown0115[24];
- eq->showhelm = true;
+ eq->showhelm = emu->showhelm;
// eq->unknown0140[4] = emu->unknown0140[4];
eq->is_npc = emu->is_npc;
eq->hairstyle = emu->hairstyle;
Index: zone/client_packet.cpp
================================================== =================
--- zone/client_packet.cpp (revision 437)
+++ zone/client_packet.cpp (working copy)
@@ -2083,6 +2083,9 @@
// don't do anything with this, we tell the client when it's
// levitating, not the other way around
}
+ else if (sa->type == AT_ShowHelmet) { // a client has changed the "Show My Helm" option
+ m_pp.showhelm = (sa->parameter == 1);
+ }
else {
cout << "Unknown SpawnAppearance type: 0x" << hex << setw(4) << setfill('0') << sa->type << dec
<< " value: 0x" << hex << setw(8) << setfill('0') << sa->parameter << dec << endl;
@@ -7155,7 +7158,7 @@
if(!p_timers.Load(&database)) {
LogFile->write(EQEMuLog::Error, "Unable to load ability timers from the database for %s (%i)!", GetCleanName(), CharacterID());
}
-
+
#ifdef _EQDEBUG
printf("Dumping inventory on load:\n");
m_inv.dumpInventory();
Index: common/eq_constants.h
================================================== =================
--- common/eq_constants.h (revision 437)
+++ common/eq_constants.h (working copy)
@@ -148,6 +148,7 @@
#define AT_Split 28 // 0 = normal, 1 = autosplit on
#define AT_Size 29 // spawn's size
#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name
+#define AT_ShowHelmet 43 // 0 = do not show helmet graphic, 1 = show graphic
//#define AT_Trader 300 // Bazzar Trader Mode
// solar: animations for AT_Anim
Index: common/eq_packet_structs.h
================================================== =================
--- common/eq_packet_structs.h (revision 437)
+++ common/eq_packet_structs.h (working copy)
@@ -880,7 +880,7 @@
/*7204*/ uint32 career_tribute_points;
/*7208*/ uint32 unknown6056;
/*7212*/ uint32 tribute_points;
-/*7216*/ uint32 unknown6064;
+/*7216*/ uint32 showhelm; //0=don't show helmet graphics, 1=
/*7220*/ uint32 tribute_active; //1=active
/*7224*/ Tribute_Struct tributes[MAX_PLAYER_TRIBUTES];
/*7264*/ Disciplines_Struct disciplines; //fathernitwit: 10-06-04
Index: common/patches/SoF.cpp
================================================== =================
--- common/patches/SoF.cpp (revision 437)
+++ common/patches/SoF.cpp (working copy)
@@ -586,8 +586,7 @@
OUT(raidAutoconsent);
OUT(guildAutoconsent);
// OUT(unknown19575[5]);
-// OUT(showhelm);
- eq->showhelm = 1;
+ eq->showhelm = emu->showhelm;
OUT(RestTimer);
// OUT(unknown19584[4]);
// OUT(unknown19588);
Index: common/patches/Titanium.cpp
================================================== =================
--- common/patches/Titanium.cpp (revision 437)
+++ common/patches/Titanium.cpp (working copy)
@@ -382,8 +382,7 @@
OUT(raidAutoconsent);
OUT(guildAutoconsent);
// OUT(unknown19575[5]);
-// OUT(showhelm);
- eq->showhelm = 1;
+ eq->showhelm = emu->showhelm;
// OUT(unknown19584[4]);
// OUT(unknown19588);
@@ -470,7 +469,7 @@
// eq->padding0070 = emu->padding0070;
eq->eyecolor1 = emu->eyecolor1;
// eq->unknown0115[24] = emu->unknown0115[24];
- eq->showhelm = true;
+ eq->showhelm = emu->showhelm;
// eq->unknown0140[4] = emu->unknown0140[4];
eq->is_npc = emu->is_npc;
eq->hairstyle = emu->hairstyle;
Index: zone/client_packet.cpp
================================================== =================
--- zone/client_packet.cpp (revision 437)
+++ zone/client_packet.cpp (working copy)
@@ -2083,6 +2083,9 @@
// don't do anything with this, we tell the client when it's
// levitating, not the other way around
}
+ else if (sa->type == AT_ShowHelmet) { // a client has changed the "Show My Helm" option
+ m_pp.showhelm = (sa->parameter == 1);
+ }
else {
cout << "Unknown SpawnAppearance type: 0x" << hex << setw(4) << setfill('0') << sa->type << dec
<< " value: 0x" << hex << setw(8) << setfill('0') << sa->parameter << dec << endl;
@@ -7155,7 +7158,7 @@
if(!p_timers.Load(&database)) {
LogFile->write(EQEMuLog::Error, "Unable to load ability timers from the database for %s (%i)!", GetCleanName(), CharacterID());
}
-
+
#ifdef _EQDEBUG
printf("Dumping inventory on load:\n");
m_inv.dumpInventory();