Jump to content

solid2005

Members
  • Posts

    145
  • Joined

  • Last visited

Posts posted by solid2005

  1.  

    I have issue when compiling in centos!

    Visual c in my test server, same version is good, no warnings, no errors, everything is working properly!

    d43c.png

     

     

    but when doing the same, in my dedicated server, I got errors in this two lines, even using the same files in the same revision, thats weird

     

     

    s0zz.png
    those lines,  dont know wht to change here to fix it    REV 17181
     
                pc_paycash(sd,(int)z,0, LOG_TYPE_VENDING);
                pc_getcash(vsd,(int)z,0, LOG_TYPE_VENDING);

     

    try to add ,vsd on the last part.

            pc_paycash(sd,(int)z,0, LOG_TYPE_VENDING,sd);

                pc_getcash(vsd,(int)z,0, LOG_TYPE_VENDING,vsd);

  2. Added git rev 11580.

     

    Why git rev?

    Because svn is outdated revision.

     

    example of this.

     

    // @autoloottype
    1480: Item type not found.
    1481: You're already autolooting this item type.
    1482: Your autoloottype list has all item types. You can remove some items with @autoloottype -<type name or ID>.
    1483: Autolooting item type: '%s' {%d}
    1484: You're currently not autolooting this item type.
    1485: Removed item type: '%s' {%d} from your autoloottype list.
    1486: To add an item type to the list, use "@aloottype +<type name or ID>". To remove an item type, use "@aloottype -<type name or ID>".
    1487: Type List: healing = 0, usable = 2, etc = 3, weapon = 4, armor = 5, card = 6, petegg = 7, petarmor = 8, ammo = 10
    1488: "@aloottype reset" will clear your autoloottype list.
    1489: Your autoloottype list is empty.
    1490: Item types on your autoloottype list:
    1491: Your autoloottype list has been reset.
    

    git rev 11580 ExtendedVendingSystem_1.8.10.patch

  3. is this safe?

    Index: src/map/status.c
    ===================================================================
    --- src/map/status.c    (revision 17379)
    +++ src/map/status.c    (working copy)
    @@ -2543,6 +2543,18 @@
                     if (!calculating) //Abort, run_script retriggered this. [Skotlex]
                         return 1;
                 }
    +            
    +            // Refine bonus [Cydh]
    +            if(refine_bonus[wlv].refine[sd->status.inventory[index].refine-1].script) {
    +                if (wd == &sd->left_weapon) {
    +                    sd->state.lr_flag = 1;
    +                    run_script(refine_bonus[wlv].refine[sd->status.inventory[index].refine-1].script,0,sd->bl.id,0);
    +                    sd->state.lr_flag = 0;
    +                } else
    +                    run_script(refine_bonus[wlv].refine[sd->status.inventory[index].refine-1].script,0,sd->bl.id,0);
    +                if (!calculating)
    +                    return 1;
    +            }
     
                 if(sd->status.inventory[index].card[0]==CARD0_FORGE)
                 {    // Forged weapon
    @@ -2559,6 +2571,9 @@
                 int r;
                 if ( (r = sd->status.inventory[index].refine) )
                     refinedef += refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
    +                // Refine bonus
    +                if(refine_bonus[REFINE_TYPE_ARMOR].refine[sd->status.inventory[index].refine-1].script)
    +                    run_script(refine_bonus[REFINE_TYPE_ARMOR].refine[sd->status.inventory[index].refine-1].script,0,sd->bl.id,0);
                 if(sd->inventory_data[index]->script) {
                     if( i == EQI_HAND_L ) //Shield
                         sd->state.lr_flag = 3;
    @@ -11445,6 +11460,97 @@
         return true;
     }
     
    +// Refine bonus
    +// [Cydh] [email protected]
    +static int status_readdb_refine_bonus(void)
    +{
    +    const char* filename = "refine_bonus.txt";
    +    uint32 lines = 0, count = 0;
    +    char line[1024], path[256];
    +    FILE* fp;
    +
    +    sprintf(path, "%s/%s", db_path, filename);
    +    if((fp = fopen(path, "r")) == NULL )
    +    {
    +        ShowWarning("status_readdb_refine_bonus: File not found \"%s\", skipping.\n", path);
    +        return 0;
    +    }
    +
    +    while(fgets(line, sizeof(line), fp))
    +    {
    +        char *str[3], *p;
    +        int i, type, refine;
    +
    +        lines++;
    +        if(line[0] == '/' && line[1] == '/')
    +            continue;
    +
    +        memset(str, 0, sizeof(str));
    +
    +        p = line;
    +
    +        while( ISSPACE(*p) )
    +            ++p;
    +        if( *p == '\0' )
    +            continue;
    +        for( i = 0; i < 2; ++i )
    +        {
    +            str[i] = p;
    +            p = strchr(p,',');
    +            if( p == NULL )
    +                break;
    +            *p = '\0';
    +            ++p;
    +        }
    +
    +        if( p == NULL )
    +        {
    +            ShowError("status_readdb_refine_bonus: Insufficient columns in line %d of \"%s\" (item with type %d), skipping.\n", lines, path, atoi(str[0]));
    +            continue;
    +        }
    +
    +        // Equip type
    +        type = atoi(str[0]);
    +        if( type < REFINE_TYPE_ARMOR || type > REFINE_TYPE_WEAPON4 ) 
    +        {
    +            ShowError("status_readdb_refine_bonus : Invalid item type '%s'.\n",atoi(str[0]));
    +            continue;
    +        }
    +
    +        // Refine number
    +        refine = atoi(str[1])-1;
    +        if( refine < 0 || refine >= MAX_REFINE ) 
    +        {
    +            ShowError("status_readdb_refine_bonus : Invalid item refine number '%s' (0 - %d).\n",atoi(str[1]),MAX_REFINE);
    +            continue;
    +        }
    +
    +        // Script
    +        if( *p != '{' )
    +        {
    +            ShowError("status_readdb_refine_bonus: Invalid format (Script column-start) in line %d of \"%s\" (script with item type %d and refine number %d), skipping.\n",lines,path,atoi(str[0]),atoi(str[1]));
    +            continue;
    +        }
    +        str[2] = p;
    +        p = strstr(p+1,"}");
    +        if( strchr(p,',') != NULL )
    +        {
    +            ShowError("status_readdb_refine_bonus: Invalid format (Script column-end) in line %d of \"%s\" (script with item type %d and refine number %d), skipping.\n",lines,path,atoi(str[0]),atoi(str[1]));
    +            continue;
    +        }
    +
    +        refine_bonus[type].refine[refine].script = parse_script(str[2],path,lines,0);
    +        count++;
    +    }
    +
    +    fclose(fp);
    +    
    +    ShowStatus("Done reading '"CL_WHITE"%lu"CL_RESET"' entries in '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);
    +
    +    return 0;
    +}
    +
    +
     /*
     * Read status db
     * job1.txt
    @@ -11467,6 +11573,10 @@
         memset(aspd_base, 0, sizeof(aspd_base));
         // reset job_db2.txt data
         memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
    +    
    +    // Refine bonus
    +    memset(refine_bonus->refine,0,sizeof(refine_bonus->refine));
    +    memset(refine_bonus,0,sizeof(refine_bonus));
     
         // size_fix.txt
         for(i=0;i<ARRAYLENGTH(atkmods);i++)
    @@ -11486,8 +11596,10 @@
     
         // read databases
         //
    +    
    +    // Refine bonus
    +    status_readdb_refine_bonus();
    
  4. This mode is ready on svn.

    src/config/core.h

     

    /// Uncomment to enable skills damage adjustments
    /// By enabling this, db/skill_damage.txt and the skill_damage mapflag will adjust the
    /// damage rate of specified skills.
    //#define ADJUST_SKILL_DAMAGE
    

     

    Change this //#define ADJUST_SKILL_DAMAGE to #define ADJUST_SKILL_DAMAGE.

×
×
  • Create New...