Good day! Does this still work? I've encountered different structure on map.cpp. It was supposed to be like this but
diff --git a/src/map/map.cpp b/src/map/map.cpp
index 735bfc678..10537d75e 100644
--- a/src/map/map.cpp
+++ b/src/map/map.cpp
@@ -2088,6 +2088,9 @@ int map_quit(struct map_session_data *sd) {
status_change_end(&sd->bl, SC_AUTOTRADE, INVALID_TIMER);
status_change_end(&sd->bl, SC_SPURT, INVALID_TIMER);
status_change_end(&sd->bl, SC_BERSERK, INVALID_TIMER);
+#ifdef FORGOTTEN_SKILLS
+ status_change_end(&sd->bl, SC_FURY2, INVALID_TIMER);
+#endif
status_change_end(&sd->bl, SC__BLOODYLUST, INVALID_TIMER);
status_change_end(&sd->bl, SC_TRICKDEAD, INVALID_TIMER);
status_change_end(&sd->bl, SC_LEADERSHIP, INVALID_TIMER);
it's different now.
/*==========================================
* Standard call when a player connection is closed.
*------------------------------------------*/
int map_quit(map_session_data *sd) {
int i;
if (sd->state.keepshop == false) { // Close vending/buyingstore
if (sd->state.vending)
vending_closevending(sd);
else if (sd->state.buyingstore)
buyingstore_close(sd);
}
if(!sd->state.active) { //Removing a player that is not active.
struct auth_node *node = chrif_search(sd->status.account_id);
if (node && node->char_id == sd->status.char_id &&
node->state != ST_LOGOUT)
//Except when logging out, clear the auth-connect data immediately.
chrif_auth_delete(node->account_id, node->char_id, node->state);
//Non-active players should not have loaded any data yet (or it was cleared already) so no additional cleanups are needed.
return 0;
}
if (sd->expiration_tid != INVALID_TIMER)
delete_timer(sd->expiration_tid, pc_expiration_timer);
if (sd->npc_timer_id != INVALID_TIMER) //Cancel the event timer.
npc_timerevent_quit(sd);
if (sd->autotrade_tid != INVALID_TIMER)
delete_timer(sd->autotrade_tid, pc_autotrade_timer);
if (sd->npc_id)
npc_event_dequeue(sd);
if (sd->bg_id)
bg_team_leave(sd, true, true);
if (sd->bg_queue_id > 0)
bg_queue_leave(sd, false);
if( sd->status.clan_id )
clan_member_left(sd);
pc_itemcd_do(sd,false);
npc_script_event(sd, NPCE_LOGOUT);
//Unit_free handles clearing the player related data,
//map_quit handles extra specific data which is related to quitting normally
//(changing map-servers invokes unit_free but bypasses map_quit)
if( sd->sc.count ) {
for (const auto &it : status_db) {
std::bitset<SCF_MAX> &flag = it.second->flag;
//No need to save infinite status
if (flag[SCF_NOSAVEINFINITE] && sd->sc.getSCE(it.first) && sd->sc.getSCE(it.first)->val4 > 0) {
status_change_end(&sd->bl, static_cast<sc_type>(it.first));
continue;
}
//Status that are not saved
if (flag[SCF_NOSAVE]) {
status_change_end(&sd->bl, static_cast<sc_type>(it.first));
continue;
}
//Removes status by config
if (battle_config.debuff_on_logout&1 && flag[SCF_DEBUFF] || //Removes debuffs
(battle_config.debuff_on_logout&2 && !(flag[SCF_DEBUFF]))) //Removes buffs
{
status_change_end(&sd->bl, static_cast<sc_type>(it.first));
continue;
}
}
}
for (i = 0; i < EQI_MAX; i++) {
if (sd->equip_index[i] >= 0)
if (pc_isequip(sd,sd->equip_index[i]))
pc_unequipitem(sd,sd->equip_index[i],2);
}
// Return loot to owner
if( sd->pd ) pet_lootitem_drop(sd->pd, sd);
if (sd->ed) // Remove effects here rather than unit_remove_map_pc so we don't clear on Teleport/map change.
elemental_clean_effect(sd->ed);
if (sd->state.permanent_speed == 1) sd->state.permanent_speed = 0; // Remove lock so speed is set back to normal at login.
struct map_data *mapdata = map_getmapdata(sd->bl.m);
if( mapdata->instance_id > 0 )
instance_delusers(mapdata->instance_id);
unit_remove_map_pc(sd,CLR_RESPAWN);
if (sd->state.vending)
idb_remove(vending_getdb(), sd->status.char_id);
if (sd->state.buyingstore)
idb_remove(buyingstore_getdb(), sd->status.char_id);
pc_damage_log_clear(sd,0);
party_booking_delete(sd); // Party Booking [Spiria]
pc_makesavestatus(sd);
pc_clean_skilltree(sd);
pc_crimson_marker_clear(sd);
pc_macro_detector_disconnect(*sd);
chrif_save(sd, CSAVE_QUIT|CSAVE_INVENTORY|CSAVE_CART);
unit_free_pc(sd);
return 0;
}