# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -46,7 +46,7 @@
#include <time.h>
-#define PVP_CALCRANK_INTERVAL 1000 // PVP���ʌv�Z�̊Ԋu
+#define PVP_CALCRANK_INTERVAL 1000 // PVP calculation interval
static unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL];
static unsigned int max_level[CLASS_COUNT][2];
static unsigned int statp[MAX_LEVEL+1];
@@ -556,7 +556,7 @@
}
/*==========================================
- * ��?�b̏���?
+ * Initial player Connection?
*------------------------------------------*/
int pc_setnewpc(struct map_session_data *sd, int account_id, int char_id, int login_id1, unsigned int client_tick, int sex, int fd)
{
@@ -824,10 +824,15 @@
return false; // Job Change Fail
}
+/*=================================================
+* Can the player equip the item at index n in inventory
+* return
+* 0 = no
+* 1 = yes
+*------------------------------------------------*/
int pc_isequip(struct map_session_data *sd,int n)
{
struct item_data *item;
- //?����{�q�̏ꍇ�̌��̐E�Ƃ��Z�o����
nullpo_ret(sd);
@@ -902,8 +907,8 @@
}
/*==========================================
- * session id�ɖ�薳��
- * char�I���瑗���Ă����X�e?�^�X��ݒ�
+ * No problem with the session id
+ * set the status that has been sent from char server
*------------------------------------------*/
bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_time, int group_id, struct mmo_charstatus *st, bool changing_mapservers)
{
@@ -1017,7 +1022,7 @@
for( i = 0; i < 3; i++ )
sd->hate_mob[i] = -1;
- // �ʒu�̐ݒ�
+ //warp player
if ((i=pc_setpos(sd,sd->status.last_point.map, sd->status.last_point.x, sd->status.last_point.y, CLR_OUTSIGHT)) != 0) {
ShowError ("Last_point_map %s - id %d not found (error code %d)\n", mapindex_id2name(sd->status.last_point.map), sd->status.last_point.map, i);
@@ -1255,7 +1260,7 @@
/*==========================================
- * ?������X�L���̌v�Z
+ * Calculation of Skills lvls
*------------------------------------------*/
int pc_calc_skilltree(struct map_session_data *sd)
{
@@ -3317,7 +3322,7 @@
return 1;
}
/*==========================================
- * �J?�h?��
+ * Append a cart to an item ?
*------------------------------------------*/
int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip)
{
@@ -3372,18 +3377,18 @@
}
//
-// �A�C�e����
+// Items
//
/*==========================================
- * �X�L���ɂ�锃���l�C��
+ * Correction buying value by skills
*------------------------------------------*/
int pc_modifybuyvalue(struct map_session_data *sd,int orig_value)
{
int skill,val = orig_value,rate1 = 0,rate2 = 0;
- if((skill=pc_checkskill(sd,MC_DISCOUNT))>0) // �f�B�X�J�E���g
+ if((skill=pc_checkskill(sd,MC_DISCOUNT))>0) // merchant discount
rate1 = 5+skill*2-((skill==10)? 1:0);
- if((skill=pc_checkskill(sd,RG_COMPULSION))>0) // �R���p���V�����f�B�X�J�E���g
+ if((skill=pc_checkskill(sd,RG_COMPULSION))>0) // rogue discount
rate2 = 5+skill*4;
if(rate1 < rate2) rate1 = rate2;
if(rate1)
@@ -3395,12 +3400,12 @@
}
/*==========================================
- * �X�L���ɂ��?��l�C��
+ * Correction selling value by skills
*------------------------------------------*/
int pc_modifysellvalue(struct map_session_data *sd,int orig_value)
{
int skill,val = orig_value,rate = 0;
- if((skill=pc_checkskill(sd,MC_OVERCHARGE))>0) // �I?�o?�`��?�W
+ if((skill=pc_checkskill(sd,MC_OVERCHARGE))>0) //OverCharge ?
rate = 5+skill*2-((skill==10)? 1:0);
if(rate)
val = (int)((double)orig_value*(double)(100+rate)/100.);
@@ -3411,8 +3416,8 @@
}
/*==========================================
- * �A�C�e�������bɁA�V�����A�C�e�������g�����A
- * 3�������ɂ����邩�m�F
+ * Checking if we have enough place on inventory for new item
+ * Make sure to take 30,000 limit
*------------------------------------------*/
int pc_checkadditem(struct map_session_data *sd,int nameid,int amount)
{
@@ -3439,7 +3444,8 @@
}
/*==========================================
- * �A�C�e�����̌�?
+ * Return number of available place in inventory
+ * Each non stackable item will reduce place by 1
*------------------------------------------*/
int pc_inventoryblank(struct map_session_data *sd)
{
@@ -3599,7 +3605,7 @@
}
/*==========================================
- * �A�C�e����T���āA�C���f�b�N�X��Ԃ�
+ * Searching a specified itemid in inventory and return his stored index
*------------------------------------------*/
int pc_search_inventory(struct map_session_data *sd,int item_id)
{
@@ -3611,7 +3617,14 @@
}
/*==========================================
- * �A�C�e���lj��B��?�̂�item�\��?��?����
+ * Attempt tp add a new item in inventory
+ * return
+ 0 = success
+ 1 = invalid itemid not found or negative amount
+ 2 = overweight
+ 4 = no free place found
+ 5 = max amount reached
+
*------------------------------------------*/
int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_log_pick_type log_type)
{
@@ -3682,7 +3695,10 @@
}
/*==========================================
- * �A�C�e�������炷
+ * Remove an item at index n from inventory by amount
+ * return
+ * 0 = succes
+ * 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)
{
@@ -3710,7 +3726,10 @@
}
/*==========================================
- * �A�C�e���𗎂�
+ * Attempt to drop an item
+ * return
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_dropitem(struct map_session_data *sd,int n,int amount)
{
@@ -3751,7 +3770,10 @@
}
/*==========================================
- * �A�C�e�����E��
+ * Attempt to pickup an item
+ * return
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
{
@@ -3764,7 +3786,7 @@
nullpo_ret(fitem);
if(!check_distance_bl(&fitem->bl, &sd->bl, 2) && sd->ud.skillid!=BS_GREED)
- return 0; // ����������
+ return 0; // Distance is too far
if (sd->status.party_id)
p = party_search(sd->status.party_id);
@@ -3818,6 +3840,12 @@
return 1;
}
+/*==========================================
+ * Can we use the item ?
+ * Return
+ * 0 = no
+ * 1 = yes
+ *------------------------------------------*/
int pc_isUseitem(struct map_session_data *sd,int n)
{
struct item_data *item;
@@ -3836,7 +3864,7 @@
if( !item->script ) //if it has no script, you can't really consume it!
return 0;
- switch( nameid )
+ switch( nameid ) //FIXME harcoded itemid [Lighta]
{
case 605: // Anodyne
if( map_flag_gvg(sd->bl.m) )
@@ -3973,7 +4001,10 @@
}
/*==========================================
- * �A�C�e�����g��
+ * Last checks et use item
+ * return
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_useitem(struct map_session_data *sd,int n)
{
@@ -3995,6 +4026,7 @@
)
return 0;
+ //Check if status forbid us
if( sd->sc.count && (
sd->sc.data[SC_BERSERK] ||
(sd->sc.data[SC_GRAVITATION] && sd->sc.data[SC_GRAVITATION]->val3 == BCT_SELF) ||
@@ -4087,7 +4119,10 @@
}
/*==========================================
- * �J?�g�A�C�e���lj��B��?�̂�item�\��?��?����
+ * Add item on cart for given index
+ * return
+ * 0 = success
+ * 1 = fail
*------------------------------------------*/
int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amount,e_log_pick_type log_type)
{
@@ -4147,7 +4182,10 @@
}
/*==========================================
- * �J?�g�A�C�e�������炷
+ * Delete item on cart for given index
+ * return
+ * 0 = success
+ * 1 = fail
*------------------------------------------*/
int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type,e_log_pick_type log_type)
{
@@ -4174,7 +4212,10 @@
}
/*==========================================
- * �J?�g�փA�C�e���ړ�
+ * Transfert item from inventory to cart
+ * return
+ * 0 = fail
+ * 1 = succes
*------------------------------------------*/
int pc_putitemtocart(struct map_session_data *sd,int idx,int amount)
{
@@ -4197,7 +4238,10 @@
}
/*==========================================
- * �J?�g?�̃A�C�e��?�m�F(��?�̍�����Ԃ�)
+ * Get number of item on cart
+ * return
+ -1 = itemid not found or no amount found
+ x = remaining itemid on cart after get
*------------------------------------------*/
int pc_cartitem_amount(struct map_session_data* sd, int idx, int amount)
{
@@ -4213,7 +4257,10 @@
}
/*==========================================
- * �J?�g����A�C�e���ړ�
+ * Retrieve an item at index idx from cart
+ * return
+ * 0 = player not found or (FIXME) succes (from pc_cart_delitem)
+ * 1 = failure
*------------------------------------------*/
int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
{
@@ -4237,7 +4284,7 @@
}
/*==========================================
- * �X�e�B���i���J
+ * Display item stolen msg to player sd
*------------------------------------------*/
int pc_show_steal(struct block_list *bl,va_list ap)
{
@@ -4259,7 +4306,10 @@
return 0;
}
/*==========================================
- *
+ * Stole an item from bl (mob)
+ * return
+ * 0 = fail
+ * 1 = succes
*------------------------------------------*/
int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
{
@@ -4340,7 +4390,10 @@
}
/*==========================================
- *
+ * Stole zeny from bl (mob)
+ * return
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
{
@@ -4524,7 +4577,11 @@
}
/*==========================================
- * PC�̃����_����?�v
+ * 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
*------------------------------------------*/
int pc_randomwarp(struct map_session_data *sd, clr_type type)
{
@@ -4535,7 +4592,7 @@
m=sd->bl.m;
- if (map[sd->bl.m].flag.noteleport) // �e���|?�g�֎~
+ if (map[sd->bl.m].flag.noteleport) //Teleport forbiden
return 0;
do{
@@ -4599,10 +4656,10 @@
}
//
-// ����??
+// Skills
//
/*==========================================
- * �X�L����?�� ���L���Ă����ꍇLv���Ԃ�
+ * Return player sd skilllv learned for given skill
*------------------------------------------*/
int pc_checkskill(struct map_session_data *sd,int skill_id)
{
@@ -4628,13 +4685,7 @@
}
/*==========================================
- * ����?�X�ɂ��X�L����??�`�F�b�N
- * ��?�F
- * struct map_session_data *sd �Z�b�V�����f?�^
- * int nameid ?���iID
- * �Ԃ�l�F
- * 0 ?�X�Ȃ�
- * -1 �X�L��������
+ * Checking if player match condition for given skill and kill status if not
*------------------------------------------*/
int pc_checkallowskill(struct map_session_data *sd)
{
@@ -4680,7 +4731,8 @@
}
/*==========================================
- * ? ���i�̃`�F�b�N
+ * Return equiped itemid? on player sd at pos
+ * if -1 mean nothing equiped
*------------------------------------------*/
int pc_checkequip(struct map_session_data *sd,int pos)
{
@@ -5290,7 +5342,7 @@
return;
}
/*==========================================
- * ??�l�擾
+ * Give x exp at sd player and calculate remaining exp for next lvl
*------------------------------------------*/
int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int base_exp,unsigned int job_exp,bool quest)
{
@@ -5385,8 +5437,10 @@
};
/*==========================================
- * base level���K�v??�l�v�Z
+ * base level exp lookup.
*------------------------------------------*/
+
+///How much bexp do player need for next level
unsigned int pc_nextbaseexp(struct map_session_data *sd)
{
nullpo_ret(sd);
@@ -5397,6 +5451,7 @@
return exp_table[pc_class2idx(sd->status.class_)][0][sd->status.base_level-1];
}
+///How much bexp do player need 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)
@@ -5407,8 +5462,13 @@
/*==========================================
- * job level���K�v??�l�v�Z
+ * job level exp lookup
+ * return
+ * 0 = not found
+ * x = exp for level
*------------------------------------------*/
+
+///How much jexp do player need for next level
unsigned int pc_nextjobexp(struct map_session_data *sd)
{
nullpo_ret(sd);
@@ -5418,6 +5478,7 @@
return exp_table[pc_class2idx(sd->status.class_)][1][sd->status.job_level-1];
}
+///How much jexp do player need for next level
unsigned int pc_thisjobexp(struct map_session_data *sd)
{
if(sd->status.job_level>pc_maxjoblv(sd) || sd->status.job_level<=1)
@@ -5583,7 +5644,8 @@
}
/*==========================================
- * �X�L���|�C���g����U��
+ * Update skilllv for player sd
+ * Skill point allocation
*------------------------------------------*/
int pc_skillup(struct map_session_data *sd,int skill_num)
{
@@ -6069,6 +6131,9 @@
sd->canlog_tick = gettick();
}
+/*==========================================
+ * Invoked when a player have negative current hp
+ *------------------------------------------*/
int pc_dead(struct map_session_data *sd,struct block_list *src)
{
int i=0,j=0,k=0;
@@ -6389,10 +6454,11 @@
if(battle_config.pc_invincible_time > 0)
pc_setinvincibletimer(sd, battle_config.pc_invincible_time);
}
-// script? �A
//
+// script
+//
/*==========================================
- * script�pPC�X�e?�^�X?�ݏo��
+ * script reading pc status registry
*------------------------------------------*/
int pc_readparam(struct map_session_data* sd,int type)
{
@@ -6438,7 +6504,7 @@
}
/*==========================================
- * script�pPC�X�e?�^�X�ݒ�
+ * script set pc status registry
*------------------------------------------*/
int pc_setparam(struct map_session_data *sd,int type,int val)
{
@@ -6606,7 +6672,9 @@
}
/*==========================================
- * HP/SP��
+ * HP/SP Recovery
+ * Heal player hp nad/or sp linearly
+ * Calculate bonus by status
*------------------------------------------*/
int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
{
@@ -6664,7 +6732,8 @@
}
/*==========================================
- * HP/SP��
+ * HP/SP Recovery
+ * Heal player hp nad/or sp by rate
*------------------------------------------*/
int pc_percentheal(struct map_session_data *sd,int hp,int sp)
{
@@ -6702,9 +6771,7 @@
}
/*==========================================
- * �E?�X
- * ��? job �E�� 0�`23
- * upper �ʏ� 0, ?�� 1, �{�q 2, ���̂܂� -1
+ * Called when player changing job
* Rewrote to make it tidider [Celest]
*------------------------------------------*/
int pc_jobchange(struct map_session_data *sd,int job, int upper)
@@ -6861,7 +6928,7 @@
}
/*==========================================
- * ������?�X
+ * Tell client player sd has change equipement
*------------------------------------------*/
int pc_equiplookall(struct map_session_data *sd)
{
@@ -6883,7 +6950,7 @@
}
/*==========================================
- * ������?�X
+ * Tell client player sd has change look (hair,equip...)
*------------------------------------------*/
int pc_changelook(struct map_session_data *sd,int type,int val)
{
@@ -6943,7 +7010,7 @@
}
/*==========================================
- * �t?�i(��,�y�R,�J?�g)�ݒ�
+ * Give an option (type) to player (sd) and display it to client
*------------------------------------------*/
int pc_setoption(struct map_session_data *sd,int type)
{
@@ -7061,7 +7128,7 @@
}
/*==========================================
- * �J?�g�ݒ�
+ * Give player a cart
*------------------------------------------*/
int pc_setcart(struct map_session_data *sd,int type)
{
@@ -7086,12 +7153,12 @@
}
/*==========================================
- * ��ݒ�
+ * Give player a falcon
*------------------------------------------*/
int pc_setfalcon(TBL_PC* sd, int flag)
{
if( flag ){
- if( pc_checkskill(sd,HT_FALCON)>0 ) // �t�@���R���}�X�^��?�X�L������
+ if( pc_checkskill(sd,HT_FALCON)>0 ) // // You cannot get falcon while riding warg or while you have warg.
pc_setoption(sd,sd->sc.option|OPTION_FALCON);
} else if( pc_isfalcon(sd) ){
pc_setoption(sd,sd->sc.option&~OPTION_FALCON); // remove falcon
@@ -7101,12 +7168,12 @@
}
/*==========================================
- * �y�R�y�R�ݒ�
+ * Give player a wug (wolf)
*------------------------------------------*/
int pc_setriding(TBL_PC* sd, int flag)
{
if( flag ){
- if( pc_checkskill(sd,KN_RIDING) > 0 ) // ���C�f�B���O�X�L������
+ if( pc_checkskill(sd,KN_RIDING) > 0 ) //Have riding skill
pc_setoption(sd, sd->sc.option|OPTION_RIDING);
} else if( pc_isriding(sd) ){
pc_setoption(sd, sd->sc.option&~OPTION_RIDING);
@@ -7116,7 +7183,10 @@
}
/*==========================================
- * �A�C�e���h���b�v�s����
+ * Check if player can drop an item
+ * return
+ * 0 = no
+ *
*------------------------------------------*/
int pc_candrop(struct map_session_data *sd, struct item *item)
{
@@ -7128,7 +7198,8 @@
}
/*==========================================
- * script�p??�̒l��?��
+ * Read ram register for player sd
+ * get val (int) from reg for player sd
*------------------------------------------*/
int pc_readreg(struct map_session_data* sd, int reg)
{
@@ -7140,7 +7211,8 @@
return ( i < sd->reg_num ) ? sd->reg[i].data : 0;
}
/*==========================================
- * script�p??�̒l��ݒ�
+ * Set ram register for player sd
+ * memo val(int) at reg for player sd
*------------------------------------------*/
int pc_setreg(struct map_session_data* sd, int reg, int val)
{
@@ -7168,7 +7240,8 @@
}
/*==========================================
- * script�p������??�̒l��?��
+ * Read ram register for player sd
+ * get val (str) from reg for player sd
*------------------------------------------*/
char* pc_readregstr(struct map_session_data* sd, int reg)
{
@@ -7180,7 +7253,8 @@
return ( i < sd->regstr_num ) ? sd->regstr[i].data : NULL;
}
/*==========================================
- * script�p������??�̒l��ݒ�
+ * Set ram register for player sd
+ * memo val(str) at reg for player sd
*------------------------------------------*/
int pc_setregstr(struct map_session_data* sd, int reg, const char* str)
{
@@ -7460,7 +7534,7 @@
}
/*==========================================
- * �C�x���g�^�C�}??��
+ * Exec eventtimer for player sd (retrieved from map_session (id))
*------------------------------------------*/
static int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -7485,7 +7559,7 @@
}
/*==========================================
- * �C�x���g�^�C�}?�lj�
+ * Add eventtimer for player sd ?
*------------------------------------------*/
int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
{
@@ -7503,7 +7577,7 @@
}
/*==========================================
- * �C�x���g�^�C�}?�폜
+ * Del eventtimer for player sd ?
*------------------------------------------*/
int pc_deleventtimer(struct map_session_data *sd,const char *name)
{
@@ -7533,7 +7607,7 @@
}
/*==========================================
- * �C�x���g�^�C�}?�J�E���g�l�lj�
+ * Update eventtimer count for player sd
*------------------------------------------*/
int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick)
{
@@ -7552,7 +7626,7 @@
}
/*==========================================
- * �C�x���g�^�C�}?�S�폜
+ * Remove all eventtimer for player sd
*------------------------------------------*/
int pc_cleareventtimer(struct map_session_data *sd)
{
@@ -7575,10 +7649,10 @@
}
//
-// ? ����
+// Equipment
//
/*==========================================
- * �A�C�e����?������
+ * Equip item on player sd at req_pos from inventory index n
*------------------------------------------*/
int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
{
@@ -7761,7 +7835,7 @@
}
/*==========================================
- * ? �����������O��
+ * Called when attemting to unequip an item from player
* type:
* 0 - only unequip
* 1 - calculate status after unequipping
@@ -7890,8 +7964,8 @@
}
/*==========================================
- * �A�C�e����index��?���l�߂���
- * ? ���i��?���\�`�F�b�N���s�Ȃ�
+ * Checking if player (sd) have unauthorize, invalide item
+ * on inventory, cart, equiped for the map (item_noequip)
*------------------------------------------*/
int pc_checkitem(struct map_session_data *sd)
{
@@ -7971,7 +8045,7 @@
}
/*==========================================
- * PVP���ʌv�Z�p(foreachinarea)
+ * Update PVP rank for sd1 to sd2
*------------------------------------------*/
int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
{
@@ -7990,7 +8064,8 @@
return 0;
}
/*==========================================
- * PVP���ʌv�Z
+ * Calculate new rank beetween all present players (map_foreachinarea)
+ * and display result
*------------------------------------------*/
int pc_calc_pvprank(struct map_session_data *sd)
{
@@ -8005,7 +8080,7 @@
return sd->pvp_rank;
}
/*==========================================
- * PVP���ʌv�Z(timer)
+ * Calculate next sd ranking calculation from config
*------------------------------------------*/
int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -8027,7 +8102,10 @@
}
/*==========================================
- * sd�͌������Ă��邩(?���̏ꍇ�͑����char_id��Ԃ�)
+ * Checking if sd is married
+ * Return
+ * partner_id = yes,
+ * 0 = no
*------------------------------------------*/
int pc_ismarried(struct map_session_data *sd)
{
@@ -8039,7 +8117,10 @@
return 0;
}
/*==========================================
- * sd��dstsd�ƌ���(dstsd��sd�̌���?�������bɍs��)
+ * Marry player sd to player dstsd
+ * return
+ * -1 = fail
+ * 0 = success
*------------------------------------------*/
int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd)
{
@@ -8054,6 +8135,9 @@
/*==========================================
* Divorce sd from its partner
+ * return
+ * -1 = fail
+ * 0 = success
*------------------------------------------*/
int pc_divorce(struct map_session_data *sd)
{
@@ -8092,7 +8176,7 @@
}
/*==========================================
- * sd�̑����map_session_data��Ԃ�
+ * Get sd partner charid. (Married partner)
*------------------------------------------*/
struct map_session_data *pc_get_partner(struct map_session_data *sd)
{
@@ -8103,6 +8187,9 @@
return NULL;
}
+/*==========================================
+ * Get sd father charid. (Need to be baby)
+ *------------------------------------------*/
struct map_session_data *pc_get_father (struct map_session_data *sd)
{
if (sd && sd->class_&JOBL_BABY && sd->status.father > 0)
@@ -8112,6 +8199,9 @@
return NULL;
}
+/*==========================================
+ * Get sd mother charid. (Need to be baby)
+ *------------------------------------------*/
struct map_session_data *pc_get_mother (struct map_session_data *sd)
{
if (sd && sd->class_&JOBL_BABY && sd->status.mother > 0)
@@ -8121,6 +8211,9 @@
return NULL;
}
+/*==========================================
+ * Get sd children charid. (Need to be married)
+ *------------------------------------------*/
struct map_session_data *pc_get_child (struct map_session_data *sd)
{
if (sd && pc_ismarried(sd) && sd->status.child > 0)
@@ -8130,6 +8223,9 @@
return NULL;
}
+/*==========================================
+ * Set player sd to bleed. (losing hp and/or sp each diff_tick)
+ *------------------------------------------*/
void pc_bleeding (struct map_session_data *sd, unsigned int diff_tick)
{
int hp = 0, sp = 0;
@@ -8191,7 +8287,7 @@
}
/*==========================================
- * �Z?�u�|�C���g�̕ۑ�
+ * Memo player sd savepoint. (map,x,y)
*------------------------------------------*/
int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
{
@@ -8205,7 +8301,7 @@
}
/*==========================================
- * �����Z?�u (timer??)
+ * Save 1 player data at autosave intervalle
*------------------------------------------*/
int pc_autosave(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -8489,13 +8585,20 @@
return true;
}
+/*==========================================
+ * pc DB reading.
+ * exp.txt - required experience values
+ * skill_tree.txt - skill tree for every class
+ * attr_fix.txt - elemental adjustment table
+ * statpoint.txt - status point per level
+ *------------------------------------------*/
int pc_readdb(void)
{
int i,j,k;
FILE *fp;
char line[24000],*p;
- // �K�v??�l?��?��
+ //reset
memset(exp_table,0,sizeof(exp_table));
memset(max_level,0,sizeof(max_level));
@@ -8580,12 +8683,12 @@
}
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","exp.txt");
- // �X�L���c��?
+ // reset skilltree
memset(skill_tree,0,sizeof(skill_tree));
sv_readdb(db_path, DBPATH"skill_tree.txt", ',', 3+MAX_PC_SKILL_REQUIRE*2, 4+MAX_PC_SKILL_REQUIRE*2, -1, &pc_readdb_skilltree);
- // ?���C���e?�u��
+ // Table of correction ?
for(i=0;i<4;i++)
for(j=0;j<ELE_MAX;j++)
for(k=0;k<ELE_MAX;k++)
@@ -8637,7 +8740,7 @@
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","attr_fix.txt");
- // �X�L���c��?
+ // reset statspoint
memset(statp,0,sizeof(statp));
i=1;
@@ -8768,7 +8871,7 @@
return;
}
/*==========================================
- * pc? �W����
+ * pc Init/Terminate
*------------------------------------------*/
void do_final_pc(void) {