Jump to content

Jonne

Members
  • Posts

    153
  • Joined

  • Last visited

Posts posted by Jonne

  1. Revert the diff I gave you (but only for the skill.c) and apply this one:

    diff --git a/src/map/skill.c b/src/map/skill.c
    index 117c0a7..7d3a586 100644
    --- a/src/map/skill.c
    +++ b/src/map/skill.c
    @@ -11176,6 +11176,12 @@ int skill_castend_map (struct map_session_data *sd, uint16 skill_id, const char
      wx = sd->menuskill_val>>16;
      wy = sd->menuskill_val&0xffff;
     
    + // check whether it's allowed to cast AL_WARP there
    + if (map_getcell(sd->bl.m, wx, wy, CELL_CHKNOWARPPORTAL)) {
    + skill_failed(sd);
    + return 0;
    + }
    +
      if( lv <= 0 ) return 0;
      if( lv > 4 ) lv = 4; // crash prevention
     
    
  2. It's in skill.c in skill_weaponrefine:

     

    /*==========================================
     * Weapon Refine [Celest]
     *------------------------------------------*/
    void skill_weaponrefine (struct map_session_data *sd, int idx)
    {
    nullpo_retv(sd);
     
    if (idx >= 0 && idx < MAX_INVENTORY)
    {
    int i = 0, ep = 0, per;
    int material[5] = { 0, 1010, 1011, 984, 984 };
    struct item *item;
    struct item_data *ditem = sd->inventory_data[idx];
    item = &sd->status.inventory[idx];
     
    if(item->nameid > 0 && ditem->type == IT_WEAPON)
    {
    
  3. Isn't this rather in clif_joinchatok ?

    /// Notifies the client about entering a chatroom (ZC_ENTER_ROOM).
    /// 00db <packet len>.W <chat id>.L { <role>.L <name>.24B }*
    /// role:
    ///     0 = owner (menu)
    ///     1 = normal
    void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
    {
    int fd;
    int i,t;
     
    nullpo_retv(sd);
    nullpo_retv(cd);
     
    fd = sd->fd;
    if (!session_isActive(fd))
    return;
    t = (int)(cd->owner->type == BL_NPC);
    WFIFOHEAD(fd, 8 + (28*(cd->users+t)));
    WFIFOW(fd, 0) = 0xdb;
    WFIFOW(fd, 2) = 8 + (28*(cd->users+t));
    WFIFOL(fd, 4) = cd->bl.id;
     
    if(cd->owner->type == BL_NPC){
    WFIFOL(fd, 30) = 1;
    WFIFOL(fd, 8) = 0;
    memcpy(WFIFOP(fd, 12), ((struct npc_data *)cd->owner)->name, NAME_LENGTH);
    for (i = 0; i < cd->users; i++) {
    WFIFOL(fd, 8+(i+1)*28) = 1;
    memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH);
    }
    } else
    for (i = 0; i < cd->users; i++) {
    WFIFOL(fd, 8+i*28) = (i != 0 || cd->owner->type == BL_NPC);
    memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH);
    }
    WFIFOSET(fd, WFIFOW(fd, 2));
    }
    

    Try this maybe:

    /// Notifies the client about entering a chatroom (ZC_ENTER_ROOM).
    /// 00db <packet len>.W <chat id>.L { <role>.L <name>.24B }*
    /// role:
    ///     0 = owner (menu)
    ///     1 = normal
    void clif_joinchatok(struct map_session_data *sd,struct chat_data* cd)
    {
    int fd;
    int i,t;
     
    nullpo_retv(sd);
    nullpo_retv(cd);
     
    fd = sd->fd;
    if (!session_isActive(fd))
    return;
    t = (int)(cd->owner->type == BL_NPC);
    WFIFOHEAD(fd, 8 + (28*(cd->users+t)));
    WFIFOW(fd, 0) = 0xdb;
    WFIFOW(fd, 2) = 8 + (28*(cd->users+t));
    WFIFOL(fd, 4) = cd->bl.id;
     
    if(cd->owner->type == BL_NPC){
    char name[NAME_LENGTH+1];
    char *pos;
     
    strcpy(name, ((struct npc_data *)cd->owner)->name);
    pos = strchr(name, '#');
    if (pos != NULL) {
    *pos = '\0';
    }
    WFIFOL(fd, 30) = 1;
    WFIFOL(fd, 8) = 0;
    memcpy(WFIFOP(fd, 12), name, NAME_LENGTH);
    for (i = 0; i < cd->users; i++) {
    WFIFOL(fd, 8+(i+1)*28) = 1;
    memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH);
    }
    } else
    for (i = 0; i < cd->users; i++) {
    WFIFOL(fd, 8+i*28) = (i != 0 || cd->owner->type == BL_NPC);
    memcpy(WFIFOP(fd, 8+(i+t)*28+4), cd->usersd[i]->status.name, NAME_LENGTH);
    }
    WFIFOSET(fd, WFIFOW(fd, 2));
    }
    
    • Upvote 1
  4. Try this. It adds a new Cell which is called cell_nowarpportal. You can't cast warp portals onto those cells. 

    diff --git a/db/const.txt b/db/const.txt
    index 76926dc..9320e38 100644
    --- a/db/const.txt
    +++ b/db/const.txt
    @@ -388,6 +388,7 @@ cell_basilica 4
     cell_landprotector 5
     cell_novending 6
     cell_nochat 7
    +cell_nowarpportal 10
     
     //cell_gettype 0
     cell_chkwall 1
    diff --git a/src/map/map.c b/src/map/map.c
    index 2c8bf35..176d2d1 100644
    --- a/src/map/map.c
    +++ b/src/map/map.c
    @@ -2664,6 +2664,8 @@ int map_getcellp(struct map_data* m,int16 x,int16 y,cell_chk cellchk)
      return (cell.maelstrom);
      case CELL_CHKICEWALL:
      return (cell.icewall);
    + case CELL_CHKNOWARPPORTAL:
    + return (cell.nowarpportal);
     
      // special checks
      case CELL_CHKPASS:
    @@ -2718,6 +2720,8 @@ void map_setcell(int16 m, int16 x, int16 y, cell_t cell, bool flag)
      case CELL_NOCHAT:        map[m].cell[j].nochat = flag;        break;
      case CELL_MAELSTROM:  map[m].cell[j].maelstrom = flag;   break;
      case CELL_ICEWALL:  map[m].cell[j].icewall = flag;   break;
    + case CELL_NOWARPPORTAL:  map[m].cell[j].nowarpportal = flag;   break;
    +
      default:
      ShowWarning("map_setcell: invalid cell type '%d'\n", (int)cell);
      break;
    diff --git a/src/map/map.h b/src/map/map.h
    index c584671..56bd72c 100644
    --- a/src/map/map.h
    +++ b/src/map/map.h
    @@ -460,6 +460,7 @@ typedef enum {
      CELL_NOCHAT,
      CELL_MAELSTROM,
      CELL_ICEWALL,
    + CELL_NOWARPPORTAL,
     
     } cell_t;
     
    @@ -484,6 +485,7 @@ typedef enum {
      CELL_CHKNOCHAT,
      CELL_CHKMAELSTROM,
      CELL_CHKICEWALL,
    + CELL_CHKNOWARPPORTAL,
     
     } cell_chk;
     
    @@ -503,7 +505,8 @@ struct mapcell
      novending : 1,
      nochat : 1,
      maelstrom : 1,
    - icewall : 1;
    + icewall : 1,
    + nowarpportal : 1;
     
     #ifdef CELL_NOSTACK
      unsigned char cell_bl; //Holds amount of bls in this cell.
    diff --git a/src/map/skill.c b/src/map/skill.c
    index 117c0a7..d5ff5bd 100644
    --- a/src/map/skill.c
    +++ b/src/map/skill.c
    @@ -13397,6 +13397,12 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id
      clif_displaymessage(sd->fd, output); //"Duel: Can't use %s in duel."
      return 0;
      }
    + if (map_getcell(sd->bl.m, sd->bl.x, sd->bl.y, CELL_CHKNOWARPPORTAL)) {
    + char output[128];
    + sprintf(output, msg_txt(sd, 1404), skill_get_name(AL_WARP));
    + clif_displaymessage(sd->fd, output); //"Warpportal failed."
    + return 0;
    + }
      break;
      case MO_CALLSPIRITS:
      if(sc && sc->data[SC_RAISINGDRAGON])
    
  5.  

     

     

    Dividing by 3 would make it a double which is 8 Byte = 64Bit. Same size.

     

     

    Er, it's integer division, so it wouldn't be made into a double precision floating point number. It will still be 64 bits because damage itself is declared as an int64 though, so it's kinda moot. Why is that cast even there?

     

    Oh yea, that might be. Maybe it gave warnings on some compiler systems? Dunno

  6.  

    Hello!

    I was looking through the src and stumbled upon this:

    #ifndef RENEWAL
    if( sc->data[SC_ASSUMPTIO] ) {
    if( map_flag_vs(bl->m) )
    damage = (int64)damage*2/3; //Receive 66% damage
    else
    damage >>= 1; //Receive 50% damage
    }
    #endif

    So why not divide the damage by 3, then multiply it by 2? this way a 64 bit int woulnd't be required.

    #ifndef RENEWAL
    if( sc->data[SC_ASSUMPTIO] ) {
    if( map_flag_vs(bl->m) )
    damage = damage/3*2; //Receive 66% damage
    else
    damage >>= 1; //Receive 50% damage
    }
    #endif

     

    Dividing by 3 would make it a double which is 8 Byte = 64Bit. Same size.

  7. Error 1 error LNK2019: unresolved external symbol _achievement_update_explore referenced in function _clif_parse_LoadEndAck clif.obj map-server_sql
    Error 2 error LNK2019: unresolved external symbol _do_final_achievement referenced in function _do_final map.obj map-server_sql
    Error 3 error LNK2019: unresolved external symbol _do_init_achievement referenced in function _do_init map.obj map-server_sql
    Error 4 error LNK2019: unresolved external symbol _achievement_update_mob referenced in function _mob_dead mob.obj map-server_sql
    Error 5 error LNK2019: unresolved external symbol _achievement_loadTracker referenced in function _pc_authok pc.obj map-server_sql
    Error 6 error LNK2019: unresolved external symbol _achievement_update_itemfind referenced in function _pc_additem pc.obj map-server_sql
    Error 7 error LNK2019: unresolved external symbol _achievement_update_itemuse referenced in function _pc_useitem pc.obj map-server_sql
    Error 8 error LNK2019: unresolved external symbol _achievement_update_quest referenced in function _quest_update_status quest.obj map-server_sql
    Error 9 error LNK2019: unresolved external symbol _achievement_searchTrackerIndex referenced in function _buildin_getachievementinfo script.obj map-server_sql
    Error 10 error LNK2019: unresolved external symbol _achievement_exists referenced in function _buildin_getachievementinfo script.obj map-server_sql
    Error 11 error LNK2019: unresolved external symbol _achievement_achieve referenced in function _buildin_achieve script.obj map-server_sql
    Error 12 fatal error LNK1120: 11 unresolved externals ..map-server_sql.exe map-server_sql
    

    Is there have a solution?

    Add to Makefile or your VS C++ Project.

  8. 
    Index: src/map/battle.c
    ===================================================================
    --- src/map/battle.c (revision 15627)
    +++ src/map/battle.c (working copy)
    @@ -4285,7 +4285,7 @@
     switch( target->type )
     { // Checks on actual target
     case BL_PC:
    - if (((TBL_PC*)target)->invincible_timer != INVALID_TIMER || pc_isinvisible((TBL_PC*)target) || ((TBL_PC*)target)->sc.data[sC__MANHOLE])
    + if ((((TBL_PC*)target)->invincible_timer != INVALID_TIMER && src->type == BL_MOB) || pc_isinvisible((TBL_PC*)target) || ((TBL_PC*)target)->sc.data[sC__MANHOLE])
     return -1; //Cannot be targeted yet.
     break;
     case BL_MOB:
    

    Like this?

  9. Thanks for your help, guys. I found out the key things i had to do:

    Most of the files that I really cared about (ie: configurations, NPCs, etc) were just copy pasta. Other key things (the client, for example. i wasnt sure if it was still compatible with what i had..) i lucked out on. Everything is working fine..... almost ><

    At first, the FluxCP i have started going bonkers. I fixed it by adding a new column to my login database named "level" so it had backwards compatibility. I just gotta remember to set both for my admins.

    The latest issue that I have now is the Experience. My rates are 150kx/100kx. The job exp seems to be just fine, but the base exp isnt. On average, the experience payout is sometimes 1% of what it should be. An example is Rybio:

    SHOULD be giving out 236250000 base experience. He gives 1/10th of that.

    Isilla is another example. Should be giving 518400000. She gives 8890327 (which is roughly 1.5% of what it should be giving.)

    This is causing my players to complain a LOT about leveling, and its becoming rather annoying. If you have any suggestions or fixes, please let me know. I have no issues if it requires editing the source, as I am a developer.

    Requesting a mod to close this topic now. I'm going to move the new issue to a new topic as appropriate.

    You get much less EXP when the monsters are out of your Level Range. See renewal.h in sourcecode. You can disable it there and also get information in the Wiki(there is link in the file) about the system.

  10. ./conf/import - about everything except atcommand related things.

    pull a diff from ./src/common/ & ./src/map/ and see what you can apply.

    Char Server is now full SQL, so you can't do it via diff, you need to apply changes manualy. login table changed, so go to your current login table and change 'level' column to 'group_id'. The rest is about the same in the SQL DB, just that *_re was added, but it won't conflict with eA afaik.

  11. It's neither FLEE nor HIT. It's the hitrate calculation which is outdated. RE defines only a Dodgerate which is: 100% - (HIT - FLEE). Athena calculates Hitrate instead, so you need to change the formula to: Hitrate = HIT - FLEE.

    Here is a diff:

    
    Index: src/map/battle.c
    ===================================================================
    --- src/map/battle.c (revision 15627)
    +++ src/map/battle.c (working copy)
    @@ -1391,7 +1391,7 @@
     { //Hit/Flee calculation
     short
     flee = tstatus->flee,
    - hitrate=80; //Default hitrate
    + hitrate;
    
     if(battle_config.agi_penalty_type &&
     battle_config.agi_penalty_target&target->type)
    @@ -1408,7 +1408,7 @@
     }
     }
    
    - hitrate+= sstatus->hit - flee;
    + hitrate = sstatus->hit - flee;
    
     if(wd.flag&BF_LONG && !skill_num && //Fogwall's hit penalty is only for normal ranged attacks.
     tsc && tsc->data[sC_FOGWALL])
    

  12. Here is a diff. I didn't test it, but it should work and do what you want it to do:

    
    Index: src/map/clif.c
    ===================================================================
    --- src/map/clif.c (revision 15627)
    +++ src/map/clif.c (working copy)
    @@ -9218,6 +9218,16 @@
    
     mail_clear(sd);
    
    + { // Check if through equip if item is allowed on map [Jonne]
    + int i;
    +
    + for (i = 0; i < EQI_MAX; ++i) {
    + if (sd->equip_index[i] >= 0 && !pc_isequip(sd, sd->equip_index[i]))
    + pc_unequipitem(sd, sd->equip_index[i], 2);
    + }
    + }
    +
    +
     if(map[sd->bl.m].flag.loadevent) // Lance
     npc_script_event(sd, NPCE_LOADMAP);
    
    
    

  13. That was my hope. It seems like a small, but very useful addition, but I lack the skills necessary to do a legitimate @latency command.

    But as Pekkle said, it would be as easy as.

    @Latency

    Server Sends Packet--(lag)-->Client Responds--(lag)-->Divide by 2.

    So it does not work like this:

    Client uses Command--(lag)-->Server Reponds--(lag)-->Divide by 2?

    Both seems legit, now we have to analyze the packet with which this is possible.

  14. Ok so I was checking a little npc script and I realize we didn't had a proper way to check if we had enought place on storage for more then 1 item.

    I'll explain by an exemple :

    let say we have 500 extra weight left;

    itemx = 5 n1 = 100 ok we have enought place.

    itemy = 6, n2 = 3 ok we also have enought place.

    But how to know if we have both ? if(checkwieght(itemx,n1) && checkwieght(itemy,n2)). we can sadly see that this condition wont fit in our case =/

    Of course we could solve probably this by fetching both item weight (getiteminfo()) + our courrent weight and compare to our maxweight, but uh sound painfull, plus we won't even know if we still have place in inventory etc...

    So I tought of upgrading chekweight to read not 1 item but as many as we want.

    Here my base : http://pastebin.com/TK0dRs3s

    Yet I'm not fully satisfied, I'd be sweet if instead reading 1 at the time we could send arrays as parameter.

    Hope it's be usefull.

    Your code looks strange. You also hand out the items at the end. I think Kenpachi is right: This is rather a Change you can throw into the Release section than something everybody needs.

  15. Another thing that i'm studying at moment is the possibility of having YOURS repo (saving your changes), but also syncronized with original repo (rAthena). Its good for me, so i can have my private modifications saved on a repositorie, and still receiving updates from original repo. I know thats someone will hate this because of "private" of a public thing, but...

    I'm actually doing this myself with subversion, where I just merge the changes from the original repository to my own (with conflicts coming up now and then). Is it correct to believe that GIT does not have this conflicts? If it has them, why is it better than SVN?

    You don't need to create one folder for the original Repo and one for your own repo. It all works together.

    Also, tools involved with git sounds better for me.

    On what os are you developing? I'm on windows and don't want to miss something like TortoiseSVN's integration into the explorer. Has GIT similiar tools or what tools sound better than those for SVN?

    TortoiseGIT. Same as TortoiseSVN just for GIT.

    You create Sub-Branches without creating a whole new folder with all files (save disk space) and can work in it while the Main-Branch still keeps getting updated. You can then merge your changes to the Main-Branch. The Main-Branch could be a "Stable" release whereas the other one is a developing version. Every developer can have "unlimited" amounts of branches etc. Also there is the possibility of the team to share Diff's directly instead of commiting and fetching from the Main-Server but rather Commit to a teammember into his Branch.

    Isn't this also possible with SVN, even easier?

    You have to create a folder for every branch. This is not the case in GIT. It saves Disc-Space and still keeps it clean.

×
×
  • Create New...