summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c9
-rw-r--r--src/map/clif.c6
-rw-r--r--src/map/clif.h2
-rw-r--r--src/map/pc.c4
-rw-r--r--src/map/skill.c14
-rw-r--r--src/map/status.c2
6 files changed, 17 insertions, 20 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index fd31f5a1f..8ad54f413 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2253,7 +2253,7 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
case LG_RAGEBURST:
if( sc ){
skillratio += -100 + (status_get_max_hp(src) - status_get_hp(src)) / 100 + sc->fv_counter * 200;
- clif->millenniumshield(sd, (sc->fv_counter = 0));
+ clif->millenniumshield(src, (sc->fv_counter = 0));
}
RE_LVL_DMOD(100);
break;
@@ -2665,8 +2665,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
if( sce->val3 <= 0 ) { // Shield Down
sce->val2--;
if( sce->val2 > 0 ) {
- if( sd )
- clif->millenniumshield(sd,sce->val2);
+ clif->millenniumshield(bl,sce->val2);
sce->val3 = 1000; // Next Shield
} else
status_change_end(bl,SC_MILLENNIUMSHIELD,INVALID_TIMER); // All shields down
@@ -2932,9 +2931,9 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
rnd()%100 < sce->val3)
status->heal(src, damage*sce->val4/100, 0, 3);
- if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON
+ if( (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON
&& rnd()%100 < sce->val2 && sc->fv_counter <= sce->val3 )
- clif->millenniumshield(sd, sc->fv_counter++);
+ clif->millenniumshield(bl, sc->fv_counter++);
if (sc->data[SC_STYLE_CHANGE] && rnd()%2) {
TBL_HOM *hd = BL_CAST(BL_HOM,bl);
diff --git a/src/map/clif.c b/src/map/clif.c
index 1e1a98e09..5dacf6360 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -17118,15 +17118,15 @@ int clif_elementalconverter_list(struct map_session_data *sd) {
/**
* Rune Knight
**/
-void clif_millenniumshield(struct map_session_data *sd, short shields ) {
+void clif_millenniumshield(struct block_list *bl, short shields ) {
#if PACKETVER >= 20081217
unsigned char buf[10];
WBUFW(buf,0) = 0x440;
- WBUFL(buf,2) = sd->bl.id;
+ WBUFL(buf,2) = bl->id;
WBUFW(buf,6) = shields;
WBUFW(buf,8) = 0;
- clif->send(buf,packet_len(0x440),&sd->bl,AREA);
+ clif->send(buf,packet_len(0x440),bl,AREA);
#endif
}
/**
diff --git a/src/map/clif.h b/src/map/clif.h
index 1e0319b7b..9006a9ea3 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -763,7 +763,7 @@ struct clif_interface {
void (*specialeffect) (struct block_list* bl, int type, enum send_target target);
void (*specialeffect_single) (struct block_list* bl, int type, int fd);
void (*specialeffect_value) (struct block_list* bl, int effect_id, int num, send_target target);
- void (*millenniumshield) (struct map_session_data *sd, short shields );
+ void (*millenniumshield) (struct block_list *bl, short shields );
void (*charm) (struct map_session_data *sd, short type);
void (*charm_single) (int fd, struct map_session_data *sd, short type);
void (*snap) ( struct block_list *bl, short x, short y );
diff --git a/src/map/pc.c b/src/map/pc.c
index 7ca582b86..8768c83c6 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -196,7 +196,7 @@ int pc_addspiritball(struct map_session_data *sd,int interval,int max)
sd->spirit_timer[i] = tid;
sd->spiritball++;
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
- clif->millenniumshield(sd,sd->spiritball);
+ clif->millenniumshield(&sd->bl,sd->spiritball);
else
clif->spiritball(&sd->bl);
@@ -235,7 +235,7 @@ int pc_delspiritball(struct map_session_data *sd,int count,int type)
if(!type) {
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
- clif->millenniumshield(sd,sd->spiritball);
+ clif->millenniumshield(&sd->bl,sd->spiritball);
else
clif->spiritball(&sd->bl);
}
diff --git a/src/map/skill.c b/src/map/skill.c
index 0df90a538..2e520454f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -7778,10 +7778,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case RK_MILLENNIUMSHIELD:
- if( sd ){
+ {
short shields = (rnd()%100<50) ? 4 : ((rnd()%100<80) ? 3 : 2);
sc_start4(bl,type,100,skill_lv,shields,1000,0,skill->get_time(skill_id,skill_lv));
- clif->millenniumshield(sd,shields);
+ clif->millenniumshield(src,shields);
clif->skill_nodamage(src,bl,skill_id,1,1);
}
break;
@@ -7811,12 +7811,10 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
int value = 0;
type = SC_NONE;
if( skill->area_temp[5]&0x10 ){
- if( dstsd ){
- value = (rnd()%100<50) ? 4 : ((rnd()%100<80) ? 3 : 2);
- clif->millenniumshield(dstsd,value);
- skill->area_temp[5] &= ~0x10;
- type = SC_MILLENNIUMSHIELD;
- }
+ value = (rnd()%100<50) ? 4 : ((rnd()%100<80) ? 3 : 2);
+ clif->millenniumshield(bl,value);
+ skill->area_temp[5] &= ~0x10;
+ type = SC_MILLENNIUMSHIELD;
}else if( skill->area_temp[5]&0x20 ){
value = status_get_max_hp(bl) * 25 / 100;
status->change_clear_buffs(bl,4);
diff --git a/src/map/status.c b/src/map/status.c
index 4114bc859..e204e9d92 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -9683,7 +9683,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
* 3rd Stuff
**/
case SC_MILLENNIUMSHIELD:
- clif->millenniumshield(sd,0);
+ clif->millenniumshield(bl,0);
break;
case SC_HALLUCINATIONWALK:
sc_start(bl,SC_HALLUCINATIONWALK_POSTDELAY,100,sce->val1,skill->get_time2(GC_HALLUCINATIONWALK,sce->val1));