mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 09:37:55 +00:00
[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:
@@ -4759,12 +4759,12 @@ XS(XS_Client_SetClientMaxLevel); /* prototype to pass -Wmissing-prototypes */
|
||||
XS(XS_Client_SetClientMaxLevel) {
|
||||
dXSARGS;
|
||||
if (items != 2)
|
||||
Perl_croak(aTHX_ "Usage: Client::SetClientMaxLevel(THIS, int in_level)");
|
||||
Perl_croak(aTHX_ "Usage: Client::SetClientMaxLevel(THIS, uint8 max_level)");
|
||||
{
|
||||
Client* THIS;
|
||||
int in_level = (int)SvUV(ST(1));
|
||||
uint8 max_level = (uint8) SvUV(ST(1));
|
||||
VALIDATE_THIS_IS_CLIENT;
|
||||
THIS->SetClientMaxLevel(in_level);
|
||||
THIS->SetClientMaxLevel(max_level);
|
||||
}
|
||||
XSRETURN_EMPTY;
|
||||
}
|
||||
@@ -4776,7 +4776,7 @@ XS(XS_Client_GetClientMaxLevel) {
|
||||
Perl_croak(aTHX_ "Usage: Client::GetClientMaxLevel(THIS)");
|
||||
{
|
||||
Client* THIS;
|
||||
int RETVAL;
|
||||
uint8 RETVAL;
|
||||
dXSTARG;
|
||||
VALIDATE_THIS_IS_CLIENT;
|
||||
RETVAL = THIS->GetClientMaxLevel();
|
||||
|
||||
Reference in New Issue
Block a user