• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Game::attack(CreaturePtr)

Nephyon

New Member
Joined
Mar 28, 2013
Messages
3
Reaction score
0
Hello,

In game.cpp file, we can find the member function Game::attack(CreaturePtr). This member function has the following definition:

C++:
void Game::attack(CreaturePtr creature)
{
    if(!canPerformGameAction() || creature == m_localPlayer)
        return;

    // cancel when attacking again
    if(creature && creature == m_attackingCreature)
        creature = nullptr;

    if(creature && isFollowing())
        cancelFollow();

    setAttackingCreature(creature);
    m_localPlayer->stopAutoWalk();

    if(m_protocolVersion >= 963) {
        if(creature)
            m_seq = creature->getId();
    } else
        m_seq++;

    m_protocolGame->sendAttack(creature ? creature->getId() : 0, m_seq);
}

I do not understand what is this m_seq and what is this for? What is its function?
I would appreciate if someone could explain me better about this.

Regards,
Nephyon.
 
Back
Top