Пример #1
0
BObjectImp* PolSystemExecutorModule::mf_IncRevision( /* uobject */ )
{
    UObject* uobj;
    if (getUObjectParam( exec, 0, uobj ) )
    {
        uobj->increv();
        send_object_cache_to_inrange(uobj);
        return new BLong(1);
    }
    else
    {
        return new BError( "Invalid parameter type" );
    }
}
Пример #2
0
void Equipment::reduce_hp_from_hit()
{
    if ( hp_ >= 1 && Clib::random_int( 99 ) == 0 )
    {
        set_dirty();
        --hp_;
        increv();
        if ( isa( CLASS_ARMOR ) )
        {
            Mobile::Character* chr = GetCharacterOwner();
            if ( chr != NULL )
                chr->refresh_ar();
        }
        send_object_cache_to_inrange( this );
    }
}