summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormekolat <mekolat@users.noreply.github.com>2016-04-13 12:35:27 -0400
committermekolat <mekolat@users.noreply.github.com>2016-04-15 11:47:31 -0400
commit636f0212bd2ea7f0f55d2859fcbea9f91d633903 (patch)
treee021413a22908674bd4dde1b29fb4f8709ab6e2a
parent2a581450a6ff87c5a183be3855e68b3f2e1b53f3 (diff)
downloadtmwa-636f0212bd2ea7f0f55d2859fcbea9f91d633903.tar.gz
tmwa-636f0212bd2ea7f0f55d2859fcbea9f91d633903.tar.bz2
tmwa-636f0212bd2ea7f0f55d2859fcbea9f91d633903.tar.xz
tmwa-636f0212bd2ea7f0f55d2859fcbea9f91d633903.zip
do not send superfluous info on LoadEndAck
-rw-r--r--src/map/clif.cpp54
-rw-r--r--src/map/map.hpp1
-rw-r--r--src/map/pc.cpp5
3 files changed, 27 insertions, 33 deletions
diff --git a/src/map/clif.cpp b/src/map/clif.cpp
index ea11bbf..31ecaf8 100644
--- a/src/map/clif.cpp
+++ b/src/map/clif.cpp
@@ -3504,21 +3504,10 @@ RecvResult clif_parse_LoadEndAck(Session *s, dumb_ptr<map_session_data> sd)
//clif_authok();
if (sd->npc_id)
npc_event_dequeue(sd);
- clif_skillinfoblock(sd);
- pc_checkitem(sd);
//guild_info();
// loadendack時
// next exp
- clif_updatestatus(sd, SP::NEXTBASEEXP);
- clif_updatestatus(sd, SP::NEXTJOBEXP);
- // skill point
- clif_updatestatus(sd, SP::SKILLPOINT);
- // item
- clif_itemlist(sd);
- clif_equiplist(sd);
- // param all
- clif_initialstatus(sd);
// party
party_send_movemap(sd);
// 119
@@ -3532,14 +3521,11 @@ RecvResult clif_parse_LoadEndAck(Session *s, dumb_ptr<map_session_data> sd)
map_addblock(sd); // ブロック登録
clif_spawnpc(sd); // spawn
- clif_map_pvp(sd); // send map pvp status
-
- // weight max , now
- clif_updatestatus(sd, SP::MAXWEIGHT);
- clif_updatestatus(sd, SP::WEIGHT);
+ if (sd->bl_m->flag.get(MapFlag::PVP))
+ clif_map_pvp(sd); // send map pvp status
// pvp
- if (!battle_config.pk_mode)
+ /*if (!battle_config.pk_mode)
sd->pvp_timer.cancel();
if (sd->bl_m->flag.get(MapFlag::PVP))
@@ -3557,18 +3543,13 @@ RecvResult clif_parse_LoadEndAck(Session *s, dumb_ptr<map_session_data> sd)
else
{
// sd->pvp_timer = nullptr;
- }
-
- sd->state.connect_new = 0;
+ }*/
// view equipment item
- clif_changelook(sd, LOOK::WEAPON, static_cast<uint16_t>(ItemLook::NONE));
- if (battle_config.save_clothcolor == 1 && sd->status.clothes_color > 0)
- clif_changelook(sd, LOOK::CLOTHES_COLOR,
- sd->status.clothes_color);
+ //if (battle_config.save_clothcolor == 1 && sd->status.clothes_color > 0)
+ // clif_changelook(sd, LOOK::CLOTHES_COLOR,
+ // sd->status.clothes_color);
- // option
- clif_changeoption(sd);
// broken equipment
// clif_changelook_accessories(sd, nullptr);
@@ -3579,8 +3560,25 @@ RecvResult clif_parse_LoadEndAck(Session *s, dumb_ptr<map_session_data> sd)
sd->bl_x + AREA_SIZE, sd->bl_y + AREA_SIZE,
BL::NUL);
- if (!sd->state.seen_motd)
- pc_show_motd(sd);
+ if (!sd->state.connect_new)
+ return rv;
+
+ // all the code below is only executed once, on login
+ pc_show_motd(sd);
+ clif_skillinfoblock(sd);
+ pc_checkitem(sd);
+ clif_updatestatus(sd, SP::NEXTBASEEXP);
+ clif_updatestatus(sd, SP::NEXTJOBEXP);
+ clif_updatestatus(sd, SP::SKILLPOINT);
+ clif_itemlist(sd);
+ clif_equiplist(sd);
+ clif_initialstatus(sd);
+ clif_changeoption(sd);
+ clif_changelook(sd, LOOK::WEAPON, static_cast<uint16_t>(ItemLook::NONE));
+ clif_updatestatus(sd, SP::MAXWEIGHT);
+ clif_updatestatus(sd, SP::WEIGHT);
+ npc_event_doall_l(stringish<ScriptLabel>("OnPCLoginEvent"_s), sd->bl_id, nullptr);
+ sd->state.connect_new = 0;
return rv;
}
diff --git a/src/map/map.hpp b/src/map/map.hpp
index 25fdba5..7732af9 100644
--- a/src/map/map.hpp
+++ b/src/map/map.hpp
@@ -145,7 +145,6 @@ struct map_session_data : block_list, SessionData
unsigned shroud_hides_name_talking:1;
unsigned shroud_disappears_on_pickup:1;
unsigned shroud_disappears_on_talk:1;
- unsigned seen_motd:1;
unsigned pvpchannel;
unsigned pvp_rank;
unsigned npc_dialog_mes:1;
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index db3b372..066484d 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -850,10 +850,7 @@ void pc_show_motd(dumb_ptr<map_session_data> sd)
// If you remove the sending of this message,
// the license does not permit you to publicly use this software.
- clif_displaymessage(sd->sess, "Server : ##7This server is Free Software, for details type @source in chat or use the tmwa-source tool"_s);
- npc_event_doall_l(stringish<ScriptLabel>("OnPCLoginEvent"_s), sd->bl_id, nullptr);
-
- sd->state.seen_motd = true;
+ clif_displaymessage(sd->sess, "Server : ##7This server is Free Software, for details type @source in chat."_s);
}
/*==========================================