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
|
||||
sce->val2--;
|
||||
if (sce->val2 > 0) {
|
||||
clif_millenniumshield(target, sce->val2);
|
||||
clif_millenniumshield( *target, sce->val2 );
|
||||
sce->val3 = 1000; // Next shield
|
||||
} else
|
||||
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)
|
||||
clif_spiritball(&sd->bl);
|
||||
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)
|
||||
clif_soulball(sd);
|
||||
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) )
|
||||
clif_sendbgemblem_area(sd);
|
||||
if (sd->spiritcharm_type != CHARM_TYPE_NONE && sd->spiritcharm > 0)
|
||||
clif_spiritcharm(sd);
|
||||
clif_spiritcharm( *sd );
|
||||
if (sd->status.robe)
|
||||
clif_refreshlook(bl,bl->id,LOOK_ROBE,sd->status.robe,AREA);
|
||||
clif_efst_status_change_sub(bl, bl, AREA);
|
||||
@ -19386,15 +19386,16 @@ void clif_elementalconverter_list( map_session_data& sd ){
|
||||
/**
|
||||
* Rune Knight
|
||||
**/
|
||||
void clif_millenniumshield(struct block_list *bl, short shields) {
|
||||
#if PACKETVER >= 20081217
|
||||
unsigned char buf[10];
|
||||
void clif_millenniumshield( block_list& bl, int16 shields ){
|
||||
#if PACKETVER >= 20081126
|
||||
PACKET_ZC_MILLENNIUMSHIELD packet{};
|
||||
|
||||
WBUFW(buf,0) = 0x440;
|
||||
WBUFL(buf,2) = bl->id;
|
||||
WBUFW(buf,6) = shields;
|
||||
WBUFW(buf,8) = 0;
|
||||
clif_send(buf,packet_len(0x440),bl,AREA);
|
||||
packet.packetType = HEADER_ZC_MILLENNIUMSHIELD;
|
||||
packet.aid = bl.id;
|
||||
packet.num = shields;
|
||||
packet.state = 0;
|
||||
|
||||
clif_send( &packet, sizeof( packet ), &bl, AREA );
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -19550,18 +19551,19 @@ void clif_parse_SkillSelectMenu(int fd, map_session_data *sd) {
|
||||
}
|
||||
|
||||
|
||||
/// Kagerou/Oboro amulet spirit (ZC_SPIRITS_ATTRIBUTE).
|
||||
/// 08cf <id>.L <type>.W <num>.W
|
||||
void clif_spiritcharm(map_session_data *sd) {
|
||||
unsigned char buf[10];
|
||||
/// Kagerou/Oboro amulet spirit.
|
||||
/// 08cf <id>.L <type>.W <num>.W (ZC_SPIRITS_ATTRIBUTE)
|
||||
void clif_spiritcharm( map_session_data& sd ){
|
||||
#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;
|
||||
WBUFL(buf,2) = sd->bl.id;
|
||||
WBUFW(buf,6) = sd->spiritcharm_type;
|
||||
WBUFW(buf,8) = sd->spiritcharm;
|
||||
clif_send(buf, packet_len(0x08cf), &sd->bl, AREA);
|
||||
clif_send( &packet, sizeof( packet ), &sd.bl, AREA );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -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_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 );
|
||||
|
||||
@ -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_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_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->spiritball++;
|
||||
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
|
||||
clif_millenniumshield(&sd->bl,sd->spiritball);
|
||||
clif_millenniumshield( sd->bl, sd->spiritball );
|
||||
else
|
||||
clif_spiritball(&sd->bl);
|
||||
}
|
||||
@ -898,7 +898,7 @@ void pc_delspiritball(map_session_data *sd,int count,int type)
|
||||
|
||||
if(!type) {
|
||||
if( (sd->class_&MAPID_THIRDMASK) == MAPID_ROYAL_GUARD )
|
||||
clif_millenniumshield(&sd->bl,sd->spiritball);
|
||||
clif_millenniumshield( sd->bl, sd->spiritball );
|
||||
else
|
||||
clif_spiritball(&sd->bl);
|
||||
}
|
||||
@ -13069,7 +13069,7 @@ static TIMER_FUNC(pc_spiritcharm_timer){
|
||||
if (sd->spiritcharm <= 0)
|
||||
sd->spiritcharm_type = CHARM_TYPE_NONE;
|
||||
|
||||
clif_spiritcharm(sd);
|
||||
clif_spiritcharm( *sd );
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -13115,7 +13115,7 @@ void pc_addspiritcharm(map_session_data *sd, int interval, int max, int type)
|
||||
sd->spiritcharm++;
|
||||
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)
|
||||
sd->spiritcharm_type = CHARM_TYPE_NONE;
|
||||
|
||||
clif_spiritcharm(sd);
|
||||
clif_spiritcharm( *sd );
|
||||
}
|
||||
|
||||
#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
|
||||
val3 = 1000; // Shield HP
|
||||
clif_millenniumshield(bl, val2);
|
||||
clif_millenniumshield( *bl, val2 );
|
||||
}
|
||||
break;
|
||||
case SC_ABUNDANCE:
|
||||
@ -13569,7 +13569,7 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
|
||||
|
||||
/* 3rd Stuff */
|
||||
case SC_MILLENNIUMSHIELD:
|
||||
clif_millenniumshield(bl, 0);
|
||||
clif_millenniumshield( *bl, 0 );
|
||||
break;
|
||||
case SC_HALLUCINATIONWALK:
|
||||
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