summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-23 02:20:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-23 02:20:03 +0300
commit371293407ca9937a03942a2f8e32f2eb7c87940c (patch)
tree3cc7f056d64216bd144daabfb774db7e7836cef1 /src/map/pc.c
parentab9362782312ad81ef1c1d47dcac464607a710a2 (diff)
downloadevol-hercules-371293407ca9937a03942a2f8e32f2eb7c87940c.tar.gz
evol-hercules-371293407ca9937a03942a2f8e32f2eb7c87940c.tar.bz2
evol-hercules-371293407ca9937a03942a2f8e32f2eb7c87940c.tar.xz
evol-hercules-371293407ca9937a03942a2f8e32f2eb7c87940c.zip
Fix hookStop usage.
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index fddcdea..6272f40 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -25,8 +25,8 @@ int epc_readparam_pre(struct map_session_data* sd, int *type)
{
if (*type == Const_ClientVersion)
{
- hookStop();
struct SessionExt *data = session_get_bysd(sd);
+ hookStop();
if (!data)
return 0;
return data->clientVersion;
@@ -51,22 +51,22 @@ int epc_setregistry(struct map_session_data *sd, int64 *reg, int *val)
#define equipPos(mask, field, lookf) \
if (pos & mask) \
{ \
- hookStop(); \
if (id) \
sd->status.field = id->look; \
else \
sd->status.field = 0; \
clif->changelook(&sd->bl, lookf, sd->status.field); \
+ hookStop(); \
}
#define equipPos2(mask, lookf) \
if (pos & mask) \
{ \
- hookStop(); \
if (id) \
clif->changelook(&sd->bl, lookf, id->look); \
else \
clif->changelook(&sd->bl, lookf, 0); \
+ hookStop(); \
}
void epc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int *posPtr)
@@ -93,16 +93,16 @@ void epc_equipitem_pos(struct map_session_data *sd, struct item_data *id, int *p
#define unequipPos(mask, field, lookf) \
if (pos & mask) \
{ \
- hookStop(); \
sd->status.field = 0; \
clif->changelook(&sd->bl, lookf, sd->status.field); \
+ hookStop(); \
}
#define unequipPos2(mask, lookf) \
if (pos & mask) \
{ \
- hookStop(); \
clif->changelook(&sd->bl, lookf, 0); \
+ hookStop(); \
}
void epc_unequipitem_pos(struct map_session_data *sd, int *nPtr, int *posPtr)
@@ -141,4 +141,5 @@ bool epc_can_attack (struct map_session_data *sd, int *target_id)
return false;
}
}
+ return true;
}