Extended server spellbook entries to RoF2 standard and added per-client restriction of spell id max

This commit is contained in:
Uleat
2019-01-24 03:53:41 -05:00
parent 2d5f0dce42
commit 4658ad676f
17 changed files with 205 additions and 49 deletions
+6 -1
View File
@@ -2640,6 +2640,11 @@ bool Client::CheckAccess(int16 iDBLevel, int16 iDefaultLevel) {
}
void Client::MemorizeSpell(uint32 slot,uint32 spellid,uint32 scribing){
if (slot < 0 || slot >= EQEmu::spells::DynamicLookup(ClientVersion(), GetGM())->SpellbookSize)
return;
if (spellid < 3 || spellid > EQEmu::spells::DynamicLookup(ClientVersion(), GetGM())->SpellIdMax)
return;
auto outapp = new EQApplicationPacket(OP_MemorizeSpell, sizeof(MemorizeSpell_Struct));
MemorizeSpell_Struct* mss=(MemorizeSpell_Struct*)outapp->pBuffer;
mss->scribing=scribing;
@@ -9126,4 +9131,4 @@ bool Client::GotoPlayer(std::string player_name)
}
return false;
}
}