summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-05 22:23:12 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-05 22:26:06 +0300
commit6b230a4de27de394dd4e28662cd27070ab91c1f1 (patch)
tree58dba9c128bb7eb480472dd42d5e6b44401b74e3
parentdb82d35cb549aa305df53c4f0cbe5149062161e3 (diff)
downloadevol-hercules-6b230a4de27de394dd4e28662cd27070ab91c1f1.tar.gz
evol-hercules-6b230a4de27de394dd4e28662cd27070ab91c1f1.tar.bz2
evol-hercules-6b230a4de27de394dd4e28662cd27070ab91c1f1.tar.xz
evol-hercules-6b230a4de27de394dd4e28662cd27070ab91c1f1.zip
Replace struct map_session_data to TBL_PC.
-rw-r--r--src/map/clif.c28
-rw-r--r--src/map/clif.h16
-rw-r--r--src/map/data/session.c2
-rw-r--r--src/map/data/session.h2
-rw-r--r--src/map/map.c4
-rw-r--r--src/map/npc.c2
-rw-r--r--src/map/npc.h2
-rw-r--r--src/map/parse.c18
-rw-r--r--src/map/pc.c12
-rw-r--r--src/map/pc.h12
-rw-r--r--src/map/script.c2
-rw-r--r--src/map/send.c14
-rw-r--r--src/map/send.h8
-rw-r--r--src/map/skill.c2
-rw-r--r--src/map/skill.h2
-rw-r--r--src/map/unit.c2
16 files changed, 64 insertions, 64 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 57b8596..ccf5502 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -23,7 +23,7 @@
#include "map/struct/mapdext.h"
#include "map/struct/sessionext.h"
-void eclif_quest_send_list(struct map_session_data *sd)
+void eclif_quest_send_list(TBL_PC *sd)
{
if (!sd)
{
@@ -56,7 +56,7 @@ void eclif_quest_send_list(struct map_session_data *sd)
hookStop();
}
-void eclif_quest_add(struct map_session_data *sd, struct quest *qd)
+void eclif_quest_add(TBL_PC *sd, struct quest *qd)
{
if (!sd)
{
@@ -93,7 +93,7 @@ void eclif_charnameack(int *fdPtr, struct block_list *bl)
if (bl->type == BL_NPC)
{
int fd = *fdPtr;
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
if (!sd)
{
hookStop();
@@ -136,7 +136,7 @@ void eclif_charnameack(int *fdPtr, struct block_list *bl)
send_changelook(fd, id, field, item->look); \
}
-static void eclif_send_additional_slots(struct map_session_data* sd, struct map_session_data* sd2)
+static void eclif_send_additional_slots(TBL_PC* sd, TBL_PC* sd2)
{
if (!sd || !sd2)
return;
@@ -163,18 +163,18 @@ static void eclif_send_additional_slots(struct map_session_data* sd, struct map_
//skipping SHADOW slots
}
-void eclif_getareachar_unit_post(struct map_session_data* sd, struct block_list *bl)
+void eclif_getareachar_unit_post(TBL_PC* sd, struct block_list *bl)
{
if (!bl)
return;
if (bl->type == BL_PC)
{
- eclif_send_additional_slots(sd, (struct map_session_data *)bl);
- eclif_send_additional_slots((struct map_session_data *)bl, sd);
+ eclif_send_additional_slots(sd, (TBL_PC *)bl);
+ eclif_send_additional_slots((TBL_PC *)bl, sd);
}
}
-void eclif_authok_post(struct map_session_data *sd)
+void eclif_authok_post(TBL_PC *sd)
{
if (!sd)
return;
@@ -186,7 +186,7 @@ void eclif_authok_post(struct map_session_data *sd)
send_mapmask(sd->fd, mask);
}
-void eclif_changemap_post(struct map_session_data *sd, short *m,
+void eclif_changemap_post(TBL_PC *sd, short *m,
int *x __attribute__ ((unused)), int *y __attribute__ ((unused)))
{
if (!sd)
@@ -228,7 +228,7 @@ bool eclif_send(const void* buf __attribute__ ((unused)),
return true;
}
-void eclif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd, enum send_target *target)
+void eclif_set_unit_idle(struct block_list* bl, TBL_PC *tsd, enum send_target *target)
{
if (tsd && bl && bl->id == tsd->bl.id && *target == SELF)
return;
@@ -281,7 +281,7 @@ int eclif_send_actual(int *fd, void *buf, int *len)
return 0;
}
-void eclif_set_unit_idle_post(struct block_list* bl, struct map_session_data *tsd,
+void eclif_set_unit_idle_post(struct block_list* bl, TBL_PC *tsd,
enum send_target *target)
{
if (!bl || !tsd)
@@ -295,17 +295,17 @@ void eclif_set_unit_idle_post(struct block_list* bl, struct map_session_data *ts
send_npc_info(bl, &tsd->bl, *target);
}
-void eclif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
+void eclif_set_unit_walking(struct block_list* bl, TBL_PC *tsd,
struct unit_data* ud, enum send_target *target)
{
- struct map_session_data *sd = BL_CAST(BL_PC, ud->bl);
+ TBL_PC *sd = BL_CAST(BL_PC, ud->bl);
if (!sd || !pc_isinvisible(sd))
send_advmoving(ud, tsd ? &tsd->bl : bl, *target);
}
void eclif_move(struct unit_data *ud)
{
- struct map_session_data *sd = BL_CAST(BL_PC, ud->bl);
+ TBL_PC *sd = BL_CAST(BL_PC, ud->bl);
if (!sd || !pc_isinvisible(sd))
send_advmoving(ud, ud->bl, AREA_WOS);
}
diff --git a/src/map/clif.h b/src/map/clif.h
index 79da4a4..5fd155b 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -4,22 +4,22 @@
#ifndef EVOL_MAP_CLIF
#define EVOL_MAP_CLIF
-void eclif_quest_send_list(struct map_session_data *sd);
-void eclif_quest_add(struct map_session_data *sd, struct quest *qd);
+void eclif_quest_send_list(TBL_PC *sd);
+void eclif_quest_add(TBL_PC *sd, struct quest *qd);
void eclif_charnameack(int *fdPtr, struct block_list *bl);
-void eclif_getareachar_unit_post(struct map_session_data* sd, struct block_list *bl);
+void eclif_getareachar_unit_post(TBL_PC* sd, struct block_list *bl);
void eclif_sendlook(struct block_list *bl, int *id, int *type,
int *val, int *val2, enum send_target *target);
bool eclif_send(const void* buf, int *len, struct block_list* bl, enum send_target *type);
-void eclif_set_unit_idle(struct block_list* bl, struct map_session_data *tsd,
+void eclif_set_unit_idle(struct block_list* bl, TBL_PC *tsd,
enum send_target *target);
int eclif_send_actual(int *fd, void *buf, int *len);
-void eclif_authok_post(struct map_session_data *sd);
-void eclif_changemap_post(struct map_session_data *sd, short *m, int *x, int *y);
-void eclif_set_unit_idle_post(struct block_list* bl, struct map_session_data *tsd,
+void eclif_authok_post(TBL_PC *sd);
+void eclif_changemap_post(TBL_PC *sd, short *m, int *x, int *y);
+void eclif_set_unit_idle_post(struct block_list* bl, TBL_PC *tsd,
enum send_target *target);
-void eclif_set_unit_walking(struct block_list* bl, struct map_session_data *tsd,
+void eclif_set_unit_walking(struct block_list* bl, TBL_PC *tsd,
struct unit_data* ud, enum send_target *target);
void eclif_move(struct unit_data *ud);
diff --git a/src/map/data/session.c b/src/map/data/session.c
index 24c5ed2..7a6e16a 100644
--- a/src/map/data/session.c
+++ b/src/map/data/session.c
@@ -26,7 +26,7 @@ struct SessionExt *session_get(int fd)
return data;
}
-struct SessionExt *session_get_bysd(struct map_session_data *sd)
+struct SessionExt *session_get_bysd(TBL_PC *sd)
{
if (!sd)
return NULL;
diff --git a/src/map/data/session.h b/src/map/data/session.h
index 40b05e6..040b408 100644
--- a/src/map/data/session.h
+++ b/src/map/data/session.h
@@ -7,7 +7,7 @@
struct SessionExt;
struct SessionExt *session_get(int fd);
-struct SessionExt *session_get_bysd(struct map_session_data *sd);
+struct SessionExt *session_get_bysd(TBL_PC *sd);
struct SessionExt *session_create(void);
#endif // EVOL_MAP_SESSION
diff --git a/src/map/map.c b/src/map/map.c
index a4376fe..618ae9c 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -53,7 +53,7 @@ void emap_online_list(int fd)
{
char *buf = aCalloc (1, 20000);
char *ptr = buf;
- struct map_session_data* sd;
+ TBL_PC* sd;
struct SessionExt *data1 = session_get(fd);
if (!data1)
@@ -70,7 +70,7 @@ void emap_online_list(int fd)
return;
}
- struct map_session_data* ssd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* ssd = (TBL_PC*)session[fd]->session_data;
if (!ssd)
{
aFree(buf);
diff --git a/src/map/npc.c b/src/map/npc.c
index 9ccca29..c0c29bf 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -53,7 +53,7 @@ void enpc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char
hookStop();
}
-int enpc_buysellsel(struct map_session_data* sd, int *id, int *type)
+int enpc_buysellsel(TBL_PC* sd, int *id, int *type)
{
struct npc_data *nd;
diff --git a/src/map/npc.h b/src/map/npc.h
index 5e424e9..4f584fe 100644
--- a/src/map/npc.h
+++ b/src/map/npc.h
@@ -7,7 +7,7 @@
void enpc_parse_unknown_mapflag(const char *name, char *w3, char *w4, const char* start,
const char* buffer, const char* filepath, int *retval);
-int enpc_buysellsel(struct map_session_data* sd, int *id, int *type);
+int enpc_buysellsel(TBL_PC* sd, int *id, int *type);
bool enpc_db_checkid(int *idPtr);
diff --git a/src/map/parse.c b/src/map/parse.c
index b9c9816..60db879 100644
--- a/src/map/parse.c
+++ b/src/map/parse.c
@@ -36,7 +36,7 @@ void map_parse_join_channel(int fd)
{
char name[24];
char *p;
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
int res = 0;
if (!sd)
return;
@@ -66,7 +66,7 @@ void map_parse_part_channel(int fd)
{
char name[24];
char *p;
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
int k;
if (!sd)
return;
@@ -111,7 +111,7 @@ void map_parse_pet_say(int fd)
{
char message[500];
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
if (!sd || !sd->pd)
return;
@@ -124,7 +124,7 @@ void map_parse_pet_say(int fd)
void map_parse_pet_emote(int fd)
{
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
if (!sd || !sd->pd)
return;
const time_t t = time(NULL);
@@ -153,7 +153,7 @@ void map_parse_get_online_list(int fd)
void map_parse_pet_move(int fd)
{
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
if (!sd || !sd->pd)
return;
short x = RFIFOW(fd, 6);
@@ -166,7 +166,7 @@ void map_parse_pet_move(int fd)
void map_parse_pet_dir(int fd)
{
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
if (!sd || !sd->pd)
return;
unit->setdir(&sd->pd->bl, RFIFOB(fd, 8));
@@ -176,7 +176,7 @@ void map_parse_homun_say(int fd)
{
char message[500];
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
const int len = RFIFOW(fd, 2);
if (len > 500 || len < 6)
return;
@@ -189,7 +189,7 @@ void map_parse_homun_say(int fd)
void map_parse_homun_emote(int fd)
{
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
if (!sd)
return;
const time_t t = time(NULL);
@@ -208,7 +208,7 @@ void map_parse_homun_emote(int fd)
void map_parse_homun_dir(int fd)
{
- struct map_session_data* sd = (struct map_session_data*)session[fd]->session_data;
+ TBL_PC* sd = (TBL_PC*)session[fd]->session_data;
if (!sd || !sd->pd)
return;
if (sd->md && sd->md->db)
diff --git a/src/map/pc.c b/src/map/pc.c
index b4de8c4..78c6d5f 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -23,7 +23,7 @@
int langScriptId;
-int epc_readparam_pre(struct map_session_data* sd, int *type)
+int epc_readparam_pre(TBL_PC* sd, int *type)
{
if (*type == Const_ClientVersion)
{
@@ -36,7 +36,7 @@ int epc_readparam_pre(struct map_session_data* sd, int *type)
return 0;
}
-int epc_setregistry(struct map_session_data *sd, int64 *reg, int *val)
+int epc_setregistry(TBL_PC *sd, int64 *reg, int *val)
{
if (*reg == langScriptId)
{
@@ -71,7 +71,7 @@ int epc_setregistry(struct map_session_data *sd, int64 *reg, int *val)
hookStop(); \
}
-void epc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int *posPtr)
+void epc_equipitem_pos(TBL_PC *sd, struct item_data *id, int *posPtr)
{
int pos = *posPtr;
@@ -110,7 +110,7 @@ void epc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int *p
hookStop(); \
}
-void epc_unequipitem_pos(struct map_session_data *sd,
+void epc_unequipitem_pos(TBL_PC *sd,
int *nPtr __attribute__ ((unused)),
int *posPtr)
{
@@ -135,7 +135,7 @@ void epc_unequipitem_pos(struct map_session_data *sd,
#undef unequipPos
#undef unequipPos2
-bool epc_can_attack (struct map_session_data *sd, int *target_id)
+bool epc_can_attack (TBL_PC *sd, int *target_id)
{
if (!sd)
return false;
@@ -154,7 +154,7 @@ bool epc_can_attack (struct map_session_data *sd, int *target_id)
return true;
}
-int epc_takeitem(struct map_session_data *sd __attribute__ ((unused)),
+int epc_takeitem(TBL_PC *sd __attribute__ ((unused)),
struct flooritem_data *fitem)
{
if (!fitem)
diff --git a/src/map/pc.h b/src/map/pc.h
index 429a74d..313e049 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -9,17 +9,17 @@ enum VarConst
Const_ClientVersion = 10000
};
-int epc_readparam_pre(struct map_session_data* sd, int *type);
+int epc_readparam_pre(TBL_PC* sd, int *type);
-int epc_setregistry(struct map_session_data *sd, int64 *reg, int *val);
+int epc_setregistry(TBL_PC *sd, int64 *reg, int *val);
-void epc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int *posPtr);
+void epc_equipitem_pos(TBL_PC *sd, struct item_data *id, int *posPtr);
-void epc_unequipitem_pos(struct map_session_data *sd, int *nPtr, int *posPtr);
+void epc_unequipitem_pos(TBL_PC *sd, int *nPtr, int *posPtr);
-bool epc_can_attack (struct map_session_data *sd, int *target_id);
+bool epc_can_attack (TBL_PC *sd, int *target_id);
-int epc_takeitem(struct map_session_data *sd, struct flooritem_data *fitem);
+int epc_takeitem(TBL_PC *sd, struct flooritem_data *fitem);
void epc_validate_levels(void);
diff --git a/src/map/script.c b/src/map/script.c
index efd117a..3f445f3 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -829,7 +829,7 @@ BUILDIN(setNpcDialogTitle)
script->reportsrc(st);
return false;
}
- struct map_session_data *sd = script->rid2sd (st);
+ TBL_PC *sd = script->rid2sd (st);
if (!sd)
{
ShowWarning("player not attached\n");
diff --git a/src/map/send.c b/src/map/send.c
index 0ba1089..b2bafa0 100644
--- a/src/map/send.c
+++ b/src/map/send.c
@@ -22,7 +22,7 @@
#include "map/data/session.h"
#include "map/struct/sessionext.h"
-void send_npccommand (struct map_session_data *sd, int npcId, int cmd)
+void send_npccommand (TBL_PC *sd, int npcId, int cmd)
{
if (!sd)
return;
@@ -39,7 +39,7 @@ void send_npccommand (struct map_session_data *sd, int npcId, int cmd)
}
// 0 - get client lang
-void send_npccommand2 (struct map_session_data *sd, int npcId, int cmd, int id, int x, int y)
+void send_npccommand2 (TBL_PC *sd, int npcId, int cmd, int id, int x, int y)
{
if (!sd)
return;
@@ -134,12 +134,12 @@ void send_pc_info(struct block_list* bl1,
return;
char buf[12];
- struct map_session_data *sd = (struct map_session_data *)bl1;
+ TBL_PC *sd = (TBL_PC *)bl1;
struct SessionExt *data = session_get_bysd(sd);
if (!data)
return;
- struct map_session_data *tsd = (struct map_session_data *)bl2;
+ TBL_PC *tsd = (TBL_PC *)bl2;
if (tsd)
{
struct SessionExt *tdata = session_get_bysd(tsd);
@@ -165,7 +165,7 @@ void send_npc_info(struct block_list* bl1,
if (!bl1 || bl1->type != BL_NPC)
return;
- struct map_session_data *tsd = (struct map_session_data *)bl2;
+ TBL_PC *tsd = (TBL_PC *)bl2;
if (tsd)
{
struct SessionExt *tdata = session_get_bysd(tsd);
@@ -232,7 +232,7 @@ void send_changemusic_brodcast(const int map, const char *music)
aFree(buf);
}
-void send_changenpc_title (struct map_session_data *sd, const int npcId, const char *name)
+void send_changenpc_title (TBL_PC *sd, const int npcId, const char *name)
{
if (!sd || !name)
return;
@@ -261,7 +261,7 @@ void send_join_ack(int fd, const char *const name, int flag)
WFIFOSET (fd, 27);
}
-void send_slave_say(struct map_session_data *sd,
+void send_slave_say(TBL_PC *sd,
struct block_list *bl,
const char *const name,
const char *const message)
diff --git a/src/map/send.h b/src/map/send.h
index 74f3e05..ae9f305 100644
--- a/src/map/send.h
+++ b/src/map/send.h
@@ -4,8 +4,8 @@
#ifndef EVOL_MAP_PC
#define EVOL_MAP_PC
-void send_npccommand (struct map_session_data *sd, int npcId, int cmd);
-void send_npccommand2 (struct map_session_data *sd, int npcId, int cmd, int id, int x, int y);
+void send_npccommand (TBL_PC *sd, int npcId, int cmd);
+void send_npccommand2 (TBL_PC *sd, int npcId, int cmd, int id, int x, int y);
void send_local_message(int fd, struct block_list* bl, const char* msg);
void send_changelook(int fd, int id, int type, int val);
void send_mapmask(int fd, int mask);
@@ -13,7 +13,7 @@ void send_mapmask_brodcast(const int map, const int mask);
void send_mob_info(struct block_list* bl1, struct block_list* bl2, enum send_target target);
void send_advmoving(struct unit_data* ud, struct block_list *tbl, enum send_target target);
void send_changemusic_brodcast(const int map, const char *music);
-void send_changenpc_title (struct map_session_data *sd, const int npcId, const char *name);
+void send_changenpc_title (TBL_PC *sd, const int npcId, const char *name);
void send_join_ack(int fd, const char *const name, int flag);
void send_pc_info(struct block_list* bl1,
struct block_list* bl2,
@@ -21,7 +21,7 @@ void send_pc_info(struct block_list* bl1,
void send_npc_info(struct block_list* bl1,
struct block_list* bl2,
enum send_target target);
-void send_slave_say(struct map_session_data *sd,
+void send_slave_say(TBL_PC *sd,
struct block_list *bl,
const char *const name,
const char *const message);
diff --git a/src/map/skill.c b/src/map/skill.c
index 67dd563..37ada8d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -17,7 +17,7 @@
#include "../../../map/script.h"
int eskill_check_condition_castend_post(int retVal,
- struct map_session_data* sd,
+ TBL_PC* sd,
uint16 *skill_id,
uint16 *skill_lv)
{
diff --git a/src/map/skill.h b/src/map/skill.h
index d6927b9..132e909 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -5,7 +5,7 @@
#define EVOL_MAP_SKILL
int eskill_check_condition_castend_post(int retVal,
- struct map_session_data* sd,
+ TBL_PC* sd,
uint16 *skill_id,
uint16 *skill_lv);
diff --git a/src/map/unit.c b/src/map/unit.c
index 5a1ca83..e5b7e97 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -22,7 +22,7 @@
int eunit_can_move(struct block_list *bl)
{
- struct map_session_data *sd;
+ TBL_PC *sd;
struct unit_data *ud;
struct status_change *sc;