Fixed clif_move to use the correct movement packets (#8405)
* Removed unused ZC_NOTIFY_MOVE (0x86) packet --------- Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
parent
6ca99e7852
commit
0d3550e7ea
147
src/map/clif.cpp
147
src/map/clif.cpp
@ -1391,35 +1391,29 @@ static void clif_spawn_unit( struct block_list *bl, enum send_target target ){
|
|||||||
/*==========================================
|
/*==========================================
|
||||||
* Prepares 'unit walking' packet
|
* Prepares 'unit walking' packet
|
||||||
*------------------------------------------*/
|
*------------------------------------------*/
|
||||||
static void clif_set_unit_walking( struct block_list *bl, map_session_data *tsd, struct unit_data *ud, enum send_target target ){
|
static void clif_set_unit_walking( struct block_list& bl, map_session_data* tsd, struct unit_data& ud, enum send_target target ){
|
||||||
nullpo_retv( bl );
|
|
||||||
nullpo_retv( ud );
|
|
||||||
|
|
||||||
map_session_data* sd;
|
|
||||||
status_change* sc = status_get_sc( bl );
|
|
||||||
struct view_data* vd = status_get_viewdata( bl );
|
|
||||||
struct packet_unit_walking p;
|
struct packet_unit_walking p;
|
||||||
int g_id = status_get_guild_id(bl);
|
|
||||||
|
|
||||||
sd = BL_CAST(BL_PC, bl);
|
|
||||||
|
|
||||||
p.PacketType = unit_walkingType;
|
p.PacketType = unit_walkingType;
|
||||||
#if PACKETVER >= 20091103
|
#if PACKETVER >= 20091103
|
||||||
p.PacketLength = sizeof(p);
|
p.PacketLength = sizeof(p);
|
||||||
#endif
|
#endif
|
||||||
#if PACKETVER >= 20071106
|
#if PACKETVER >= 20071106
|
||||||
p.objecttype = clif_bl_type( bl, true );
|
p.objecttype = clif_bl_type( &bl, true );
|
||||||
#endif
|
#endif
|
||||||
|
map_session_data* sd = BL_CAST(BL_PC, &bl);
|
||||||
#if PACKETVER >= 20131223
|
#if PACKETVER >= 20131223
|
||||||
p.AID = bl->id;
|
p.AID = bl.id;
|
||||||
p.GID = (sd) ? sd->status.char_id : 0; // CCODE
|
p.GID = (sd) ? sd->status.char_id : 0; // CCODE
|
||||||
#else
|
#else
|
||||||
p.GID = bl->id;
|
p.GID = bl.id;
|
||||||
#endif
|
#endif
|
||||||
p.speed = status_get_speed(bl);
|
p.speed = status_get_speed( &bl );
|
||||||
|
status_change* sc = status_get_sc( &bl );
|
||||||
p.bodyState = (sc) ? sc->opt1 : 0;
|
p.bodyState = (sc) ? sc->opt1 : 0;
|
||||||
p.healthState = (sc) ? sc->opt2 : 0;
|
p.healthState = (sc) ? sc->opt2 : 0;
|
||||||
p.effectState = (sc) ? sc->option : 0;
|
p.effectState = (sc) ? sc->option : 0;
|
||||||
|
struct view_data* vd = status_get_viewdata( &bl );
|
||||||
p.job = vd->class_;
|
p.job = vd->class_;
|
||||||
p.head = vd->hair_style;
|
p.head = vd->hair_style;
|
||||||
p.weapon = vd->weapon;
|
p.weapon = vd->weapon;
|
||||||
@ -1436,31 +1430,31 @@ static void clif_set_unit_walking( struct block_list *bl, map_session_data *tsd,
|
|||||||
#if PACKETVER >= 20101124
|
#if PACKETVER >= 20101124
|
||||||
p.robe = vd->robe;
|
p.robe = vd->robe;
|
||||||
#endif
|
#endif
|
||||||
p.GUID = g_id;
|
p.GUID = status_get_guild_id( &bl );
|
||||||
p.GEmblemVer = status_get_emblem_id(bl);
|
p.GEmblemVer = status_get_emblem_id( &bl );
|
||||||
p.honor = (sd) ? sd->status.manner : 0;
|
p.honor = (sd) ? sd->status.manner : 0;
|
||||||
p.virtue = (sc) ? sc->opt3 : 0;
|
p.virtue = (sc) ? sc->opt3 : 0;
|
||||||
p.isPKModeON = (sd && sd->status.karma) ? 1 : 0;
|
p.isPKModeON = (sd && sd->status.karma) ? 1 : 0;
|
||||||
p.sex = vd->sex;
|
p.sex = vd->sex;
|
||||||
WBUFPOS2( &p.MoveData[0], 0, bl->x, bl->y, ud->to_x, ud->to_y, 8, 8 );
|
WBUFPOS2( &p.MoveData[0], 0, bl.x, bl.y, ud.to_x, ud.to_y, 8, 8 );
|
||||||
p.xSize = p.ySize = (sd) ? 5 : 0;
|
p.xSize = p.ySize = (sd) ? 5 : 0;
|
||||||
p.clevel = clif_setlevel(bl);
|
p.clevel = clif_setlevel( &bl );
|
||||||
#if PACKETVER >= 20080102
|
#if PACKETVER >= 20080102
|
||||||
p.font = (sd) ? sd->status.font : 0;
|
p.font = (sd) ? sd->status.font : 0;
|
||||||
#endif
|
#endif
|
||||||
#if PACKETVER >= 20120221
|
#if PACKETVER >= 20120221
|
||||||
if( battle_config.monster_hp_bars_info && !map_getmapflag(bl->m, MF_HIDEMOBHPBAR) && bl->type == BL_MOB && (status_get_hp(bl) < status_get_max_hp( bl ) ) ){
|
if( battle_config.monster_hp_bars_info && !map_getmapflag(bl.m, MF_HIDEMOBHPBAR) && bl.type == BL_MOB && (status_get_hp( &bl ) < status_get_max_hp( &bl ) ) ){
|
||||||
p.maxHP = status_get_max_hp(bl);
|
p.maxHP = status_get_max_hp( &bl );
|
||||||
p.HP = status_get_hp(bl);
|
p.HP = status_get_hp( &bl );
|
||||||
} else {
|
} else {
|
||||||
p.maxHP = -1;
|
p.maxHP = -1;
|
||||||
p.HP = -1;
|
p.HP = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( bl->type == BL_MOB ){
|
if( bl.type == BL_MOB ){
|
||||||
p.isBoss = ( (mob_data*)bl )->get_bosstype();
|
p.isBoss = reinterpret_cast<mob_data*>( &bl )->get_bosstype();
|
||||||
}else if( bl->type == BL_PET ){
|
}else if( bl.type == BL_PET ){
|
||||||
p.isBoss = ( (pet_data*)bl )->db->get_bosstype();
|
p.isBoss = reinterpret_cast<pet_data*>( &bl )->db->get_bosstype();
|
||||||
}else{
|
}else{
|
||||||
p.isBoss = BOSSTYPE_NONE;
|
p.isBoss = BOSSTYPE_NONE;
|
||||||
}
|
}
|
||||||
@ -1470,24 +1464,24 @@ static void clif_set_unit_walking( struct block_list *bl, map_session_data *tsd,
|
|||||||
#endif
|
#endif
|
||||||
/* Might be earlier, this is when the named item bug began */
|
/* Might be earlier, this is when the named item bug began */
|
||||||
#if PACKETVER >= 20131223
|
#if PACKETVER >= 20131223
|
||||||
safestrncpy(p.name, status_get_name(bl), NAME_LENGTH);
|
safestrncpy(p.name, status_get_name( &bl ), NAME_LENGTH);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
clif_send( &p, sizeof(p), tsd ? &tsd->bl : bl, target );
|
clif_send( &p, sizeof(p), tsd ? &tsd->bl : &bl, target );
|
||||||
|
|
||||||
// if disguised, send the info to self
|
// if disguised, send the info to self
|
||||||
if( disguised( bl ) ){
|
if( disguised( &bl ) ){
|
||||||
#if PACKETVER >= 20091103
|
#if PACKETVER >= 20091103
|
||||||
p.objecttype = pcdb_checkid( status_get_viewdata(bl)->class_ ) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE
|
p.objecttype = pcdb_checkid( status_get_viewdata( &bl )->class_ ) ? 0x0 : 0x5; //PC_TYPE : NPC_MOB_TYPE
|
||||||
#if PACKETVER >= 20131223
|
#if PACKETVER >= 20131223
|
||||||
p.AID = disguised_bl_id( bl->id );
|
p.AID = disguised_bl_id( bl.id );
|
||||||
#else
|
#else
|
||||||
p.GID = disguised_bl_id( bl->id );
|
p.GID = disguised_bl_id( bl.id );
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
p.GID = disguised_bl_id( bl->id );
|
p.GID = disguised_bl_id( bl.id );
|
||||||
#endif
|
#endif
|
||||||
clif_send(&p,sizeof(p),bl,SELF);
|
clif_send(&p, sizeof(p), &bl, SELF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1991,13 +1985,30 @@ void clif_walkok( map_session_data& sd ){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void clif_move2( struct block_list *bl, struct view_data *vd, struct unit_data *ud ){
|
/// Notifies clients in an area, that an other visible object is walking.
|
||||||
|
/// Note: unit must not be self
|
||||||
|
void clif_move( struct unit_data& ud )
|
||||||
|
{
|
||||||
|
struct block_list* bl = ud.bl;
|
||||||
|
struct view_data* vd = status_get_viewdata(bl);
|
||||||
|
|
||||||
|
if (bl == nullptr || vd == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// This performance check is needed to keep GM-hidden objects from being notified to bots.
|
||||||
|
if (vd->class_ == JT_INVISIBLE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Hide NPC from Maya Purple card
|
||||||
|
if (clif_npc_mayapurple(bl))
|
||||||
|
return;
|
||||||
|
|
||||||
status_change* sc = nullptr;
|
status_change* sc = nullptr;
|
||||||
|
|
||||||
if ((sc = status_get_sc(bl)) && sc->option & (OPTION_HIDE | OPTION_CLOAK | OPTION_INVISIBLE | OPTION_CHASEWALK))
|
if ((sc = status_get_sc(bl)) && sc->option & (OPTION_HIDE | OPTION_CLOAK | OPTION_INVISIBLE | OPTION_CHASEWALK))
|
||||||
clif_ally_only = true;
|
clif_ally_only = true;
|
||||||
|
|
||||||
clif_set_unit_walking( bl, nullptr, ud, AREA_WOS );
|
clif_set_unit_walking( *bl, nullptr, ud, AREA_WOS );
|
||||||
|
|
||||||
if (vd->cloth_color)
|
if (vd->cloth_color)
|
||||||
clif_refreshlook(bl, bl->id, LOOK_CLOTHES_COLOR, vd->cloth_color, AREA_WOS);
|
clif_refreshlook(bl, bl->id, LOOK_CLOTHES_COLOR, vd->cloth_color, AREA_WOS);
|
||||||
@ -2007,8 +2018,7 @@ static void clif_move2( struct block_list *bl, struct view_data *vd, struct unit
|
|||||||
switch (bl->type) {
|
switch (bl->type) {
|
||||||
case BL_PC:
|
case BL_PC:
|
||||||
{
|
{
|
||||||
TBL_PC *sd = ((TBL_PC*)bl);
|
map_session_data* sd = reinterpret_cast<map_session_data*>( bl );
|
||||||
// clif_movepc(sd);
|
|
||||||
if (sd->state.size == SZ_BIG) // tiny/big players [Valaris]
|
if (sd->state.size == SZ_BIG) // tiny/big players [Valaris]
|
||||||
clif_specialeffect(&sd->bl, EF_GIANTBODY2, AREA);
|
clif_specialeffect(&sd->bl, EF_GIANTBODY2, AREA);
|
||||||
else if (sd->state.size == SZ_MEDIUM)
|
else if (sd->state.size == SZ_MEDIUM)
|
||||||
@ -2019,7 +2029,7 @@ static void clif_move2( struct block_list *bl, struct view_data *vd, struct unit
|
|||||||
break;
|
break;
|
||||||
case BL_MOB:
|
case BL_MOB:
|
||||||
{
|
{
|
||||||
TBL_MOB *md = ((TBL_MOB*)bl);
|
mob_data* md = reinterpret_cast<mob_data*>( bl );
|
||||||
if (md->special_state.size == SZ_BIG) // tiny/big mobs [Valaris]
|
if (md->special_state.size == SZ_BIG) // tiny/big mobs [Valaris]
|
||||||
clif_specialeffect(&md->bl, EF_GIANTBODY2, AREA);
|
clif_specialeffect(&md->bl, EF_GIANTBODY2, AREA);
|
||||||
else if (md->special_state.size == SZ_MEDIUM)
|
else if (md->special_state.size == SZ_MEDIUM)
|
||||||
@ -2028,67 +2038,10 @@ static void clif_move2( struct block_list *bl, struct view_data *vd, struct unit
|
|||||||
break;
|
break;
|
||||||
case BL_PET:
|
case BL_PET:
|
||||||
if (vd->head_bottom) // needed to display pet equip properly
|
if (vd->head_bottom) // needed to display pet equip properly
|
||||||
clif_pet_equip_area((TBL_PET*)bl);
|
clif_pet_equip_area(BL_CAST(BL_PET, bl));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
clif_ally_only = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Notifies clients in an area, that an other visible object is walking.
|
|
||||||
/// 0086 <id>.L <walk data>.6B <walk start time>.L (ZC_NOTIFY_MOVE)
|
|
||||||
/// Note: unit must not be self
|
|
||||||
void clif_move(struct unit_data *ud)
|
|
||||||
{
|
|
||||||
struct view_data* vd;
|
|
||||||
struct block_list* bl = ud->bl;
|
|
||||||
status_change *sc = nullptr;
|
|
||||||
PACKET_ZC_NOTIFY_MOVE packet{};
|
|
||||||
|
|
||||||
packet.packetType = HEADER_ZC_NOTIFY_MOVE;
|
|
||||||
|
|
||||||
vd = status_get_viewdata(bl);
|
|
||||||
if (!vd )
|
|
||||||
return;
|
|
||||||
//This performance check is needed to keep GM-hidden objects from being notified to bots.
|
|
||||||
else if( vd->class_ == JT_INVISIBLE ){
|
|
||||||
// If the player was disguised we still need to update the disguised unit, since the main unit will be updated through clif_walkok
|
|
||||||
if(disguised(bl)) {
|
|
||||||
packet.gid = disguised_bl_id(bl->id);
|
|
||||||
WBUFPOS2(packet.moveData, 0, bl->x, bl->y, ud->to_x, ud->to_y, 8, 8);
|
|
||||||
packet.moveStartTime = client_tick(gettick());
|
|
||||||
|
|
||||||
clif_send(&packet, sizeof(packet), bl, SELF);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hide NPC from Maya Purple card
|
|
||||||
if (clif_npc_mayapurple(bl))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (ud->state.speed_changed) {
|
|
||||||
// Since we don't know how to update the speed of other objects,
|
|
||||||
// use the old walk packet to update the data.
|
|
||||||
ud->state.speed_changed = 0;
|
|
||||||
clif_move2(bl, vd, ud);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((sc = status_get_sc(bl)) && sc->option&(OPTION_HIDE|OPTION_CLOAK|OPTION_INVISIBLE|OPTION_CHASEWALK))
|
|
||||||
clif_ally_only = true;
|
|
||||||
|
|
||||||
packet.gid = bl->id;
|
|
||||||
WBUFPOS2(packet.moveData,0,bl->x,bl->y,ud->to_x,ud->to_y,8,8);
|
|
||||||
packet.moveStartTime = client_tick(gettick());
|
|
||||||
|
|
||||||
clif_send(&packet, sizeof(packet), bl, AREA_WOS);
|
|
||||||
|
|
||||||
if (disguised(bl)) {
|
|
||||||
packet.gid = disguised_bl_id(bl->id);
|
|
||||||
|
|
||||||
clif_send(&packet, sizeof(packet), bl, SELF);
|
|
||||||
}
|
|
||||||
clif_ally_only = false;
|
clif_ally_only = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5037,7 +4990,7 @@ void clif_getareachar_unit( map_session_data* sd,struct block_list *bl ){
|
|||||||
ud = unit_bl2ud(bl);
|
ud = unit_bl2ud(bl);
|
||||||
|
|
||||||
if( ud && ud->walktimer != INVALID_TIMER ){
|
if( ud && ud->walktimer != INVALID_TIMER ){
|
||||||
clif_set_unit_walking( bl, sd, ud, SELF );
|
clif_set_unit_walking( *bl, sd, *ud, SELF );
|
||||||
}else{
|
}else{
|
||||||
clif_set_unit_idle( bl, false, SELF, &sd->bl );
|
clif_set_unit_idle( bl, false, SELF, &sd->bl );
|
||||||
}
|
}
|
||||||
|
|||||||
@ -814,7 +814,7 @@ void clif_clearunit_area( block_list& bl, clr_type type );
|
|||||||
void clif_clearunit_delayed(struct block_list* bl, clr_type type, t_tick tick);
|
void clif_clearunit_delayed(struct block_list* bl, clr_type type, t_tick tick);
|
||||||
int clif_spawn(struct block_list *bl, bool walking = false); //area
|
int clif_spawn(struct block_list *bl, bool walking = false); //area
|
||||||
void clif_walkok( map_session_data& sd );
|
void clif_walkok( map_session_data& sd );
|
||||||
void clif_move(struct unit_data *ud); //area
|
void clif_move( struct unit_data& ud ); //area
|
||||||
void clif_changemap( map_session_data& sd, short m, uint16 x, uint16 y );
|
void clif_changemap( map_session_data& sd, short m, uint16 x, uint16 y );
|
||||||
void clif_changemapserver( map_session_data& sd, const char* map, uint16 x, uint16 y, uint32 ip, uint16 port );
|
void clif_changemapserver( map_session_data& sd, const char* map, uint16 x, uint16 y, uint32 ip, uint16 port );
|
||||||
void clif_blown(struct block_list *bl); // area
|
void clif_blown(struct block_list *bl); // area
|
||||||
|
|||||||
@ -3471,7 +3471,6 @@ int mob_class_change (struct mob_data *md, int mob_id)
|
|||||||
status_set_viewdata(&md->bl, mob_id);
|
status_set_viewdata(&md->bl, mob_id);
|
||||||
clif_mob_class_change(md,md->vd->class_);
|
clif_mob_class_change(md,md->vd->class_);
|
||||||
status_calc_mob(md,SCO_FIRST);
|
status_calc_mob(md,SCO_FIRST);
|
||||||
md->ud.state.speed_changed = 1; //Speed change update.
|
|
||||||
|
|
||||||
if (battle_config.monster_class_change_recover) {
|
if (battle_config.monster_class_change_recover) {
|
||||||
memset(md->dmglog, 0, sizeof(md->dmglog));
|
memset(md->dmglog, 0, sizeof(md->dmglog));
|
||||||
|
|||||||
@ -611,6 +611,8 @@ struct PACKET_ZC_HOSKILLINFO_UPDATE {
|
|||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
DEFINE_PACKET_HEADER(ZC_HOSKILLINFO_UPDATE, 0x239)
|
DEFINE_PACKET_HEADER(ZC_HOSKILLINFO_UPDATE, 0x239)
|
||||||
|
|
||||||
|
// Unused packet (alpha?)
|
||||||
|
/*
|
||||||
struct PACKET_ZC_NOTIFY_MOVE {
|
struct PACKET_ZC_NOTIFY_MOVE {
|
||||||
int16 packetType;
|
int16 packetType;
|
||||||
uint32 gid;
|
uint32 gid;
|
||||||
@ -618,6 +620,7 @@ struct PACKET_ZC_NOTIFY_MOVE {
|
|||||||
uint32 moveStartTime;
|
uint32 moveStartTime;
|
||||||
} __attribute__((packed));
|
} __attribute__((packed));
|
||||||
DEFINE_PACKET_HEADER(ZC_NOTIFY_MOVE, 0x86)
|
DEFINE_PACKET_HEADER(ZC_NOTIFY_MOVE, 0x86)
|
||||||
|
*/
|
||||||
|
|
||||||
struct PACKET_ZC_NOTIFY_PLAYERMOVE {
|
struct PACKET_ZC_NOTIFY_PLAYERMOVE {
|
||||||
int16 packetType;
|
int16 packetType;
|
||||||
|
|||||||
@ -1785,7 +1785,7 @@ static int pet_ai_sub_hard(struct pet_data *pd, map_session_data *sd, t_tick tic
|
|||||||
return 0; // Wait until the pet finishes walking back to master.
|
return 0; // Wait until the pet finishes walking back to master.
|
||||||
|
|
||||||
pd->status.speed = pd->get_pet_walk_speed();
|
pd->status.speed = pd->get_pet_walk_speed();
|
||||||
pd->ud.state.change_walk_target = pd->ud.state.speed_changed = 1;
|
pd->ud.state.change_walk_target = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pd->target_id) {
|
if (pd->target_id) {
|
||||||
|
|||||||
@ -16082,7 +16082,6 @@ BUILDIN_FUNC(npcspeed)
|
|||||||
|
|
||||||
if( nd ) {
|
if( nd ) {
|
||||||
nd->speed = speed;
|
nd->speed = speed;
|
||||||
nd->ud.state.speed_changed = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return SCRIPT_CMD_SUCCESS;
|
return SCRIPT_CMD_SUCCESS;
|
||||||
|
|||||||
@ -5616,7 +5616,7 @@ void status_calc_bl_main(struct block_list *bl, std::bitset<SCB_MAX> flag)
|
|||||||
* piece of code triggers the walk-timer is set on INVALID_TIMER)
|
* piece of code triggers the walk-timer is set on INVALID_TIMER)
|
||||||
**/
|
**/
|
||||||
if (ud)
|
if (ud)
|
||||||
ud->state.change_walk_target = ud->state.speed_changed = 1;
|
ud->state.change_walk_target = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flag[SCB_STR]) {
|
if(flag[SCB_STR]) {
|
||||||
|
|||||||
@ -140,7 +140,7 @@ int unit_walktoxy_sub(struct block_list *bl)
|
|||||||
unit_refresh( bl, true );
|
unit_refresh( bl, true );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
clif_move(ud);
|
clif_move( *ud );
|
||||||
|
|
||||||
if(ud->walkpath.path_pos>=ud->walkpath.path_len)
|
if(ud->walkpath.path_pos>=ud->walkpath.path_len)
|
||||||
i = -1;
|
i = -1;
|
||||||
@ -557,7 +557,7 @@ static TIMER_FUNC(unit_walktoxy_timer)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// Resend walk packet for proper Self Destruction display.
|
// Resend walk packet for proper Self Destruction display.
|
||||||
clif_move(ud);
|
clif_move( *ud );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BL_NPC:
|
case BL_NPC:
|
||||||
@ -627,7 +627,7 @@ static TIMER_FUNC(unit_walktoxy_timer)
|
|||||||
}
|
}
|
||||||
ud->walktimer = add_timer(tick+speed,unit_walktoxy_timer,id,speed);
|
ud->walktimer = add_timer(tick+speed,unit_walktoxy_timer,id,speed);
|
||||||
if( md && DIFF_TICK(tick,md->dmgtick) < 3000 ) // Not required not damaged recently
|
if( md && DIFF_TICK(tick,md->dmgtick) < 3000 ) // Not required not damaged recently
|
||||||
clif_move(ud);
|
clif_move( *ud );
|
||||||
} else if(ud->state.running) { // Keep trying to run.
|
} else if(ud->state.running) { // Keep trying to run.
|
||||||
if (!(unit_run(bl, nullptr, SC_RUN) || unit_run(bl, sd, SC_WUGDASH)) )
|
if (!(unit_run(bl, nullptr, SC_RUN) || unit_run(bl, sd, SC_WUGDASH)) )
|
||||||
ud->state.running = 0;
|
ud->state.running = 0;
|
||||||
|
|||||||
@ -52,7 +52,6 @@ struct unit_data {
|
|||||||
unsigned step_attack : 1;
|
unsigned step_attack : 1;
|
||||||
unsigned walk_easy : 1 ;
|
unsigned walk_easy : 1 ;
|
||||||
unsigned running : 1;
|
unsigned running : 1;
|
||||||
unsigned speed_changed : 1;
|
|
||||||
unsigned walk_script : 1;
|
unsigned walk_script : 1;
|
||||||
unsigned blockedmove : 1;
|
unsigned blockedmove : 1;
|
||||||
unsigned blockedskill : 1;
|
unsigned blockedskill : 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user