diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-05 17:59:28 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-05 17:59:28 +0000 |
commit | f97561eb2ee94d591170e1f578c0cf736669b210 (patch) | |
tree | 53d275f73c8848a1d59d642d032a745263015a76 | |
parent | f7cf35aaad2512e7f329954946aac5e2a24cdfb7 (diff) | |
download | hercules-f97561eb2ee94d591170e1f578c0cf736669b210.tar.gz hercules-f97561eb2ee94d591170e1f578c0cf736669b210.tar.bz2 hercules-f97561eb2ee94d591170e1f578c0cf736669b210.tar.xz hercules-f97561eb2ee94d591170e1f578c0cf736669b210.zip |
- Fixed skill_unitsetting using layout->count for the for instead of group->count
- Added SC_INCDEXRATE/SC_INCAGIRATE. NPC_POWERUP/NPC_AGIUP now correctly increase dex/agi by 40% per level.
- Fixed char-sql server not deleting character variables
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6984 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 6 | ||||
-rw-r--r-- | src/char_sql/char.c | 7 | ||||
-rw-r--r-- | src/map/chrif.c | 14 | ||||
-rw-r--r-- | src/map/skill.c | 7 | ||||
-rw-r--r-- | src/map/status.c | 9 | ||||
-rw-r--r-- | src/map/status.h | 2 |
6 files changed, 32 insertions, 13 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 7fcdacb83..4c01cd61f 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,12 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/06/05
+ * Fixed skill_unitsetting using layout->count for the for instead of
+ group->count [Skotlex]
+ * Added SC_INCDEXRATE/SC_INCAGIRATE. NPC_POWERUP/NPC_AGIUP now correctly
+ increase dex/agi by 40% per level. [Skotlex]
+ * Fixed char-sql server not deleting character variables when deleting a
+ char. [Skotlex]
* Corrected cloaking not ending on attack if you are near a wall. [Skotlex]
* Updated pc_bonus to use cap_value on all status_data modifiers to prevent
overflows/underflows. [Skotlex]
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index 66846fa7d..507704523 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1585,6 +1585,13 @@ int delete_char_sql(int char_id, int partner_id) ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
}
+ /* delete character registry */
+ sprintf(tmp_sql,"DELETE FROM `%s` WHERE `type`=3 AND `char_id`='%d'",reg_db, char_id);
+ if(mysql_query(&mysql_handle, tmp_sql)) {
+ ShowSQL("DB error - %s\n",mysql_error(&mysql_handle));
+ ShowDebug("at %s:%d - %s\n", __FILE__,__LINE__,tmp_sql);
+ }
+
/* delete skills */
sprintf(tmp_sql,"DELETE FROM `%s` WHERE `char_id`='%d'",skill_db, char_id);
if(mysql_query(&mysql_handle, tmp_sql)) {
diff --git a/src/map/chrif.c b/src/map/chrif.c index f9a9e7620..ff88945a0 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -312,7 +312,7 @@ int chrif_removemap(int fd){ */
int chrif_changemapserver(struct map_session_data *sd, short map, int x, int y, int ip, short port)
{
- int /*i, */s_ip=0;
+ int s_ip;
nullpo_retr(-1, sd);
@@ -323,13 +323,11 @@ int chrif_changemapserver(struct map_session_data *sd, short map, int x, int y, pc_authfail(sd);
return -1;
}
-
- s_ip = 0;
- //for(i = 0; i < fd_max; i++)
- // if (session[i] && session[i]->session_data == sd) {
- s_ip = session[sd->fd]->client_addr.sin_addr.s_addr; // For what you're looping it? [Lance]
- // break;
- // }
+
+ if (sd->fd && sd->fd < fd_max && session[sd->fd])
+ s_ip = session[sd->fd]->client_addr.sin_addr.s_addr;
+ else //Not connected? Can't retrieve IP
+ s_ip = 0;
WFIFOHEAD(char_fd, 35);
WFIFOW(char_fd, 0) = 0x2b05;
diff --git a/src/map/skill.c b/src/map/skill.c index 663ebee21..25601dc56 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4906,13 +4906,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case NPC_POWERUP: sc_start(bl,SC_INCATKRATE,100,40*skilllv,skill_get_time(skillid, skilllv)); clif_skill_nodamage(src,bl,skillid,skilllv, - sc_start(bl,type,100,20*skilllv,skill_get_time(skillid, skilllv))); + sc_start(bl,type,100,40*skilllv,skill_get_time(skillid, skilllv))); break; case NPC_AGIUP: sc_start(bl,SC_SPEEDUP1,100,skilllv,skill_get_time(skillid, skilllv)); clif_skill_nodamage(src,bl,skillid,skilllv, - sc_start(bl,type,100,20*skilllv,skill_get_time(skillid, skilllv))); + sc_start(bl,type,100,40*skilllv,skill_get_time(skillid, skilllv))); break; case NPC_INVISIBLE: @@ -6416,7 +6416,8 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid, val1=skilllv; val2=0; limit=group->limit; - for(i=0;i<layout->count;i++){ + count=group->unit_count; + for(i=0;i<count;i++){ struct skill_unit *unit; int ux,uy,alive=1; ux = x + layout->dx[i]; diff --git a/src/map/status.c b/src/map/status.c index 172de6f00..0b057fcad 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -255,8 +255,8 @@ void initChangeTables(void) { add_sc(NPC_STOP, SC_STOP); set_sc(NPC_BREAKWEAPON, SC_BROKENWEAPON, SI_BROKENWEAPON, SCB_NONE); set_sc(NPC_BREAKARMOR, SC_BROKENARMOR, SI_BROKENARMOR, SCB_NONE); - set_sc(NPC_POWERUP, SC_INCHITRATE, SI_BLANK, SCB_HIT); - set_sc(NPC_AGIUP, SC_INCFLEERATE, SI_BLANK, SCB_FLEE); + set_sc(NPC_POWERUP, SC_INCDEXRATE, SI_BLANK, SCB_DEX); + set_sc(NPC_AGIUP, SC_INCAGIRATE, SI_BLANK, SCB_AGI); add_sc(NPC_INVISIBLE, SC_CLOAKING); set_sc(LK_AURABLADE, SC_AURABLADE, SI_AURABLADE, SCB_NONE); set_sc(LK_PARRYING, SC_PARRYING, SI_PARRYING, SCB_NONE); @@ -2664,6 +2664,8 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang if(sc->data[SC_CONCENTRATE].timer!=-1 && sc->data[SC_QUAGMIRE].timer == -1) agi += (agi-sc->data[SC_CONCENTRATE].val3)*sc->data[SC_CONCENTRATE].val2/100; + if(sc->data[SC_INCAGIRATE].timer!=-1) + agi += agi*sc->data[SC_INCAGIRATE].val1/100; if(sc->data[SC_INCALLSTATUS].timer!=-1) agi += sc->data[SC_INCALLSTATUS].val1; if(sc->data[SC_INCAGI].timer!=-1) @@ -2765,6 +2767,9 @@ static unsigned short status_calc_dex(struct block_list *bl, struct status_chang if(sc->data[SC_CONCENTRATE].timer!=-1 && sc->data[SC_QUAGMIRE].timer == -1) dex += (dex-sc->data[SC_CONCENTRATE].val4)*sc->data[SC_CONCENTRATE].val2/100; + + if(sc->data[SC_INCDEXRATE].timer!=-1) + dex += dex*sc->data[SC_INCDEXRATE].val1/100; if(sc->data[SC_INCALLSTATUS].timer!=-1) dex += sc->data[SC_INCALLSTATUS].val1; if(sc->data[SC_INCDEX].timer!=-1) diff --git a/src/map/status.h b/src/map/status.h index f242bbd7f..59fe25d6b 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -253,6 +253,8 @@ enum { SC_CHANGE,
SC_BLOODLUST,
SC_FLEET,
+ SC_INCAGIRATE,
+ SC_INCDEXRATE,
SC_MAX, //Automatically updated max, used in for's and at startup to check we are within bounds. [Skotlex]
};
extern int SkillStatusChangeTable[MAX_SKILL];
|