summaryrefslogtreecommitdiff
path: root/src/map/pc.cpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-09-08 19:43:28 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-09-09 19:29:31 -0700
commita5861a4c81bb616b7fba2028cf9ee31f890357c5 (patch)
tree0a7aedad97d70b6194eb57a7de39857d015685a3 /src/map/pc.cpp
parent367e76ba89bde0e3fb6c4ae0e64cd3927e0db2f2 (diff)
downloadtmwa-a5861a4c81bb616b7fba2028cf9ee31f890357c5.tar.gz
tmwa-a5861a4c81bb616b7fba2028cf9ee31f890357c5.tar.bz2
tmwa-a5861a4c81bb616b7fba2028cf9ee31f890357c5.tar.xz
tmwa-a5861a4c81bb616b7fba2028cf9ee31f890357c5.zip
Use IP4 classes and rename conf variables
Diffstat (limited to 'src/map/pc.cpp')
-rw-r--r--src/map/pc.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/map/pc.cpp b/src/map/pc.cpp
index 7b0af59..5fdb390 100644
--- a/src/map/pc.cpp
+++ b/src/map/pc.cpp
@@ -583,8 +583,8 @@ int pc_isequip(dumb_ptr<map_session_data> sd, int n)
item = sd->inventory_data[n];
sc_data = battle_get_sc_data(sd);
- if (battle_config.gm_allequip > 0
- && pc_isGM(sd) >= battle_config.gm_allequip)
+ if (battle_config.gm_all_equipment > 0
+ && pc_isGM(sd) >= battle_config.gm_all_equipment)
return 1;
if (item == NULL)
@@ -609,8 +609,6 @@ int pc_authok(int id, int login_id2, TimeT connect_until_time,
struct party *p;
tick_t tick = gettick();
- struct sockaddr_in sai;
- socklen_t sa_len = sizeof(struct sockaddr);
sd = map_id2sd(id);
if (sd == NULL)
@@ -759,10 +757,6 @@ int pc_authok(int id, int login_id2, TimeT connect_until_time,
sd->packet_flood_reset_due = TimeT();
sd->packet_flood_in = 0;
- // Obtain IP address (if they are still connected)
- if (!getpeername(sd->fd, reinterpret_cast<struct sockaddr *>(&sai), &sa_len))
- sd->ip = sai.sin_addr;
-
// message of the limited time of the account
if (connect_until_time)
{
@@ -2308,7 +2302,7 @@ int pc_setpos(dumb_ptr<map_session_data> sd,
{
if (sd->mapname_)
{
- struct in_addr ip;
+ IP4Address ip;
int port;
if (map_mapname2ipport(mapname_, &ip, &port) == 0)
{
@@ -2638,7 +2632,7 @@ int pc_stop_walking(dumb_ptr<map_session_data> sd, int type)
sd->to_y = sd->bl_y;
if (type & 0x01)
clif_fixpos(sd);
- if (type & 0x02 && battle_config.pc_damage_delay)
+ if (type & 0x02 && battle_config.player_damage_delay)
{
tick_t tick = gettick();
interval_t delay = battle_get_dmotion(sd);
@@ -2794,7 +2788,7 @@ void pc_attack_timer(TimerData *, tick_t tick, int id)
if (opt != NULL && bool(*opt & Option::REAL_ANY_HIDE))
return;
- if (!battle_config.sdelay_attack_enable)
+ if (!battle_config.skill_delay_attack_enable)
{
if (tick < sd->canact_tick)
{
@@ -2837,7 +2831,7 @@ void pc_attack_timer(TimerData *, tick_t tick, int id)
}
else
{
- if (battle_config.pc_attack_direction_change)
+ if (battle_config.player_attack_direction_change)
sd->dir = sd->head_dir = map_calc_dir(sd, bl->bl_x, bl->bl_y); // 向き設定
if (sd->walktimer)
@@ -5207,7 +5201,7 @@ void pc_autosave(TimerData *, tick_t)
if (save_flag == 0)
last_save_fd = 0;
- interval_t interval = autosave_interval / (clif_countusers() + 1);
+ interval_t interval = autosave_time / (clif_countusers() + 1);
if (interval <= interval_t::zero())
interval = std::chrono::milliseconds(1);
Timer(gettick() + interval,
@@ -5265,7 +5259,7 @@ int do_init_pc(void)
pc_natural_heal,
NATURAL_HEAL_INTERVAL
).detach();
- Timer(gettick() + autosave_interval,
+ Timer(gettick() + autosave_time,
pc_autosave
).detach();