summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-29 13:25:12 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-29 13:25:12 +0000
commiteebfc36c15910697eba22ffa8229c6656add6e39 (patch)
tree241a976b29db3ae27c493c2b5009a8badd490ece /src/map/npc.c
parentb895e6e423264a426025bdf82fc05a7f83f75839 (diff)
downloadhercules-eebfc36c15910697eba22ffa8229c6656add6e39.tar.gz
hercules-eebfc36c15910697eba22ffa8229c6656add6e39.tar.bz2
hercules-eebfc36c15910697eba22ffa8229c6656add6e39.tar.xz
hercules-eebfc36c15910697eba22ffa8229c6656add6e39.zip
* Reverted npc_checknear to exclude check for class_ -1.
* Removed npc_checknear in npc_buysellsel, npc_selllist and npc_buylist as enough preventive measures of hacking are already implemented. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6370 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index af2ed2c91..2f4745948 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -979,8 +979,9 @@ int npc_checknear(struct map_session_data *sd,int id)
return 1;
}
- if (nd->class_<0) // イベント系は常にOK
- return 0;
+ // Reprecated, please do not uncomment this. [Lance]
+ //if (nd->class_<0) // イベント系は常にOK
+ // return 0;
// エリア判定
if (nd->bl.m!=sd->bl.m ||
@@ -1084,8 +1085,8 @@ int npc_buysellsel(struct map_session_data *sd,int id,int type)
nullpo_retr(1, sd);
- if (npc_checknear(sd,id))
- return 1;
+ //if (npc_checknear(sd,id))
+ // return 1;
nd=(struct npc_data *)map_id2bl(id);
if (nd->bl.subtype!=SHOP) {
@@ -1119,8 +1120,8 @@ int npc_buylist(struct map_session_data *sd,int n,unsigned short *item_list)
nullpo_retr(3, sd);
nullpo_retr(3, item_list);
- if (npc_checknear(sd,sd->npc_shopid))
- return 3;
+ //if (npc_checknear(sd,sd->npc_shopid))
+ // return 3;
nd=(struct npc_data*)map_id2bl(sd->npc_shopid);
if (nd->bl.subtype!=SHOP)
@@ -1213,8 +1214,8 @@ int npc_selllist(struct map_session_data *sd,int n,unsigned short *item_list)
nullpo_retr(1, sd);
nullpo_retr(1, item_list);
- if (npc_checknear(sd,sd->npc_shopid))
- return 1;
+ //if (npc_checknear(sd,sd->npc_shopid))
+ // return 1;
for(i=0,z=0;i<n;i++) {
int nameid;
if (item_list[i*2]-2 <0 || item_list[i*2]-2 >=MAX_INVENTORY)