SQL synchronization

This commit is contained in:
rAthenaAPI
2020-03-24 18:38:07 +01:00
parent 412d90048d
commit 53761b952a
18 changed files with 133 additions and 2095 deletions

View File

@@ -1387,29 +1387,6 @@ static void clif_spiritcharm_single(int fd, struct map_session_data *sd)
WFIFOSET(fd, packet_len(0x08cf));
}
/// Notifies the client of an object's souls.
/// Note: Spirit spheres and Soul spheres work on
/// seprate systems officially, but both send out
/// the same packet which leads to confusion on how
/// much soul energy a Soul Reaper acturally has
/// should the player also have spirit spheres.
/// They will likely create a new packet for this soon
/// to seprate the animations for spirit and soul spheres.
/// For now well use this and replace it later when possible. [Rytech]
///
/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
static void clif_soulball_single(int fd, struct map_session_data *sd)
{
WFIFOHEAD(fd, packet_len(0x1d0));
WFIFOW(fd,0)=0x1d0;
WFIFOL(fd,2)=sd->bl.id;
WFIFOW(fd,6)=sd->soulball;
WFIFOSET(fd, packet_len(0x1d0));
}
/*==========================================
* Run when player changes map / refreshes
* Tells its client to display all weather settings being used by this map
@@ -1499,8 +1476,6 @@ int clif_spawn(struct block_list *bl)
if (sd->spiritball > 0)
clif_spiritball(&sd->bl);
if (sd->soulball > 0)
clif_soulball(sd);
if(sd->state.size==SZ_BIG) // tiny/big players [Valaris]
clif_specialeffect(bl,EF_GIANTBODY2,AREA);
else if(sd->state.size==SZ_MEDIUM)
@@ -4633,33 +4608,6 @@ void clif_storageclose(struct map_session_data* sd)
WFIFOSET(fd,packet_len(0xf8));
}
/// Notifies clients in an area of an object's souls.
/// Note: Spirit spheres and Soul spheres work on
/// seprate systems officially, but both send out
/// the same packet which leads to confusion on how
/// much soul energy a Soul Reaper acturally has
/// should the player also have spirit spheres.
/// They will likely create a new packet for this soon
/// to seprate the animations for spirit and soul spheres.
/// For now well use this and replace it later when possible. [Rytech]
///
/// 01d0 <id>.L <amount>.W (ZC_SPIRITS)
/// 01e1 <id>.L <amount>.W (ZC_SPIRITS2)
void clif_soulball(struct map_session_data *sd)
{
unsigned char buf[8];
nullpo_retv(sd);
WBUFW(buf,0)=0x1d0;
WBUFL(buf,2)=sd->bl.id;
WBUFW(buf,6)=sd->soulball;
clif_send(buf,packet_len(0x1d0),&sd->bl,AREA);
return;
}
/*==========================================
* Server tells 'sd' player client the abouts of 'dstsd' player
*------------------------------------------*/
@@ -4681,8 +4629,6 @@ static void clif_getareachar_pc(struct map_session_data* sd,struct map_session_d
clif_spiritball_single(sd->fd, dstsd);
if (dstsd->spiritcharm_type != CHARM_TYPE_NONE && dstsd->spiritcharm > 0)
clif_spiritcharm_single(sd->fd, dstsd);
if (dstsd->soulball > 0)
clif_soulball_single(sd->fd, dstsd);
if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
(sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
pc_has_permission(sd, PC_PERM_VIEW_HPMETER)
@@ -6081,10 +6027,6 @@ void clif_status_change_sub(struct block_list *bl, int id, int type, int flag, t
nullpo_retv(bl);
// Statuses with an infinite duration, but still needs a duration sent to display properly.
if (type == EFST_LUNARSTANCE || type == EFST_UNIVERSESTANCE || type == EFST_SUNSTANCE || type == EFST_STARSTANCE)
tick = 200;
#if PACKETVER >= 20120618
if (flag && battle_config.display_status_timers)
WBUFW(buf,0) = 0x983;
@@ -9561,8 +9503,6 @@ void clif_refresh(struct map_session_data *sd)
clif_spiritball_single(sd->fd, sd);
if (sd->spiritcharm_type != CHARM_TYPE_NONE && sd->spiritcharm > 0)
clif_spiritcharm_single(sd->fd, sd);
if (sd->soulball)
clif_soulball_single(sd->fd, sd);
if (sd->vd.cloth_color)
clif_refreshlook(&sd->bl,sd->bl.id,LOOK_CLOTHES_COLOR,sd->vd.cloth_color,SELF);
if (sd->vd.body_style)
@@ -10765,7 +10705,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd)
if(!sd->state.autotrade && mapdata->flag[MF_LOADEVENT]) // Lance
npc_script_event(sd, NPCE_LOADMAP);
if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd)))
if (pc_checkskill(sd, SG_DEVIL) && pc_is_maxjoblv(sd))
clif_status_load(&sd->bl, EFST_DEVIL1, 1); //blindness [Komurka]
if (sd->sc.opt2) //Client loses these on warp.
@@ -11045,7 +10985,7 @@ void clif_parse_QuitGame(int fd, struct map_session_data *sd)
{
/* Rovert's prevent logout option fixed [Valaris] */
//int type = RFIFOW(fd,packet_db[RFIFOW(fd,0)].pos[0]);
if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC_SUHIDE] && !sd->sc.data[SC_NEWMOON] &&
if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC_SUHIDE] &&
(!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
{
set_eof(fd);
@@ -11281,8 +11221,7 @@ void clif_parse_ActionRequest_sub(struct map_session_data *sd, int action_type,
(sd->sc.data[SC_AUTOCOUNTER] && action_type != 0x07) ||
sd->sc.data[SC_BLADESTOP] ||
sd->sc.data[SC__MANHOLE] ||
sd->sc.data[SC_SUHIDE] ||
sd->sc.data[SC_GRAVITYCONTROL]))
sd->sc.data[SC_SUHIDE] ))
return;
if(action_type != 0x00 && action_type != 0x07)
@@ -11409,7 +11348,7 @@ void clif_parse_Restart(int fd, struct map_session_data *sd)
break;
case 0x01:
/* Rovert's Prevent logout option - Fixed [Valaris] */
if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC_SUHIDE] && !sd->sc.data[SC_NEWMOON] &&
if( !sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC_SUHIDE] &&
(!battle_config.prevent_logout || sd->canlog_tick == 0 || DIFF_TICK(gettick(), sd->canlog_tick) > battle_config.prevent_logout) )
{ //Send to char-server for character selection.
pc_damage_log_clear(sd,0);