Fix Cannot attack mob if my level is too high

Toki.San

Moderatore
25 Febbraio 2010
256
42
493
410
Ultima modifica:
This little code let you not attack mob if difference between your level and mob level is over 15

C++:
//Battle.cpp
//in bool battle_is_attackable(LPCHARACTER ch, LPCHARACTER victim) search:

    if (victim->IsDead())
        return false;
  
//Add Under:

    if (!(victim->IsPC()))
    {
        if (ch->GetLevel() - victim->GetLevel() > 15)
        {
            return false;
        }
    }

GitHub