Fixed packets 0x440 and 0x8cf (#8486)
Follow up to d445497 Fixes #8478 Thanks to @gmragnarok, @LadyNanuia and @Haydrich
This commit is contained in:
parent
fccf328a54
commit
d2cb6c10e1
@ -1375,7 +1375,7 @@ bool battle_status_block_damage(struct block_list *src, struct block_list *targe
|
|||||||
if (sce->val3 <= 0) { // Shield Down
|
if (sce->val3 <= 0) { // Shield Down
|
||||||
sce->val2--;
|
sce->val2--;
|
||||||
if (sce->val2 > 0) {
|
if (sce->val2 > 0) {
|
||||||
clif_millenniumshield(target, sce->val2);
|
clif_millenniumshield( *target, sce->val2 );
|
||||||
sce->val3 = 1000; // Next shield
|
sce->val3 = 1000; // Next shield
|
||||||
} else
|
} else
|
||||||
status_change_end(target, SC_MILLENNIUMSHIELD); // All shields down
|
status_change_end(target, SC_MILLENNIUMSHIELD); // All shields down
|
||||||
|
|||||||
@ -1698,7 +1698,7 @@ int clif_spawn( struct block_list *bl, bool walking ){
|
|||||||
if (sd->spiritball > 0)
|
if (sd->spiritball > 0)
|
||||||
clif_spiritball(&sd->bl);
|
clif_spiritball(&sd->bl);
|
||||||
if (sd->sc.getSCE(SC_MILLENNIUMSHIELD))
|
if (sd->sc.getSCE(SC_MILLENNIUMSHIELD))
|
||||||
clif_millenniumshield(&sd->bl, sd->sc.getSCE(SC_MILLENNIUMSHIELD)->val2);
|
clif_millenniumshield( sd->bl, sd->sc.getSCE( SC_MILLENNIUMSHIELD )->val2 );
|
||||||
if (sd->soulball > 0)
|
if (sd->soulball > 0)
|
||||||
clif_soulball(sd);
|
clif_soulball(sd);
|
||||||
if (sd->servantball > 0)
|
if (sd->servantball > 0)
|
||||||
@ -1712,7 +1712,7 @@ int clif_spawn( struct block_list *bl, bool walking ){
|
|||||||
if( sd->bg_id && map_getmapflag(sd->bl.m, MF_BATTLEGROUND) )
|
if( sd->bg_id && map_getmapflag(sd->bl.m, MF_BATTLEGROUND) )
|
||||||
clif_sendbgemblem_area(sd);
|
clif_sendbgemblem_area(sd);
|
||||||
if (sd->spiritcharm_type != CHARM_TYPE_NONE && sd->spiritcharm > 0)
|
if (sd->spiritcharm_type != CHARM_TYPE_NONE && sd->spiritcharm > 0)
|
||||||
clif_spiritcharm(sd);
|
clif_spiritcharm( *sd );
|
||||||
if (sd->status.robe)
|
if (sd->status.robe)
|
||||||
clif_refreshlook(bl,bl->id,LOOK_ROBE,sd->status.robe,AREA);
|
clif_refreshlook(bl,bl->id,LOOK_ROBE,sd->status.robe,AREA);
|
||||||
clif_efst_status_change_sub(bl, bl, AREA);
|
clif_efst_status_change_sub(bl, bl, AREA);
|
||||||
@ -19386,15 +19386,16 @@ void clif_elementalconverter_list( map_session_data& sd ){
|
|||||||
/**
|
/**
|
||||||
* Rune Knight
|
* Rune Knight
|
||||||
**/
|
**/
|
||||||
void clif_millenniumshield(struct block_list *bl, short shields) {
|
void clif_millenniumshield( block_list& bl, int16 shields ){
|
||||||
#if PACKETVER >= 20081217
|
#if PACKETVER >= 20081126
|
||||||
unsigned char buf[10];
|
PACKET_ZC_MILLENNIUMSHIELD packet{};
|
||||||
|
|
||||||
WBUFW(buf,0) = 0x440;
|
packet.packetType = HEADER_ZC_MILLENNIUMSHIELD;
|
||||||
WBUFL(buf,2) = bl->id;
|
packet.aid = bl.id;
|
||||||
WBUFW(buf,6) = shields;
|
packet.num = shields;
|
||||||
WBUFW(buf,8) = 0;
|
packet.state = 0;
|
||||||
clif_send(buf,packet_len(0x440),bl,AREA);
|
|
||||||
|
clif_send( &packet, sizeof( packet ), &bl, AREA );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19550,18 +19551,19 @@ void clif_parse_SkillSelectMenu(int fd, map_session_data *sd) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Kagerou/Oboro amulet spirit (ZC_SPIRITS_ATTRIBUTE).
|
/// Kagerou/Oboro amulet spirit.
|
||||||
/// 08cf <id>.L <type>.W <num>.W
|
/// 08cf <id>.L <type>.W <num>.W (ZC_SPIRITS_ATTRIBUTE)
|
||||||
void clif_spiritcharm(map_session_data *sd) {
|
void clif_spiritcharm( map_session_data& sd ){
|
||||||
unsigned char buf[10];
|
#if PACKETVER >= 20111102
|
||||||
|
PACKET_ZC_SPIRITS_ATTRIBUTE packet{};
|
||||||
|
|
||||||
nullpo_retv(sd);
|
packet.packetType = HEADER_ZC_SPIRITS_ATTRIBUTE;
|
||||||
|
packet.aid = sd.bl.id;
|
||||||
|
packet.spiritsType = static_cast<decltype(packet.spiritsType)>(sd.spiritcharm_type);
|
||||||
|
packet.num = static_cast<decltype(packet.num)>(sd.spiritcharm);
|
||||||
|
|
||||||
WBUFW(buf,0) = 0x08cf;
|
clif_send( &packet, sizeof( packet ), &sd.bl, AREA );
|
||||||
WBUFL(buf,2) = sd->bl.id;
|
#endif
|
||||||
WBUFW(buf,6) = sd->spiritcharm_type;
|
|
||||||
WBUFW(buf,8) = sd->spiritcharm;
|
|
||||||
clif_send(buf, packet_len(0x08cf), &sd->bl, AREA);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1270,7 +1270,7 @@ void clif_parse_roulette_item(int fd, map_session_data *sd);
|
|||||||
|
|
||||||
void clif_elementalconverter_list( map_session_data& sd );
|
void clif_elementalconverter_list( map_session_data& sd );
|
||||||
|
|
||||||
void clif_millenniumshield(struct block_list *bl, short shields);
|
void clif_millenniumshield( block_list& bl, int16 shields );
|
||||||
|
|
||||||
void clif_magicdecoy_list( map_session_data& sd, uint16 skill_lv, short x, short y );
|
void clif_magicdecoy_list( map_session_data& sd, uint16 skill_lv, short x, short y );
|
||||||
|
|
||||||
@ -1282,7 +1282,7 @@ int clif_skill_itemlistwindow( map_session_data *sd, uint16 skill_id, uint16 ski
|
|||||||
void clif_elemental_info(map_session_data *sd);
|
void clif_elemental_info(map_session_data *sd);
|
||||||
void clif_elemental_updatestatus(map_session_data *sd, int type);
|
void clif_elemental_updatestatus(map_session_data *sd, int type);
|
||||||
|
|
||||||
void clif_spiritcharm(map_session_data *sd);
|
void clif_spiritcharm( map_session_data& sd );
|
||||||
|
|
||||||
void clif_snap( struct block_list *bl, short x, short y );
|
void clif_snap( struct block_list *bl, short x, short y );
|
||||||
void clif_monster_hp_bar( struct mob_data* md, int fd );
|
void clif_monster_hp_bar( struct mob_data* md, int fd );
|
||||||
|
|||||||
@ -855,7 +855,7 @@ void pc_addspiritball(map_session_data *sd,int interval,int max)
|
|||||||
sd->spirit_timer[i] = tid;
|
sd->spirit_timer[i] = tid;
|
||||||
sd->spiritball++;
|
sd->spiritball++;
|
||||||
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
|
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
|
||||||
clif_millenniumshield(&sd->bl,sd->spiritball);
|
clif_millenniumshield( sd->bl, sd->spiritball );
|
||||||
else
|
else
|
||||||
clif_spiritball(&sd->bl);
|
clif_spiritball(&sd->bl);
|
||||||
}
|
}
|
||||||
@ -898,7 +898,7 @@ void pc_delspiritball(map_session_data *sd,int count,int type)
|
|||||||
|
|
||||||
if(!type) {
|
if(!type) {
|
||||||
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
|
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
|
||||||
clif_millenniumshield(&sd->bl,sd->spiritball);
|
clif_millenniumshield( sd->bl, sd->spiritball );
|
||||||
else
|
else
|
||||||
clif_spiritball(&sd->bl);
|
clif_spiritball(&sd->bl);
|
||||||
}
|
}
|
||||||
@ -13069,7 +13069,7 @@ static TIMER_FUNC(pc_spiritcharm_timer){
|
|||||||
if (sd->spiritcharm <= 0)
|
if (sd->spiritcharm <= 0)
|
||||||
sd->spiritcharm_type = CHARM_TYPE_NONE;
|
sd->spiritcharm_type = CHARM_TYPE_NONE;
|
||||||
|
|
||||||
clif_spiritcharm(sd);
|
clif_spiritcharm( *sd );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -13115,7 +13115,7 @@ void pc_addspiritcharm(map_session_data *sd, int interval, int max, int type)
|
|||||||
sd->spiritcharm++;
|
sd->spiritcharm++;
|
||||||
sd->spiritcharm_type = type;
|
sd->spiritcharm_type = type;
|
||||||
|
|
||||||
clif_spiritcharm(sd);
|
clif_spiritcharm( *sd );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -13164,7 +13164,7 @@ void pc_delspiritcharm(map_session_data *sd, int count, int type)
|
|||||||
if (sd->spiritcharm <= 0)
|
if (sd->spiritcharm <= 0)
|
||||||
sd->spiritcharm_type = CHARM_TYPE_NONE;
|
sd->spiritcharm_type = CHARM_TYPE_NONE;
|
||||||
|
|
||||||
clif_spiritcharm(sd);
|
clif_spiritcharm( *sd );
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
|
#if defined(RENEWAL_DROP) || defined(RENEWAL_EXP)
|
||||||
|
|||||||
@ -11638,7 +11638,7 @@ int status_change_start(struct block_list* src, struct block_list* bl,enum sc_ty
|
|||||||
|
|
||||||
val2 = ((chance < 20) ? 4 : (chance < 50) ? 3 : 2); // Shield count
|
val2 = ((chance < 20) ? 4 : (chance < 50) ? 3 : 2); // Shield count
|
||||||
val3 = 1000; // Shield HP
|
val3 = 1000; // Shield HP
|
||||||
clif_millenniumshield(bl, val2);
|
clif_millenniumshield( *bl, val2 );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SC_ABUNDANCE:
|
case SC_ABUNDANCE:
|
||||||
@ -13569,7 +13569,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
|
|||||||
|
|
||||||
/* 3rd Stuff */
|
/* 3rd Stuff */
|
||||||
case SC_MILLENNIUMSHIELD:
|
case SC_MILLENNIUMSHIELD:
|
||||||
clif_millenniumshield(bl, 0);
|
clif_millenniumshield( *bl, 0 );
|
||||||
break;
|
break;
|
||||||
case SC_HALLUCINATIONWALK:
|
case SC_HALLUCINATIONWALK:
|
||||||
sc_start(bl,bl,SC_HALLUCINATIONWALK_POSTDELAY,100,sce->val1,skill_get_time2(GC_HALLUCINATIONWALK,sce->val1));
|
sc_start(bl,bl,SC_HALLUCINATIONWALK_POSTDELAY,100,sce->val1,skill_get_time2(GC_HALLUCINATIONWALK,sce->val1));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user