Esempio n. 1
0
LocatedEntity * CharacterClient::lookFor(const RootEntity & ent)
{
    Look op;
    op->setArgs1(ent);
    op->setFrom(getId());
    return sendLook(op);
}
Esempio n. 2
0
void BaseMind::init(OpVector& res)
{
    Look look;
    Root lookArg;
    lookArg->setId(m_entityId);
    look->setArgs1(lookArg);
    look->setFrom(getId());
    res.push_back(look);
}
void AccountServerLobbyintegration::test_lobby_look()
{
    test_send_count = 0;

    Look op;
    op->setFrom(m_account->getId());

    OpVector res;
    m_account->operation(op, res);
    ASSERT_TRUE(!res.empty());
}
Esempio n. 4
0
void EntityImporterBase::startEntityWalking()
{
    m_state = ENTITY_WALKSTART;
    Look l;

    l->setFrom(mAvatarId);
    l->setSerialno(newSerialNumber());

    sendOperation(l);

}
Esempio n. 5
0
LocatedEntity * CharacterClient::look(const std::string & id)
{
    Look op;
    if (!id.empty()) {
        Anonymous ent;
        ent->setId(id);
        op->setArgs1(ent);
    }
    op->setFrom(getId());
    return sendLook(op);
}
Esempio n. 6
0
static void lookAtEntity(ClientConnection& con, const std::string & eid,
                                                const std::string & loc)
{
    Look l;
    l->setFrom(con.getCharacterId());
    Anonymous lookEnt;
    lookEnt->setId(eid);
    l->setArgs1(lookEnt);
    int serial = con.send(l);
    
    verbose( std::cout << "Waiting for In-game look response on connection "
                       << con.getAccount() << std::endl << std::flush; );
Esempio n. 7
0
File: View.cpp Progetto: sajty/eris
void View::sendLookAt(const std::string& eid)
{
    Look look;
    if (!eid.empty()) {
        PendingSightMap::iterator pending = m_pending.find(eid);
        if (pending != m_pending.end()) {
            switch (pending->second)
            {
            case SACTION_QUEUED:
                // flip over to default (APPEAR) as normal
                pending->second = SACTION_APPEAR; break;
                
            case SACTION_DISCARD:
            case SACTION_HIDE:
                if (m_notifySights.count(eid) == 0) {
                    // no-one cares, don't bother to look
                    m_pending.erase(pending);
                    issueQueuedLook();
                    return;
                } // else someone <em>does</em> care, so let's do the look, but
                  // keep SightAction unchanged so it discards / is hidden as
                  // expected.
                break;
                
            case SACTION_APPEAR:
                // this can happen if a queued entity disappears and then
                // re-appears, all while in the look queue. we can safely fall
                // through.
                break;
                
            default:
                // broken state handling logic
                assert(false);
                break;
            }
        } else {
            // no previous entry, default to APPEAR
            m_pending.insert(pending, std::make_pair(eid, SACTION_APPEAR));
        }
        
        // pending map is in the right state, build up the args now
        Root what;
        what->setId(eid);
        look->setArgs1(what);
    }
    
    look->setFrom(m_owner->getId());
    getConnection()->send(look);
}