summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/guild.c40
-rw-r--r--src/map/itemdb.c4
-rw-r--r--src/map/map.c4
-rw-r--r--src/map/mob.c8
-rw-r--r--src/map/npc.c24
-rw-r--r--src/map/path.c2
-rw-r--r--src/map/pc.c98
7 files changed, 88 insertions, 92 deletions
diff --git a/src/map/guild.c b/src/map/guild.c
index e0d2d7f8a..90f9c4a88 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -393,7 +393,7 @@ int guild_create(struct map_session_data *sd, const char *name)
return 1;
}
-//Whether or not to create guilde
+//Whether or not to create guild
int guild_created(int account_id,int guild_id)
{
struct map_session_data *sd=map_id2sd(account_id);
@@ -744,7 +744,7 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag)
return 0;
}
- //if all ok adding player to guild
+ //if all ok add player to guild
sd->status.guild_id = g->guild_id;
sd->guild_emblem_id = g->emblem_id;
//Packets which were sent in the previous 'guild_sent' implementation.
@@ -1033,7 +1033,7 @@ int guild_change_position(int guild_id,int idx,
}
/*====================================================
- * Notification of member has changed his guild tiltle
+ * Notification of member has changed his guild title
*---------------------------------------------------*/
int guild_position_changed(int guild_id,int idx,struct guild_position *p)
{
@@ -1184,7 +1184,7 @@ static DBData create_expcache(DBKey key, va_list args)
}
/*====================================================
- * return Taxed experience from player sd to guild
+ * Return taxed experience from player sd to guild
*---------------------------------------------------*/
unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp)
{
@@ -1218,7 +1218,7 @@ unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp)
}
/*====================================================
- * Player sd pay a tribue experience exp to his guild
+ * Player sd pay a tribute experience to his guild
* Add this experience to guild exp
* [Celest]
*---------------------------------------------------*/
@@ -1314,10 +1314,10 @@ void guild_guildaura_refresh(struct map_session_data *sd, int skill_num, int ski
}
/*====================================================
- * Count number of relation the guild have
- * flag :
- * 0 = allied
- * 1 = ennemy
+ * Count number of relations the guild has.
+ * Flag:
+ * 0 = allied
+ * 1 = enemy
*---------------------------------------------------*/
int guild_get_alliance_count(struct guild *g,int flag)
{
@@ -1343,11 +1343,11 @@ void guild_block_skill(struct map_session_data *sd, int time)
}
/*====================================================
- * Check relation between guild_id1 and guild_id2
- * flag :
- * 0 = allied
- * 1 = ennemy
- * return true if yes
+ * Check relation between guild_id1 and guild_id2.
+ * Flag:
+ * 0 = allied
+ * 1 = enemy
+ * Returns true if yes.
*---------------------------------------------------*/
int guild_check_alliance(int guild_id1, int guild_id2, int flag)
{
@@ -1363,7 +1363,7 @@ int guild_check_alliance(int guild_id1, int guild_id2, int flag)
}
/*====================================================
- * Player sd, asking player tsd an alliance between there 2 guild
+ * Player sd, asking player tsd an alliance between their 2 guilds
*---------------------------------------------------*/
int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
{
@@ -1421,7 +1421,7 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
}
/*====================================================
- * Player sd, awsser to player tsd (account_id) for an alliance request
+ * Player sd, answer to player tsd (account_id) for an alliance request
*---------------------------------------------------*/
int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
{
@@ -1498,7 +1498,7 @@ int guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
}
/*====================================================
- * Player sd, asking player tsd a formal ennemy relation between there 2 guild
+ * Player sd, asking player tsd a formal enemy relation between their 2 guilds
*---------------------------------------------------*/
int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
{
@@ -1541,7 +1541,7 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
}
/*====================================================
- * Notification of a relationship between 2 guild
+ * Notification of a relationship between 2 guilds
*---------------------------------------------------*/
int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag,const char *name1,const char *name2)
{
@@ -1604,7 +1604,7 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
if ((flag & 0x0f) == 0) { // alliance notification
if( sd[1]!=NULL )
clif_guild_allianceack(sd[1],2);
- } else if ((flag & 0x0f) == 1) { // ennemy notification
+ } else if ((flag & 0x0f) == 1) { // enemy notification
if( sd[0]!=NULL )
clif_guild_oppositionack(sd[0],0);
}
@@ -1923,7 +1923,7 @@ void guild_castle_reconnect(int castle_id, int index, int value)
}
}
-// Loadcastle data then invoque OnAgitInit* on last
+// Load castle data then invoke OnAgitInit* on last
int guild_castledataloadack(int len, struct guild_castle *gc)
{
int i;
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 5869f0533..7ea11ef7a 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -136,7 +136,7 @@ int itemdb_searchname_array(struct item_data** data, int size, const char *str)
/*==========================================
- * Return a random item id from group. (take in account % chance giving/tot group)
+ * Return a random item id from group. (takes into account % chance giving/tot group)
*------------------------------------------*/
int itemdb_searchrandomid(int group)
{
@@ -586,7 +586,7 @@ static void itemdb_read_itemgroup(void)
}
/*==========================================
- * Read item forbiden by mapflag (can't equip item)
+ * Read item forbidden by mapflag (can't equip item)
*------------------------------------------*/
static bool itemdb_read_noequip(char* str[], int columns, int current)
{// <nameid>,<mode>
diff --git a/src/map/map.c b/src/map/map.c
index 7165e3fe9..e1e252a07 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -229,7 +229,7 @@ int map_freeblock_unlock (void)
return block_free_lock;
}
-// Timer fonction to check if there some remaining lock and remove them if so.
+// Timer function to check if there some remaining lock and remove them if so.
// Called each 1s
int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -1314,7 +1314,7 @@ int map_get_new_object_id(void)
}
/*==========================================
- * Timered fonction to clear the floor (remove remaining item)
+ * Timered function to clear the floor (remove remaining item)
* Called each flooritem_lifetime ms
*------------------------------------------*/
int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data)
diff --git a/src/map/mob.c b/src/map/mob.c
index 4967a0ec3..f5ecac8be 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2834,7 +2834,7 @@ int mob_warpslave(struct block_list *bl, int range)
}
/*==========================================
- * Count slave sub, curently chking if mob master is the given id
+ * Counts slave sub, curently checking if mob master is the given ID.
*------------------------------------------*/
int mob_countslave_sub(struct block_list *bl,va_list ap)
{
@@ -2849,7 +2849,7 @@ int mob_countslave_sub(struct block_list *bl,va_list ap)
}
/*==========================================
- * Cout how many slave a mob got on map
+ * Counts the number of slaves a mob has on the map.
*------------------------------------------*/
int mob_countslave(struct block_list *bl)
{
@@ -2955,8 +2955,8 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
}
/*==========================================
- * MOBskill lookup (get skillindex trough skillid)
- * return -1 if not found
+ * MOBskill lookup (get skillindex through skillid)
+ * Returns -1 if not found.
*------------------------------------------*/
int mob_skillid2skillidx(int class_,int skillid)
{
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)
{
diff --git a/src/map/path.c b/src/map/path.c
index fad68bada..4505efcaa 100644
--- a/src/map/path.c
+++ b/src/map/path.c
@@ -45,7 +45,7 @@ static void push_heap_path(int *heap,struct tmp_path *tp,int index)
/*==========================================
* heap update (helper function)
- * move toward the root Because cost has decreased
+ * Move toward the root because cost has decreased.
*------------------------------------------*/
static void update_heap_path(int *heap,struct tmp_path *tp,int index)
{
diff --git a/src/map/pc.c b/src/map/pc.c
index 328b9e07e..7dd648715 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -834,10 +834,8 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd,
}
/*=================================================
- * Can the player equip the item at index n in inventory
- * return
- * 0 = no
- * 1 = yes
+ * Checks if the player can equip the item at index n in inventory.
+ * Returns 0 (no) or 1 (yes).
*------------------------------------------------*/
int pc_isequip(struct map_session_data *sd,int n)
{
@@ -1277,7 +1275,7 @@ static int pc_calc_skillpoint(struct map_session_data* sd)
/*==========================================
- * Calculation of Skills lvls
+ * Calculation of skill level.
*------------------------------------------*/
int pc_calc_skilltree(struct map_session_data *sd)
{
@@ -3744,8 +3742,8 @@ int pc_search_inventory(struct map_session_data *sd,int item_id)
}
/*==========================================
- * Attempt tp add a new item in inventory
- * return
+ * Attempt to add a new item to inventory.
+ * Return:
0 = success
1 = invalid itemid not found or negative amount
2 = overweight
@@ -3836,9 +3834,9 @@ int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_l
}
/*==========================================
- * Remove an item at index n from inventory by amount
- * return
- * 0 = succes
+ * Remove an item at index n from inventory by amount.
+ * Return:
+ * 0 = success
* 1 = invalid itemid or negative amount
*------------------------------------------*/
int pc_delitem(struct map_session_data *sd,int n,int amount,int type, short reason, e_log_pick_type log_type)
@@ -3867,8 +3865,8 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type, short reas
}
/*==========================================
- * Attempt to drop an item
- * return
+ * Attempt to drop an item.
+ * Return:
* 0 = fail
* 1 = success
*------------------------------------------*/
@@ -3911,8 +3909,8 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
}
/*==========================================
- * Attempt to pickup an item
- * return
+ * Attempt to pick up an item.
+ * Return:
* 0 = fail
* 1 = success
*------------------------------------------*/
@@ -3982,8 +3980,8 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
}
/*==========================================
- * Can we use the item ?
- * Return
+ * Check if item is usable.
+ * Return:
* 0 = no
* 1 = yes
*------------------------------------------*/
@@ -4147,8 +4145,8 @@ int pc_isUseitem(struct map_session_data *sd,int n)
}
/*==========================================
- * Last checks et use item
- * return
+ * Last checks to use an item.
+ * Return:
* 0 = fail
* 1 = success
*------------------------------------------*/
@@ -4273,8 +4271,8 @@ int pc_useitem(struct map_session_data *sd,int n)
}
/*==========================================
- * Add item on cart for given index
- * return
+ * Add item on cart for given index.
+ * Return:
* 0 = success
* 1 = fail
*------------------------------------------*/
@@ -4342,8 +4340,8 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
}
/*==========================================
- * Delete item on cart for given index
- * return
+ * Delete item on cart for given index.
+ * Return:
* 0 = success
* 1 = fail
*------------------------------------------*/
@@ -4372,8 +4370,8 @@ int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type,e_log_
}
/*==========================================
- * Transfert item from inventory to cart
- * return
+ * Transfer item from inventory to cart.
+ * Return:
* 0 = fail
* 1 = succes
*------------------------------------------*/
@@ -4398,8 +4396,8 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount)
}
/*==========================================
- * Get number of item on cart
- * return
+ * Get number of item in cart.
+ * Return:
-1 = itemid not found or no amount found
x = remaining itemid on cart after get
*------------------------------------------*/
@@ -4417,8 +4415,8 @@ int pc_cartitem_amount(struct map_session_data* sd, int idx, int amount)
}
/*==========================================
- * Retrieve an item at index idx from cart
- * return
+ * Retrieve an item at index idx from cart.
+ * Return:
* 0 = player not found or (FIXME) succes (from pc_cart_delitem)
* 1 = failure
*------------------------------------------*/
@@ -4466,8 +4464,8 @@ int pc_show_steal(struct block_list *bl,va_list ap)
return 0;
}
/*==========================================
- * Stole an item from bl (mob)
- * return
+ * Steal an item from bl (mob).
+ * Return:
* 0 = fail
* 1 = succes
*------------------------------------------*/
@@ -4753,11 +4751,11 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
/*==========================================
- * Warp player sd to random location on current map
- * may fail if no Cell walkable found (1000 attempt)
- * return
- * 0 = fail or FIXME succes (from pc_setpos)
- * x(1|2) = fail
+ * Warp player sd to random location on current map.
+ * May fail if no walkable cell found (1000 attempts).
+ * Return:
+ * 0 = fail or FIXME success (from pc_setpos)
+ * x(1|2) = fail
*------------------------------------------*/
int pc_randomwarp(struct map_session_data *sd, clr_type type)
{
@@ -4768,7 +4766,7 @@ int pc_randomwarp(struct map_session_data *sd, clr_type type)
m=sd->bl.m;
- if (map[sd->bl.m].flag.noteleport) //Teleport forbiden
+ if (map[sd->bl.m].flag.noteleport) //Teleport forbidden
return 0;
do{
@@ -5717,7 +5715,7 @@ unsigned int pc_maxjoblv(struct map_session_data *sd)
* base level exp lookup.
*------------------------------------------*/
-///How much bexp do player need for next level
+//Base exp needed for next level.
unsigned int pc_nextbaseexp(struct map_session_data *sd)
{
nullpo_ret(sd);
@@ -5728,7 +5726,7 @@ unsigned int pc_nextbaseexp(struct map_session_data *sd)
return exp_table[pc_class2idx(sd->status.class_)][0][sd->status.base_level-1];
}
-///How much bexp do player need for this level
+//Base exp needed for this level.
unsigned int pc_thisbaseexp(struct map_session_data *sd)
{
if(sd->status.base_level>pc_maxbaselv(sd) || sd->status.base_level<=1)
@@ -5740,12 +5738,12 @@ unsigned int pc_thisbaseexp(struct map_session_data *sd)
/*==========================================
* job level exp lookup
- * return
+ * Return:
* 0 = not found
* x = exp for level
*------------------------------------------*/
-///How much jexp do player need for next level
+//Job exp needed for next level.
unsigned int pc_nextjobexp(struct map_session_data *sd)
{
nullpo_ret(sd);
@@ -5755,7 +5753,7 @@ unsigned int pc_nextjobexp(struct map_session_data *sd)
return exp_table[pc_class2idx(sd->status.class_)][1][sd->status.job_level-1];
}
-///How much jexp do player need for next level
+//Job exp needed for this level.
unsigned int pc_thisjobexp(struct map_session_data *sd)
{
if(sd->status.job_level>pc_maxjoblv(sd) || sd->status.job_level<=1)
@@ -6423,7 +6421,7 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h
}
/*==========================================
- * Invoked when a player have negative current hp
+ * Invoked when a player has negative current hp
*------------------------------------------*/
int pc_dead(struct map_session_data *sd,struct block_list *src)
{
@@ -6974,8 +6972,8 @@ void pc_heal(struct map_session_data *sd,unsigned int hp,unsigned int sp, int ty
/*==========================================
* HP/SP Recovery
- * Heal player hp nad/or sp linearly
- * Calculate bonus by status
+ * Heal player hp and/or sp linearly.
+ * Calculate bonus by status.
*------------------------------------------*/
int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
{
@@ -7080,7 +7078,7 @@ int pc_percentheal(struct map_session_data *sd,int hp,int sp)
}
/*==========================================
- * Called when player changing job
+ * Called when player changes job
* Rewrote to make it tidider [Celest]
*------------------------------------------*/
int pc_jobchange(struct map_session_data *sd,int job, int upper)
@@ -8648,8 +8646,8 @@ int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data)
/*==========================================
* Checking if sd is married
- * Return
- * partner_id = yes,
+ * Return:
+ * partner_id = yes
* 0 = no
*------------------------------------------*/
int pc_ismarried(struct map_session_data *sd)
@@ -8663,7 +8661,7 @@ int pc_ismarried(struct map_session_data *sd)
}
/*==========================================
* Marry player sd to player dstsd
- * return
+ * Return:
* -1 = fail
* 0 = success
*------------------------------------------*/
@@ -8680,7 +8678,7 @@ int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd)
/*==========================================
* Divorce sd from its partner
- * return
+ * Return:
* -1 = fail
* 0 = success
*------------------------------------------*/
@@ -9167,7 +9165,7 @@ int pc_split_atoui(char* str, unsigned int* val, char sep, int max)
/*==========================================
* sub DB reading.
- * fonction used to read skill_tree.txt
+ * Function used to read skill_tree.txt
*------------------------------------------*/
static bool pc_readdb_skilltree(char* fields[], int columns, int current)
{