EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bug Reports (https://www.eqemulator.org/forums/forumdisplay.php?f=591)
-   -   minor #level error visual bug (https://www.eqemulator.org/forums/showthread.php?t=29614)

Shin Noir 09-20-2009 11:25 PM

minor #level error visual bug
 
command.cpp line 2730
Code:

void command_level(Client *c, const Seperator *sep)
{
        int16 level = atoi(sep->arg[1]);
        if ((level <= 0) || ((level > RuleI(Character, MaxLevel)) && (c->Admin() < commandLevelAboveCap)) )
                c->Message(0, "Error: #Level: Invalid Level");
        else if (c->Admin() < 100)
                c->SetLevel(level, true);
        else if (!c->GetTarget())
                c->Message(0, "Error: #Level: No target");
        else
                if (!c->GetTarget()->IsNPC() && ((c->Admin() < commandLevelNPCAboveCap) && (level > RuleI(Character, MaxLevel))))
                        c->Message(0, "Error: #Level: Invalid Level");
                else
                        c->GetTarget()->SetLevel(level, true);
        if(c->GetTarget() && c->GetTarget()->IsClient())
                c->GetTarget()->CastToClient()->SendLevelAppearance();
}

sends visual of leveling even if it's an invalid level, since SendLevelAppearance is always sent as long as target as client.

Very minor. XD


All times are GMT -4. The time now is 11:26 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.