summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/chrif.c14
-rw-r--r--src/map/skill.c7
-rw-r--r--src/map/status.c9
-rw-r--r--src/map/status.h2
4 files changed, 19 insertions, 13 deletions
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];