summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authoreuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-10-29 07:35:02 +0000
committereuphyy <euphyy@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-10-29 07:35:02 +0000
commit57720b460745f823153ec0381d5923c4634ce1d8 (patch)
tree62bf0afdcb46b7d4db77363757110e16f649d6a0 /src/map/npc.c
parent557b59100b76d55ca18cfc63dadf01deeb985265 (diff)
downloadhercules-57720b460745f823153ec0381d5923c4634ce1d8.tar.gz
hercules-57720b460745f823153ec0381d5923c4634ce1d8.tar.bz2
hercules-57720b460745f823153ec0381d5923c4634ce1d8.tar.xz
hercules-57720b460745f823153ec0381d5923c4634ce1d8.zip
* Follow-up r16835: Some cleanup.
* Updated Hunting Missions script to v1.2b, which adds experience multipliers to config (custom\quests\hunting_missions.txt) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16839 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index fc8bfe2aa..855c6f650 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -138,7 +138,7 @@ int npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd)
}
/*==========================================
- * sub fonction of npc_enable, Run OnTouch event when enabled
+ * Sub-function of npc_enable, runs OnTouch event when enabled
*------------------------------------------*/
int npc_enable_sub(struct block_list *bl, va_list ap)
{
@@ -206,7 +206,7 @@ int npc_enable(const char* name, int flag)
}
/*==========================================
- * NPC lookup (get npc_data trough npcname)
+ * NPC lookup (get npc_data through npcname)
*------------------------------------------*/
struct npc_data* npc_name2id(const char* name)
{
@@ -846,7 +846,7 @@ int npc_touch_areanpc_sub(struct block_list *bl, va_list ap)
/*==========================================
* Chk if sd is still touching his assigned npc.
- * if not then it unsets it and searches for another player in range
+ * If not, it unsets it and searches for another player in range.
*------------------------------------------*/
int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap)
{
@@ -1062,10 +1062,8 @@ int npc_check_areanpc(int flag, int m, int x, int y, int range)
}
/*==========================================
- * Chk if player not too far to acces the npc
- * return
- * npc_data : succes
- * NULL : fail
+ * Chk if player not too far to access the npc.
+ * Returns npc_data (success) or NULL (fail).
*------------------------------------------*/
struct npc_data* npc_checknear(struct map_session_data* sd, struct block_list* bl)
{
@@ -1134,7 +1132,7 @@ void run_tomb(struct map_session_data* sd, struct npc_data* nd)
/*==========================================
* NPC 1st call when clicking on npc
- * Do specific action for npc type (openshop, run scripts...)
+ * Do specific action for NPC type (openshop, run scripts...)
*------------------------------------------*/
int npc_click(struct map_session_data* sd, struct npc_data* nd)
{
@@ -1753,8 +1751,8 @@ static int npc_unload_ev(DBKey key, DBData *data, va_list ap)
return 0;
}
-//Chk if npc match src_id then unload
-//Sub fonction used to found duplicate
+//Chk if npc matches src_id, then unload.
+//Sub-function used to find duplicates.
static int npc_unload_dup_sub(struct npc_data* nd, va_list args)
{
int src_id;
@@ -1771,8 +1769,8 @@ void npc_unload_duplicates(struct npc_data* nd)
map_foreachnpc(npc_unload_dup_sub,nd->bl.id);
}
-//Remove an npc from map and db
-//single is to free name (for duplicate one I suppose)
+//Removes an npc from map and db.
+//Single is to free name (for duplicates).
int npc_unload(struct npc_data* nd, bool single) {
nullpo_ret(nd);
@@ -3350,7 +3348,7 @@ static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, con
return strchr(start,'\n');// continue
}
-//Read file and create npc/func/mapflag/monster.. accordly
+//Read file and create npc/func/mapflag/monster... accordingly.
//@runOnInit should we exec OnInit when it's done ?
void npc_parsesrcfile(const char* filepath, bool runOnInit)
{