mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Extended server spellbook entries to RoF2 standard and added per-client restriction of spell id max
This commit is contained in:
+20
-1
@@ -1156,7 +1156,26 @@ namespace SoF
|
||||
OUT(WIS);
|
||||
OUT(face);
|
||||
// OUT(unknown02264[47]);
|
||||
OUT_array(spell_book, spells::SPELLBOOK_SIZE);
|
||||
|
||||
if (spells::SPELLBOOK_SIZE <= EQEmu::spells::SPELLBOOK_SIZE) {
|
||||
for (uint32 r = 0; r < spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
else
|
||||
eq->spell_book[r] = 0xFFFFFFFFU;
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (uint32 r = 0; r < EQEmu::spells::SPELLBOOK_SIZE; r++) {
|
||||
if (emu->spell_book[r] <= spells::SPELL_ID_MAX)
|
||||
eq->spell_book[r] = emu->spell_book[r];
|
||||
else
|
||||
eq->spell_book[r] = 0xFFFFFFFFU;
|
||||
}
|
||||
// invalidate the rest of the spellbook slots
|
||||
memset(&eq->spell_book[EQEmu::spells::SPELLBOOK_SIZE], 0xFF, (sizeof(uint32) * (spells::SPELLBOOK_SIZE - EQEmu::spells::SPELLBOOK_SIZE)));
|
||||
}
|
||||
|
||||
// OUT(unknown4184[128]);
|
||||
OUT_array(mem_spells, spells::SPELL_GEM_COUNT);
|
||||
// OUT(unknown04396[32]);
|
||||
|
||||
Reference in New Issue
Block a user