From 7cef4d8fe9c8e885a03f81ec8975d19977ce41cf Mon Sep 17 00:00:00 2001 From: KimLS Date: Tue, 23 Sep 2014 13:39:05 -0700 Subject: [PATCH] Fix for spell books on newer clients not playing well with the tricksy new deblob code --- common/patches/rof.cpp | 4 ++-- common/patches/underfoot.cpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/common/patches/rof.cpp b/common/patches/rof.cpp index d5303ccfb..9e81e8878 100644 --- a/common/patches/rof.cpp +++ b/common/patches/rof.cpp @@ -1081,7 +1081,7 @@ ENCODE(OP_PlayerProfile) // zeroes for the rest of the spellbook slots for(uint32 r = 0; r < structs::MAX_PP_SPELLBOOK - MAX_PP_SPELLBOOK; r++) { - outapp->WriteUInt32(0); + outapp->WriteUInt32(0xFFFFFFFFU); } outapp->WriteUInt32(structs::MAX_PP_MEMSPELL); // Memorised spell slots @@ -1093,7 +1093,7 @@ ENCODE(OP_PlayerProfile) // zeroes for the rest of the slots for(uint32 r = 0; r < structs::MAX_PP_MEMSPELL - MAX_PP_MEMSPELL; r++) { - outapp->WriteUInt32(0); + outapp->WriteUInt32(0xFFFFFFFFU); } outapp->WriteUInt32(13); // Unknown count diff --git a/common/patches/underfoot.cpp b/common/patches/underfoot.cpp index 1eab127d5..524a4d23b 100644 --- a/common/patches/underfoot.cpp +++ b/common/patches/underfoot.cpp @@ -537,7 +537,8 @@ ENCODE(OP_PlayerProfile) { OUT(WIS); OUT(face); // OUT(unknown02264[47]); - OUT_array(spell_book, structs::MAX_PP_SPELLBOOK); + memset(eq->spell_book, 0xFF, sizeof(uint32)* structs::MAX_PP_SPELLBOOK); + OUT_array(spell_book, 480U); // OUT(unknown4184[128]); OUT_array(mem_spells, structs::MAX_PP_MEMSPELL); // OUT(unknown04396[32]);