[Cleanup] Cleanup spell and max level bucket logic. (#2181)

* [Cleanup] Cleanup spell and max level bucket logic.
- Spell buckets will now allow new mob->SetBucket() buckets since most people use these now.
- Max level bucket will now allow new mob->SetBucket() bucket since most people use these now.
- Clean up GetScribeableSpells() and GetLearnableDisciplines() logic and magic numbers.
- Make GetClientMaxLevel() uint8 instead of int since it can only be 0-255.

* Fix typo from other commit.

* Lua setter.

* Update client.cpp
This commit is contained in:
Kinglykrab
2022-05-28 14:35:17 -04:00
committed by GitHub
parent c8f6dbb86d
commit 9e9ef6809b
9 changed files with 164 additions and 159 deletions
+3 -3
View File
@@ -1844,12 +1844,12 @@ void Lua_Client::SetSecondaryWeaponOrnamentation(uint32 model_id) {
self->SetSecondaryWeaponOrnamentation(model_id);
}
void Lua_Client::SetClientMaxLevel(int value) {
void Lua_Client::SetClientMaxLevel(uint8 max_level) {
Lua_Safe_Call_Void();
self->SetClientMaxLevel(value);
self->SetClientMaxLevel(max_level);
}
int Lua_Client::GetClientMaxLevel() {
uint8 Lua_Client::GetClientMaxLevel() {
Lua_Safe_Call_Int();
return self->GetClientMaxLevel();
}