summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-10-29 06:33:43 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-10-29 06:33:43 +0000
commit07ff4adffb312e138502a83316dff13287a8d153 (patch)
tree4e4a9d6f582d20ea6ba1490fc31b2085453b9e1f /src/map
parent08080a5fc10eb6a9fdc2f1285ba32fda57684d29 (diff)
downloadhercules-07ff4adffb312e138502a83316dff13287a8d153.tar.gz
hercules-07ff4adffb312e138502a83316dff13287a8d153.tar.bz2
hercules-07ff4adffb312e138502a83316dff13287a8d153.tar.xz
hercules-07ff4adffb312e138502a83316dff13287a8d153.zip
-Add some src basic documentation.
-Change some remaining -1 for status ending timer. -Move some hardcoded msg in msg_athena -Small optimisation on battle_attr_fix git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16835 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/atcommand.c26
-rw-r--r--src/map/battle.c151
-rw-r--r--src/map/battle.h24
-rw-r--r--src/map/chat.c14
-rw-r--r--src/map/chrif.c68
-rw-r--r--src/map/clif.c55
-rw-r--r--src/map/elemental.c4
-rw-r--r--src/map/guild.c293
-rw-r--r--src/map/intif.c164
-rw-r--r--src/map/itemdb.c14
-rw-r--r--src/map/map.c142
-rw-r--r--src/map/map.h15
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/mob.c9
-rw-r--r--src/map/npc.c91
-rw-r--r--src/map/party.c9
-rw-r--r--src/map/party.h4
-rw-r--r--src/map/path.c15
-rw-r--r--src/map/pc.c309
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/pet.c8
-rw-r--r--src/map/script.c342
-rw-r--r--src/map/skill.c32
-rw-r--r--src/map/skill.h31
-rw-r--r--src/map/status.c53
-rw-r--r--src/map/storage.c96
-rw-r--r--src/map/trade.c2
-rw-r--r--src/map/unit.c31
-rw-r--r--src/map/vending.c2
-rw-r--r--src/map/vending.h6
30 files changed, 1196 insertions, 818 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 956637a8f..09a148a1b 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1151,7 +1151,7 @@ ACMD_FUNC(jobchange)
if (job == 13 || job == 21 || job == 22 || job == 26 || job == 27 || job == 4014 || job == 4022 || job == 4036 || job == 4044 || job == 4048
|| (job >= JOB_RUNE_KNIGHT2 && job <= JOB_MECHANIC_T2) || (job >= JOB_BABY_RUNE2 && job <= JOB_BABY_MECHANIC2)
) // Deny direct transformation into dummy jobs
- {clif_displaymessage(fd, "You can not change to this job by command.");
+ {clif_displaymessage(fd, msg_txt(923)); //"You can not change to this job by command."
return 0;}
if (pcdb_checkid(job))
@@ -5196,7 +5196,7 @@ ACMD_FUNC(killer)
if(sd->state.killer)
clif_displaymessage(fd, msg_txt(241));
else {
- clif_displaymessage(fd, msg_txt(287));
+ clif_displaymessage(fd, msg_txt(292));
pc_stop_attack(sd);
}
return 0;
@@ -7461,17 +7461,17 @@ ACMD_FUNC(size)
int size = 0;
nullpo_retr(-1, sd);
- size = cap_value(atoi(message),0,2);
+ size = cap_value(atoi(message),SZ_SMALL,SZ_BIG);
if(sd->state.size) {
- sd->state.size = 0;
+ sd->state.size = SZ_SMALL;
pc_setpos(sd, sd->mapindex, sd->bl.x, sd->bl.y, CLR_TELEPORT);
}
sd->state.size = size;
- if( size == 1 )
+ if( size == SZ_MEDIUM )
clif_specialeffect(&sd->bl,420,AREA);
- else if( size == 2 )
+ else if( size == SZ_BIG )
clif_specialeffect(&sd->bl,422,AREA);
clif_displaymessage(fd, msg_txt(1303)); // Size change applied.
@@ -7491,14 +7491,14 @@ ACMD_FUNC(sizeall)
for( pl_sd = (TBL_PC*)mapit_first(iter); mapit_exists(iter); pl_sd = (TBL_PC*)mapit_next(iter) ) {
if( pl_sd->state.size != size ) {
if( pl_sd->state.size ) {
- pl_sd->state.size = 0;
+ pl_sd->state.size = SZ_SMALL;
pc_setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
}
pl_sd->state.size = size;
- if( size == 1 )
+ if( size == SZ_MEDIUM )
clif_specialeffect(&pl_sd->bl,420,AREA);
- else if( size == 2 )
+ else if( size == SZ_BIG )
clif_specialeffect(&pl_sd->bl,422,AREA);
}
}
@@ -7528,19 +7528,19 @@ ACMD_FUNC(sizeguild)
return -1;
}
- size = cap_value(size,0,2);
+ size = cap_value(size,SZ_SMALL,SZ_BIG);
for( i = 0; i < g->max_member; i++ ) {
if( (pl_sd = g->member[i].sd) && pl_sd->state.size != size ) {
if( pl_sd->state.size ) {
- pl_sd->state.size = 0;
+ pl_sd->state.size = SZ_SMALL;
pc_setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, CLR_TELEPORT);
}
pl_sd->state.size = size;
- if( size == 1 )
+ if( size == SZ_MEDIUM )
clif_specialeffect(&pl_sd->bl,420,AREA);
- else if( size == 2 )
+ else if( size == SZ_BIG )
clif_specialeffect(&pl_sd->bl,422,AREA);
}
}
diff --git a/src/map/battle.c b/src/map/battle.c
index ff5aca3d3..53d3061ce 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -197,7 +197,7 @@ struct block_list* battle_getenemyarea(struct block_list *src, int x, int y, int
return bl_list[rnd()%c];
}
-// ダ??[ジの遅延
+// Dammage delayed info
struct delay_damage {
int src_id;
int target_id;
@@ -350,29 +350,38 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
}
}
}
- if( tsc && tsc->count ) {
- if( tsc->data[SC_SPIDERWEB] && atk_elem == ELE_FIRE ){
- tsc->data[SC_SPIDERWEB]->val1 = 0; // free to move now
- if( tsc->data[SC_SPIDERWEB]->val2-- > 0 )
- damage <<= 1; // double damage
- if( tsc->data[SC_SPIDERWEB]->val2 == 0 )
- status_change_end(target, SC_SPIDERWEB, INVALID_TIMER);
- }
- if( tsc->data[SC_ORATIO] && atk_elem == ELE_HOLY )
- ratio += tsc->data[SC_ORATIO]->val1 * 2;
- if( tsc->data[SC_VENOMIMPRESS] && atk_elem == ELE_POISON )
- ratio += tsc->data[SC_VENOMIMPRESS]->val2;
- if( tsc->data[SC_THORNSTRAP] && atk_elem == ELE_FIRE )
- status_change_end(target, SC_THORNSTRAP, -1);
- if( tsc->data[SC_FIRE_CLOAK_OPTION] && atk_elem == ELE_FIRE )
- damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100;
- if( tsc->data[SC_CRYSTALIZE] && target->type != BL_MOB){
- if( atk_elem == ELE_WIND)
- damage = damage * 150 / 100;
- if( atk_elem == ELE_FIRE )
- status_change_end(target, SC_CRYSTALIZE, INVALID_TIMER);
- }
- }
+ if( tsc && tsc->count ) { //since an atk can only have one type let's optimise this a bit
+ switch(atk_elem){
+ case ELE_FIRE:
+ if (tsc->data[SC_SPIDERWEB]) {
+ tsc->data[SC_SPIDERWEB]->val1 = 0; // free to move now
+ if( tsc->data[SC_SPIDERWEB]->val2-- > 0 )
+ damage <<= 1; // double damage
+ if( tsc->data[SC_SPIDERWEB]->val2 == 0 )
+ status_change_end(target, SC_SPIDERWEB, INVALID_TIMER);
+ }
+ if( tsc->data[SC_THORNSTRAP])
+ status_change_end(target, SC_THORNSTRAP, INVALID_TIMER);
+ if( tsc->data[SC_FIRE_CLOAK_OPTION])
+ damage -= damage * tsc->data[SC_FIRE_CLOAK_OPTION]->val2 / 100;
+ if( tsc->data[SC_CRYSTALIZE] && target->type != BL_MOB){
+ status_change_end(target, SC_CRYSTALIZE, INVALID_TIMER);
+ }
+ break;
+ case ELE_HOLY:
+ if( tsc->data[SC_ORATIO])
+ ratio += tsc->data[SC_ORATIO]->val1 * 2;
+ break;
+ case ELE_POISON:
+ if( tsc->data[SC_VENOMIMPRESS])
+ ratio += tsc->data[SC_VENOMIMPRESS]->val2;
+ break;
+ case ELE_WIND:
+ if( tsc->data[SC_CRYSTALIZE] && target->type != BL_MOB)
+ damage = damage * 150 / 100;
+ break;
+ }
+ } //end tsc check
if( src && src->type == BL_PC ){
struct map_session_data *sd = BL_CAST(BL_PC, src);
int s;
@@ -395,7 +404,9 @@ int battle_attr_fix(struct block_list *src, struct block_list *target, int damag
}
/*==========================================
- * ダ??[ジ??I計算
+ * Check dammage trough status.
+ * ATK may be MISS, BLOCKED FAIL, reduc, increase, end status...
+ * After this we apply bg/gvg reduction
*------------------------------------------*/
int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int damage,int skill_num,int skill_lv)
{
@@ -1002,7 +1013,7 @@ int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int dama
}
/*==========================================
- * HP/SP吸収の計算
+ * HP/SP drain calculation
*------------------------------------------*/
static int battle_calc_drain(int damage, int rate, int per)
{
@@ -1021,7 +1032,7 @@ static int battle_calc_drain(int damage, int rate, int per)
}
/*==========================================
- * ?C練ダ??[ジ
+ * Passif skill dammages increases
*------------------------------------------*/
int battle_addmastery(struct map_session_data *sd,struct block_list *target,int dmg,int type)
{
@@ -2158,7 +2169,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
&& sd->inventory_data[index]->type == IT_WEAPON )
skillratio += max(10000 - sd->inventory_data[index]->weight, 0) / 10;
skillratio += 50 * pc_checkskill(sd,LK_SPIRALPIERCE);
- } // (1 + [(Caster痴 Base Level - 100) / 200])
+ } // (1 + [(Casters Base Level - 100) / 200])
skillratio = skillratio * (100 + (status_get_lv(src)-100) / 2) / 100;
break;
case RK_WINDCUTTER:
@@ -2333,7 +2344,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
skillratio += -100 + 15 * 200;
RE_LVL_DMOD(100);
break;
- case LG_SHIELDSPELL:// [(Caster痴 Base Level x 4) + (Shield DEF x 10) + (Caster痴 VIT x 2)] %
+ case LG_SHIELDSPELL:// [(Casters Base Level x 4) + (Shield DEF x 10) + (Casters VIT x 2)] %
if( sd ) {
struct item_data *shield_data = sd->inventory_data[sd->equip_index[EQI_HAND_L]];
skillratio = status_get_lv(src) * 4 + status_get_vit(src) * 2;
@@ -2374,34 +2385,34 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
RE_LVL_DMOD(100);
break;
case SR_SKYNETBLOW:
- //ATK [{(Skill Level x 80) + (Caster痴 AGI)} x Caster痴 Base Level / 100] %
+ //ATK [{(Skill Level x 80) + (Caster AGI)} x Caster Base Level / 100] %
skillratio = 80 * skill_lv + sstatus->agi;
- if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_DRAGONCOMBO )//ATK [{(Skill Level x 100) + (Caster痴 AGI) + 150} x Caster痴 Base Level / 100] %
+ if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_DRAGONCOMBO )//ATK [{(Skill Level x 100) + (Caster AGI) + 150} x Caster Base Level / 100] %
skillratio = 100 * skill_lv + sstatus->agi + 150;
RE_LVL_DMOD(100);
break;
case SR_EARTHSHAKER:
- if( tsc && (tsc->data[SC_HIDING] || tsc->data[SC_CLOAKING] || // [(Skill Level x 150) x (Caster痴 Base Level / 100) + (Caster痴 INT x 3)] %
+ if( tsc && (tsc->data[SC_HIDING] || tsc->data[SC_CLOAKING] || // [(Skill Level x 150) x (Caster Base Level / 100) + (Caster INT x 3)] %
tsc->data[SC_CHASEWALK] || tsc->data[SC_CLOAKINGEXCEED] || tsc->data[SC__INVISIBILITY]) ){
skillratio = 150 * skill_lv;
RE_LVL_DMOD(100);
skillratio += sstatus->int_ * 3;
- }else{ //[(Skill Level x 50) x (Caster痴 Base Level / 100) + (Caster痴 INT x 2)] %
+ }else{ //[(Skill Level x 50) x (Caster Base Level / 100) + (Caster INT x 2)] %
skillratio += 50 * (skill_lv-2);
RE_LVL_DMOD(100);
skillratio += sstatus->int_ * 2;
}
break;
- case SR_FALLENEMPIRE:// ATK [(Skill Level x 150 + 100) x Caster痴 Base Level / 150] %
+ case SR_FALLENEMPIRE:// ATK [(Skill Level x 150 + 100) x Caster Base Level / 150] %
skillratio += 150 *skill_lv;
RE_LVL_DMOD(150);
break;
- case SR_TIGERCANNON:// ATK [((Caster痴 consumed HP + SP) / 4) x Caster痴 Base Level / 100] %
+ case SR_TIGERCANNON:// ATK [((Caster consumed HP + SP) / 4) x Caster Base Level / 100] %
{
int hp = sstatus->max_hp * (10 + 2 * skill_lv) / 100,
sp = sstatus->max_sp * (6 + skill_lv) / 100;
skillratio = (hp+sp) / 4;
- if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // ATK [((Caster痴 consumed HP + SP) / 2) x Caster痴 Base Level / 100] %
+ if( sc && sc->data[SC_COMBO] && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // ATK [((Caster consumed HP + SP) / 2) x Caster Base Level / 100] %
skillratio = (hp+sp) / 2;
RE_LVL_DMOD(100);
}
@@ -2415,15 +2426,15 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
RE_LVL_DMOD(150);
break;
case SR_KNUCKLEARROW:
- if( wflag&4 ){ // ATK [(Skill Level x 150) + (1000 x Target痴 current weight / Maximum weight) + (Target痴 Base Level x 5) x (Caster痴 Base Level / 150)] %
+ if( wflag&4 ){ // ATK [(Skill Level x 150) + (1000 x Target current weight / Maximum weight) + (Target Base Level x 5) x (Caster Base Level / 150)] %
skillratio = 150 * skill_lv + status_get_lv(target) * 5 * (status_get_lv(src) / 100) ;
if( tsd && tsd->weight )
skillratio += 100 * (tsd->weight / tsd->max_weight);
- }else // ATK [(Skill Level x 100 + 500) x Caster痴 Base Level / 100] %
+ }else // ATK [(Skill Level x 100 + 500) x Caster Base Level / 100] %
skillratio += 400 + (100 * skill_lv);
RE_LVL_DMOD(100);
break;
- case SR_WINDMILL: // ATK [(Caster痴 Base Level + Caster痴 DEX) x Caster痴 Base Level / 100] %
+ case SR_WINDMILL: // ATK [(Caster Base Level + Caster DEX) x Caster Base Level / 100] %
skillratio = status_get_lv(src) + sstatus->dex;
RE_LVL_DMOD(100);
break;
@@ -2443,14 +2454,14 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
skillratio += 300 * skill_lv - 100;
RE_LVL_DMOD(150);
break;
- case SR_RIDEINLIGHTNING: // ATK [{(Skill Level x 200) + Additional Damage} x Caster痴 Base Level / 100] %
+ case SR_RIDEINLIGHTNING: // ATK [{(Skill Level x 200) + Additional Damage} x Caster Base Level / 100] %
if( (sstatus->rhw.ele) == ELE_WIND || (sstatus->lhw.ele) == ELE_WIND )
skillratio += skill_lv * 50;
skillratio += -100 + 200 * skill_lv;
RE_LVL_DMOD(100);
break;
case WM_REVERBERATION_MELEE:
- // ATK [{(Skill Level x 100) + 300} x Caster痴 Base Level / 100]
+ // ATK [{(Skill Level x 100) + 300} x Caster Base Level / 100]
skillratio += 200 + 100 * pc_checkskill(sd, WM_REVERBERATION);
RE_LVL_DMOD(100);
break;
@@ -2468,7 +2479,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
skillratio += 400;
break;
case GN_CART_TORNADO:
- // ATK [( Skill Level x 50 ) + ( Cart Weight / ( 150 - Caster痴 Base STR ))] + ( Cart Remodeling Skill Level x 50 )] %
+ // ATK [( Skill Level x 50 ) + ( Cart Weight / ( 150 - Caster Base STR ))] + ( Cart Remodeling Skill Level x 50 )] %
skillratio = 50 * skill_lv;
if( sd && sd->cart_weight)
skillratio += sd->cart_weight/10 / max(150-sstatus->str,1) + pc_checkskill(sd, GN_REMODELING_CART) * 50;
@@ -2587,7 +2598,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if(sd)
ATK_ADD( 40 * pc_checkskill(sd, RA_RESEARCHTRAP) );
break;
- case RA_WUGDASH://(Caster痴 Current Weight x 10 / 8)
+ case RA_WUGDASH ://(Caster Current Weight x 10 / 8)
if( sd && sd->weight )
ATK_ADD( sd->weight / 8 );
case RA_WUGSTRIKE:
@@ -2609,13 +2620,13 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
ATK_ADD ( (sstatus->max_sp * (1 + skill_lv * 2 / 10)) + 40 * status_get_lv(src) );
}
break;
- case SR_TIGERCANNON: // (Tiger Cannon skill level x 240) + (Target痴 Base Level x 40)
+ case SR_TIGERCANNON: // (Tiger Cannon skill level x 240) + (Target Base Level x 40)
ATK_ADD( skill_lv * 240 + status_get_lv(target) * 40 );
if( sc && sc->data[SC_COMBO]
- && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // (Tiger Cannon skill level x 500) + (Target痴 Base Level x 40)
+ && sc->data[SC_COMBO]->val1 == SR_FALLENEMPIRE ) // (Tiger Cannon skill level x 500) + (Target Base Level x 40)
ATK_ADD( skill_lv * 500 + status_get_lv(target) * 40 );
break;
- case SR_FALLENEMPIRE:// [(Target痴 Size value + Skill Level - 1) x Caster痴 STR] + [(Target痴 current weight x Caster痴 DEX / 120)]
+ case SR_FALLENEMPIRE:// [(Target Size value + Skill Level - 1) x Caster STR] + [(Target current weight x Caster DEX / 120)]
ATK_ADD( ((tstatus->size+1)*2 + skill_lv - 1) * sstatus->str);
if( tsd && tsd->weight ){
ATK_ADD( (tsd->weight/10) * sstatus->dex / 120 );
@@ -2854,7 +2865,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
ATK_ADD(10*sc->data[SC_GN_CARTBOOST]->val1);
if(sc->data[SC_GT_CHANGE] && sc->data[SC_GT_CHANGE]->val2){
- struct block_list *bl; // ATK increase: ATK [{(Caster痴 DEX / 4) + (Caster痴 STR / 2)} x Skill Level / 5]
+ struct block_list *bl; // ATK increase: ATK [{(Caster DEX / 4) + (Caster STR / 2)} x Skill Level / 5]
if( (bl = map_id2bl(sc->data[SC_GT_CHANGE]->val2)) )
ATK_ADD( ( status_get_dex(bl)/4 + status_get_str(bl)/2 ) * sc->data[SC_GT_CHANGE]->val1 / 5 );
}
@@ -3710,8 +3721,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
case WL_HELLINFERNO:
skillratio = 300 * skill_lv;
RE_LVL_DMOD(100);
- // Shadow: MATK [{( Skill Level x 300 ) x ( Caster痴 Base Level / 100 ) x 4/5 }] %
- // Fire : MATK [{( Skill Level x 300 ) x ( Caster痴 Base Level / 100 ) /5 }] %
+ // Shadow: MATK [{( Skill Level x 300 ) x ( Caster Base Level / 100 ) x 4/5 }] %
+ // Fire : MATK [{( Skill Level x 300 ) x ( Caster Base Level / 100 ) /5 }] %
if( mflag&ELE_DARK ){ skillratio *= 4; s_ele = ELE_DARK; }
skillratio /= 5;
break;
@@ -3755,7 +3766,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
skillratio = (skillratio + 200) * skill_lv;
RE_LVL_DMOD(100);
break;
- case LG_SHIELDSPELL:// [(Caster痴 Base Level x 4) + (Shield MDEF x 100) + (Caster痴 INT x 2)] %
+ case LG_SHIELDSPELL:// [(Casters Base Level x 4) + (Shield MDEF x 100) + (Casters INT x 2)] %
if( sd ) {
skillratio = status_get_lv(src) * 4 + sd->bonus.shieldmdef * 100 + status_get_int(src) * 2;
} else
@@ -3768,7 +3779,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
skillratio += 50 * skill_lv;
break;
case WM_REVERBERATION_MAGIC:
- // MATK [{(Skill Level x 100) + 100} x Caster痴 Base Level / 100] %
+ // MATK [{(Skill Level x 100) + 100} x Casters Base Level / 100] %
skillratio += 100 * (sd ? pc_checkskill(sd, WM_REVERBERATION) : 1);
RE_LVL_DMOD(100);
break;
@@ -4052,7 +4063,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
}
/*==========================================
- * その他ダ??[ジ計算
+ * Calculate Misc dammage for skillid
*------------------------------------------*/
struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag)
{
@@ -4235,7 +4246,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
md.damage = 100 + 200 * skill_lv + sstatus->int_;
break;
case GN_HELLS_PLANT_ATK:
- //[{( Hell Plant Skill Level x Caster痴 Base Level ) x 10 } + {( Caster痴 INT x 7 ) / 2 } x { 18 + ( Caster痴 Job Level / 4 )] x ( 5 / ( 10 - Summon Flora Skill Level ))
+ //[{( Hell Plant Skill Level x Casters Base Level ) x 10 } + {( Casters INT x 7 ) / 2 } x { 18 + ( Casters Job Level / 4 )] x ( 5 / ( 10 - Summon Flora Skill Level ))
md.damage = ( skill_lv * status_get_lv(src) * 10 ) + ( sstatus->int_ * 7 / 2 ) * ( 18 + (sd?sd->status.job_level:0) / 4 ) * ( 5 / (10 - (sd?pc_checkskill(sd,AM_CANNIBALIZE):0)) );
break;
case KO_HAPPOKUNAI:
@@ -4395,7 +4406,7 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
return md;
}
/*==========================================
- * ダ??[ジ計算一括??用
+ * Battle main entry, from skill_attack
*------------------------------------------*/
struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int count)
{
@@ -4435,7 +4446,7 @@ int battle_calc_return_damage(struct block_list* bl, struct block_list *src, int
rdamage = (*dmg) * sc->data[SC_REFLECTDAMAGE]->val2 / 100;
if( rdamage > max_damage ) rdamage = max_damage;
}else if( sc && sc->data[SC_CRESCENTELBOW] && !is_boss(src) && rnd()%100 < sc->data[SC_CRESCENTELBOW]->val2 ){
- //ATK [{(Target痴 HP / 100) x Skill Level} x Caster痴 Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}]
+ //ATK [{(Target HP / 100) x Skill Level} x Caster Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}]
int ratio = (status_get_hp(src) / 100) * sc->data[SC_CRESCENTELBOW]->val1 * status_get_lv(bl) / 125;
if (ratio > 5000) ratio = 5000; // Maximum of 5000% ATK
rdamage = rdamage * ratio / 100 + (*dmg) * (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10;
@@ -4564,7 +4575,7 @@ int battle_damage_area( struct block_list *bl, va_list ap) {
return 0;
}
/*==========================================
- * 通??U撃??まとめ
+ * Do a basic physical attack (call trough unit_attack_timer)
*------------------------------------------*/
enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* target, unsigned int tick, int flag) {
struct map_session_data *sd = NULL, *tsd = NULL;
@@ -4631,13 +4642,12 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
}
}
}
-
- if (sc && sc->data[SC_CLOAKING] && !(sc->data[SC_CLOAKING]->val4&2))
- status_change_end(src, SC_CLOAKING, INVALID_TIMER);
-
- if (sc && sc->data[SC_CLOAKINGEXCEED] && !(sc->data[SC_CLOAKINGEXCEED]->val4&2))
- status_change_end(src, SC_CLOAKINGEXCEED, INVALID_TIMER);
-
+ if (sc && sc->count) {
+ if (sc->data[SC_CLOAKING] && !(sc->data[SC_CLOAKING]->val4 & 2))
+ status_change_end(src, SC_CLOAKING, INVALID_TIMER);
+ else if (sc->data[SC_CLOAKINGEXCEED] && !(sc->data[SC_CLOAKINGEXCEED]->val4 & 2))
+ status_change_end(src, SC_CLOAKINGEXCEED, INVALID_TIMER);
+ }
if( tsc && tsc->data[SC_AUTOCOUNTER] && status_check_skilluse(target, src, KN_AUTOCOUNTER, 1) )
{
int dir = map_calc_dir(target,src->x,src->y);
@@ -5123,7 +5133,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
//All else not specified is an invalid target.
default:
return 0;
- }
+ } //end switch actual target
switch( t_bl->type )
{ //Checks on target master
@@ -5152,7 +5162,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
break;
}
default: break; //other type doesn't have slave yet
- }
+ } //end switch master target
switch( src->type ) { //Checks on actual src type
case BL_PET:
@@ -5179,7 +5189,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if (t_bl->type == BL_MOB && ((TBL_MOB*)t_bl)->class_ == MOBID_EMPERIUM && flag&BCT_ENEMY)
return 0; //mercenary may not attack Emperium
break;
- }
+ } //end switch actual src
switch( s_bl->type )
{ //Checks on source master
@@ -5233,7 +5243,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if (t_bl->type != s_bl->type)
state |= BCT_ENEMY;
break;
- }
+ } //end switch on src master
if( (flag&BCT_ALL) == BCT_ALL )
{ //All actually stands for all attackable chars
@@ -5293,7 +5303,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
)
state &= ~BCT_ENEMY;
}
- }
+ }//end map_flag_vs chk rivality
else
{ //Non pvp/gvg, check party/guild settings.
if( flag&BCT_PARTY || state&BCT_ENEMY )
@@ -5309,7 +5319,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if(s_guild && t_guild && (s_guild == t_guild || guild_isallied(s_guild, t_guild)))
state |= BCT_GUILD;
}
- }
+ } //end non pvp/gvg chk rivality
if( !state ) //If not an enemy, nor a guild, nor party, nor yourself, it's neutral.
state = BCT_NEUTRAL;
@@ -5320,7 +5330,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return (flag&state)?1:-1;
}
/*==========================================
- * 射程判定
+ * Check if can attack from this range
+ * Basic check then calling path_search for obstacle etc..
*------------------------------------------*/
bool battle_check_range(struct block_list *src, struct block_list *bl, int range)
{
diff --git a/src/map/battle.h b/src/map/battle.h
index a67fd15f5..28e6176ec 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -14,24 +14,24 @@ typedef enum damage_lv {
ATK_DEF // attack connected
} damage_lv;
-// ダメージ
+// dammage structure
struct Damage {
- int damage,damage2;
- int type,div_;
+ int damage,damage2; //right, left dmg
+ int type,div_; //chk clif_damage for type @TODO add an enum ? ; nb of hit
int amotion,dmotion;
- int blewcount;
- int flag;
+ int blewcount; //nb of knockback
+ int flag; //chk BF_* flag, (enum below)
enum damage_lv dmg_lv; //ATK_LUCKY,ATK_FLEE,ATK_DEF
};
-// 属性表(読み込みはpc.c、battle_attr_fixで使用)
+//(Used in read pc.c,) attribute table (battle_attr_fix)
extern int attr_fix_table[4][10][10];
struct map_session_data;
struct mob_data;
struct block_list;
-// ダメージ計算
+// Damage Calculation
struct Damage battle_calc_attack(int attack_type,struct block_list *bl,struct block_list *target,int skill_num,int skill_lv,int count);
@@ -42,12 +42,12 @@ void battle_drain(struct map_session_data *sd, struct block_list *tbl, int rdama
int battle_attr_ratio(int atk_elem,int def_type, int def_lv);
int battle_attr_fix(struct block_list *src, struct block_list *target, int damage,int atk_elem,int def_type, int def_lv);
-// ダメージ最終計算
+// Final calculation Damage
int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damage *d,int damage,int skill_num,int skill_lv);
int battle_calc_gvg_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag);
int battle_calc_bg_damage(struct block_list *src,struct block_list *bl,int damage,int div_,int skill_num,int skill_lv,int flag);
-enum { // 最終計算のフラグ
+enum { // Flag of the final calculation
BF_WEAPON = 0x0001,
BF_MAGIC = 0x0002,
BF_MISC = 0x0004,
@@ -62,10 +62,10 @@ enum { // 最終計算のフラグ
int battle_delay_damage (unsigned int tick, int amotion, struct block_list *src, struct block_list *target, int attack_type, int skill_id, int skill_lv, int damage, enum damage_lv dmg_lv, int ddelay);
-// 通常攻撃処理まとめ
+// Summary normal attack treatment (basic attack)
enum damage_lv battle_weapon_attack( struct block_list *bl,struct block_list *target,unsigned int tick,int flag);
-// 各種パラメータを得る
+// Accessors
struct block_list* battle_get_master(struct block_list *src);
struct block_list* battle_gettargeted(struct block_list *target);
struct block_list* battle_getenemy(struct block_list *target, int type, int range);
@@ -93,7 +93,7 @@ int battle_check_target(struct block_list *src, struct block_list *target,int fl
bool battle_check_range(struct block_list *src,struct block_list *bl,int range);
void battle_consume_ammo(struct map_session_data* sd, int skill, int lv);
-// 設定
+// Settings
#define MIN_HAIR_STYLE battle_config.min_hair_style
#define MAX_HAIR_STYLE battle_config.max_hair_style
diff --git a/src/map/chat.c b/src/map/chat.c
index 702ee55d9..ad4a767cf 100644
--- a/src/map/chat.c
+++ b/src/map/chat.c
@@ -156,13 +156,13 @@ int chat_joinchat(struct map_session_data* sd, int chatid, const char* pass)
pc_setchatid(sd,cd->bl.id);
- clif_joinchatok(sd,cd); // 新たに参加した人には全員のリスト
- clif_addchat(cd,sd); // 既に中に居た人には追加した人の報告
- clif_dispchat(cd,0); // 周囲の人には人数変化報告
+ clif_joinchatok(sd, cd); //To the person who newly joined the list of all
+ clif_addchat(cd, sd); //Reports To the person who already in the chat
+ clif_dispchat(cd, 0); //Reported number of changes to the people around
- chat_triggerevent(cd); // イベント
-
- return 0;
+ chat_triggerevent(cd); //Event
+
+ return 0;
}
@@ -372,7 +372,7 @@ int chat_deletenpcchat(struct npc_data* nd)
}
/*==========================================
- * 規定人数以上でイベントが定義されてるなら実行
+ * Trigger npc event when we enter the chatroom
*------------------------------------------*/
int chat_triggerevent(struct chat_data *cd)
{
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 02bd3686c..9a4cb1554 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -730,7 +730,7 @@ int chrif_charselectreq(struct map_session_data* sd, uint32 s_ip)
}
/*==========================================
- * キャラ名問い合わせ
+ * Search Char trough id on char serv
*------------------------------------------*/
int chrif_searchcharid(int char_id)
{
@@ -803,7 +803,7 @@ int chrif_changesex(struct map_session_data *sd)
WFIFOW(char_fd,30) = 5;
WFIFOSET(char_fd,44);
- clif_displaymessage(sd->fd, "Need disconnection to perform change-sex request...");
+ clif_displaymessage(sd->fd, msg_txt(410)); //"Need disconnection to perform change-sex request..."
if (sd->fd)
clif_authfail_fd(sd->fd, 15);
@@ -835,20 +835,16 @@ static void chrif_char_ask_name_answer(int acc, const char* player_name, uint16
return;
}
- switch( type ) {
- case 1 : action = "block"; break;
- case 2 : action = "ban"; break;
- case 3 : action = "unblock"; break;
- case 4 : action = "unban"; break;
- case 5 : action = "change the sex of"; break;
- default: action = "???"; break;
- }
-
+ if(type>0 && type<=5)
+ sprintf(action,msg_txt(427+type)); //block|ban|unblock|unban|change the sex of
+ else
+ sprintf(action,"???");
+
switch( answer ) {
- case 0 : sprintf(output, "Login-server has been asked to %s the player '%.*s'.", action, NAME_LENGTH, player_name); break;
- case 1 : sprintf(output, "The player '%.*s' doesn't exist.", NAME_LENGTH, player_name); break;
- case 2 : sprintf(output, "Your GM level don't authorise you to %s the player '%.*s'.", action, NAME_LENGTH, player_name); break;
- case 3 : sprintf(output, "Login-server is offline. Impossible to %s the player '%.*s'.", action, NAME_LENGTH, player_name); break;
+ case 0 : sprintf(output, msg_txt(424), action, NAME_LENGTH, player_name); break;
+ case 1 : sprintf(output, msg_txt(425), NAME_LENGTH, player_name); break;
+ case 2 : sprintf(output, msg_txt(426), action, NAME_LENGTH, player_name); break;
+ case 3 : sprintf(output, msg_txt(427), action, NAME_LENGTH, player_name); break;
default: output[0] = '\0'; break;
}
@@ -856,7 +852,7 @@ static void chrif_char_ask_name_answer(int acc, const char* player_name, uint16
}
/*==========================================
- * 性別変化終了 (modified by Yor)
+ * Request char server to change sex of char (modified by Yor)
*------------------------------------------*/
int chrif_changedsex(int fd)
{
@@ -902,7 +898,7 @@ int chrif_changedsex(int fd)
// save character
sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
// do same modify in login-server for the account, but no in char-server (it ask again login_id1 to login, and don't remember it)
- clif_displaymessage(sd->fd, "Your sex has been changed (need disconnection by the server)...");
+ clif_displaymessage(sd->fd, msg_txt(411)); //"Your sex has been changed (need disconnection by the server)..."
set_eof(sd->fd); // forced to disconnect for the change
map_quit(sd); // Remove leftovers (e.g. autotrading) [Paradox924X]
}
@@ -1003,26 +999,20 @@ int chrif_accountban(int fd)
sd->login_id1++; // change identify, because if player come back in char within the 5 seconds, he can change its characters
if (RFIFOB(fd,6) == 0) // 0: change of statut, 1: ban
{
- switch (RFIFOL(fd,7)) { // status or final date of a banishment
- case 1: clif_displaymessage(sd->fd, "Your account has 'Unregistered'."); break;
- case 2: clif_displaymessage(sd->fd, "Your account has an 'Incorrect Password'..."); break;
- case 3: clif_displaymessage(sd->fd, "Your account has expired."); break;
- case 4: clif_displaymessage(sd->fd, "Your account has been rejected from server."); break;
- case 5: clif_displaymessage(sd->fd, "Your account has been blocked by the GM Team."); break;
- case 6: clif_displaymessage(sd->fd, "Your Game's EXE file is not the latest version."); break;
- case 7: clif_displaymessage(sd->fd, "Your account has been prohibited to log in."); break;
- case 8: clif_displaymessage(sd->fd, "Server is jammed due to over populated."); break;
- case 9: clif_displaymessage(sd->fd, "Your account has not more authorised."); break;
- case 100: clif_displaymessage(sd->fd, "Your account has been totally erased."); break;
- default: clif_displaymessage(sd->fd, "Your account has not more authorised."); break;
- }
+ int ret_status = RFIFOL(fd,7); // status or final date of a banishment
+ if(0<ret_status && ret_status<=9)
+ clif_displaymessage(sd->fd, msg_txt(411+ret_status));
+ else if(ret_status==100)
+ clif_displaymessage(sd->fd, msg_txt(421));
+ else
+ clif_displaymessage(sd->fd, msg_txt(420)); //"Your account has not more authorised."
}
else if (RFIFOB(fd,6) == 1) // 0: change of statut, 1: ban
{
time_t timestamp;
char tmpstr[2048];
timestamp = (time_t)RFIFOL(fd,7); // status or final date of a banishment
- strcpy(tmpstr, "Your account has been banished until ");
+ strcpy(tmpstr, msg_txt(423)); //"Your account has been banished until "
strftime(tmpstr + strlen(tmpstr), 24, "%d-%m-%Y %H:%M:%S", localtime(&timestamp));
clif_displaymessage(sd->fd, tmpstr);
}
@@ -1399,10 +1389,10 @@ int chrif_parse(int fd)
cmd = RFIFOW(fd,0);
if (cmd < 0x2af8 || cmd >= 0x2af8 + ARRAYLENGTH(packet_len_table) || packet_len_table[cmd-0x2af8] == 0)
{
- int r = intif_parse(fd); // intifに渡す
+ int r = intif_parse(fd); // Passed on to the intif
- if (r == 1) continue; // intifで処理した
- if (r == 2) return 0; // intifで処理したが、データが足りない
+ if (r == 1) continue; // Treated in intif
+ if (r == 2) return 0; // Didn't have enough data (len==-1)
ShowWarning("chrif_parse: session #%d, intif_parse failed (unrecognized command 0x%.4x).\n", fd, cmd);
set_eof(fd);
@@ -1478,8 +1468,8 @@ int send_usercount_tochar(int tid, unsigned int tick, int id, intptr_t data)
}
/*==========================================
- * timer関数
- * 今このmap鯖に繋がっているクライアント人数をchar鯖へ送る
+ * timerFunction
+ * Send to char the number of client connected to map
*------------------------------------------*/
int send_users_tochar(void)
{
@@ -1508,8 +1498,8 @@ int send_users_tochar(void)
}
/*==========================================
- * timer関数
- * char鯖との接続を確認し、もし切れていたら再度接続する
+ * timerFunction
+ * Chk the connection to char server, (if it down)
*------------------------------------------*/
static int check_connect_char_server(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -1591,7 +1581,7 @@ int auth_db_final(DBKey key, DBData *data, va_list ap)
}
/*==========================================
- * 終了
+ * Destructor
*------------------------------------------*/
int do_final_chrif(void)
{
diff --git a/src/map/clif.c b/src/map/clif.c
index 49751b7d4..38d62691f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -191,7 +191,10 @@ int map_fd;
static int clif_parse (int fd);
/*==========================================
- * map鯖のip設定
+ * mapソスIソスソスipソスン抵ソス
+ *------------------------------------------*/
+/*==========================================
+ * Ip setting of map-server
*------------------------------------------*/
int clif_setip(const char* ip)
{
@@ -1357,9 +1360,9 @@ int clif_spawn(struct block_list *bl)
int i;
if (sd->spiritball > 0)
clif_spiritball(sd);
- if(sd->state.size==2) // tiny/big players [Valaris]
+ if(sd->state.size==SZ_BIG) // tiny/big players [Valaris]
clif_specialeffect(bl,423,AREA);
- else if(sd->state.size==1)
+ else if(sd->state.size==SZ_MEDIUM)
clif_specialeffect(bl,421,AREA);
if( sd->bg_id && map[sd->bl.m].flag.battleground )
clif_sendbgemblem_area(sd);
@@ -1384,9 +1387,9 @@ int clif_spawn(struct block_list *bl)
case BL_MOB:
{
TBL_MOB *md = ((TBL_MOB*)bl);
- if(md->special_state.size==2) // tiny/big mobs [Valaris]
+ if(md->special_state.size==SZ_BIG) // tiny/big mobs [Valaris]
clif_specialeffect(&md->bl,423,AREA);
- else if(md->special_state.size==1)
+ else if(md->special_state.size==SZ_MEDIUM)
clif_specialeffect(&md->bl,421,AREA);
}
break;
@@ -1587,18 +1590,18 @@ static void clif_move2(struct block_list *bl, struct view_data *vd, struct unit_
{
TBL_PC *sd = ((TBL_PC*)bl);
// clif_movepc(sd);
- if(sd->state.size==2) // tiny/big players [Valaris]
+ if(sd->state.size==SZ_BIG) // tiny/big players [Valaris]
clif_specialeffect(&sd->bl,423,AREA);
- else if(sd->state.size==1)
+ else if(sd->state.size==SZ_MEDIUM)
clif_specialeffect(&sd->bl,421,AREA);
}
break;
case BL_MOB:
{
TBL_MOB *md = ((TBL_MOB*)bl);
- if(md->special_state.size==2) // tiny/big mobs [Valaris]
+ if(md->special_state.size==SZ_BIG) // tiny/big mobs [Valaris]
clif_specialeffect(&md->bl,423,AREA);
- else if(md->special_state.size==1)
+ else if(md->special_state.size==SZ_MEDIUM)
clif_specialeffect(&md->bl,421,AREA);
}
break;
@@ -3211,7 +3214,7 @@ void clif_arrowequip(struct map_session_data *sd,int val)
fd=sd->fd;
WFIFOHEAD(fd, packet_len(0x013c));
WFIFOW(fd,0)=0x013c;
- WFIFOW(fd,2)=val+2;//矢のアイテムID
+ WFIFOW(fd,2)=val+2; //Item ID of the arrow
WFIFOSET(fd,packet_len(0x013c));
}
@@ -4101,9 +4104,9 @@ void clif_getareachar_unit(struct map_session_data* sd,struct block_list *bl)
{
TBL_PC* tsd = (TBL_PC*)bl;
clif_getareachar_pc(sd, tsd);
- if(tsd->state.size==2) // tiny/big players [Valaris]
+ if(tsd->state.size==SZ_BIG) // tiny/big players [Valaris]
clif_specialeffect_single(bl,423,sd->fd);
- else if(tsd->state.size==1)
+ else if(tsd->state.size==SZ_MEDIUM)
clif_specialeffect_single(bl,421,sd->fd);
if( tsd->bg_id && map[tsd->bl.m].flag.battleground )
clif_sendbgemblem_single(sd->fd,tsd);
@@ -11901,22 +11904,22 @@ void clif_parse_GuildRequestInfo(int fd, struct map_session_data *sd)
switch( RFIFOL(fd,2) )
{
- case 0: // ギルド基本情報、同盟敵対情報
+ case 0: // ソスMソスソスソスhソスソス{ソスソスソスAソスソスソスソスソスGソスホ擾ソスソス
clif_guild_basicinfo(sd);
clif_guild_allianceinfo(sd);
break;
- case 1: // メンバーリスト、役職名リスト
+ case 1: // ソスソスソスソスソスoソス[ソスソスソスXソスgソスAソスソスEソスソスソスソスソスXソスg
clif_guild_positionnamelist(sd);
clif_guild_memberlist(sd);
break;
- case 2: // 役職名リスト、役職情報リスト
+ case 2: // ソスソスEソスソスソスソスソスXソスgソスAソスソスEソスソスリスソスg
clif_guild_positionnamelist(sd);
clif_guild_positioninfolist(sd);
break;
- case 3: // スキルリスト
+ case 3: // ソスXソスLソスソスソスソスソスXソスg
clif_guild_skillinfo(sd);
break;
- case 4: // 追放リスト
+ case 4: // ソスヌ包ソスXソスg
clif_guild_expulsionlist(sd);
break;
default:
@@ -12072,7 +12075,7 @@ void clif_parse_GuildLeave(int fd,struct map_session_data *sd)
}
if( sd->bg_id )
{
- clif_displaymessage(fd, "You can't leave battleground guilds.");
+ clif_displaymessage(fd, msg_txt(670)); //"You can't leave battleground guilds."
return;
}
@@ -12889,7 +12892,7 @@ void clif_parse_FriendsListAdd(int fd, struct map_session_data *sd)
// Friend already exists
for (i = 0; i < MAX_FRIENDS && sd->status.friends[i].char_id != 0; i++) {
if (sd->status.friends[i].char_id == f_sd->status.char_id) {
- clif_displaymessage(fd, "Friend already exists.");
+ clif_displaymessage(fd, msg_txt(671)); //"Friend already exists."
return;
}
}
@@ -12992,7 +12995,7 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
(sd->status.friends[i].char_id != char_id || sd->status.friends[i].account_id != account_id); i++);
if (i == MAX_FRIENDS) {
- clif_displaymessage(fd, "Name not found in list.");
+ clif_displaymessage(fd, msg_txt(672)); //"Name not found in list."
return;
}
@@ -13017,7 +13020,7 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
} else { //friend not online -- ask char server to delete from his friendlist
if(chrif_removefriend(char_id,sd->status.char_id)) { // char-server offline, abort
- clif_displaymessage(fd, "This action can't be performed at the moment. Please try again later.");
+ clif_displaymessage(fd, msg_txt(673)); //"This action can't be performed at the moment. Please try again later."
return;
}
}
@@ -13030,7 +13033,7 @@ void clif_parse_FriendsListRemove(int fd, struct map_session_data *sd)
memcpy(&sd->status.friends[j-1], &sd->status.friends[j], sizeof(sd->status.friends[0]));
memset(&sd->status.friends[MAX_FRIENDS-1], 0, sizeof(sd->status.friends[MAX_FRIENDS-1]));
- clif_displaymessage(fd, "Friend removed");
+ clif_displaymessage(fd, msg_txt(674)); //"Friend removed"
WFIFOHEAD(fd,packet_len(0x20a));
WFIFOW(fd,0) = 0x20a;
@@ -13840,7 +13843,7 @@ void clif_parse_Mail_send(int fd, struct map_session_data *sd)
if( DIFF_TICK(sd->cansendmail_tick, gettick()) > 0 )
{
- clif_displaymessage(sd->fd,"Cannot send mails too fast!!.");
+ clif_displaymessage(sd->fd,msg_txt(675)); //"Cannot send mails too fast!!."
clif_Mail_send(fd, true); // fail
return;
}
@@ -16042,7 +16045,7 @@ int clif_autoshadowspell_list(struct map_session_data *sd) {
sd->menuskill_id = SC_AUTOSHADOWSPELL;
sd->menuskill_val = c;
} else {
- status_change_end(&sd->bl,SC_STOP,-1);
+ status_change_end(&sd->bl,SC_STOP,INVALID_TIMER);
clif_skill_fail(sd,SC_AUTOSHADOWSPELL,USESKILL_FAIL_IMITATION_SKILL_NONE,0);
}
@@ -16416,7 +16419,7 @@ static int packetdb_readdb(void)
#endif
#if PACKETVER < 2
3, 28, 19, 11, 3, -1, 9, 5, 52, 51, 56, 58, 41, 2, 6, 6,
-#elif PACKETVER < 20071106 // 78-7b 亀島以降 lv99エフェクト用
+#elif PACKETVER < 20071106 // 78-7b ソスTソスソスソスネ降 lv99ソスGソスtソスFソスNソスgソスp
3, 28, 19, 11, 3, -1, 9, 5, 54, 53, 58, 60, 41, 2, 6, 6,
#elif PACKETVER <= 20081217 // change in 0x78 and 0x7c
3, 28, 19, 11, 3, -1, 9, 5, 55, 53, 58, 60, 42, 2, 6, 6,
@@ -16451,7 +16454,7 @@ static int packetdb_readdb(void)
6, 3,106, 10, 10, 34, 0, 6, 8, 4, 4, 4, 29, -1, 10, 6,
#if PACKETVER < 1
90, 86, 24, 6, 30,102, 8, 4, 8, 4, 14, 10, -1, 6, 2, 6,
-#else // 196 comodo以降 状態表示アイコン用
+#else // 196 comodoソスネ降 ソスソスヤ表ソスソスソスAソスCソスRソスソスソスp
90, 86, 24, 6, 30,102, 9, 4, 8, 4, 14, 10, -1, 6, 2, 6,
#endif
#if PACKETVER < 20081126
diff --git a/src/map/elemental.c b/src/map/elemental.c
index c8788002e..3abab157f 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -101,7 +101,7 @@ int elemental_save(struct elemental_data *ed) {
return 1;
}
-static int elemental_summon_end(int tid, unsigned int tick, int id, intptr data) {
+static int elemental_summon_end(int tid, unsigned int tick, int id, intptr_t data) {
struct map_session_data *sd;
struct elemental_data *ed;
@@ -643,7 +643,7 @@ static int elemental_ai_sub_foreachclient(struct map_session_data *sd, va_list a
return 0;
}
-static int elemental_ai_timer(int tid, unsigned int tick, int id, intptr data) {
+static int elemental_ai_timer(int tid, unsigned int tick, int id, intptr_t data) {
map_foreachpc(elemental_ai_sub_foreachclient,tick);
return 0;
diff --git a/src/map/guild.c b/src/map/guild.c
index 23b8bf131..e0d2d7f8a 100644
--- a/src/map/guild.c
+++ b/src/map/guild.c
@@ -39,12 +39,13 @@ struct eventlist {
struct eventlist *next;
};
-// ギルドのEXPキャッシュのフラッシュに関連する定数
-#define GUILD_SEND_XY_INVERVAL 5000 // 座標やHP送信の間隔
-#define GUILD_PAYEXP_INVERVAL 10000 // 間隔(キャッシュの最大生存時間、ミリ秒)
-#define GUILD_PAYEXP_LIST 8192 // キャッシュの最大数
+//Constant related to the flash of the Guild EXP cache
+#define GUILD_SEND_XY_INVERVAL 5000 // Interval of sending coordinates and HP
+#define GUILD_PAYEXP_INVERVAL 10000 //Interval (maximum survival time of the cache, in milliseconds)
+#define GUILD_PAYEXP_LIST 8192 //The maximum number of cache
+
+//Guild EXP cache
-// ギルドのEXPキャッシュ
struct guild_expcache {
int guild_id, account_id, char_id;
uint64 exp;
@@ -91,13 +92,13 @@ int guild_skill_get_max (int id)
return guild_skill_tree[id-GD_SKILLBASE].max;
}
-// ギルドスキルがあるか確認
-int guild_checkskill(struct guild *g,int id)
-{
- int idx = id-GD_SKILLBASE;
- if (idx < 0 || idx >= MAX_GUILDSKILL)
- return 0;
- return g->skill[idx].lv;
+// Retrive skilllv learned by guild
+
+int guild_checkskill(struct guild *g, int id) {
+ int idx = id - GD_SKILLBASE;
+ if (idx < 0 || idx >= MAX_GUILDSKILL)
+ return 0;
+ return g->skill[idx].lv;
}
/*==========================================
@@ -261,7 +262,7 @@ int guild_getposition(struct guild* g, struct map_session_data* sd)
return( i < g->max_member ) ? g->member[i].position : -1;
}
-// メンバー情報の作成
+//Creation of member information
void guild_makemember(struct guild_member *m,struct map_session_data *sd)
{
nullpo_retv(sd);
@@ -283,7 +284,7 @@ void guild_makemember(struct guild_member *m,struct map_session_data *sd)
}
/**
- * ギルドのEXPキャッシュをinter鯖にフラッシュする
+ * Server cache to be flushed to inter the Guild EXP
* @see DBApply
*/
int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) {
@@ -392,7 +393,7 @@ int guild_create(struct map_session_data *sd, const char *name)
return 1;
}
-// 作成可否
+//Whether or not to create guilde
int guild_created(int account_id,int guild_id)
{
struct map_session_data *sd=map_id2sd(account_id);
@@ -400,24 +401,24 @@ int guild_created(int account_id,int guild_id)
if(sd==NULL)
return 0;
if(!guild_id) {
- clif_guild_created(sd,2); // 作成失敗(同名ギルド存在)
+ clif_guild_created(sd, 2); // Creation failure (presence of the same name Guild)
return 0;
}
//struct guild *g;
sd->status.guild_id=guild_id;
clif_guild_created(sd,0);
if(battle_config.guild_emperium_check)
- pc_delitem(sd,pc_search_inventory(sd,714),1,0,0,LOG_TYPE_CONSUME); // エンペリウム消耗
+ pc_delitem(sd,pc_search_inventory(sd,714),1,0,0,LOG_TYPE_CONSUME); // ソスGソスソスソスyソスソスソスEソスソスソスソスソスソス
return 0;
}
-// 情報要求
+//Information request
int guild_request_info(int guild_id)
{
return intif_guild_request_info(guild_id);
}
-// イベント付き情報要求
+//Information request with event
int guild_npc_request_info(int guild_id,const char *event)
{
if( guild_search(guild_id) )
@@ -442,7 +443,7 @@ int guild_npc_request_info(int guild_id,const char *event)
return guild_request_info(guild_id);
}
-// 所属キャラの確認
+//Confirmation of the character belongs to guild
int guild_check_member(struct guild *g)
{
int i;
@@ -469,7 +470,7 @@ int guild_check_member(struct guild *g)
return 0;
}
-// 情報所得失敗(そのIDのキャラを全部未所属にする)
+//Delete association with guild_id for all characters
int guild_recv_noinfo(int guild_id)
{
struct map_session_data *sd;
@@ -486,7 +487,7 @@ int guild_recv_noinfo(int guild_id)
return 0;
}
-// 情報所得
+//Get and display information for all member
int guild_recv_info(struct guild *sg)
{
struct guild *g,before;
@@ -504,7 +505,7 @@ int guild_recv_info(struct guild *sg)
idb_put(guild_db,sg->guild_id,g);
before=*sg;
- // 最初のロードなのでユーザーのチェックを行う
+ //Perform the check on the user because the first load
guild_check_member(sg);
if ((sd = map_nick2sd(sg->master)) != NULL)
{
@@ -539,32 +540,32 @@ int guild_recv_info(struct guild *sg)
bm++;
}
- for(i=0;i<g->max_member;i++){ // 情報の送信
+ for (i = 0; i < g->max_member; i++) { //Transmission of information at all members
sd = g->member[i].sd;
if( sd==NULL )
continue;
- if( before.guild_lv!=g->guild_lv || bm!=m ||
- before.max_member!=g->max_member ){
- clif_guild_basicinfo(sd); // 基本情報送信
- clif_guild_emblem(sd,g); // エンブレム送信
- }
+ if (before.guild_lv != g->guild_lv || bm != m ||
+ before.max_member != g->max_member) {
+ clif_guild_basicinfo(sd); //Submit basic information
+ clif_guild_emblem(sd, g); //Submit emblem
+ }
- if(bm!=m){ // メンバー情報送信
- clif_guild_memberlist(g->member[i].sd);
- }
+ if (bm != m) { //Send members information
+ clif_guild_memberlist(g->member[i].sd);
+ }
- if( before.skill_point!=g->skill_point)
- clif_guild_skillinfo(sd); // スキル情報送信
+ if (before.skill_point != g->skill_point)
+ clif_guild_skillinfo(sd); //Submit information skills
- if( guild_new ){ // 未送信なら所属情報も送る
- clif_guild_belonginfo(sd,g);
- clif_guild_notice(sd,g);
- sd->guild_emblem_id=g->emblem_id;
- }
- }
+ if (guild_new) { // Send information and affiliation if unsent
+ clif_guild_belonginfo(sd, g);
+ clif_guild_notice(sd, g);
+ sd->guild_emblem_id = g->emblem_id;
+ }
+ }
- // イベントの発生
+ //Occurrence of an event
if (guild_infoevent_db->remove(guild_infoevent_db, db_i2key(sg->guild_id), &data))
{
struct eventlist *ev = db_data2ptr(&data), *ev2;
@@ -579,12 +580,12 @@ int guild_recv_info(struct guild *sg)
return 0;
}
-
-// ギルドへの勧誘
-int guild_invite(struct map_session_data *sd,struct map_session_data *tsd)
-{
- struct guild *g;
- int i;
+/*=============================================
+ * Player sd send a guild invatation to player tsd to join his guild
+ *--------------------------------------------*/
+int guild_invite(struct map_session_data *sd, struct map_session_data *tsd) {
+ struct guild *g;
+ int i;
nullpo_ret(sd);
@@ -597,7 +598,7 @@ int guild_invite(struct map_session_data *sd,struct map_session_data *tsd)
return 0; //Invite permission.
if(!battle_config.invite_request_check) {
- if (tsd->party_invite>0 || tsd->trade_partner || tsd->adopt_invite ) { // 相手が取引中かどうか
+ if (tsd->party_invite > 0 || tsd->trade_partner || tsd->adopt_invite) { //checking if there no other invitation pending
clif_guild_inviteack(sd,0);
return 0;
}
@@ -616,7 +617,7 @@ int guild_invite(struct map_session_data *sd,struct map_session_data *tsd)
return 0;
}
- // 定員確認
+ //search an empty spot in guild
ARR_FIND( 0, g->max_member, i, g->member[i].account_id == 0 );
if(i==g->max_member){
clif_guild_inviteack(sd,3);
@@ -714,7 +715,9 @@ void guild_member_joined(struct map_session_data *sd)
g->member[i].sd = sd;
}
-// ギルドメンバが追加された
+/*==========================================
+ * Add a player to a given guild_id
+ *----------------------------------------*/
int guild_member_added(int guild_id,int account_id,int char_id,int flag)
{
struct map_session_data *sd= map_id2sd(account_id),*sd2;
@@ -724,7 +727,7 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag)
return 0;
if(sd==NULL || sd->guild_invite==0){
- // キャラ側に登録できなかったため脱退要求を出す
+ // cancel if player not present or invalide guild_id invitation
if (flag == 0) {
ShowError("guild: member added error %d is not online\n",account_id);
intif_guild_leave(guild_id,account_id,char_id,0,"** Data Error **");
@@ -735,13 +738,13 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag)
sd->guild_invite = 0;
sd->guild_invite_account = 0;
- if(flag==1){ // 失敗
+ if (flag == 1) { //failure
if( sd2!=NULL )
clif_guild_inviteack(sd2,3);
return 0;
}
- // 成功
+ //if all ok adding 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.
@@ -759,7 +762,9 @@ int guild_member_added(int guild_id,int account_id,int char_id,int flag)
return 0;
}
-// ギルド脱退要求
+/*==========================================
+ * Player request leaving a given guild_id
+ *----------------------------------------*/
int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int char_id, const char* mes)
{
struct guild *g;
@@ -780,7 +785,9 @@ int guild_leave(struct map_session_data* sd, int guild_id, int account_id, int c
return 0;
}
-// ギルド追放要求
+/*==========================================
+ * Request remove a player to a given guild_id
+ *----------------------------------------*/
int guild_expulsion(struct map_session_data* sd, int guild_id, int account_id, int char_id, const char* mes)
{
struct map_session_data *tsd;
@@ -917,7 +924,7 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
}
if(idx == -1 || c == 0) {
- // ギルドのメンバー外なので追放扱いする
+ //Treat char_id who doesn't match guild_id (not found as member)
struct map_session_data *sd = map_id2sd(account_id);
if(sd && sd->status.char_id == char_id) {
sd->status.guild_id=0;
@@ -953,7 +960,10 @@ int guild_recv_memberinfoshort(int guild_id,int account_id,int char_id,int onlin
return 0;
}
-// ギルド会話送信
+
+/*====================================================
+ * Send a message to whole guild
+ *---------------------------------------------------*/
int guild_send_message(struct map_session_data *sd,const char *mes,int len)
{
nullpo_ret(sd);
@@ -968,7 +978,10 @@ int guild_send_message(struct map_session_data *sd,const char *mes,int len)
return 0;
}
-// ギルド会話受信
+
+/*====================================================
+ * Guild receive a message, will be displayed to whole member
+ *---------------------------------------------------*/
int guild_recv_message(int guild_id,int account_id,const char *mes,int len)
{
struct guild *g;
@@ -977,12 +990,18 @@ int guild_recv_message(int guild_id,int account_id,const char *mes,int len)
clif_guild_message(g,account_id,mes,len);
return 0;
}
-// ギルドメンバの役職変更
+
+/*====================================================
+ * Member changing position in guild
+ *---------------------------------------------------*/
int guild_change_memberposition(int guild_id,int account_id,int char_id,short idx)
{
return intif_guild_change_memberinfo(guild_id,account_id,char_id,GMI_POSITION,&idx,sizeof(idx));
}
-// ギルドメンバの役職変更通知
+
+/*====================================================
+ * Notification of new position for member
+ *---------------------------------------------------*/
int guild_memberposition_changed(struct guild *g,int idx,int pos)
{
nullpo_ret(g);
@@ -995,7 +1014,10 @@ int guild_memberposition_changed(struct guild *g,int idx,int pos)
clif_charnameupdate(g->member[idx].sd);
return 0;
}
-// ギルド役職変更
+
+/*====================================================
+ * Change guild title or member
+ *---------------------------------------------------*/
int guild_change_position(int guild_id,int idx,
int mode,int exp_mode,const char *name)
{
@@ -1009,7 +1031,10 @@ int guild_change_position(int guild_id,int idx,
safestrncpy(p.name,name,NAME_LENGTH);
return intif_guild_position(guild_id,idx,&p);
}
-// ギルド役職変更通知
+
+/*====================================================
+ * Notification of member has changed his guild tiltle
+ *---------------------------------------------------*/
int guild_position_changed(int guild_id,int idx,struct guild_position *p)
{
struct guild *g=guild_search(guild_id);
@@ -1025,7 +1050,10 @@ int guild_position_changed(int guild_id,int idx,struct guild_position *p)
clif_charnameupdate(g->member[i].sd);
return 0;
}
-// ギルド告知変更
+
+/*====================================================
+ * Change guild notice
+ *---------------------------------------------------*/
int guild_change_notice(struct map_session_data *sd,int guild_id,const char *mes1,const char *mes2)
{
nullpo_ret(sd);
@@ -1034,7 +1062,10 @@ int guild_change_notice(struct map_session_data *sd,int guild_id,const char *mes
return 0;
return intif_guild_notice(guild_id,mes1,mes2);
}
-// ギルド告知変更通知
+
+/*====================================================
+ * Notification of guild has changed his notice
+ *---------------------------------------------------*/
int guild_notice_changed(int guild_id,const char *mes1,const char *mes2)
{
int i;
@@ -1052,7 +1083,10 @@ int guild_notice_changed(int guild_id,const char *mes1,const char *mes2)
}
return 0;
}
-// ギルドエンブレム変更
+
+/*====================================================
+ * Change guild emblem
+ *---------------------------------------------------*/
int guild_change_emblem(struct map_session_data *sd,int len,const char *data)
{
struct guild *g;
@@ -1066,7 +1100,10 @@ int guild_change_emblem(struct map_session_data *sd,int len,const char *data)
return intif_guild_emblem(sd->status.guild_id,len,data);
}
-// ギルドエンブレム変更通知
+
+/*====================================================
+ * Notification of guild emblem changed
+ *---------------------------------------------------*/
int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)
{
int i;
@@ -1146,7 +1183,9 @@ static DBData create_expcache(DBKey key, va_list args)
return db_ptr2data(c);
}
-// ギルドのEXP上納
+/*====================================================
+ * return Taxed experience from player sd to guild
+ *---------------------------------------------------*/
unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp)
{
struct guild *g;
@@ -1178,7 +1217,11 @@ unsigned int guild_payexp(struct map_session_data *sd,unsigned int exp)
return exp;
}
-// Celest
+/*====================================================
+ * Player sd pay a tribue experience exp to his guild
+ * Add this experience to guild exp
+ * [Celest]
+ *---------------------------------------------------*/
int guild_getexp(struct map_session_data *sd,int exp)
{
struct guild_expcache *c;
@@ -1195,7 +1238,9 @@ int guild_getexp(struct map_session_data *sd,int exp)
return exp;
}
-// スキルポイント割り振り
+/*====================================================
+ * Ask to increase guildskill skill_num
+ *---------------------------------------------------*/
int guild_skillup(TBL_PC* sd, int skill_num)
{
struct guild* g;
@@ -1216,7 +1261,10 @@ int guild_skillup(TBL_PC* sd, int skill_num)
return 0;
}
-// スキルポイント割り振り通知
+
+/*====================================================
+ * Notification of guildskill skill_num increase request
+ *---------------------------------------------------*/
int guild_skillupack(int guild_id,int skill_num,int account_id)
{
struct map_session_data *sd=map_id2sd(account_id);
@@ -1238,13 +1286,14 @@ int guild_skillupack(int guild_id,int skill_num,int account_id)
}
}
- // 全員に通知
+ // Inform all members
for(i=0;i<g->max_member;i++)
if((sd=g->member[i].sd)!=NULL)
clif_guild_skillinfo(sd);
return 0;
}
+
void guild_guildaura_refresh(struct map_session_data *sd, int skill_num, int skill_lv) {
struct skill_unit_group* group = NULL;
int type = status_skill2sc(skill_num);
@@ -1263,7 +1312,13 @@ void guild_guildaura_refresh(struct map_session_data *sd, int skill_num, int ski
}
return;
}
-// ギルド同盟数所得
+
+/*====================================================
+ * Count number of relation the guild have
+ * flag :
+ * 0 = allied
+ * 1 = ennemy
+ *---------------------------------------------------*/
int guild_get_alliance_count(struct guild *g,int flag)
{
int i,c;
@@ -1287,8 +1342,13 @@ void guild_block_skill(struct map_session_data *sd, int time)
skill_blockpc_start_(sd, skill_num[i], time , true);
}
-// 同盟関係かどうかチェック
-// 同盟なら1、それ以外は0
+/*====================================================
+ * Check relation between guild_id1 and guild_id2
+ * flag :
+ * 0 = allied
+ * 1 = ennemy
+ * return true if yes
+ *---------------------------------------------------*/
int guild_check_alliance(int guild_id1, int guild_id2, int flag)
{
struct guild *g;
@@ -1302,14 +1362,16 @@ int guild_check_alliance(int guild_id1, int guild_id2, int flag)
return( i < MAX_GUILDALLIANCE ) ? 1 : 0;
}
-// ギルド同盟要求
+/*====================================================
+ * Player sd, asking player tsd an alliance between there 2 guild
+ *---------------------------------------------------*/
int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
{
struct guild *g[2];
int i;
if(agit_flag || agit2_flag) { // Disable alliance creation during woe [Valaris]
- clif_displaymessage(sd->fd,"Alliances cannot be made during Guild Wars!");
+ clif_displaymessage(sd->fd,msg_txt(676)); //"Alliances cannot be made during Guild Wars!"
return 0;
} // end addition [Valaris]
@@ -1343,7 +1405,7 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
return 0;
}
- for(i=0;i<MAX_GUILDALLIANCE;i++){ // すでに同盟状態か確認
+ for (i = 0; i < MAX_GUILDALLIANCE; i++) { // check if already allied
if( g[0]->alliance[i].guild_id==tsd->status.guild_id &&
g[0]->alliance[i].opposition==0){
clif_guild_allianceack(sd,0);
@@ -1357,7 +1419,10 @@ int guild_reqalliance(struct map_session_data *sd,struct map_session_data *tsd)
clif_guild_reqalliance(tsd,sd->status.account_id,g[0]->name);
return 0;
}
-// ギルド勧誘への返答
+
+/*====================================================
+ * Player sd, awsser to player tsd (account_id) for an alliance request
+ *---------------------------------------------------*/
int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
{
struct map_session_data *tsd;
@@ -1369,13 +1434,13 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
return 0;
}
- if(sd->guild_alliance!=tsd->status.guild_id) // 勧誘とギルドIDが違う
+ if (sd->guild_alliance != tsd->status.guild_id) // proposed guild_id alliance doesn't match tsd guildid
return 0;
- if(flag==1){ // 承諾
+ if (flag == 1) { // consent
int i;
- struct guild *g,*tg; // 同盟数再確認
+ struct guild *g, *tg; // Reconfirm the number of alliance
g=guild_search(sd->status.guild_id);
tg=guild_search(tsd->status.guild_id);
@@ -1403,11 +1468,11 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
tsd->status.account_id,sd->status.account_id,9 );
}
- // inter鯖へ同盟要請
+ // inform other servers
intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
sd->status.account_id,tsd->status.account_id,0 );
return 0;
- }else{ // 拒否
+ } else { // deny
sd->guild_alliance=0;
sd->guild_alliance_account=0;
if(tsd!=NULL)
@@ -1416,13 +1481,15 @@ int guild_reply_reqalliance(struct map_session_data *sd,int account_id,int flag)
return 0;
}
-// ギルド関係解消
+/*====================================================
+ * Player sd asking to break alliance with guild guild_id
+ *---------------------------------------------------*/
int guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
{
nullpo_ret(sd);
if(agit_flag || agit2_flag) { // Disable alliance breaking during woe [Valaris]
- clif_displaymessage(sd->fd,"Alliances cannot be broken during Guild Wars!");
+ clif_displaymessage(sd->fd,msg_txt(677)); //"Alliances cannot be broken during Guild Wars!"
return 0;
} // end addition [Valaris]
@@ -1430,7 +1497,9 @@ int guild_delalliance(struct map_session_data *sd,int guild_id,int flag)
return 0;
}
-// ギルド敵対
+/*====================================================
+ * Player sd, asking player tsd a formal ennemy relation between there 2 guild
+ *---------------------------------------------------*/
int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
{
struct guild *g;
@@ -1451,9 +1520,9 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
return 0;
}
- for(i=0;i<MAX_GUILDALLIANCE;i++){ // すでに関係を持っているか確認
+ for (i = 0; i < MAX_GUILDALLIANCE; i++) { // checking relations
if(g->alliance[i].guild_id==tsd->status.guild_id){
- if(g->alliance[i].opposition==1){ // すでに敵対
+ if (g->alliance[i].opposition == 1) { // check if not already hostile
clif_guild_oppositionack(sd,2);
return 0;
}
@@ -1465,13 +1534,15 @@ int guild_opposition(struct map_session_data *sd,struct map_session_data *tsd)
}
}
- // inter鯖に敵対要請
+ // inform other serv
intif_guild_alliance( sd->status.guild_id,tsd->status.guild_id,
sd->status.account_id,tsd->status.account_id,1 );
return 0;
}
-// ギルド同盟/敵対通知
+/*====================================================
+ * Notification of a relationship between 2 guild
+ *---------------------------------------------------*/
int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag,const char *name1,const char *name2)
{
struct guild *g[2];
@@ -1495,14 +1566,14 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
sd[0]->guild_alliance_account=0;
}
- if(flag&0x70){ // 失敗
+ if (flag & 0x70) { // failure
for(i=0;i<2-(flag&1);i++)
if( sd[i]!=NULL )
clif_guild_allianceack(sd[i],((flag>>4)==i+1)?3:4);
return 0;
}
- if(!(flag&0x08)){ // 関係追加
+ if (!(flag & 0x08)) { // new relationship
for(i=0;i<2-(flag&1);i++)
{
if(g[i]!=NULL)
@@ -1516,7 +1587,7 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
}
}
}
- }else{ // 関係解消
+ } else { // remove relationship
for(i=0;i<2-(flag&1);i++)
{
if(g[i]!=NULL)
@@ -1525,21 +1596,21 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
if( j < MAX_GUILDALLIANCE )
g[i]->alliance[j].guild_id = 0;
}
- if( sd[i]!=NULL ) // 解消通知
+ if (sd[i] != NULL) // notify players
clif_guild_delalliance(sd[i],guild_id[1-i],(flag&1));
}
}
- if((flag&0x0f)==0){ // 同盟通知
+ if ((flag & 0x0f) == 0) { // alliance notification
if( sd[1]!=NULL )
clif_guild_allianceack(sd[1],2);
- }else if((flag&0x0f)==1){ // 敵対通知
+ } else if ((flag & 0x0f) == 1) { // ennemy notification
if( sd[0]!=NULL )
clif_guild_oppositionack(sd[0],0);
}
- for(i=0;i<2-(flag&1);i++){ // 同盟/敵対リストの再送信
+ for (i = 0; i < 2 - (flag & 1); i++) { // Retransmission of the relationship list to all members
struct map_session_data *sd;
if(g[i]!=NULL)
for(j=0;j<g[i]->max_member;j++)
@@ -1550,7 +1621,7 @@ int guild_allianceack(int guild_id1,int guild_id2,int account_id1,int account_id
}
/**
- * ギルド解散通知用
+ * Notification for the guild disbanded
* @see DBApply
*/
int guild_broken_sub(DBKey key, DBData *data, va_list ap)
@@ -1562,7 +1633,7 @@ int guild_broken_sub(DBKey key, DBData *data, va_list ap)
nullpo_ret(g);
- for(i=0;i<MAX_GUILDALLIANCE;i++){ // 関係を破棄
+ for(i=0;i<MAX_GUILDALLIANCE;i++){ // Destroy all relationships
if(g->alliance[i].guild_id==guild_id){
for(j=0;j<g->max_member;j++)
if( (sd=g->member[j].sd)!=NULL )
@@ -1608,7 +1679,7 @@ int guild_broken(int guild_id,int flag)
if(flag!=0 || g==NULL)
return 0;
- for(i=0;i<g->max_member;i++){ // ギルド解散を通知
+ for(i=0;i<g->max_member;i++){ // Destroy all relationships
if((sd=g->member[i].sd)!=NULL){
if(sd->state.storage_flag == 2)
storage_guild_storage_quit(sd,1);
@@ -1675,13 +1746,13 @@ int guild_gm_changed(int guild_id, int account_id, int char_id)
if (g->member[pos].sd && g->member[pos].sd->fd)
{
- clif_displaymessage(g->member[pos].sd->fd, "You no longer are the Guild Master.");
+ clif_displaymessage(g->member[pos].sd->fd, msg_txt(678)); //"You no longer are the Guild Master."
g->member[pos].sd->state.gmaster_flag = 0;
}
if (g->member[0].sd && g->member[0].sd->fd)
{
- clif_displaymessage(g->member[0].sd->fd, "You have become the Guild Master!");
+ clif_displaymessage(g->member[0].sd->fd, msg_txt(679)); //"You have become the Guild Master!"
g->member[0].sd->state.gmaster_flag = g;
//Block his skills for 5 minutes to prevent abuse.
guild_block_skill(g->member[0].sd, 300000);
@@ -1700,7 +1771,9 @@ int guild_gm_changed(int guild_id, int account_id, int char_id)
return 1;
}
-// ギルド解散
+/*====================================================
+ * Guild disbanded
+ *---------------------------------------------------*/
int guild_break(struct map_session_data *sd,char *name)
{
struct guild *g;
@@ -1850,7 +1923,7 @@ void guild_castle_reconnect(int castle_id, int index, int value)
}
}
-// ギルドデータ一括受信(初期化時)
+// Loadcastle data then invoque OnAgitInit* on last
int guild_castledataloadack(int len, struct guild_castle *gc)
{
int i;
@@ -1893,6 +1966,9 @@ int guild_castledataloadack(int len, struct guild_castle *gc)
return 0;
}
+/*====================================================
+ * Start normal woe and triggers all npc OnAgitStart
+ *---------------------------------------------------*/
int guild_agit_start(void)
{ // Run All NPC_Event[OnAgitStart]
int c = npc_event_doall("OnAgitStart");
@@ -1900,6 +1976,9 @@ int guild_agit_start(void)
return 0;
}
+/*====================================================
+ * End normal woe and triggers all npc OnAgitEnd
+ *---------------------------------------------------*/
int guild_agit_end(void)
{ // Run All NPC_Event[OnAgitEnd]
int c = npc_event_doall("OnAgitEnd");
@@ -1907,6 +1986,9 @@ int guild_agit_end(void)
return 0;
}
+/*====================================================
+ * Start woe2 and triggers all npc OnAgitStart2
+ *---------------------------------------------------*/
int guild_agit2_start(void)
{ // Run All NPC_Event[OnAgitStart2]
int c = npc_event_doall("OnAgitStart2");
@@ -1914,6 +1996,9 @@ int guild_agit2_start(void)
return 0;
}
+/*====================================================
+ * End woe2 and triggers all npc OnAgitEnd2
+ *---------------------------------------------------*/
int guild_agit2_end(void)
{ // Run All NPC_Event[OnAgitEnd2]
int c = npc_event_doall("OnAgitEnd2");
diff --git a/src/map/intif.c b/src/map/intif.c
index c88d4a579..2374eaf38 100644
--- a/src/map/intif.c
+++ b/src/map/intif.c
@@ -46,11 +46,11 @@ static const int packet_len_table[]={
-1,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator]
};
-extern int char_fd; // inter serverのfdはchar_fdを使う
-#define inter_fd char_fd // エイリアス
+extern int char_fd; // inter server Fd used for char_fd
+#define inter_fd char_fd // alias
//-----------------------------------------------------------------
-// inter serverへの送信
+// Send to inter server
int CheckForCharServer(void)
{
@@ -136,7 +136,7 @@ int intif_rename(struct map_session_data *sd, int type, char *name)
return 0;
}
-// GMメッセージを送信
+// GM Send a message
int intif_broadcast(const char* mes, int len, int type)
{
int lp = type ? 4 : 0;
@@ -386,7 +386,7 @@ int intif_send_guild_storage(int account_id,struct guild_storage *gstor)
return 0;
}
-// パーティ作成要求
+// Party creation request
int intif_create_party(struct party_member *member,char *name,int item,int item2)
{
if (CheckForCharServer())
@@ -403,7 +403,8 @@ int intif_create_party(struct party_member *member,char *name,int item,int item2
WFIFOSET(inter_fd,WFIFOW(inter_fd, 2));
return 0;
}
-// パーティ情報要求
+
+// Party information request
int intif_request_partyinfo(int party_id, int char_id)
{
if (CheckForCharServer())
@@ -415,7 +416,8 @@ int intif_request_partyinfo(int party_id, int char_id)
WFIFOSET(inter_fd,10);
return 0;
}
-// パーティ追加要求
+
+// Request to add a member to party
int intif_party_addmember(int party_id,struct party_member *member)
{
if (CheckForCharServer())
@@ -428,7 +430,8 @@ int intif_party_addmember(int party_id,struct party_member *member)
WFIFOSET(inter_fd,WFIFOW(inter_fd, 2));
return 1;
}
-// パーティ設定変更
+
+// Request to change party configuration (exp,item share)
int intif_party_changeoption(int party_id,int account_id,int exp,int item)
{
if (CheckForCharServer())
@@ -442,7 +445,8 @@ int intif_party_changeoption(int party_id,int account_id,int exp,int item)
WFIFOSET(inter_fd,14);
return 0;
}
-// パーティ脱退要求
+
+// Request to leave party
int intif_party_leave(int party_id,int account_id, int char_id)
{
if (CheckForCharServer())
@@ -455,7 +459,8 @@ int intif_party_leave(int party_id,int account_id, int char_id)
WFIFOSET(inter_fd,14);
return 0;
}
-// パーティ移動要求
+
+// Request keeping party for new map ??
int intif_party_changemap(struct map_session_data *sd,int online)
{
int m, mapindex;
@@ -481,7 +486,8 @@ int intif_party_changemap(struct map_session_data *sd,int online)
WFIFOSET(inter_fd,19);
return 1;
}
-// パーティー解散要求
+
+// Request breaking party
int intif_break_party(int party_id)
{
if (CheckForCharServer())
@@ -492,7 +498,8 @@ int intif_break_party(int party_id)
WFIFOSET(inter_fd,6);
return 0;
}
-// パーティ会話送信
+
+// Sending party chat
int intif_party_message(int party_id,int account_id,const char *mes,int len)
{
if (CheckForCharServer())
@@ -511,6 +518,7 @@ int intif_party_message(int party_id,int account_id,const char *mes,int len)
return 0;
}
+// Request a new leader for party
int intif_party_leaderchange(int party_id,int account_id,int char_id)
{
if (CheckForCharServer())
@@ -524,8 +532,7 @@ int intif_party_leaderchange(int party_id,int account_id,int char_id)
return 0;
}
-
-// ギルド作成要求
+// Request a Guild creation
int intif_guild_create(const char *name,const struct guild_member *master)
{
if (CheckForCharServer())
@@ -541,7 +548,8 @@ int intif_guild_create(const char *name,const struct guild_member *master)
WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
return 0;
}
-// ギルド情報要求
+
+// Request Guild information
int intif_guild_request_info(int guild_id)
{
if (CheckForCharServer())
@@ -552,7 +560,8 @@ int intif_guild_request_info(int guild_id)
WFIFOSET(inter_fd,6);
return 0;
}
-// ギルドメンバ追加要求
+
+// Request to add member to the guild
int intif_guild_addmember(int guild_id,struct guild_member *m)
{
if (CheckForCharServer())
@@ -566,6 +575,7 @@ int intif_guild_addmember(int guild_id,struct guild_member *m)
return 0;
}
+// Request a new leader for guild
int intif_guild_change_gm(int guild_id, const char* name, int len)
{
if (CheckForCharServer())
@@ -579,7 +589,7 @@ int intif_guild_change_gm(int guild_id, const char* name, int len)
return 0;
}
-// ギルドメンバ脱退/追放要求
+// Request to leave guild
int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const char *mes)
{
if (CheckForCharServer())
@@ -594,7 +604,8 @@ int intif_guild_leave(int guild_id,int account_id,int char_id,int flag,const cha
WFIFOSET(inter_fd,55);
return 0;
}
-// ギルドメンバのオンライン状況/Lv更新要求
+
+//Update request / Lv online status of the guild members
int intif_guild_memberinfoshort(int guild_id,int account_id,int char_id,int online,int lv,int class_)
{
if (CheckForCharServer())
@@ -610,7 +621,8 @@ int intif_guild_memberinfoshort(int guild_id,int account_id,int char_id,int onli
WFIFOSET(inter_fd,19);
return 0;
}
-// ギルド解散通知
+
+//Guild disbanded notification
int intif_guild_break(int guild_id)
{
if (CheckForCharServer())
@@ -621,7 +633,8 @@ int intif_guild_break(int guild_id)
WFIFOSET(inter_fd,6);
return 0;
}
-// ギルド会話送信
+
+// Send a guild message
int intif_guild_message(int guild_id,int account_id,const char *mes,int len)
{
if (CheckForCharServer())
@@ -640,7 +653,8 @@ int intif_guild_message(int guild_id,int account_id,const char *mes,int len)
return 0;
}
-// ギルド基本情報変更要求
+
+// Request a change of Guild basic information
int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len)
{
if (CheckForCharServer())
@@ -654,7 +668,8 @@ int intif_guild_change_basicinfo(int guild_id,int type,const void *data,int len)
WFIFOSET(inter_fd,len+10);
return 0;
}
-// ギルドメンバ情報変更要求
+
+// Request a change of Guild member information
int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id,
int type,const void *data,int len)
{
@@ -671,7 +686,8 @@ int intif_guild_change_memberinfo(int guild_id,int account_id,int char_id,
WFIFOSET(inter_fd,len+18);
return 0;
}
-// ギルド役職変更要求
+
+// Request a change of Guild title
int intif_guild_position(int guild_id,int idx,struct guild_position *p)
{
if (CheckForCharServer())
@@ -685,7 +701,8 @@ int intif_guild_position(int guild_id,int idx,struct guild_position *p)
WFIFOSET(inter_fd,WFIFOW(inter_fd,2));
return 0;
}
-// ギルドスキルアップ要求
+
+// Request an update of Guildskill skillnum
int intif_guild_skillup(int guild_id, int skill_num, int account_id, int max)
{
if( CheckForCharServer() )
@@ -699,7 +716,8 @@ int intif_guild_skillup(int guild_id, int skill_num, int account_id, int max)
WFIFOSET(inter_fd, 18);
return 0;
}
-// ギルド同盟/敵対要求
+
+// Request a new guild relationship
int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account_id2,int flag)
{
if (CheckForCharServer())
@@ -714,7 +732,8 @@ int intif_guild_alliance(int guild_id1,int guild_id2,int account_id1,int account
WFIFOSET(inter_fd,19);
return 0;
}
-// ギルド告知変更要求
+
+// Request to change guild notice
int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
{
if (CheckForCharServer())
@@ -727,7 +746,8 @@ int intif_guild_notice(int guild_id,const char *mes1,const char *mes2)
WFIFOSET(inter_fd,186);
return 0;
}
-// ギルドエンブレム変更要求
+
+// Request to change guild emblem
int intif_guild_emblem(int guild_id,int len,const char *data)
{
if (CheckForCharServer())
@@ -761,7 +781,8 @@ int intif_guild_castle_dataload(int num, int *castle_ids)
return 1;
}
-//ギルド城占領ギルド変更要求
+
+// Request change castle guild owner and save data
int intif_guild_castle_datasave(int castle_id,int index, int value)
{
if (CheckForCharServer())
@@ -868,7 +889,7 @@ int intif_parse_WisMessage(int fd)
}
//Success to send whisper.
clif_wis_message(sd->fd, wisp_source, (char*)RFIFOP(fd,56),RFIFOW(fd,2)-56);
- intif_wis_replay(id,0); // 送信成功
+ intif_wis_replay(id,0); // succes
return 0;
}
@@ -925,7 +946,7 @@ int mapif_parse_WisToGM(int fd)
return 0;
}
-// アカウント変数通知
+// Request player registre
int intif_parse_Registers(int fd)
{
int j,p,len,max, flag;
@@ -1017,13 +1038,15 @@ int intif_parse_LoadGuildStorage(int fd)
storage_guild_storageopen(sd);
return 0;
}
+
+// ACK guild_storage saved
int intif_parse_SaveGuildStorage(int fd)
{
storage_guild_storagesaved(/*RFIFOL(fd,2), */RFIFOL(fd,6));
return 0;
}
-// パーティ作成可否
+// ACK party creation
int intif_parse_PartyCreated(int fd)
{
if(battle_config.etc_log)
@@ -1031,7 +1054,8 @@ int intif_parse_PartyCreated(int fd)
party_created(RFIFOL(fd,2), RFIFOL(fd,6),RFIFOB(fd,10),RFIFOL(fd,11), (char *)RFIFOP(fd,15));
return 0;
}
-// パーティ情報
+
+// Receive party info
int intif_parse_PartyInfo(int fd)
{
if( RFIFOW(fd,2) == 12 ){
@@ -1045,7 +1069,8 @@ int intif_parse_PartyInfo(int fd)
party_recv_info((struct party *)RFIFOP(fd,8), RFIFOL(fd,4));
return 0;
}
-// パーティ追加通知
+
+// ACK adding party member
int intif_parse_PartyMemberAdded(int fd)
{
if(battle_config.etc_log)
@@ -1053,13 +1078,15 @@ int intif_parse_PartyMemberAdded(int fd)
party_member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10), RFIFOB(fd, 14));
return 0;
}
-// パーティ設定変更通知
+
+// ACK changing party option
int intif_parse_PartyOptionChanged(int fd)
{
party_optionchanged(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOW(fd,10),RFIFOW(fd,12),RFIFOB(fd,14));
return 0;
}
-// パーティ脱退通知
+
+// ACK member leaving party
int intif_parse_PartyMemberWithdraw(int fd)
{
if(battle_config.etc_log)
@@ -1067,32 +1094,36 @@ int intif_parse_PartyMemberWithdraw(int fd)
party_member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
return 0;
}
-// パーティ解散通知
+
+// ACK party break
int intif_parse_PartyBroken(int fd)
{
party_broken(RFIFOL(fd,2));
return 0;
}
-// パーティ移動通知
+
+// ACK party on new map
int intif_parse_PartyMove(int fd)
{
party_recv_movemap(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOW(fd,14),RFIFOB(fd,16),RFIFOW(fd,17));
return 0;
}
-// パーティメッセージ
+
+// ACK party messages
int intif_parse_PartyMessage(int fd)
{
party_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
return 0;
}
-// ギルド作成可否
+// ACK guild creation
int intif_parse_GuildCreated(int fd)
{
guild_created(RFIFOL(fd,2),RFIFOL(fd,6));
return 0;
}
-// ギルド情報
+
+// ACK guild infos
int intif_parse_GuildInfo(int fd)
{
if(RFIFOW(fd,2) == 8) {
@@ -1105,7 +1136,8 @@ int intif_parse_GuildInfo(int fd)
guild_recv_info((struct guild *)RFIFOP(fd,4));
return 0;
}
-// ギルドメンバ追加通知
+
+// ACK adding guild member
int intif_parse_GuildMemberAdded(int fd)
{
if(battle_config.etc_log)
@@ -1113,20 +1145,22 @@ int intif_parse_GuildMemberAdded(int fd)
guild_member_added(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14));
return 0;
}
-// ギルドメンバ脱退/追放通知
+
+// ACK member leaving guild
int intif_parse_GuildMemberWithdraw(int fd)
{
guild_member_withdraw(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),(char *)RFIFOP(fd,55),(char *)RFIFOP(fd,15));
return 0;
}
-// ギルドメンバオンライン状態/Lv変更通知
+// ACK guild member basic info
int intif_parse_GuildMemberInfoShort(int fd)
{
guild_recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17));
return 0;
}
-// ギルド解散通知
+
+// ACK guild break
int intif_parse_GuildBroken(int fd)
{
guild_broken(RFIFOL(fd,2),RFIFOB(fd,6));
@@ -1189,7 +1223,7 @@ int intif_parse_GuildMemberInfoChanged(int fd)
return 0;
}
-// ギルド役職変更通知
+// ACK change of guild title
int intif_parse_GuildPosition(int fd)
{
if( RFIFOW(fd,2)!=sizeof(struct guild_position)+12 )
@@ -1197,54 +1231,62 @@ int intif_parse_GuildPosition(int fd)
guild_position_changed(RFIFOL(fd,4),RFIFOL(fd,8),(struct guild_position *)RFIFOP(fd,12));
return 0;
}
-// ギルドスキル割り振り通知
+
+// ACK change of guild skill update
int intif_parse_GuildSkillUp(int fd)
{
guild_skillupack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
return 0;
}
-// ギルド同盟/敵対通知
+
+// ACK change of guild relationship
int intif_parse_GuildAlliance(int fd)
{
guild_allianceack(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOL(fd,14),RFIFOB(fd,18),(char *) RFIFOP(fd,19),(char *) RFIFOP(fd,43));
return 0;
}
-// ギルド告知変更通知
+
+// ACK change of guild notice
int intif_parse_GuildNotice(int fd)
{
guild_notice_changed(RFIFOL(fd,2),(char *) RFIFOP(fd,6),(char *) RFIFOP(fd,66));
return 0;
}
-// ギルドエンブレム変更通知
+
+// ACK change of guild emblem
int intif_parse_GuildEmblem(int fd)
{
guild_emblem_changed(RFIFOW(fd,2)-12,RFIFOL(fd,4),RFIFOL(fd,8), (char *)RFIFOP(fd,12));
return 0;
}
-// ギルド会話受信
+
+// ACK guild message
int intif_parse_GuildMessage(int fd)
{
guild_recv_message(RFIFOL(fd,4),RFIFOL(fd,8),(char *) RFIFOP(fd,12),RFIFOW(fd,2)-12);
return 0;
}
-// ギルド城データ要求返信
+
+// Reply guild castle data request
int intif_parse_GuildCastleDataLoad(int fd)
{
return guild_castledataloadack(RFIFOW(fd,2), (struct guild_castle *)RFIFOP(fd,4));
}
+// ACK change of guildmaster
int intif_parse_GuildMasterChanged(int fd)
{
return guild_gm_changed(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10));
}
-// pet
+// Request pet creation
int intif_parse_CreatePet(int fd)
{
pet_get_egg(RFIFOL(fd,2),RFIFOL(fd,7),RFIFOB(fd,6));
return 0;
}
+// ACK pet data
int intif_parse_RecvPetData(int fd)
{
struct s_pet p;
@@ -1261,6 +1303,8 @@ int intif_parse_RecvPetData(int fd)
return 0;
}
+
+// ACK pet save data
int intif_parse_SavePetOk(int fd)
{
if(RFIFOB(fd,6) == 1)
@@ -1269,6 +1313,7 @@ int intif_parse_SavePetOk(int fd)
return 0;
}
+// ACK deleting pet
int intif_parse_DeletePetOk(int fd)
{
if(RFIFOB(fd,2) == 1)
@@ -1277,6 +1322,7 @@ int intif_parse_DeletePetOk(int fd)
return 0;
}
+// ACK changing name resquest, players,pets,hommon
int intif_parse_ChangeNameOk(int fd)
{
struct map_session_data *sd = NULL;
@@ -2112,19 +2158,19 @@ void intif_parse_MessageToFD(int fd) {
}
//-----------------------------------------------------------------
-// inter serverからの通信
-// エラーがあれば0(false)を返すこと
-// パケットが処理できれば1,パケット長が足りなければ2を返すこと
+// Communication from the inter server
+// Return a 0 (false) if there were any errors.
+// 1, 2 if there are not enough to return the length of the packet if the packet processing
int intif_parse(int fd)
{
int packet_len, cmd;
cmd = RFIFOW(fd,0);
- // パケットのID確認
+ // Verify ID of the packet
if(cmd<0x3800 || cmd>=0x3800+(sizeof(packet_len_table)/sizeof(packet_len_table[0])) ||
packet_len_table[cmd-0x3800]==0){
return 0;
}
- // パケットの長さ確認
+ // Check the length of the packet
packet_len = packet_len_table[cmd-0x3800];
if(packet_len==-1){
if(RFIFOREST(fd)<4)
@@ -2134,7 +2180,7 @@ int intif_parse(int fd)
if((int)RFIFOREST(fd)<packet_len){
return 2;
}
- // 処理分岐
+ // Processing branch
switch(cmd){
case 0x3800:
if (RFIFOL(fd,4) == 0xFF000000) //Normal announce.
@@ -2217,7 +2263,7 @@ int intif_parse(int fd)
ShowError("intif_parse : unknown packet %d %x\n",fd,RFIFOW(fd,0));
return 0;
}
- // パケット読み飛ばし
+ // Skip packet
RFIFOSKIP(fd,packet_len);
return 1;
}
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index db571ed97..5869f0533 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -25,7 +25,7 @@ static struct item_group itemgroup_db[MAX_ITEMGROUP];
struct item_data dummy_item; //This is the default dummy item used for non-existant items. [Skotlex]
/**
- * 名前で検索用
+ * Search for item name
* name = item alias, so we should find items aliases first. if not found then look for "jname" (full name)
* @see DBApply
*/
@@ -51,7 +51,7 @@ static int itemdb_searchname_sub(DBKey key, DBData *data, va_list ap)
}
/*==========================================
- * 名前で検索
+ * Return item data from item name. (lookup)
*------------------------------------------*/
struct item_data* itemdb_searchname(const char *str)
{
@@ -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)
*------------------------------------------*/
int itemdb_searchrandomid(int group)
{
@@ -480,7 +480,8 @@ int itemdb_isidentified(int nameid)
}
/*==========================================
- * アイテム使用可能フラグのオーバーライド
+ * Search by name for the override flags available items
+ * (Give item another sprite)
*------------------------------------------*/
static bool itemdb_read_itemavail(char* str[], int columns, int current)
{// <nameid>,<sprite>
@@ -585,7 +586,7 @@ static void itemdb_read_itemgroup(void)
}
/*==========================================
- * 装備制限ファイル読み出し
+ * Read item forbiden by mapflag (can't equip item)
*------------------------------------------*/
static bool itemdb_read_noequip(char* str[], int columns, int current)
{// <nameid>,<mode>
@@ -1075,7 +1076,8 @@ static bool itemdb_parse_dbrow(char** str, const char* source, int line, int scr
}
/*==========================================
- * アイテムデータベースの読み込み
+ * Reading item from item db
+ * item_db2 overwriting item_db
*------------------------------------------*/
static int itemdb_readdb(void)
{
diff --git a/src/map/map.c b/src/map/map.c
index df2e8765f..76bb95021 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -93,7 +93,7 @@ char *SCRIPT_CONF_NAME;
char *MSG_CONF_NAME;
char *GRF_PATH_FILENAME;
-// 極力 staticでロ?カルに?める
+// DBMap declaartion
static DBMap* id_db=NULL; // int id -> struct block_list*
static DBMap* pc_db=NULL; // int id -> struct map_session_data*
static DBMap* mobid_db=NULL; // int id -> struct mob_data*
@@ -183,12 +183,11 @@ int map_usercount(void)
}
//
-// block削除の安全性確保?理
+// blockソス除ソスフ茨ソスソスSソスソスソスmソスソス?ソスソス
//
/*==========================================
- * blockをfreeするときfreeの?わりに呼ぶ
- * ロックされているときはバッファにためる
+ * Attempt to free a map blocklist
*------------------------------------------*/
int map_freeblock (struct block_list *bl)
{
@@ -205,7 +204,7 @@ int map_freeblock (struct block_list *bl)
return block_free_lock;
}
/*==========================================
- * blockのfreeを一市Iに禁止する
+ * blockソスソスfreeソスソスソスソスsIソスノ禁止ソスソスソスソス
*------------------------------------------*/
int map_freeblock_lock (void)
{
@@ -213,9 +212,9 @@ int map_freeblock_lock (void)
}
/*==========================================
- * blockのfreeのロックを解除する
- * このとき、ロックが完全になくなると
- * バッファにたまっていたblockを全部削除
+ * blockソスソスfreeソスフソスソスbソスNソスソスソスソスソスソスソスソスソスソス
+ * ソスソスソスフとゑソスソスAソスソスソスbソスNソスソスソスソスソスSソスノなゑソスソスネゑソスソス
+ * ソスoソスbソスtソス@ソスノゑソスソスワゑソスソストゑソスソスソスblockソスソスSソスソスソス除
*------------------------------------------*/
int map_freeblock_unlock (void)
{
@@ -235,10 +234,10 @@ int map_freeblock_unlock (void)
return block_free_lock;
}
-// map_freeblock_lock() を呼んで map_freeblock_unlock() を呼ばない
-// 関数があったので、定期的にblock_free_lockをリセットするようにする。
-// この関数は、do_timer() のトップレベルから呼ばれるので、
-// block_free_lock を直接いじっても支障無いはず。
+// map_freeblock_lock() ソスソスソストゑソスソス map_freeblock_unlock() ソスソスソストばなゑソス
+// ソスヨ撰ソスソスソスソスソスソスソスソスソスソスフで、ソスソスソスIソスソスblock_free_lockソスソスソスソスソスZソスbソスgソスソスソスソス謔、ソスノゑソスソスソスB
+// ソスソスソスフ関撰ソスソスヘ、do_timer() ソスフトソスbソスvソスソスソスxソスソスソスソスソスソストばゑソスソスフで、
+// block_free_lock ソス直接ゑソスソスソスソスソスソストゑソスソスxソス癘ウソスソスソスヘゑソスソスB
int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -252,11 +251,11 @@ int map_freeblock_timer(int tid, unsigned int tick, int id, intptr_t data)
}
//
-// block化?理
+// blockソスソス?ソスソス
//
/*==========================================
- * map[]のblock_listから?がっている場合に
- * bl->prevにbl_headのアドレスを入れておく
+ * map[]ソスソスblock_listソスソスソスソス?ソスソスソスソスソストゑソスソスソス鼾ソスソス
+ * bl->prevソスソスbl_headソスフアソスhソスソスソスXソスソスソスソストゑソスソスソス
*------------------------------------------*/
static struct block_list bl_head;
@@ -339,10 +338,10 @@ int map_delblock(struct block_list* bl)
int pos;
nullpo_ret(bl);
- // ?にblocklistから?けている
+ // blocklist (2ways chainlist)
if (bl->prev == NULL) {
if (bl->next != NULL) {
- // prevがNULLでnextがNULLでないのは有ってはならない
+ // prevソスソスNULLソスソスnextソスソスNULLソスナなゑソスソスフは有ソスソスソストはなゑソスネゑソス
ShowError("map_delblock error : bl->next!=NULL\n");
}
return 0;
@@ -357,7 +356,7 @@ int map_delblock(struct block_list* bl)
if (bl->next)
bl->next->prev = bl->prev;
if (bl->prev == &bl_head) {
- // リストの頭なので、map[]のblock_listを更新する
+ // ソスソスソスXソスgソスフ難ソスソスネので、map[]ソスソスblock_listソスソスソスXソスVソスソスソスソス
if (bl->type == BL_MOB) {
map[bl->m].block_mob[pos] = bl->next;
} else {
@@ -589,10 +588,10 @@ int map_foreachinrange(int (*func)(struct block_list*,va_list), struct block_lis
if(bl_list_count>=BL_LIST_MAX)
ShowWarning("map_foreachinrange: block count too many!\n");
- map_freeblock_lock(); // メモリからの解放を禁止する
+ map_freeblock_lock(); // ソスソスソスソスソスソスソスソスソスソスフ会ソスソスソスソスヨ止ソスソスソスソス
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // 有?かどうかチェック
+ if(bl_list[i]->prev) // ソスL?ソスソスソスヌゑソスソスソスソス`ソスFソスbソスN
{
va_list ap;
va_start(ap, type);
@@ -600,7 +599,7 @@ int map_foreachinrange(int (*func)(struct block_list*,va_list), struct block_lis
va_end(ap);
}
- map_freeblock_unlock(); // 解放を許可する
+ map_freeblock_unlock(); // ソスソスソスソスソスソスソスツゑソスソスソス
bl_list_count = blockcount;
return returnCount; //[Skotlex]
@@ -661,10 +660,10 @@ int map_foreachinshootrange(int (*func)(struct block_list*,va_list),struct block
if(bl_list_count>=BL_LIST_MAX)
ShowWarning("map_foreachinrange: block count too many!\n");
- map_freeblock_lock(); // メモリからの解放を禁止する
+ map_freeblock_lock(); // ソスソスソスソスソスソスソスソスソスソスフ会ソスソスソスソスヨ止ソスソスソスソス
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // 有?かどうかチェック
+ if(bl_list[i]->prev) // ソスL?ソスソスソスヌゑソスソスソスソス`ソスFソスbソスN
{
va_list ap;
va_start(ap, type);
@@ -672,16 +671,16 @@ int map_foreachinshootrange(int (*func)(struct block_list*,va_list),struct block
va_end(ap);
}
- map_freeblock_unlock(); // 解放を許可する
+ map_freeblock_unlock(); // ソスソスソスソスソスソスソスツゑソスソスソス
bl_list_count = blockcount;
return returnCount; //[Skotlex]
}
/*==========================================
- * map m (x0,y0)-(x1,y1)?の全objに?して
- * funcを呼ぶ
- * type!=0 ならその種類のみ
+ * map m (x0,y0)-(x1,y1)?ソスフ全objソスソス?ソスソスソスソス
+ * funcソスソスソストゑソス
+ * type!=0 ソスネらそソスフ趣ソズのゑソス
*------------------------------------------*/
int map_foreachinarea(int (*func)(struct block_list*,va_list), int m, int x0, int y0, int x1, int y1, int type, ...)
{
@@ -726,10 +725,10 @@ int map_foreachinarea(int (*func)(struct block_list*,va_list), int m, int x0, in
if(bl_list_count>=BL_LIST_MAX)
ShowWarning("map_foreachinarea: block count too many!\n");
- map_freeblock_lock(); // メモリからの解放を禁止する
+ map_freeblock_lock(); // ソスソスソスソスソスソスソスソスソスソスフ会ソスソスソスソスヨ止ソスソスソスソス
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // 有?かどうかチェック
+ if(bl_list[i]->prev) // ソスL?ソスソスソスヌゑソスソスソスソス`ソスFソスbソスN
{
va_list ap;
va_start(ap, type);
@@ -737,7 +736,7 @@ int map_foreachinarea(int (*func)(struct block_list*,va_list), int m, int x0, in
va_end(ap);
}
- map_freeblock_unlock(); // 解放を許可する
+ map_freeblock_unlock(); // ソスソスソスソスソスソスソスツゑソスソスソス
bl_list_count = blockcount;
return returnCount; //[Skotlex]
@@ -792,10 +791,10 @@ int map_forcountinrange(int (*func)(struct block_list*,va_list), struct block_li
if(bl_list_count>=BL_LIST_MAX)
ShowWarning("map_forcountinrange: block count too many!\n");
- map_freeblock_lock(); // メモリからの解放を禁止する
+ map_freeblock_lock(); // ソスソスソスソスソスソスソスソスソスソスフ会ソスソスソスソスヨ止ソスソスソスソス
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // 有?かどうかチェック
+ if(bl_list[i]->prev) // ソスL?ソスソスソスヌゑソスソスソスソス`ソスFソスbソスN
{
va_list ap;
va_start(ap, type);
@@ -805,7 +804,7 @@ int map_forcountinrange(int (*func)(struct block_list*,va_list), struct block_li
break;
}
- map_freeblock_unlock(); // 解放を許可する
+ map_freeblock_unlock(); // ソスソスソスソスソスソスソスツゑソスソスソス
bl_list_count = blockcount;
return returnCount; //[Skotlex]
@@ -853,10 +852,10 @@ int map_forcountinarea(int (*func)(struct block_list*,va_list), int m, int x0, i
if(bl_list_count>=BL_LIST_MAX)
ShowWarning("map_foreachinarea: block count too many!\n");
- map_freeblock_lock(); // メモリからの解放を禁止する
+ map_freeblock_lock(); // ソスソスソスソスソスソスソスソスソスソスフ会ソスソスソスソスヨ止ソスソスソスソス
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // 有?かどうかチェック
+ if(bl_list[i]->prev) // ソスL?ソスソスソスヌゑソスソスソスソス`ソスFソスbソスN
{
va_list ap;
va_start(ap, type);
@@ -866,18 +865,18 @@ int map_forcountinarea(int (*func)(struct block_list*,va_list), int m, int x0, i
break;
}
- map_freeblock_unlock(); // 解放を許可する
+ map_freeblock_unlock(); // ソスソスソスソスソスソスソスツゑソスソスソス
bl_list_count = blockcount;
return returnCount; //[Skotlex]
}
/*==========================================
- * 矩形(x0,y0)-(x1,y1)が(dx,dy)移動した暫?
- * 領域外になる領域(矩形かL字形)?のobjに
- * ?してfuncを呼ぶ
+ * ソスソス`(x0,y0)-(x1,y1)ソスソス(dx,dy)ソスレ難ソスソスソスソスソスソスb?
+ * ソスフ茨ソスOソスノなゑソスフ茨ソス(ソスソス`ソスソスLソスソスソス`)?ソスソスobjソスソス
+ * ?ソスソスソスソスfuncソスソスソストゑソス
*
- * dx,dyは-1,0,1のみとする(どんな値でもいいっぽい?)
+ * dx,dyソスソス-1,0,1ソスフみとゑソスソスソスiソスヌゑソスネ値ソスナゑソスソスソスソスソスソスソスソスロゑソスソスHソスj
*------------------------------------------*/
int map_foreachinmovearea(int (*func)(struct block_list*,va_list), struct block_list* center, int range, int dx, int dy, int type, ...)
{
@@ -991,7 +990,7 @@ int map_foreachinmovearea(int (*func)(struct block_list*,va_list), struct block_
if(bl_list_count>=BL_LIST_MAX)
ShowWarning("map_foreachinmovearea: block count too many!\n");
- map_freeblock_lock(); // メモリからの解放を禁止する
+ map_freeblock_lock(); // Prohibit the release from memory
for(i=blockcount;i<bl_list_count;i++)
if(bl_list[i]->prev)
@@ -1002,7 +1001,7 @@ int map_foreachinmovearea(int (*func)(struct block_list*,va_list), struct block_
va_end(ap);
}
- map_freeblock_unlock(); // 解放を許可する
+ map_freeblock_unlock(); // Allow Free
bl_list_count = blockcount;
return returnCount;
@@ -1037,10 +1036,10 @@ int map_foreachincell(int (*func)(struct block_list*,va_list), int m, int x, int
if(bl_list_count>=BL_LIST_MAX)
ShowWarning("map_foreachincell: block count too many!\n");
- map_freeblock_lock(); // メモリからの解放を禁止する
+ map_freeblock_lock(); // ソスソスソスソスソスソスソスソスソスソスフ会ソスソスソスソスヨ止ソスソスソスソス
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // 有?かどうかチェック
+ if(bl_list[i]->prev) // ソスL?ソスソスソスヌゑソスソスソスソス`ソスFソスbソスN
{
va_list ap;
va_start(ap, type);
@@ -1048,7 +1047,7 @@ int map_foreachincell(int (*func)(struct block_list*,va_list), int m, int x, int
va_end(ap);
}
- map_freeblock_unlock(); // 解放を許可する
+ map_freeblock_unlock(); // ソスソスソスソスソスソスソスツゑソスソスソス
bl_list_count = blockcount;
return returnCount;
@@ -1274,10 +1273,10 @@ int map_foreachinmap(int (*func)(struct block_list*,va_list), int m, int type,..
if(bl_list_count>=BL_LIST_MAX)
ShowWarning("map_foreachinmap: block count too many!\n");
- map_freeblock_lock(); // メモリからの解放を禁止する
+ map_freeblock_lock(); // ソスソスソスソスソスソスソスソスソスソスフ会ソスソスソスソスヨ止ソスソスソスソス
for(i=blockcount;i<bl_list_count;i++)
- if(bl_list[i]->prev) // 有?かどうかチェック
+ if(bl_list[i]->prev) // ソスL?ソスソスソスヌゑソスソスソスソス`ソスFソスbソスN
{
va_list ap;
va_start(ap, type);
@@ -1285,7 +1284,7 @@ int map_foreachinmap(int (*func)(struct block_list*,va_list), int m, int type,..
va_end(ap);
}
- map_freeblock_unlock(); // 解放を許可する
+ map_freeblock_unlock(); // ソスソスソスソスソスソスソスツゑソスソスソス
bl_list_count = blockcount;
return returnCount;
@@ -1324,12 +1323,12 @@ int map_get_new_object_id(void)
}
/*==========================================
- * 床アイテムを消す
+ * ソスソスソスAソスCソスeソスソスソスソスソスソスソスソス
*
- * data==0の暫ヘtimerで消えた殊 * data!=0の暫ヘ拾う等で消えた暫ニして動?
+ * data==0ソスフ暫ソスtimerソスナ擾ソスソスソスソスソスソスソス * data!=0ソスフ暫ヘ拾ソスソスソスソスソスナ擾ソスソスソスソスソスソスbニゑソスソスト難ソス??
*
- * 後者は、map_clearflooritem(id)へ
- * map.h?で#defineしてある
+ * ソスソスメは、map_clearflooritem(id)ソスソス
+ * map.h?ソスソス#defineソスソスソストゑソスソスソス
*------------------------------------------*/
int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -1469,10 +1468,13 @@ int map_search_freecell(struct block_list *src, int m, short *x,short *y, int rx
}
/*==========================================
- * (m,x,y)を中心に3x3以?に床アイテム設置
- *
- * item_dataはamount以外をcopyする
- * type flag: &1 MVP item. &2 do stacking check.
+ * Add an item to location (m,x,y)
+ * Parameters
+ * @item_data item attributes
+ * @amount quantity
+ * @m, @x, @y mapid,x,y
+ * @first_charid, @second_charid, @third_charid, looting priority
+ * @flag: &1 MVP item. &2 do stacking check.
*------------------------------------------*/
int map_addflooritem(struct item *item_data,int amount,int m,int x,int y,int first_charid,int second_charid,int third_charid,int flags)
{
@@ -1608,7 +1610,7 @@ void map_reqnickdb(struct map_session_data * sd, int charid)
}
/*==========================================
- * id_dbへblを追加
+ * id_dbソスソスblソスソスヌ会ソス
*------------------------------------------*/
void map_addiddb(struct block_list *bl)
{
@@ -1636,7 +1638,7 @@ void map_addiddb(struct block_list *bl)
}
/*==========================================
- * id_dbからblを削除
+ * id_dbソスソスソスソスblソスソスソス除
*------------------------------------------*/
void map_deliddb(struct block_list *bl)
{
@@ -1779,7 +1781,7 @@ int map_quit(struct map_session_data *sd) {
}
/*==========================================
- * id番?のPCを探す。居なければNULL
+ * idソスソス?ソスソスPCソスソスTソスソスソスBソスソスソスネゑソスソスソスソスNULL
*------------------------------------------*/
struct map_session_data * map_id2sd(int id)
{
@@ -2200,7 +2202,7 @@ bool mapit_exists(struct s_mapiterator* mapit)
}
/*==========================================
- * map.npcへ追加 (warp等の領域持ちのみ)
+ * map.npcソスヨ追会ソス (warpソスソスソスフ領域持ソスソスソスフゑソス)
*------------------------------------------*/
bool map_addnpc(int m,struct npc_data *nd)
{
@@ -2323,7 +2325,7 @@ void map_removemobs(int m)
}
/*==========================================
- * map名からmap番?へ?換
+ * mapソスソスソスソスソスソスmapソスソス?ソスソス?ソスソス
*------------------------------------------*/
int map_mapname2mapid(const char* name)
{
@@ -2351,7 +2353,7 @@ int map_mapindex2mapid(unsigned short mapindex)
}
/*==========================================
- * 他鯖map名からip,port?換
+ * ソスソスソスImapソスソスソスソスソスソスip,port?ソスソス
*------------------------------------------*/
int map_mapname2ipport(unsigned short name, uint32* ip, uint16* port)
{
@@ -2463,7 +2465,7 @@ int map_random_dir(struct block_list *bl, short *x, short *y)
return 0;
}
-// gat系
+// gatソスn
inline static struct mapcell map_gat2cell(int gat) {
struct mapcell cell;
@@ -2497,7 +2499,7 @@ static int map_cell2gat(struct mapcell cell)
}
/*==========================================
- * (m,x,y)の状態を調べる
+ * Confirm if celltype in (m,x,y) match the one given in cellchk
*------------------------------------------*/
int map_getcell(int m,int x,int y,cell_chk cellchk)
{
@@ -2751,7 +2753,7 @@ static DBData create_map_data_other_server(DBKey key, va_list args)
}
/*==========================================
- * 他鯖管理のマップをdbに追加
+ * ソスソスソスIソスヌ暦ソスソスフマソスbソスvソスソスdbソスノ追会ソス
*------------------------------------------*/
int map_setipport(unsigned short mapindex, uint32 ip, uint16 port)
{
@@ -2772,7 +2774,7 @@ int map_setipport(unsigned short mapindex, uint32 ip, uint16 port)
}
/**
- * 他鯖管理のマップを全て削除
+ * ソスソスソスIソスヌ暦ソスソスフマソスbソスvソスソスSソスト削除
* @see DBApply
*/
int map_eraseallipport_sub(DBKey key, DBData *data, va_list va)
@@ -2792,7 +2794,7 @@ int map_eraseallipport(void)
}
/*==========================================
- * 他鯖管理のマップをdbから削除
+ * ソスソスソスIソスヌ暦ソスソスフマソスbソスvソスソスdbソスソスソスソス除
*------------------------------------------*/
int map_eraseipport(unsigned short mapindex, uint32 ip, uint16 port)
{
@@ -3235,7 +3237,7 @@ int parse_console(const char* buf)
}
/*==========================================
- * 設定ファイルを?み?む
+ * ソスン抵ソスtソス@ソスCソスソスソスソス?ソスソス?ソスソス
*------------------------------------------*/
int map_config_read(char *cfgName)
{
@@ -3599,7 +3601,7 @@ static int cleanup_db_sub(DBKey key, DBData *data, va_list va)
}
/*==========================================
- * map鯖終了・理
+ * mapソスIソスIソスソスソスEソスソス
*------------------------------------------*/
void do_final(void)
{
@@ -3978,7 +3980,7 @@ int do_init(int argc, char *argv[])
do_init_battleground();
do_init_duel();
- npc_event_do_oninit(); // npcのOnInitイベント?行
+ npc_event_do_oninit(); // Init npcs (OnInit)
if( console )
{
diff --git a/src/map/map.h b/src/map/map.h
index 118808713..423f5d501 100644
--- a/src/map/map.h
+++ b/src/map/map.h
@@ -610,15 +610,16 @@ extern char charhelp_txt[];
extern char wisp_server_name[];
-// 鯖全体情報
+// users
void map_setusers(int);
int map_getusers(void);
int map_usercount(void);
-// block削除関連
+
+// blocklist lock
int map_freeblock(struct block_list *bl);
int map_freeblock_lock(void);
int map_freeblock_unlock(void);
-// block関連
+// blocklist manipulation
int map_addblock(struct block_list* bl);
int map_delblock(struct block_list* bl);
int map_moveblock(struct block_list *, int, int, unsigned int);
@@ -631,10 +632,10 @@ int map_foreachinmovearea(int (*func)(struct block_list*,va_list), struct block_
int map_foreachincell(int (*func)(struct block_list*,va_list), int m, int x, int y, int type, ...);
int map_foreachinpath(int (*func)(struct block_list*,va_list), int m, int x0, int y0, int x1, int y1, int range, int length, int type, ...);
int map_foreachinmap(int (*func)(struct block_list*,va_list), int m, int type, ...);
-//block関連に追加
+//blocklist nb in one cell
int map_count_oncell(int m,int x,int y,int type);
struct skill_unit *map_find_skill_unit_oncell(struct block_list *,int x,int y,int skill_id,struct skill_unit *, int flag);
-// 一時的object関連
+// search and creation
int map_get_new_object_id(void);
int map_search_freecell(struct block_list *src, int m, short *x, short *y, int rx, int ry, int flag);
//
@@ -642,13 +643,13 @@ int map_quit(struct map_session_data *);
// npc
bool map_addnpc(int,struct npc_data *);
-// 床アイテム関連
+// map item
int map_clearflooritem_timer(int tid, unsigned int tick, int id, intptr_t data);
int map_removemobs_timer(int tid, unsigned int tick, int id, intptr_t data);
#define map_clearflooritem(id) map_clearflooritem_timer(0,0,id,1)
int map_addflooritem(struct item *item_data,int amount,int m,int x,int y,int first_charid,int second_charid,int third_charid,int flags);
-// キャラid=>キャラ名 変換関連
+// player to map session
void map_addnickdb(int charid, const char* nick);
void map_delnickdb(int charid, const char* nick);
void map_reqnickdb(struct map_session_data* sd,int charid);
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index b9e42aeae..45e8e04ce 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -371,7 +371,7 @@ int mercenary_killbonus(struct mercenary_data *md)
const enum sc_type scs[] = { SC_MERC_FLEEUP, SC_MERC_ATKUP, SC_MERC_HPUP, SC_MERC_SPUP, SC_MERC_HITUP };
int index = rnd() % ARRAYLENGTH(scs);
- status_change_start(&md->bl, scs[index], 10000, rnd()%5, 0, 0, 0, 600000, 0);
+ sc_start(&md->bl, scs[index], 100, rnd() % 5, 600000);
return 0;
}
diff --git a/src/map/mob.c b/src/map/mob.c
index c7918ce93..4967a0ec3 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -2834,7 +2834,7 @@ int mob_warpslave(struct block_list *bl, int range)
}
/*==========================================
- * 画面内の取り巻きの数計算用(foreachinarea)
+ * Count slave sub, curently chking 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
*------------------------------------------*/
int mob_countslave(struct block_list *bl)
{
@@ -2955,7 +2955,8 @@ int mob_summonslave(struct mob_data *md2,int *value,int amount,int skill_id)
}
/*==========================================
- *MOBskillから該当skillidのskillidxを返す
+ * MOBskill lookup (get skillindex trough skillid)
+ * return -1 if not found
*------------------------------------------*/
int mob_skillid2skillidx(int class_,int skillid)
{
@@ -3965,7 +3966,7 @@ static bool mob_readdb_mobavail(char* str[], int columns, int current)
class_=atoi(str[0]);
- if(mob_db(class_) == mob_dummy) // 値が異常なら処理しない。
+ if(mob_db(class_) == mob_dummy) // invalid class (probably undefined in db)
{
ShowWarning("mob_readdb_mobavail: Unknown mob id %d.\n", class_);
return false;
diff --git a/src/map/npc.c b/src/map/npc.c
index 8ecb7da86..fc8bfe2aa 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -138,9 +138,7 @@ int npc_ontouch2_event(struct map_session_data *sd, struct npc_data *nd)
}
/*==========================================
- * NPCの無効化/有効化
- * npc_enable
- * npc_enable_sub 有効時にOnTouchイベントを実行
+ * sub fonction of npc_enable, Run OnTouch event when enabled
*------------------------------------------*/
int npc_enable_sub(struct block_list *bl, va_list ap)
{
@@ -167,6 +165,9 @@ int npc_enable_sub(struct block_list *bl, va_list ap)
return 0;
}
+/*==========================================
+ * Disable / Enable NPC
+ *------------------------------------------*/
int npc_enable(const char* name, int flag)
{
struct npc_data* nd = npc_name2id(name);
@@ -197,15 +198,15 @@ int npc_enable(const char* name, int flag)
clif_spawn(&nd->bl);
} else
clif_changeoption(&nd->bl);
-
- if( flag&3 && (nd->u.scr.xs >= 0 || nd->u.scr.ys >= 0) )
+
+ if( flag&3 && (nd->u.scr.xs >= 0 || nd->u.scr.ys >= 0) ) //check if player standing on a OnTouchArea
map_foreachinarea( npc_enable_sub, nd->bl.m, nd->bl.x-nd->u.scr.xs, nd->bl.y-nd->u.scr.ys, nd->bl.x+nd->u.scr.xs, nd->bl.y+nd->u.scr.ys, BL_PC, nd );
return 0;
}
/*==========================================
- * NPCを名前で探す
+ * NPC lookup (get npc_data trough npcname)
*------------------------------------------*/
struct npc_data* npc_name2id(const char* name)
{
@@ -240,8 +241,9 @@ int npc_rr_secure_timeout_timer(int tid, unsigned int tick, int id, intptr_t dat
return 0;
}
#endif
+
/*==========================================
- * イベントキューのイベント処理
+ * Dequeue event and add timer for execution (100ms)
*------------------------------------------*/
int npc_event_dequeue(struct map_session_data* sd)
{
@@ -299,7 +301,8 @@ static int npc_event_export(struct npc_data *nd, int i)
int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char* eventname); //[Lance]
/**
- * 全てのNPCのOn*イベント実行
+ * Exec name (NPC events) on player or global
+ * Do on all NPC when called with foreach
* @see DBApply
*/
int npc_event_doall_sub(DBKey key, DBData *data, va_list ap)
@@ -363,11 +366,13 @@ int npc_event_do(const char* name)
return c;
}
+
// runs the specified event (global only)
int npc_event_doall(const char* name)
{
return npc_event_doall_id(name, 0);
}
+
// runs the specified event, with a RID attached (global only)
int npc_event_doall_id(const char* name, int rid)
{
@@ -388,7 +393,8 @@ bool npc_event_isspecial(const char* eventname)
/*==========================================
- * 時計イベント実行
+ * Clock event execution
+ * OnMinute/OnClock/OnHour/OnDay/OnDDHHMM
*------------------------------------------*/
int npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -435,7 +441,7 @@ int npc_event_do_clock(int tid, unsigned int tick, int id, intptr_t data)
}
/*==========================================
- * OnInitイベント実行(&時計イベント開始)
+ * OnInit Event execution (the start of the event and watch)
*------------------------------------------*/
void npc_event_do_oninit(void)
{
@@ -445,7 +451,7 @@ void npc_event_do_oninit(void)
}
/*==========================================
- * タイマーイベント用ラベルの取り込み
+ * Incorporation of the label for the timer event
* called from npc_parse_script
*------------------------------------------*/
int npc_timerevent_export(struct npc_data *nd, int i)
@@ -454,7 +460,7 @@ int npc_timerevent_export(struct npc_data *nd, int i)
char *lname = nd->u.scr.label_list[i].name;
int pos = nd->u.scr.label_list[i].pos;
if (sscanf(lname, "OnTimer%d%n", &t, &k) == 1 && lname[k] == '\0') {
- // タイマーイベント
+ // Timer event
struct npc_timerevent_list *te = nd->u.scr.timer_event;
int j, k = nd->u.scr.timeramount;
if (te == NULL)
@@ -783,7 +789,7 @@ int npc_event_sub(struct map_session_data* sd, struct event_data* ev, const char
}
/*==========================================
- * イベント型のNPC処理
+ * NPC processing event type
*------------------------------------------*/
int npc_event(struct map_session_data* sd, const char* eventname, int ontouch)
{
@@ -813,6 +819,9 @@ int npc_event(struct map_session_data* sd, const char* eventname, int ontouch)
return npc_event_sub(sd,ev,eventname);
}
+/*==========================================
+ * Sub chk then execute area event type
+ *------------------------------------------*/
int npc_touch_areanpc_sub(struct block_list *bl, va_list ap)
{
struct map_session_data *sd;
@@ -835,6 +844,10 @@ int npc_touch_areanpc_sub(struct block_list *bl, va_list ap)
return 1;
}
+/*==========================================
+ * Chk if sd is still touching his assigned npc.
+ * if not then it unsets it and searches for another player in range
+ *------------------------------------------*/
int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap)
{
struct npc_data *nd = map_id2nd(sd->touching_id);
@@ -861,7 +874,7 @@ int npc_touchnext_areanpc(struct map_session_data* sd, bool leavemap)
}
/*==========================================
- * 接触型のNPC処理
+ * Exec OnTouch for player if in range of area event
*------------------------------------------*/
int npc_touch_areanpc(struct map_session_data* sd, int m, int x, int y)
{
@@ -1048,6 +1061,12 @@ int npc_check_areanpc(int flag, int m, int x, int y, int range)
return (map[m].npc[i]->bl.id);
}
+/*==========================================
+ * Chk if player not too far to acces the npc
+ * return
+ * npc_data : succes
+ * NULL : fail
+ *------------------------------------------*/
struct npc_data* npc_checknear(struct map_session_data* sd, struct block_list* bl)
{
struct npc_data *nd;
@@ -1072,7 +1091,7 @@ struct npc_data* npc_checknear(struct map_session_data* sd, struct block_list* b
}
/*==========================================
- * NPCのオープンチャット発言
+ * Make NPC talk in global chat (like npctalk)
*------------------------------------------*/
int npc_globalmessage(const char* name, const char* mes)
{
@@ -1114,7 +1133,8 @@ void run_tomb(struct map_session_data* sd, struct npc_data* nd)
}
/*==========================================
- * クリック時のNPC処理
+ * NPC 1st call when clicking on npc
+ * Do specific action for npc type (openshop, run scripts...)
*------------------------------------------*/
int npc_click(struct map_session_data* sd, struct npc_data* nd)
{
@@ -1194,7 +1214,7 @@ int npc_scriptcont(struct map_session_data* sd, int id)
}
/*==========================================
- *
+ * Chk if valid call then open buy or selling list
*------------------------------------------*/
int npc_buysellsel(struct map_session_data* sd, int id, int type)
{
@@ -1211,7 +1231,7 @@ int npc_buysellsel(struct map_session_data* sd, int id, int type)
sd->npc_id=0;
return 1;
}
- if (nd->sc.option&OPTION_INVISIBLE) // 無効化されている
+ if (nd->sc.option & OPTION_INVISIBLE) // can't buy if npc is not visible (hack?)
return 1;
if( nd->class_ < 0 && !sd->state.callshop )
{// not called through a script and is not a visible NPC so an invalid call
@@ -1310,6 +1330,7 @@ int npc_cashshop_buylist(struct map_session_data *sd, int points, int count, uns
return 0;
}
+
//npc_buylist for script-controlled shops.
static int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* item_list, struct npc_data* nd)
{
@@ -1335,6 +1356,7 @@ static int npc_buylist_sub(struct map_session_data* sd, int n, unsigned short* i
return 0;
}
+
/*==========================================
* Cash Shop Buy
*------------------------------------------*/
@@ -1693,6 +1715,8 @@ int npc_selllist(struct map_session_data* sd, int n, unsigned short* item_list)
return 0;
}
+//Atempt to remove an npc from a map
+//This doesn't remove it from map_db
int npc_remove_map(struct npc_data* nd)
{
int m,i;
@@ -1729,6 +1753,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
static int npc_unload_dup_sub(struct npc_data* nd, va_list args)
{
int src_id;
@@ -1745,6 +1771,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)
int npc_unload(struct npc_data* nd, bool single) {
nullpo_ret(nd);
@@ -1957,7 +1985,7 @@ static void npc_parsename(struct npc_data* nd, const char* name, const char* sta
ShowWarning("npc_parsename: Duplicate unique name in file '%s', line'%d'. Renaming '%s' to '%s'.\n", filepath, strline(buffer,start-buffer), nd->exname, newname);
ShowDebug("this npc:\n display name '%s'\n unique name '%s'\n map=%s, x=%d, y=%d\n", nd->name, nd->exname, this_mapname, nd->bl.x, nd->bl.y);
- ShowDebug("other npc:\n display name '%s'\n unique name '%s'\n map=%s, x=%d, y=%d\n", dnd->name, dnd->exname, other_mapname, dnd->bl.x, dnd->bl.y);
+ ShowDebug("other npc in '%s' :\n display name '%s'\n unique name '%s'\n map=%s, x=%d, y=%d\n",dnd->path, dnd->name, dnd->exname, other_mapname, dnd->bl.x, dnd->bl.y);
safestrncpy(nd->exname, newname, sizeof(nd->exname));
}
@@ -1987,6 +2015,7 @@ static void npc_parsename(struct npc_data* nd, const char* name, const char* sta
}
}
+//Add then display an npc warp on map
struct npc_data* npc_add_warp(short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y)
{
int i;
@@ -2208,7 +2237,8 @@ static const char* npc_parse_shop(char* w1, char* w2, char* w3, char* w4, const
}
/**
- * NPCのラベルデータコンバート
+ * NPC縺ョ繝ゥ繝吶Ν繝繝シ繧ソ繧ウ繝ウ繝舌シ繝
+ * Not sure, seem to add label in a chainlink
* @see DBApply
*/
int npc_convertlabel_db(DBKey key, DBData *data, va_list ap)
@@ -2671,6 +2701,7 @@ int npc_duplicate4instance(struct npc_data *snd, int m) {
return 0;
}
+//Set mapcell CELL_NPC to trigger event later
void npc_setcells(struct npc_data* nd)
{
int m = nd->bl.m, x = nd->bl.x, y = nd->bl.y, xs, ys;
@@ -2690,7 +2721,7 @@ void npc_setcells(struct npc_data* nd)
return; // Other types doesn't have touch area
}
- if (m < 0 || xs < 0 || ys < 0)
+ if (m < 0 || xs < 0 || ys < 0) //invalid range or map
return;
for (i = y-ys; i <= y+ys; i++) {
@@ -3052,7 +3083,9 @@ static const char* npc_parse_mob(char* w1, char* w2, char* w3, char* w4, const c
}
/*==========================================
- * マップフラグ行の解析
+ * Set or disable mapflag on map
+ * eg : bat_c01 mapflag battleground 2
+ * also chking if mapflag conflict with another
*------------------------------------------*/
static const char* npc_parse_mapflag(char* w1, char* w2, char* w3, char* w4, const char* start, const char* buffer, const char* filepath)
{
@@ -3317,6 +3350,8 @@ 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
+//@runOnInit should we exec OnInit when it's done ?
void npc_parsesrcfile(const char* filepath, bool runOnInit)
{
int m, lines = 0;
@@ -3538,10 +3573,10 @@ void npc_read_event_script(void)
ShowInfo("%s: %d '%s' events.\n", config[i].name, script_event[i].event_count, config[i].event_name);
}
}
+
void npc_clear_pathlist(void) {
struct npc_path_data *npd = NULL;
- DBIterator *path_list = db_iterator(npc_path_db);
-
+ DBIterator *path_list = db_iterator(npc_path_db);
/* free all npc_path_data filepaths */
for( npd = dbi_first(path_list); dbi_exists(path_list); npd = dbi_next(path_list) ) {
@@ -3551,6 +3586,8 @@ void npc_clear_pathlist(void) {
dbi_destroy(path_list);
}
+
+//Clear then reload npcs files
int npc_reload(void) {
struct npc_src_list *nsl;
int m, i;
@@ -3646,6 +3683,8 @@ int npc_reload(void) {
}
return 0;
}
+
+//Unload all npc in the given file
bool npc_unloadfile( const char* path ) {
DBIterator * iter = db_iterator(npcname_db);
struct npc_data* nd = NULL;
@@ -3666,12 +3705,14 @@ bool npc_unloadfile( const char* path ) {
return found;
}
+
void do_clear_npc(void) {
db_clear(npcname_db);
db_clear(ev_db);
}
+
/*==========================================
- * 終了
+ * Destructor
*------------------------------------------*/
int do_final_npc(void) {
npc_clear_pathlist();
diff --git a/src/map/party.c b/src/map/party.c
index c93c48955..4e23302db 100644
--- a/src/map/party.c
+++ b/src/map/party.c
@@ -103,14 +103,15 @@ static TBL_PC* party_sd_check(int party_id, int account_id, int char_id)
}
/*==========================================
- * 終了
+ * Destructor
+ * Called in map shutdown, cleanup var
*------------------------------------------*/
void do_final_party(void)
{
party_db->destroy(party_db,NULL);
party_booking_db->destroy(party_booking_db,NULL); // Party Booking [Spiria]
}
-// 初期化
+// Constructor, init vars
void do_init_party(void)
{
party_db = idb_alloc(DB_OPT_RELEASE_DATA);
@@ -649,8 +650,8 @@ bool party_changeleader(struct map_session_data *sd, struct map_session_data *ts
}
if( map[sd->bl.m].flag.partylock )
- {
- clif_displaymessage(sd->fd, "You cannot change party leaders on this map.");
+ {
+ clif_displaymessage(sd->fd, msg_txt(287));
return false;
}
diff --git a/src/map/party.h b/src/map/party.h
index 4e1eaeaf5..c87e0300b 100644
--- a/src/map/party.h
+++ b/src/map/party.h
@@ -93,10 +93,10 @@ void party_booking_search(struct map_session_data *sd, short level, short mapid,
bool party_booking_delete(struct map_session_data *sd);
#ifdef RENEWAL_EXP
-void party_renewal_exp_mod(unsigned int *base_exp, unsigned int *job_exp, int lvl, int moblvl);
+ void party_renewal_exp_mod(unsigned int *base_exp, unsigned int *job_exp, int lvl, int moblvl);
#endif
#ifdef RENEWAL_DROP
-int party_renewal_drop_mod(int diff);
+ int party_renewal_drop_mod(int diff);
#endif
#endif /* _PARTY_H_ */
diff --git a/src/map/path.c b/src/map/path.c
index b2d34a26b..fad68bada 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)
- * costが減ったので根の方へ移動
+ * move toward the root Because cost has decreased
*------------------------------------------*/
static void update_heap_path(int *heap,struct tmp_path *tp,int index)
{
@@ -147,8 +147,7 @@ static int add_path(int *heap,struct tmp_path *tp,int x,int y,int dist,int befor
/*==========================================
* Find the closest reachable cell, 'count' cells away from (x0,y0) in direction (dx,dy).
- *
- * 吹き飛ばしたあとの座標を所得
+ * Income after the coordinates of the blow
*------------------------------------------*/
int path_blownpos(int m,int x0,int y0,int dx,int dy,int count)
{
@@ -343,7 +342,7 @@ bool path_search(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int
tp[i].flag=0;
heap[0]=0;
push_heap_path(heap,tp,calc_index(x0,y0));
- xs = md->xs-1; // あらかじめ1減算しておく
+ xs = md->xs - 1; // Place by subtracting a pre-
ys = md->ys-1;
for(;;)
@@ -361,10 +360,10 @@ bool path_search(struct walkpath_data *wpd,int m,int x0,int y0,int x1,int y1,int
if(x==x1 && y==y1)
break;
- // dc[0] : y++ の時のコスト増分
- // dc[1] : x-- の時のコスト増分
- // dc[2] : y-- の時のコスト増分
- // dc[3] : x++ の時のコスト増分
+ // dc[0] : y++ Incremental cost at the time
+ // dc[1] : x--
+ // dc[2] : y--
+ // dc[3] : x++
if(y < ys && !map_getcellp(md,x ,y+1,cell)) {
f |= 1; dc[0] = (y >= y1 ? 20 : 0);
diff --git a/src/map/pc.c b/src/map/pc.c
index 414b38d58..328b9e07e 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -47,7 +47,7 @@
#include <time.h>
-#define PVP_CALCRANK_INTERVAL 1000 // PVP順位計算の間隔
+#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];
@@ -289,7 +289,7 @@ int pc_banding(struct map_session_data *sd, short skill_lv) {
memset(b_sd, 0, sizeof(b_sd));
i = party_foreachsamemap(pc_check_banding,sd,range,&sd->bl,&c,&b_sd);
- if( c < 1 )
+ if( c < 1 ) //just recalc status no need to recalc hp
{ // No more Royal Guards in Banding found.
if( (sc = status_get_sc(&sd->bl)) != NULL && sc->data[SC_BANDING] )
{
@@ -559,7 +559,7 @@ int pc_makesavestatus(struct map_session_data *sd)
}
/*==========================================
- * 接?暫フ初期?
+ * Off init ? 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)
{
@@ -833,10 +833,15 @@ bool pc_adoption(struct map_session_data *p1_sd, struct map_session_data *p2_sd,
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;
- //?生や養子の場合の元の職業を算出する
nullpo_ret(sd);
@@ -917,8 +922,8 @@ int pc_isequip(struct map_session_data *sd,int n)
}
/*==========================================
- * session idに問題無し
- * char鯖から送られてきたステ?タスを設定
+ * 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)
{
@@ -1037,7 +1042,7 @@ bool pc_authok(struct map_session_data *sd, int login_id2, time_t expiration_tim
for( i = 0; i < 3; i++ )
sd->hate_mob[i] = -1;
- // 位置の設定
+ //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);
@@ -1272,7 +1277,7 @@ static int pc_calc_skillpoint(struct map_session_data* sd)
/*==========================================
- * ?えられるスキルの計算
+ * Calculation of Skills lvls
*------------------------------------------*/
int pc_calc_skilltree(struct map_session_data *sd)
{
@@ -2015,7 +2020,7 @@ int pc_bonus_subele(struct map_session_data* sd, unsigned char ele, short rate,
}
/*==========================================
- * ? 備品による能力等のボ?ナス設定
+ * ? ソスソスソスiソスノゑソスソス\ソスヘ難ソスソスフボ?ソスiソスXソスン抵ソス
*------------------------------------------*/
int pc_bonus(struct map_session_data *sd,int type,int val)
{
@@ -2613,7 +2618,7 @@ int pc_bonus(struct map_session_data *sd,int type,int val)
}
/*==========================================
- * ? 備品による能力等のボ?ナス設定
+ * ? ソスソスソスiソスノゑソスソス\ソスヘ難ソスソスフボ?ソスiソスXソスン抵ソス
*------------------------------------------*/
int pc_bonus2(struct map_session_data *sd,int type,int type2,int val)
{
@@ -3438,7 +3443,7 @@ int pc_skill(TBL_PC* sd, int id, int level, int flag)
return 1;
}
/*==========================================
- * カ?ド?入
+ * Append a card to an item ?
*------------------------------------------*/
int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip)
{
@@ -3493,18 +3498,18 @@ int pc_insert_card(struct map_session_data* sd, int idx_card, int idx_equip)
}
//
-// アイテム物
+// Items
//
/*==========================================
- * スキルによる買い値修正
+ * Update 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) // ディスカウント
+ 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) // コムパルションディスカウント
+ if((skill=pc_checkskill(sd,RG_COMPULSION))>0) // rogue discount
rate2 = 5+skill*4;
if(rate1 < rate2) rate1 = rate2;
if(rate1)
@@ -3516,12 +3521,12 @@ int pc_modifybuyvalue(struct map_session_data *sd,int orig_value)
}
/*==========================================
- * スキルによる?り値修正
+ * Update 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) // オ?バ?チャ?ジ
+ 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.);
@@ -3532,8 +3537,8 @@ int pc_modifysellvalue(struct map_session_data *sd,int orig_value)
}
/*==========================================
- * アイテムを買った暫ノ、新しいアイテム欄を使うか、
- * 3万個制限にかかるか確認
+ * Checking if we have enough place on inventory for new item
+ * Make sure to take 30k as limit (for client I guess)
*------------------------------------------*/
int pc_checkadditem(struct map_session_data *sd,int nameid,int amount)
{
@@ -3566,7 +3571,8 @@ int pc_checkadditem(struct map_session_data *sd,int nameid,int amount)
}
/*==========================================
- * 空きアイテム欄の個?
+ * Return number of available place in inventory
+ * Each non stackable item will reduce place by 1
*------------------------------------------*/
int pc_inventoryblank(struct map_session_data *sd)
{
@@ -3726,7 +3732,7 @@ int pc_getzeny(struct map_session_data *sd,int zeny)
}
/*==========================================
- * アイテムを探して、インデックスを返す
+ * Searching a specified itemid in inventory and return his stored index
*------------------------------------------*/
int pc_search_inventory(struct map_session_data *sd,int item_id)
{
@@ -3738,7 +3744,16 @@ int pc_search_inventory(struct map_session_data *sd,int item_id)
}
/*==========================================
- * アイテム追加。個?のみitem構造?の?字を無視
+ * Attempt tp add a new item in inventory
+ * return
+ 0 = success
+ 1 = invalid itemid not found or negative amount
+ 2 = overweight
+ 3 = ?
+ 4 = no free place found
+ 5 = max amount reached
+ 6 = ?
+ 7 = stack limitation
*------------------------------------------*/
int pc_additem(struct map_session_data *sd,struct item *item_data,int amount,e_log_pick_type log_type)
{
@@ -3821,7 +3836,10 @@ 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
+ * 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)
{
@@ -3849,7 +3867,10 @@ int pc_delitem(struct map_session_data *sd,int n,int amount,int type, short reas
}
/*==========================================
- * アイテムを落す
+ * Attempt to drop an item
+ * return
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_dropitem(struct map_session_data *sd,int n,int amount)
{
@@ -3890,7 +3911,10 @@ int pc_dropitem(struct map_session_data *sd,int n,int amount)
}
/*==========================================
- * アイテムを拾う
+ * Attempt to pickup an item
+ * return
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
{
@@ -3903,7 +3927,7 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
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);
@@ -3957,6 +3981,12 @@ int pc_takeitem(struct map_session_data *sd,struct flooritem_data *fitem)
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;
@@ -3975,7 +4005,7 @@ int pc_isUseitem(struct map_session_data *sd,int n)
if( !item->script ) //if it has no script, you can't really consume it!
return 0;
- switch( nameid )
+ switch( nameid ) //@TODO, lot oh harcoded nameid here
{
case 605: // Anodyne
if( map_flag_gvg(sd->bl.m) )
@@ -4117,7 +4147,10 @@ int pc_isUseitem(struct map_session_data *sd,int n)
}
/*==========================================
- * アイテムを使う
+ * Last checks et use item
+ * return
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_useitem(struct map_session_data *sd,int n)
{
@@ -4240,7 +4273,10 @@ int pc_useitem(struct map_session_data *sd,int n)
}
/*==========================================
- * カ?トアイテム追加。個?のみ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)
{
@@ -4306,7 +4342,10 @@ int pc_cart_additem(struct map_session_data *sd,struct item *item_data,int amoun
}
/*==========================================
- * カ?トアイテムを減らす
+ * 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)
{
@@ -4333,7 +4372,10 @@ int pc_cart_delitem(struct map_session_data *sd,int n,int amount,int type,e_log_
}
/*==========================================
- * カ?トへアイテム移動
+ * Transfert item from inventory to cart
+ * return
+ * 0 = fail
+ * 1 = succes
*------------------------------------------*/
int pc_putitemtocart(struct map_session_data *sd,int idx,int amount)
{
@@ -4356,7 +4398,10 @@ int pc_putitemtocart(struct map_session_data *sd,int idx,int amount)
}
/*==========================================
- * カ?ト?のアイテム?確認(個?の差分を返す)
+ * 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)
{
@@ -4372,7 +4417,10 @@ int pc_cartitem_amount(struct map_session_data* sd, int idx, int amount)
}
/*==========================================
- * カ?トからアイテム移動
+ * 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)
{
@@ -4396,7 +4444,7 @@ int pc_getitemfromcart(struct map_session_data *sd,int idx,int amount)
}
/*==========================================
- * スティル品公開
+ * Display item stolen msg to player sd
*------------------------------------------*/
int pc_show_steal(struct block_list *bl,va_list ap)
{
@@ -4418,7 +4466,10 @@ int pc_show_steal(struct block_list *bl,va_list ap)
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)
{
@@ -4499,7 +4550,10 @@ int pc_steal_item(struct map_session_data *sd,struct block_list *bl, int lv)
}
/*==========================================
- *
+ * Stole zeny from bl (mob)
+ * return
+ * 0 = fail
+ * 1 = success
*------------------------------------------*/
int pc_steal_coin(struct map_session_data *sd,struct block_list *target)
{
@@ -4699,7 +4753,11 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
}
/*==========================================
- * PCのランダムワ?プ
+ * 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)
{
@@ -4710,7 +4768,7 @@ int pc_randomwarp(struct map_session_data *sd, clr_type type)
m=sd->bl.m;
- if (map[sd->bl.m].flag.noteleport) // テレポ?ト禁止
+ if (map[sd->bl.m].flag.noteleport) //Teleport forbiden
return 0;
do{
@@ -4774,10 +4832,10 @@ int pc_memo(struct map_session_data* sd, int pos)
}
//
-// 武器??
+// Skills
//
/*==========================================
- * スキルの?索 所有していた場合Lvが返る
+ * Return player sd skilllv learned for given skill
*------------------------------------------*/
int pc_checkskill(struct map_session_data *sd,int skill_id)
{
@@ -4803,13 +4861,13 @@ int pc_checkskill(struct map_session_data *sd,int skill_id)
}
/*==========================================
- * 武器?更によるスキルの??チェック
- * 引?:
- * struct map_session_data *sd セッションデ?タ
- * int nameid ?備品ID
- * 返り値:
- * 0 ?更なし
- * -1 スキルを解除
+ * ソスソスソスソス?ソス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ソスソスソスソスソスソスソスソス
*------------------------------------------*/
int pc_checkallowskill(struct map_session_data *sd)
{
@@ -4859,7 +4917,8 @@ int pc_checkallowskill(struct map_session_data *sd)
}
/*==========================================
- * ? 備品のチェック
+ * Return equiped itemid? on player sd at pos
+ * if -1 mean nothing equiped
*------------------------------------------*/
int pc_checkequip(struct map_session_data *sd,int pos)
{
@@ -5562,7 +5621,7 @@ static void pc_calcexp(struct map_session_data *sd, unsigned int *base_exp, unsi
return;
}
/*==========================================
- * ??値取得
+ * 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)
{
@@ -5655,8 +5714,10 @@ unsigned int pc_maxjoblv(struct map_session_data *sd)
}
/*==========================================
- * base level側必要??値計算
+ * 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);
@@ -5667,6 +5728,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
unsigned int pc_thisbaseexp(struct map_session_data *sd)
{
if(sd->status.base_level>pc_maxbaselv(sd) || sd->status.base_level<=1)
@@ -5677,8 +5739,13 @@ unsigned int pc_thisbaseexp(struct map_session_data *sd)
/*==========================================
- * job level側必要??値計算
+ * 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);
@@ -5688,6 +5755,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
unsigned int pc_thisjobexp(struct map_session_data *sd)
{
if(sd->status.job_level>pc_maxjoblv(sd) || sd->status.job_level<=1)
@@ -5857,7 +5925,8 @@ int pc_statusup2(struct map_session_data* sd, int type, int val)
}
/*==========================================
- * スキルポイント割り振り
+ * Update skilllv for player sd
+ * Skill point allocation
*------------------------------------------*/
int pc_skillup(struct map_session_data *sd,int skill_num)
{
@@ -6353,6 +6422,9 @@ void pc_damage(struct map_session_data *sd,struct block_list *src,unsigned int h
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;
@@ -6684,10 +6756,10 @@ void pc_revive(struct map_session_data *sd,unsigned int hp, unsigned int sp) {
guild_guildaura_refresh(sd,GD_HAWKEYES,guild_checkskill(sd->state.gmaster_flag,GD_HAWKEYES));
}
}
-// script? 連
+// script
//
/*==========================================
- * script用PCステ?タス?み出し
+ * script reading pc status registry
*------------------------------------------*/
int pc_readparam(struct map_session_data* sd,int type)
{
@@ -6733,7 +6805,7 @@ int pc_readparam(struct map_session_data* sd,int type)
}
/*==========================================
- * script用PCステ?タス設定
+ * script set pc status registry
*------------------------------------------*/
int pc_setparam(struct map_session_data *sd,int type,int val)
{
@@ -6901,7 +6973,9 @@ void pc_heal(struct map_session_data *sd,unsigned int hp,unsigned int sp, int ty
}
/*==========================================
- * 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)
{
@@ -6967,7 +7041,8 @@ int pc_itemheal(struct map_session_data *sd,int itemid, int hp,int sp)
}
/*==========================================
- * 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)
{
@@ -7005,9 +7080,7 @@ int pc_percentheal(struct map_session_data *sd,int hp,int sp)
}
/*==========================================
- * 職?更
- * 引? job 職業 0〜23
- * upper 通常 0, ?生 1, 養子 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)
@@ -7099,7 +7172,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
for(i=0;i<EQI_MAX;i++) {
if(sd->equip_index[i] >= 0)
if(!pc_isequip(sd,sd->equip_index[i]))
- pc_unequipitem(sd,sd->equip_index[i],2); // ?備外し
+ pc_unequipitem(sd,sd->equip_index[i],2); // unequip invalid item for class
}
//Change look, if disguised, you need to undisguise
@@ -7170,7 +7243,7 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
}
/*==========================================
- * 見た目?更
+ * Tell client player sd has change equipement
*------------------------------------------*/
int pc_equiplookall(struct map_session_data *sd)
{
@@ -7187,7 +7260,7 @@ int pc_equiplookall(struct map_session_data *sd)
}
/*==========================================
- * 見た目?更
+ * Tell client player sd has change look (hair,equip...)
*------------------------------------------*/
int pc_changelook(struct map_session_data *sd,int type,int val)
{
@@ -7247,7 +7320,7 @@ int pc_changelook(struct map_session_data *sd,int type,int val)
}
/*==========================================
- * 付?品(鷹,ペコ,カ?ト)設定
+ * Give an option (type) to player (sd) and display it to client
*------------------------------------------*/
int pc_setoption(struct map_session_data *sd,int type)
{
@@ -7364,7 +7437,7 @@ int pc_setoption(struct map_session_data *sd,int type)
}
/*==========================================
- * カ?ト設定
+ * Give player a cart
*------------------------------------------*/
int pc_setcart(struct map_session_data *sd,int type) {
#ifndef NEW_CARTS
@@ -7414,12 +7487,12 @@ int pc_setcart(struct map_session_data *sd,int type) {
}
/*==========================================
- * 鷹設定
+ * Give player a falcon
*------------------------------------------*/
int pc_setfalcon(TBL_PC* sd, int flag)
{
if( flag ){
- if( pc_checkskill(sd,HT_FALCON)>0 ) // ファルコンマスタリ?スキル所持
+ if( pc_checkskill(sd,HT_FALCON)>0 ) // ソスtソス@ソスソスソスRソスソスソス}ソスXソス^ソスソス?ソスXソスLソスソスソスソスソスソス
pc_setoption(sd,sd->sc.option|OPTION_FALCON);
} else if( pc_isfalcon(sd) ){
pc_setoption(sd,sd->sc.option&~OPTION_FALCON); // remove falcon
@@ -7429,12 +7502,12 @@ int pc_setfalcon(TBL_PC* sd, int flag)
}
/*==========================================
- * ペコペコ設定
+ * Set player riding
*------------------------------------------*/
int pc_setriding(TBL_PC* sd, int flag)
{
if( flag ){
- if( pc_checkskill(sd,KN_RIDING) > 0 ) // ライディングスキル所持
+ if( pc_checkskill(sd,KN_RIDING) > 0 ) // ソスソスソスCソスfソスBソスソスソスOソスXソスLソスソスソスソスソスソス
pc_setoption(sd, sd->sc.option|OPTION_RIDING);
} else if( pc_isriding(sd) ){
pc_setoption(sd, sd->sc.option&~OPTION_RIDING);
@@ -7444,7 +7517,7 @@ int pc_setriding(TBL_PC* sd, int flag)
}
/*==========================================
- *
+ * Give player a mado
*------------------------------------------*/
int pc_setmadogear(TBL_PC* sd, int flag)
{
@@ -7459,7 +7532,7 @@ int pc_setmadogear(TBL_PC* sd, int flag)
}
/*==========================================
- * アイテムドロップ可不可判定
+ * Check if player can drop an item
*------------------------------------------*/
int pc_candrop(struct map_session_data *sd, struct item *item)
{
@@ -7471,7 +7544,8 @@ int pc_candrop(struct map_session_data *sd, struct item *item)
}
/*==========================================
- * script用??の値を?む
+ * Read ram register for player sd
+ * get val (int) from reg for player sd
*------------------------------------------*/
int pc_readreg(struct map_session_data* sd, int reg)
{
@@ -7483,7 +7557,8 @@ int pc_readreg(struct map_session_data* sd, int reg)
return ( i < sd->reg_num ) ? sd->reg[i].data : 0;
}
/*==========================================
- * script用??の値を設定
+ * 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)
{
@@ -7511,7 +7586,8 @@ int pc_setreg(struct map_session_data* sd, int reg, int val)
}
/*==========================================
- * script用文字列??の値を?む
+ * Read ram register for player sd
+ * get val (str) from reg for player sd
*------------------------------------------*/
char* pc_readregstr(struct map_session_data* sd, int reg)
{
@@ -7523,7 +7599,8 @@ char* pc_readregstr(struct map_session_data* sd, int reg)
return ( i < sd->regstr_num ) ? sd->regstr[i].data : NULL;
}
/*==========================================
- * script用文字列??の値を設定
+ * 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)
{
@@ -7803,7 +7880,7 @@ int pc_setregistry_str(struct map_session_data *sd,const char *reg,const char *v
}
/*==========================================
- * イベントタイマ??理
+ * Exec eventtimer for player sd (retrieved from map_session (id))
*------------------------------------------*/
static int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -7828,7 +7905,7 @@ static int pc_eventtimer(int tid, unsigned int tick, int id, intptr_t data)
}
/*==========================================
- * イベントタイマ?追加
+ * Add eventtimer for player sd ?
*------------------------------------------*/
int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
{
@@ -7846,7 +7923,7 @@ int pc_addeventtimer(struct map_session_data *sd,int tick,const char *name)
}
/*==========================================
- * イベントタイマ?削除
+ * Del eventtimer for player sd ?
*------------------------------------------*/
int pc_deleventtimer(struct map_session_data *sd,const char *name)
{
@@ -7876,7 +7953,7 @@ int pc_deleventtimer(struct map_session_data *sd,const char *name)
}
/*==========================================
- * イベントタイマ?カウント値追加
+ * Update eventtimer count for player sd
*------------------------------------------*/
int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick)
{
@@ -7895,7 +7972,7 @@ int pc_addeventtimercount(struct map_session_data *sd,const char *name,int tick)
}
/*==========================================
- * イベントタイマ?全削除
+ * Remove all eventtimer for player sd
*------------------------------------------*/
int pc_cleareventtimer(struct map_session_data *sd)
{
@@ -8068,7 +8145,7 @@ int pc_load_combo(struct map_session_data *sd) {
return ret;
}
/*==========================================
- * Attempt to equip item in inventory index 'n' in the EQP_ 'req_pos'
+ * 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)
{
@@ -8269,7 +8346,7 @@ int pc_equipitem(struct map_session_data *sd,int n,int req_pos)
}
/*==========================================
- * ? 備した物を外す
+ * Called when attemting to unequip an item from player
* type:
* 0 - only unequip
* 1 - calculate status after unequipping
@@ -8432,8 +8509,8 @@ int pc_unequipitem(struct map_session_data *sd,int n,int flag) {
}
/*==========================================
- * アイテムのindex番?を詰めたり
- * ? 備品の?備可能チェックを行なう
+ * 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)
{
@@ -8513,7 +8590,7 @@ int pc_checkitem(struct map_session_data *sd)
}
/*==========================================
- * PVP順位計算用(foreachinarea)
+ * Update PVP rank for sd1 in cmp to sd2
*------------------------------------------*/
int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
{
@@ -8532,7 +8609,8 @@ int pc_calc_pvprank_sub(struct block_list *bl,va_list ap)
return 0;
}
/*==========================================
- * PVP順位計算
+ * Calculate new rank beetween all present players (map_foreachinarea)
+ * and display result
*------------------------------------------*/
int pc_calc_pvprank(struct map_session_data *sd)
{
@@ -8547,7 +8625,7 @@ int pc_calc_pvprank(struct map_session_data *sd)
return sd->pvp_rank;
}
/*==========================================
- * PVP順位計算(timer)
+ * Calculate next sd ranking calculation from config
*------------------------------------------*/
int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -8569,7 +8647,10 @@ int pc_calc_pvprank_timer(int tid, unsigned int tick, int id, intptr_t data)
}
/*==========================================
- * sdは結婚しているか(?婚の場合は相方のchar_idを返す)
+ * Checking if sd is married
+ * Return
+ * partner_id = yes,
+ * 0 = no
*------------------------------------------*/
int pc_ismarried(struct map_session_data *sd)
{
@@ -8581,7 +8662,10 @@ int pc_ismarried(struct map_session_data *sd)
return 0;
}
/*==========================================
- * sdがdstsdと結婚(dstsd→sdの結婚?理も同暫ノ行う)
+ * Marry player sd to player dstsd
+ * return
+ * -1 = fail
+ * 0 = success
*------------------------------------------*/
int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd)
{
@@ -8596,6 +8680,9 @@ int pc_marriage(struct map_session_data *sd,struct map_session_data *dstsd)
/*==========================================
* Divorce sd from its partner
+ * return
+ * -1 = fail
+ * 0 = success
*------------------------------------------*/
int pc_divorce(struct map_session_data *sd)
{
@@ -8634,7 +8721,7 @@ int pc_divorce(struct map_session_data *sd)
}
/*==========================================
- * sdの相方のmap_session_dataを返す
+ * Get sd partner charid. (Married partner)
*------------------------------------------*/
struct map_session_data *pc_get_partner(struct map_session_data *sd)
{
@@ -8645,6 +8732,9 @@ struct map_session_data *pc_get_partner(struct map_session_data *sd)
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)
@@ -8654,6 +8744,9 @@ struct map_session_data *pc_get_father (struct map_session_data *sd)
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)
@@ -8663,6 +8756,9 @@ struct map_session_data *pc_get_mother (struct map_session_data *sd)
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)
@@ -8672,6 +8768,9 @@ struct map_session_data *pc_get_child (struct map_session_data *sd)
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;
@@ -8733,7 +8832,7 @@ void pc_regen (struct map_session_data *sd, unsigned int diff_tick)
}
/*==========================================
- * セ?ブポイントの保存
+ * Memo player sd savepoint. (map,x,y)
*------------------------------------------*/
int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
{
@@ -8747,7 +8846,7 @@ int pc_setsavepoint(struct map_session_data *sd, short mapindex,int x,int y)
}
/*==========================================
- * 自動セ?ブ (timer??)
+ * Save 1 player data at autosave intervalle
*------------------------------------------*/
int pc_autosave(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -8864,7 +8963,7 @@ void pc_overheat(struct map_session_data *sd, int val) {
skill = cap_value(pc_checkskill(sd,NC_MAINFRAME),0,4);
if( sd->sc.data[SC_OVERHEAT_LIMITPOINT] ) {
heat += sd->sc.data[SC_OVERHEAT_LIMITPOINT]->val1;
- status_change_end(&sd->bl,SC_OVERHEAT_LIMITPOINT,-1);
+ status_change_end(&sd->bl,SC_OVERHEAT_LIMITPOINT,INVALID_TIMER);
}
heat = max(0,heat); // Avoid negative HEAT
@@ -9067,11 +9166,8 @@ int pc_split_atoui(char* str, unsigned int* val, char sep, int max)
}
/*==========================================
- * DB reading.
- * exp.txt - required experience values
- * skill_tree.txt - skill tree for every class
- * attr_fix.txt - elemental adjustment table
- * statpoint.txt - status points per base level
+ * sub DB reading.
+ * fonction used to read skill_tree.txt
*------------------------------------------*/
static bool pc_readdb_skilltree(char* fields[], int columns, int current)
{
@@ -9121,13 +9217,19 @@ static bool pc_readdb_skilltree(char* fields[], int columns, int current)
return true;
}
+/*==========================================
+ * pc DB reading.
+ * exp.txt - required experience values
+ * skill_tree.txt - skill tree for every class
+ * attr_fix.txt - elemental adjustment table
+ *------------------------------------------*/
int pc_readdb(void)
{
int i,j,k;
FILE *fp;
char line[24000],*p;
- // 必要??値?み?み
+ //reset
memset(exp_table,0,sizeof(exp_table));
memset(max_level,0,sizeof(max_level));
@@ -9212,12 +9314,11 @@ int pc_readdb(void)
}
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","exp.txt");
- // スキルツリ?
+ // Reset and read 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);
- // ?性修正テ?ブル
+ // Reset then read attr_fix
for(i=0;i<4;i++)
for(j=0;j<ELE_MAX;j++)
for(k=0;k<ELE_MAX;k++)
@@ -9269,7 +9370,7 @@ int pc_readdb(void)
fclose(fp);
ShowStatus("Done reading '"CL_WHITE"%s"CL_RESET"'.\n","attr_fix.txt");
- // スキルツリ?
+ // reset then read statspoint
memset(statp,0,sizeof(statp));
i=1;
@@ -9400,7 +9501,7 @@ void pc_itemcd_do(struct map_session_data *sd, bool load) {
return;
}
/*==========================================
- * pc? 係初期化
+ * pc Init/Terminate
*------------------------------------------*/
void do_final_pc(void) {
diff --git a/src/map/pc.h b/src/map/pc.h
index 589605753..bf5c62d5d 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -174,7 +174,7 @@ struct map_session_data {
unsigned short mapindex;
unsigned char head_dir; //0: Look forward. 1: Look right, 2: Look left.
unsigned int client_tick;
- int npc_id,areanpc_id,npc_shopid,touching_id;
+ int npc_id,areanpc_id,npc_shopid,touching_id; //for script follow scriptoid; ,npcid
int npc_item_flag; //Marks the npc_id with which you can use items during interactions with said npc (see script command enable_itemuse)
int npc_menu; // internal variable, used in npc menu handling
int npc_amount;
diff --git a/src/map/pet.c b/src/map/pet.c
index fbb25a1be..3513ece86 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -1031,7 +1031,7 @@ int pet_lootitem_drop(struct pet_data *pd,struct map_session_data *sd)
memset(pd->loot->item,0,pd->loot->max * sizeof(struct item));
pd->loot->count = 0;
pd->loot->weight = 0;
- pd->ud.canact_tick = gettick()+10000; // 10*1000msの間拾わない
+ pd->ud.canact_tick = gettick()+10000; //prevent picked up during 10*1000ms
if (dlist->item)
add_timer(gettick()+540,pet_delay_item_drop,0,(intptr_t)dlist);
@@ -1195,7 +1195,9 @@ int pet_skill_support_timer(int tid, unsigned int tick, int id, intptr_t data)
}
/*==========================================
- *ペットデータ読み込み
+ * Pet read db data
+ * pet_db.txt
+ * pet_db2.txt
*------------------------------------------*/
int read_petdb()
{
@@ -1343,7 +1345,7 @@ int read_petdb()
}
/*==========================================
- * スキル関係初期化処理
+ * Initialization process relationship skills
*------------------------------------------*/
int do_init_pet(void)
{
diff --git a/src/map/script.c b/src/map/script.c
index 35841016f..89812b40b 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -283,9 +283,9 @@ static struct {
int count;
int flag;
struct linkdb_node *case_label;
- } curly[256]; // 右カッコの情報
- int curly_count; // 右カッコの数
- int index; // スクリプト内で使用した構文の数
+ } curly[256]; // ソスEソスJソスbソスRソスフ擾ソスソス
+ int curly_count; // ソスEソスJソスbソスRソスフ撰ソス
+ int index; // ソスXソスNソスソスソスvソスgソスソスソスナ使ソスpソスソスソスソスソス\ソスソスソスフ撰ソス
} syntax;
const char* parse_curly_close(const char* p);
@@ -338,7 +338,7 @@ struct {
#endif
/*==========================================
- * ローカルプロトタイプ宣言 (必要な物のみ)
+ * ソスソスソス[ソスJソスソスソスvソスソスソスgソス^ソスCソスvソス骭セ (ソスKソスvソスネ包ソスソスフゑソス)
*------------------------------------------*/
const char* parse_subexpr(const char* p,int limit);
int run_func(struct script_state *st);
@@ -618,7 +618,7 @@ static void script_reportfunc(struct script_state* st)
/*==========================================
- * エラーメッセージ出力
+ * ソスGソスソスソス[ソスソスソスbソスZソス[ソスWソスoソスソス
*------------------------------------------*/
static void disp_error_message2(const char *mes,const char *pos,int report)
{
@@ -808,7 +808,7 @@ static void add_scripti(int a)
///
/// @param l The id of the str_data entry
-// 最大16Mまで
+// ソスナ托ソス16Mソスワゑソス
static void add_scriptl(int l)
{
int backpatch = str_data[l].backpatch;
@@ -823,7 +823,7 @@ static void add_scriptl(int l)
break;
case C_NOP:
case C_USERFUNC:
- // ラベルの可能性があるのでbackpatch用データ埋め込み
+ // ソスソスソスxソスソスソスフ可能ソスソスソスソスソスソスソスソスフゑソスbackpatchソスpソスfソス[ソス^ソスソスソス゚搾ソスソスソス
add_scriptc(C_NAME);
str_data[l].backpatch = script_pos;
add_scriptb(backpatch);
@@ -845,7 +845,7 @@ static void add_scriptl(int l)
}
/*==========================================
- * ラベルを解決する
+ * ソスソスソスxソスソスソスソスソスソスソスソスソスソスソスソス
*------------------------------------------*/
void set_label(int l,int pos, const char* script_pos)
{
@@ -1218,7 +1218,7 @@ const char* parse_variable(const char* p) {
}
/*==========================================
- * 項の解析
+ * ソスソスソスフ会ソスソス
*------------------------------------------*/
const char* parse_simpleexpr(const char *p)
{
@@ -1319,7 +1319,7 @@ const char* parse_simpleexpr(const char *p)
}
/*==========================================
- * 式の解析
+ * ソスソスソスフ会ソスソス
*------------------------------------------*/
const char* parse_subexpr(const char* p,int limit)
{
@@ -1381,7 +1381,7 @@ const char* parse_subexpr(const char* p,int limit)
}
/*==========================================
- * 式の評価
+ * ソスソスソスフ評ソスソス
*------------------------------------------*/
const char* parse_expr(const char *p)
{
@@ -1395,7 +1395,7 @@ const char* parse_expr(const char *p)
}
/*==========================================
- * 行の解析
+ * ソスsソスフ会ソスソス
*------------------------------------------*/
const char* parse_line(const char* p)
{
@@ -1403,7 +1403,7 @@ const char* parse_line(const char* p)
p=skip_space(p);
if(*p==';') {
- // if(); for(); while(); のために閉じ判定
+ // if(); for(); while(); ソスフゑソスソス゚に閉ゑソスソスソスソスソス
p = parse_syntax_close(p + 1);
return p;
}
@@ -1421,7 +1421,7 @@ const char* parse_line(const char* p)
return parse_curly_close(p);
}
- // 構文関連の処理
+ // ソス\ソスソスソスヨ連ソスフ擾ソスソスソス
p2 = parse_syntax(p);
if(p2 != NULL)
return p2;
@@ -1445,13 +1445,13 @@ const char* parse_line(const char* p)
disp_error_message("parse_line: need ';'",p);
}
- // if, for , while の閉じ判定
+ // if, for , while ソスフ閉ゑソスソスソスソスソス
p = parse_syntax_close(p+1);
return p;
}
-// { ... } の閉じ処理
+// { ... } ソスフ閉ゑソスソスソスソスソス
const char* parse_curly_close(const char* p)
{
if(syntax.curly_count <= 0) {
@@ -1459,46 +1459,46 @@ const char* parse_curly_close(const char* p)
return p + 1;
} else if(syntax.curly[syntax.curly_count-1].type == TYPE_NULL) {
syntax.curly_count--;
- // if, for , while の閉じ判定
+ // if, for , while ソスフ閉ゑソスソスソスソスソス
p = parse_syntax_close(p + 1);
return p;
} else if(syntax.curly[syntax.curly_count-1].type == TYPE_SWITCH) {
- // switch() 閉じ判定
+ // switch() ソスツゑソスソスソスソスソス
int pos = syntax.curly_count-1;
char label[256];
int l;
- // 一時変数を消す
+ // ソス齊橸ソスマ撰ソスソスソスソスソスソスソス
sprintf(label,"set $@__SW%x_VAL,0;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // 無条件で終了ポインタに移動
+ // ソスソスソスソスソスソスソスナ終ソスソスソス|ソスCソスソスソス^ソスノ移難ソス
sprintf(label,"goto __SW%x_FIN;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // 現在地のラベルを付ける
+ // ソスソスソスン地ソスフソスソスxソスソスソスソスtソスソスソスソス
sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label);
set_label(l,script_pos, p);
if(syntax.curly[pos].flag) {
- // default が存在する
+ // default ソスソスソスソスソスンゑソスソスソス
sprintf(label,"goto __SW%x_DEF;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
}
- // 終了ラベルを付ける
+ // ソスIソスソスソスソスソスxソスソスソスソスtソスソスソスソス
sprintf(label,"__SW%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos, p);
linkdb_final(&syntax.curly[pos].case_label); // free the list of case label
syntax.curly_count--;
- // if, for , while の閉じ判定
+ // if, for , while ソスフ閉ゑソスソスソスソスソス
p = parse_syntax_close(p + 1);
return p;
} else {
@@ -1507,9 +1507,9 @@ const char* parse_curly_close(const char* p)
}
}
-// 構文関連の処理
+// ソス\ソスソスソスヨ連ソスフ擾ソスソスソス
// break, case, continue, default, do, for, function,
-// if, switch, while をこの内部で処理します。
+// if, switch, while ソスソスソスソスソスフ難ソスソスソスソスナ擾ソスソスソスソスソスソスワゑソスソスB
const char* parse_syntax(const char* p)
{
const char *p2 = skip_word(p);
@@ -1518,7 +1518,7 @@ const char* parse_syntax(const char* p)
case 'B':
case 'b':
if(p2 - p == 5 && !strncasecmp(p,"break",5)) {
- // break の処理
+ // break ソスフ擾ソスソスソス
char label[256];
int pos = syntax.curly_count - 1;
while(pos >= 0) {
@@ -1547,7 +1547,7 @@ const char* parse_syntax(const char* p)
p = skip_space(p2);
if(*p != ';')
disp_error_message("parse_syntax: need ';'",p);
- // if, for , while の閉じ判定
+ // if, for , while ソスフ閉ゑソスソスソスソスソス
p = parse_syntax_close(p + 1);
return p;
}
@@ -1555,7 +1555,7 @@ const char* parse_syntax(const char* p)
case 'c':
case 'C':
if(p2 - p == 4 && !strncasecmp(p,"case",4)) {
- // case の処理
+ // case ソスフ擾ソスソスソス
int pos = syntax.curly_count-1;
if(pos < 0 || syntax.curly[pos].type != TYPE_SWITCH) {
disp_error_message("parse_syntax: unexpected 'case' ",p);
@@ -1565,18 +1565,18 @@ const char* parse_syntax(const char* p)
int l,v;
char *np;
if(syntax.curly[pos].count != 1) {
- // FALLTHRU 用のジャンプ
+ // FALLTHRU ソスpソスフジソスソスソスソスソスv
sprintf(label,"goto __SW%x_%xJ;",syntax.curly[pos].index,syntax.curly[pos].count);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // 現在地のラベルを付ける
+ // ソスソスソスン地ソスフソスソスxソスソスソスソスtソスソスソスソス
sprintf(label,"__SW%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label);
set_label(l,script_pos, p);
}
- // switch 判定文
+ // switch ソスソスソス阨カ
p = skip_space(p2);
if(p == p2) {
disp_error_message("parse_syntax: expect space ' '",p);
@@ -1604,12 +1604,12 @@ const char* parse_syntax(const char* p)
sprintf(label,"if(%d != $@__SW%x_VAL) goto __SW%x_%x;",
v,syntax.curly[pos].index,syntax.curly[pos].index,syntax.curly[pos].count+1);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
- // 2回parse しないとダメ
+ // ソスQソスソスparse ソスソスソスネゑソスソスニダソスソス
p2 = parse_line(label);
parse_line(p2);
syntax.curly_count--;
if(syntax.curly[pos].count != 1) {
- // FALLTHRU 終了後のラベル
+ // FALLTHRU ソスIソスソスソスソスフソスソスxソスソス
sprintf(label,"__SW%x_%xJ",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label);
set_label(l,script_pos,p);
@@ -1628,13 +1628,13 @@ const char* parse_syntax(const char* p)
}
return p + 1;
} else if(p2 - p == 8 && !strncasecmp(p,"continue",8)) {
- // continue の処理
+ // continue ソスフ擾ソスソスソス
char label[256];
int pos = syntax.curly_count - 1;
while(pos >= 0) {
if(syntax.curly[pos].type == TYPE_DO) {
sprintf(label,"goto __DO%x_NXT;",syntax.curly[pos].index);
- syntax.curly[pos].flag = 1; // continue 用のリンク張るフラグ
+ syntax.curly[pos].flag = 1; // continue ソスpソスフソスソスソスソスNソスソスソスソスtソスソスソスO
break;
} else if(syntax.curly[pos].type == TYPE_FOR) {
sprintf(label,"goto __FR%x_NXT;",syntax.curly[pos].index);
@@ -1655,7 +1655,7 @@ const char* parse_syntax(const char* p)
p = skip_space(p2);
if(*p != ';')
disp_error_message("parse_syntax: need ';'",p);
- // if, for , while の閉じ判定
+ // if, for , while ソスフ閉ゑソスソスソスソスソス
p = parse_syntax_close(p + 1);
return p;
}
@@ -1663,7 +1663,7 @@ const char* parse_syntax(const char* p)
case 'd':
case 'D':
if(p2 - p == 7 && !strncasecmp(p,"default",7)) {
- // switch - default の処理
+ // switch - default ソスフ擾ソスソスソス
int pos = syntax.curly_count-1;
if(pos < 0 || syntax.curly[pos].type != TYPE_SWITCH) {
disp_error_message("parse_syntax: unexpected 'default'",p);
@@ -1672,7 +1672,7 @@ const char* parse_syntax(const char* p)
} else {
char label[256];
int l;
- // 現在地のラベルを付ける
+ // ソスソスソスン地ソスフソスソスxソスソスソスソスtソスソスソスソス
p = skip_space(p2);
if(*p != ':') {
disp_error_message("parse_syntax: need ':'",p);
@@ -1681,13 +1681,13 @@ const char* parse_syntax(const char* p)
l=add_str(label);
set_label(l,script_pos,p);
- // 無条件で次のリンクに飛ばす
+ // ソスソスソスソスソスソスソスナ趣ソスソスフソスソスソスソスNソスノ費ソスホゑソス
sprintf(label,"goto __SW%x_%x;",syntax.curly[pos].index,syntax.curly[pos].count+1);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // default のラベルを付ける
+ // default ソスフソスソスxソスソスソスソスtソスソスソスソス
sprintf(label,"__SW%x_DEF",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -1705,7 +1705,7 @@ const char* parse_syntax(const char* p)
syntax.curly[syntax.curly_count].count = 1;
syntax.curly[syntax.curly_count].index = syntax.index++;
syntax.curly[syntax.curly_count].flag = 0;
- // 現在地のラベル形成する
+ // ソスソスソスン地ソスフソスソスxソスソスソス`ソスソスソスソスソスソス
sprintf(label,"__DO%x_BGN",syntax.curly[syntax.curly_count].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -1731,22 +1731,22 @@ const char* parse_syntax(const char* p)
disp_error_message("parse_syntax: need '('",p);
p++;
- // 初期化文を実行する
+ // ソスソスソスソスソスソスソスソスソスsソスソスソスソス
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
p=parse_line(p);
syntax.curly_count--;
- // 条件判断開始のラベル形成する
+ // ソスソスソスソスソスソスソスfソスJソスnソスフソスソスxソスソスソス`ソスソスソスソスソスソス
sprintf(label,"__FR%x_J",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
p=skip_space(p);
if(*p == ';') {
- // for(;;) のパターンなので必ず真
+ // for(;;) ソスフパソス^ソス[ソスソスソスネので必ソスソスソス^
;
} else {
- // 条件が偽なら終了地点に飛ばす
+ // ソスソスソスソスソスソスソスUソスネゑソスIソスソスソスnソス_ソスノ費ソスホゑソス
sprintf(label,"__FR%x_FIN",syntax.curly[pos].index);
add_scriptl(add_str("jump_zero"));
add_scriptc(C_ARG);
@@ -1759,32 +1759,32 @@ const char* parse_syntax(const char* p)
disp_error_message("parse_syntax: need ';'",p);
p++;
- // ループ開始に飛ばす
+ // ソスソスソス[ソスvソスJソスnソスノ費ソスホゑソス
sprintf(label,"goto __FR%x_BGN;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // 次のループへのラベル形成する
+ // ソスソスソスフソスソス[ソスvソスヨのソスソスxソスソスソス`ソスソスソスソスソスソス
sprintf(label,"__FR%x_NXT",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
- // 次のループに入る時の処理
- // for 最後の ')' を ';' として扱うフラグ
+ // ソスソスソスフソスソス[ソスvソスノ難ソス骼橸ソスフ擾ソスソスソス
+ // for ソスナ鯉ソスソス ')' ソスソス ';' ソスニゑソスソスト茨ソスソスソスソスtソスソスソスO
parse_syntax_for_flag = 1;
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
p=parse_line(p);
syntax.curly_count--;
parse_syntax_for_flag = 0;
- // 条件判定処理に飛ばす
+ // ソスソスソスソスソスソスソス闖茨ソスソスソスノ費ソスホゑソス
sprintf(label,"goto __FR%x_J;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // ループ開始のラベル付け
+ // ソスソスソス[ソスvソスJソスnソスフソスソスxソスソスソスtソスソス
sprintf(label,"__FR%x_BGN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -1811,7 +1811,7 @@ const char* parse_syntax(const char* p)
else
disp_error_message("parse_syntax:function: function name is invalid", func_name);
- // if, for , while の閉じ判定
+ // if, for , while ソスフ閉ゑソスソスソスソスソス
p = parse_syntax_close(p2 + 1);
return p;
}
@@ -1856,7 +1856,7 @@ const char* parse_syntax(const char* p)
case 'i':
case 'I':
if(p2 - p == 2 && !strncasecmp(p,"if",2)) {
- // if() の処理
+ // if() ソスフ擾ソスソスソス
char label[256];
p=skip_space(p2);
if(*p != '(') { //Prevent if this {} non-c syntax. from Rayce (jA)
@@ -1880,7 +1880,7 @@ const char* parse_syntax(const char* p)
case 's':
case 'S':
if(p2 - p == 6 && !strncasecmp(p,"switch",6)) {
- // switch() の処理
+ // switch() ソスフ擾ソスソスソス
char label[256];
p=skip_space(p2);
if(*p != '(') {
@@ -1917,12 +1917,12 @@ const char* parse_syntax(const char* p)
syntax.curly[syntax.curly_count].count = 1;
syntax.curly[syntax.curly_count].index = syntax.index++;
syntax.curly[syntax.curly_count].flag = 0;
- // 条件判断開始のラベル形成する
+ // ソスソスソスソスソスソスソスfソスJソスnソスフソスソスxソスソスソス`ソスソスソスソスソスソス
sprintf(label,"__WL%x_NXT",syntax.curly[syntax.curly_count].index);
l=add_str(label);
set_label(l,script_pos,p);
- // 条件が偽なら終了地点に飛ばす
+ // ソスソスソスソスソスソスソスUソスネゑソスIソスソスソスnソス_ソスノ費ソスホゑソス
sprintf(label,"__WL%x_FIN",syntax.curly[syntax.curly_count].index);
syntax.curly_count++;
add_scriptl(add_str("jump_zero"));
@@ -1939,7 +1939,7 @@ const char* parse_syntax(const char* p)
}
const char* parse_syntax_close(const char *p) {
- // if(...) for(...) hoge(); のように、1度閉じられたら再度閉じられるか確認する
+ // if(...) for(...) hoge(); ソスフようソスノ、ソスPソスxソスツゑソスソスソス黷スソスソスト度ソスツゑソスソスソスソス驍ゥソスmソスFソスソスソスソス
int flag;
do {
@@ -1948,9 +1948,9 @@ const char* parse_syntax_close(const char *p) {
return p;
}
-// if, for , while , do の閉じ判定
-// flag == 1 : 閉じられた
-// flag == 0 : 閉じられない
+// if, for , while , do ソスフ閉ゑソスソスソスソスソス
+// flag == 1 : ソスツゑソスソスソス黷ス
+// flag == 0 : ソスツゑソスソスソスソスネゑソス
const char* parse_syntax_close_sub(const char* p,int* flag)
{
char label[256];
@@ -1968,13 +1968,13 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
// if-block and else-block end is a new line
parse_nextline(false, p);
- // if 最終場所へ飛ばす
+ // if ソスナ終ソス齒奇ソスヨ費ソスホゑソス
sprintf(label,"goto __IF%x_FIN;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // 現在地のラベルを付ける
+ // ソスソスソスン地ソスフソスソスxソスソスソスソスtソスソスソスソス
sprintf(label,"__IF%x_%x",syntax.curly[pos].index,syntax.curly[pos].count);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2010,14 +2010,14 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
}
}
}
- // if 閉じ
+ // if ソスツゑソス
syntax.curly_count--;
- // 最終地のラベルを付ける
+ // ソスナ終ソスnソスフソスソスxソスソスソスソスtソスソスソスソス
sprintf(label,"__IF%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
if(syntax.curly[pos].flag == 1) {
- // このifに対するelseじゃないのでポインタの位置は同じ
+ // ソスソスソスソスifソスノ対ゑソスソスソスelseソスソスソスソスネゑソスソスフでポソスCソスソスソス^ソスフ位置ソスヘ難ソスソスソス
return bp;
}
return p;
@@ -2027,13 +2027,13 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
const char *p2;
if(syntax.curly[pos].flag) {
- // 現在地のラベル形成する(continue でここに来る)
+ // ソスソスソスン地ソスフソスソスxソスソスソス`ソスソスソスソスソスソス(continue ソスナゑソスソスソスソスノ暦ソスソスソス)
sprintf(label,"__DO%x_NXT",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
}
- // 条件が偽なら終了地点に飛ばす
+ // ソスソスソスソスソスソスソスUソスネゑソスIソスソスソスnソス_ソスノ費ソスホゑソス
p = skip_space(p);
p2 = skip_word(p);
if(p2 - p != 5 || strncasecmp(p,"while",5))
@@ -2055,13 +2055,13 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
add_scriptl(add_str(label));
add_scriptc(C_FUNC);
- // 開始地点に飛ばす
+ // ソスJソスnソスnソス_ソスノ費ソスホゑソス
sprintf(label,"goto __DO%x_BGN;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // 条件終了地点のラベル形成する
+ // ソスソスソスソスソスIソスソスソスnソス_ソスフソスソスxソスソスソス`ソスソスソスソスソスソス
sprintf(label,"__DO%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2077,13 +2077,13 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
// for-block end is a new line
parse_nextline(false, p);
- // 次のループに飛ばす
+ // ソスソスソスフソスソス[ソスvソスノ費ソスホゑソス
sprintf(label,"goto __FR%x_NXT;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // for 終了のラベル付け
+ // for ソスIソスソスソスフソスソスxソスソスソスtソスソス
sprintf(label,"__FR%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2093,13 +2093,13 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
// while-block end is a new line
parse_nextline(false, p);
- // while 条件判断へ飛ばす
+ // while ソスソスソスソスソスソスソスfソスヨ費ソスホゑソス
sprintf(label,"goto __WL%x_NXT;",syntax.curly[pos].index);
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // while 終了のラベル付け
+ // while ソスIソスソスソスフソスソスxソスソスソスtソスソス
sprintf(label,"__WL%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2109,13 +2109,13 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
int pos = syntax.curly_count-1;
char label[256];
int l;
- // 戻す
+ // ソス゚ゑソス
sprintf(label,"return;");
syntax.curly[syntax.curly_count++].type = TYPE_NULL;
parse_line(label);
syntax.curly_count--;
- // 現在地のラベルを付ける
+ // ソスソスソスン地ソスフソスソスxソスソスソスソスtソスソスソスソス
sprintf(label,"__FN%x_FIN",syntax.curly[pos].index);
l=add_str(label);
set_label(l,script_pos,p);
@@ -2128,7 +2128,7 @@ const char* parse_syntax_close_sub(const char* p,int* flag)
}
/*==========================================
- * 組み込み関数の追加
+ * ソスgソスン搾ソスソスン関撰ソスソスフ追会ソス
*------------------------------------------*/
static void add_buildin_func(void)
{
@@ -2201,7 +2201,7 @@ void script_set_constant(const char* name, int value, bool isparameter)
}
/*==========================================
- * 定数データベースの読み込み
+ * ソス關費ソスfソス[ソス^ソスxソス[ソスXソスフ読み搾ソスソスソス
*------------------------------------------*/
static void read_constdb(void)
{
@@ -2229,7 +2229,7 @@ static void read_constdb(void)
}
/*==========================================
- * エラー表示
+ * ソスGソスソスソス[ソス\ソスソス
*------------------------------------------*/
static const char* script_print_line(StringBuf* buf, const char* p, const char* mark, int line)
{
@@ -2251,7 +2251,7 @@ static const char* script_print_line(StringBuf* buf, const char* p, const char*
void script_error(const char* src, const char* file, int start_line, const char* error_msg, const char* error_pos)
{
- // エラーが発生した行を求める
+ // ソスGソスソスソス[ソスソスソスソスソスソスソスソスソスソスソスsソスソスソスソスソス゚ゑソス
int j;
int line = start_line;
const char *p;
@@ -2286,7 +2286,7 @@ void script_error(const char* src, const char* file, int start_line, const char*
}
/*==========================================
- * スクリプトの解析
+ * ソスXソスNソスソスソスvソスgソスフ会ソスソス
*------------------------------------------*/
struct script_code* parse_script(const char *src,const char *file,int line,int options)
{
@@ -2382,7 +2382,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
{
if( *p == '\0' )
disp_error_message("unexpected end of script",p);
- // labelだけ特殊処理
+ // labelソスソスソスソスソスソスソス齒茨ソスソス
tmpp=skip_space(skip_word(p));
if(*tmpp==':' && !(!strncasecmp(p,"default:",8) && p + 7 == tmpp)){
i=add_word(p);
@@ -2394,7 +2394,7 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
continue;
}
- // 他は全部一緒くた
+ // ソスソスソスヘ全ソスソスソス齒擾ソスソスソスソス
p=parse_line(p);
p=skip_space(p);
@@ -2980,7 +2980,7 @@ void pop_stack(struct script_state* st, int start, int end)
///
/*==========================================
- * スクリプト依存変数、関数依存変数の解放
+ * ソスXソスNソスソスソスvソスgソスヒ托ソスソスマ撰ソスソスAソスヨ撰ソスソスヒ托ソスソスマ撰ソスソスフ会ソスソス
*------------------------------------------*/
void script_free_vars(struct DBMap* storage)
{
@@ -3045,10 +3045,10 @@ void script_free_state(struct script_state* st)
}
//
-// 実行部main
+// ソスソスソスsソスソスmain
//
/*==========================================
- * コマンドの読み取り
+ * ソスRソス}ソスソスソスhソスフ読み趣ソスソス
*------------------------------------------*/
c_op get_com(unsigned char *script,int *pos)
{
@@ -3065,7 +3065,7 @@ c_op get_com(unsigned char *script,int *pos)
}
/*==========================================
- * 数値の所得
+ * ソスソスソスlソスフ擾ソスソスソス
*------------------------------------------*/
int get_num(unsigned char *script,int *pos)
{
@@ -3079,7 +3079,7 @@ int get_num(unsigned char *script,int *pos)
}
/*==========================================
- * スタックから値を取り出す
+ * ソスXソス^ソスbソスNソスソスソスソスlソスソスソスソスソスoソスソス
*------------------------------------------*/
int pop_val(struct script_state* st)
{
@@ -3540,7 +3540,7 @@ void script_stop_sleeptimers(int id)
}
/*==========================================
- * 指定ノードをsleep_dbから削除
+ * ソスwソスソスmソス[ソスhソスソスsleep_dbソスソスソスソス除
*------------------------------------------*/
struct linkdb_node* script_erase_sleepdb(struct linkdb_node *n)
{
@@ -3556,11 +3556,11 @@ struct linkdb_node* script_erase_sleepdb(struct linkdb_node *n)
n->next->prev = n->prev;
retnode = n->next;
aFree( n );
- return retnode; // 次のノードを返す
+ return retnode; // ソスソスソスフノソス[ソスhソスソスヤゑソス
}
/*==========================================
- * sleep用タイマー関数
+ * sleepソスpソス^ソスCソス}ソス[ソスヨ撰ソス
*------------------------------------------*/
int run_script_timer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -3664,7 +3664,7 @@ static void script_attach_state(struct script_state* st)
}
/*==========================================
- * スクリプトの実行メイン部分
+ * ソスXソスNソスソスソスvソスgソスフ趣ソスソスsソスソスソスCソスソスソスソスソスソス
*------------------------------------------*/
void run_script_main(struct script_state *st)
{
@@ -4137,7 +4137,7 @@ static void *queryThread_main(void *x) {
}
#endif
/*==========================================
- * 終了
+ * ソスIソスソス
*------------------------------------------*/
int do_final_script() {
int i;
@@ -4249,7 +4249,7 @@ int do_final_script() {
return 0;
}
/*==========================================
- * 初期化
+ * ソスソスソスソス
*------------------------------------------*/
int do_init_script() {
userfunc_db=strdb_alloc(DB_OPT_DUP_KEY,0);
@@ -5004,7 +5004,7 @@ BUILDIN_FUNC(warp)
return 0;
}
/*==========================================
- * エリア指定ワープ
+ * ソスGソスソスソスAソスwソス閭擾ソス[ソスv
*------------------------------------------*/
static int buildin_areawarp_sub(struct block_list *bl,va_list ap)
{
@@ -6113,7 +6113,7 @@ BUILDIN_FUNC(countitem2)
}
/*==========================================
- * 重量チェック
+ * ソスdソスハチソスFソスbソスN
*------------------------------------------*/
BUILDIN_FUNC(checkweight)
{
@@ -6321,7 +6321,7 @@ BUILDIN_FUNC(getitem2)
c3=(short)script_getnum(st,9);
c4=(short)script_getnum(st,10);
- if(nameid<0) { // ランダム
+ if(nameid<0) { // ソスソスソスソスソス_ソスソス
nameid = -nameid;
flag = 1;
}
@@ -6557,7 +6557,7 @@ BUILDIN_FUNC(makeitem)
} else
m=map_mapname2mapid(mapname);
- if(nameid<0) { // ランダム
+ if(nameid<0) { // ソスソスソスソスソス_ソスソス
nameid = -nameid;
flag = 1;
}
@@ -6886,7 +6886,7 @@ BUILDIN_FUNC(disableitemuse)
}
/*==========================================
- *キャラ関係のパラメータ取得
+ *ソスLソスソスソスソスソスヨ係ソスフパソスソスソスソスソス[ソス^ソス謫セ
*------------------------------------------*/
BUILDIN_FUNC(readparam)
{
@@ -6909,7 +6909,7 @@ BUILDIN_FUNC(readparam)
return 0;
}
/*==========================================
- *キャラ関係のID取得
+ *ソスLソスソスソスソスソスヨ係ソスソスIDソス謫セ
*------------------------------------------*/
BUILDIN_FUNC(getcharid)
{
@@ -6972,7 +6972,7 @@ BUILDIN_FUNC(getnpcid)
return 0;
}
/*==========================================
- *指定IDのPT名取得
+ *ソスwソスソスIDソスソスPTソスソスソス謫セ
*------------------------------------------*/
BUILDIN_FUNC(getpartyname)
{
@@ -6992,7 +6992,7 @@ BUILDIN_FUNC(getpartyname)
return 0;
}
/*==========================================
- *指定IDのPT人数とメンバーID取得
+ *ソスwソスソスIDソスソスPTソスlソスソスソスニソスソスソスソスoソス[IDソス謫セ
*------------------------------------------*/
BUILDIN_FUNC(getpartymember)
{
@@ -7064,7 +7064,7 @@ BUILDIN_FUNC(getpartyleader)
}
/*==========================================
- *指定IDのギルド名取得
+ *ソスwソスソスIDソスフギソスソスソスhソスソスソス謫セ
*------------------------------------------*/
BUILDIN_FUNC(getguildname)
{
@@ -7085,7 +7085,7 @@ BUILDIN_FUNC(getguildname)
}
/*==========================================
- *指定IDのGuildMaster名取得
+ *ソスwソスソスIDソスソスGuildMasterソスソスソス謫セ
*------------------------------------------*/
BUILDIN_FUNC(getguildmaster)
{
@@ -7124,7 +7124,7 @@ BUILDIN_FUNC(getguildmasterid)
}
/*==========================================
- * キャラクタの名前
+ * ソスLソスソスソスソスソスNソス^ソスフ厄ソスソスO
*------------------------------------------*/
BUILDIN_FUNC(strcharinfo)
{
@@ -7176,7 +7176,7 @@ BUILDIN_FUNC(strcharinfo)
}
/*==========================================
- * 呼び出し元のNPC情報を取得する
+ * ソストび出ソスソスソスソスソスソスNPCソスソスソスソスソス謫セソスソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(strnpcinfo)
{
@@ -7265,7 +7265,7 @@ BUILDIN_FUNC(getequipid)
}
/*==========================================
- * 装備名文字列(精錬メニュー用)
+ * ソスソスソスソスソスソスソスソスソスソスソスソスiソスソスソスBソスソスソスjソスソスソス[ソスpソスj
*------------------------------------------*/
BUILDIN_FUNC(getequipname)
{
@@ -7391,7 +7391,7 @@ BUILDIN_FUNC(repairall)
}
/*==========================================
- * 装備チェック
+ * ソスソスソスソスソス`ソスFソスbソスN
*------------------------------------------*/
BUILDIN_FUNC(getequipisequiped)
{
@@ -7414,7 +7414,7 @@ BUILDIN_FUNC(getequipisequiped)
}
/*==========================================
- * 装備品精錬可能チェック
+ * ソスソスソスソスソスiソスソスソスBソスツ能ソス`ソスFソスbソスN
*------------------------------------------*/
BUILDIN_FUNC(getequipisenableref)
{
@@ -7437,7 +7437,7 @@ BUILDIN_FUNC(getequipisenableref)
}
/*==========================================
- * 装備品鑑定チェック
+ * ソスソスソスソスソスiソスモ抵ソス`ソスFソスbソスN
*------------------------------------------*/
BUILDIN_FUNC(getequipisidentify)
{
@@ -7460,7 +7460,7 @@ BUILDIN_FUNC(getequipisidentify)
}
/*==========================================
- * 装備品精錬度
+ * ソスソスソスソスソスiソスソスソスBソスx
*------------------------------------------*/
BUILDIN_FUNC(getequiprefinerycnt)
{
@@ -7483,7 +7483,7 @@ BUILDIN_FUNC(getequiprefinerycnt)
}
/*==========================================
- * 装備品武器LV
+ * ソスソスソスソスソスiソスソスソスソスLV
*------------------------------------------*/
BUILDIN_FUNC(getequipweaponlv)
{
@@ -7506,7 +7506,7 @@ BUILDIN_FUNC(getequipweaponlv)
}
/*==========================================
- * 装備品精錬成功率
+ * ソスソスソスソスソスiソスソスソスBソスソスソスソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(getequippercentrefinery)
{
@@ -7529,7 +7529,7 @@ BUILDIN_FUNC(getequippercentrefinery)
}
/*==========================================
- * 精錬成功
+ * ソスソスソスBソスソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(successrefitem)
{
@@ -7583,7 +7583,7 @@ BUILDIN_FUNC(successrefitem)
}
/*==========================================
- * 精錬失敗
+ * ソスソスソスBソスソスソスs
*------------------------------------------*/
BUILDIN_FUNC(failedrefitem)
{
@@ -7600,11 +7600,11 @@ BUILDIN_FUNC(failedrefitem)
if(i >= 0) {
sd->status.inventory[i].refine = 0;
pc_unequipitem(sd,i,3);
- // 精錬失敗エフェクトのパケット
+ // ソスソスソスBソスソスソスsソスGソスtソスFソスNソスgソスフパソスPソスbソスg
clif_refine(sd->fd,1,i,sd->status.inventory[i].refine);
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
- // 他の人にも失敗を通知
+ // ソスソスソスフ人ソスノゑソスソスソスソスsソスソスハ知
clif_misceffect(&sd->bl,2);
}
@@ -8478,7 +8478,7 @@ BUILDIN_FUNC(gettimestr)
}
/*==========================================
- * カプラ倉庫を開く
+ * ソスJソスvソスソスソスqソスノゑソスソスJソスソス
*------------------------------------------*/
BUILDIN_FUNC(openstorage)
{
@@ -8507,7 +8507,7 @@ BUILDIN_FUNC(guildopenstorage)
}
/*==========================================
- * アイテムによるスキル発動
+ * ソスAソスCソスeソスソスソスノゑソスソスXソスLソスソスソスソスソスソス
*------------------------------------------*/
/// itemskill <skill id>,<level>
/// itemskill "<skill name>",<level>
@@ -8530,7 +8530,7 @@ BUILDIN_FUNC(itemskill)
return 0;
}
/*==========================================
- * アイテム作成
+ * ソスAソスCソスeソスソスソス成
*------------------------------------------*/
BUILDIN_FUNC(produce)
{
@@ -8562,7 +8562,7 @@ BUILDIN_FUNC(cooking)
return 0;
}
/*==========================================
- * NPCでペット作る
+ * NPCソスナペソスbソスgソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(makepet)
{
@@ -8590,7 +8590,7 @@ BUILDIN_FUNC(makepet)
return 0;
}
/*==========================================
- * NPCで経験値上げる
+ * NPCソスナ経ソスソスソスlソス繧ーソスソス
*------------------------------------------*/
BUILDIN_FUNC(getexp)
{
@@ -8660,7 +8660,7 @@ BUILDIN_FUNC(guildchangegm)
}
/*==========================================
- * モンスター発生
+ * ソスソスソスソスソスXソス^ソス[ソスソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(monster)
{
@@ -8742,7 +8742,7 @@ BUILDIN_FUNC(getmobdrops)
return 0;
}
/*==========================================
- * モンスター発生
+ * ソスソスソスソスソスXソス^ソス[ソスソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(areamonster)
{
@@ -8786,7 +8786,7 @@ BUILDIN_FUNC(areamonster)
return 0;
}
/*==========================================
- * モンスター削除
+ * ソスソスソスソスソスXソス^ソス[ソス除
*------------------------------------------*/
static int buildin_killmonster_sub_strip(struct block_list *bl,va_list ap)
{ //same fix but with killmonster instead - stripping events from mobs.
@@ -8941,7 +8941,7 @@ BUILDIN_FUNC(clone)
return 0;
}
/*==========================================
- * イベント実行
+ * ソスCソスxソスソスソスgソスソスソスs
*------------------------------------------*/
BUILDIN_FUNC(doevent)
{
@@ -8958,7 +8958,7 @@ BUILDIN_FUNC(doevent)
return 0;
}
/*==========================================
- * NPC主体イベント実行
+ * NPCソスソスフイソスxソスソスソスgソスソスソスs
*------------------------------------------*/
BUILDIN_FUNC(donpcevent)
{
@@ -8987,7 +8987,7 @@ BUILDIN_FUNC(cmdothernpc) // Added by RoVeRT
}
/*==========================================
- * イベントタイマー追加
+ * ソスCソスxソスソスソスgソス^ソスCソス}ソス[ソスヌ会ソス
*------------------------------------------*/
BUILDIN_FUNC(addtimer)
{
@@ -9004,7 +9004,7 @@ BUILDIN_FUNC(addtimer)
return 0;
}
/*==========================================
- * イベントタイマー削除
+ * ソスCソスxソスソスソスgソス^ソスCソス}ソス[ソス除
*------------------------------------------*/
BUILDIN_FUNC(deltimer)
{
@@ -9021,7 +9021,7 @@ BUILDIN_FUNC(deltimer)
return 0;
}
/*==========================================
- * イベントタイマーのカウント値追加
+ * ソスCソスxソスソスソスgソス^ソスCソス}ソス[ソスフカソスEソスソスソスgソスlソスヌ会ソス
*------------------------------------------*/
BUILDIN_FUNC(addtimercount)
{
@@ -9041,7 +9041,7 @@ BUILDIN_FUNC(addtimercount)
}
/*==========================================
- * NPCタイマー初期化
+ * NPCソス^ソスCソス}ソス[ソスソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(initnpctimer)
{
@@ -9090,7 +9090,7 @@ BUILDIN_FUNC(initnpctimer)
return 0;
}
/*==========================================
- * NPCタイマー開始
+ * NPCソス^ソスCソス}ソス[ソスJソスn
*------------------------------------------*/
BUILDIN_FUNC(startnpctimer)
{
@@ -9137,7 +9137,7 @@ BUILDIN_FUNC(startnpctimer)
return 0;
}
/*==========================================
- * NPCタイマー停止
+ * NPCソス^ソスCソス}ソス[ソスソス~
*------------------------------------------*/
BUILDIN_FUNC(stopnpctimer)
{
@@ -9179,7 +9179,7 @@ BUILDIN_FUNC(stopnpctimer)
return 0;
}
/*==========================================
- * NPCタイマー情報所得
+ * NPCソス^ソスCソス}ソス[ソスソス所難ソス
*------------------------------------------*/
BUILDIN_FUNC(getnpctimer)
{
@@ -9224,7 +9224,7 @@ BUILDIN_FUNC(getnpctimer)
return 0;
}
/*==========================================
- * NPCタイマー値設定
+ * NPCソス^ソスCソス}ソス[ソスlソスン抵ソス
*------------------------------------------*/
BUILDIN_FUNC(setnpctimer)
{
@@ -9320,7 +9320,7 @@ BUILDIN_FUNC(playerattached)
}
/*==========================================
- * 天の声アナウンス
+ * ソスVソスフ撰ソスソスAソスiソスEソスソスソスX
*------------------------------------------*/
BUILDIN_FUNC(announce)
{
@@ -9359,7 +9359,7 @@ BUILDIN_FUNC(announce)
return 0;
}
/*==========================================
- * 天の声アナウンス(特定マップ)
+ * ソスVソスフ撰ソスソスAソスiソスEソスソスソスXソスiソスソスソスソス}ソスbソスvソスj
*------------------------------------------*/
static int buildin_announce_sub(struct block_list *bl, va_list ap)
{
@@ -9398,7 +9398,7 @@ BUILDIN_FUNC(mapannounce)
return 0;
}
/*==========================================
- * 天の声アナウンス(特定エリア)
+ * ソスVソスフ撰ソスソスAソスiソスEソスソスソスXソスiソスソスソスソスGソスソスソスAソスj
*------------------------------------------*/
BUILDIN_FUNC(areaannounce)
{
@@ -9425,7 +9425,7 @@ BUILDIN_FUNC(areaannounce)
}
/*==========================================
- * ユーザー数所得
+ * ソスソスソス[ソスUソス[ソスソスソスソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(getusers)
{
@@ -9520,7 +9520,7 @@ BUILDIN_FUNC(getmapguildusers)
return 0;
}
/*==========================================
- * マップ指定ユーザー数所得
+ * ソス}ソスbソスvソスwソス閭ソス[ソスUソス[ソスソスソスソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(getmapusers)
{
@@ -9535,7 +9535,7 @@ BUILDIN_FUNC(getmapusers)
return 0;
}
/*==========================================
- * エリア指定ユーザー数所得
+ * ソスGソスソスソスAソスwソス閭ソス[ソスUソス[ソスソスソスソスソスソス
*------------------------------------------*/
static int buildin_getareausers_sub(struct block_list *bl,va_list ap)
{
@@ -9563,7 +9563,7 @@ BUILDIN_FUNC(getareausers)
}
/*==========================================
- * エリア指定ドロップアイテム数所得
+ * ソスGソスソスソスAソスwソスソスhソスソスソスbソスvソスAソスCソスeソスソスソスソスソスソスソスソス
*------------------------------------------*/
static int buildin_getareadropitem_sub(struct block_list *bl,va_list ap)
{
@@ -9609,7 +9609,7 @@ BUILDIN_FUNC(getareadropitem)
return 0;
}
/*==========================================
- * NPCの有効化
+ * NPCソスフ有ソスソス
*------------------------------------------*/
BUILDIN_FUNC(enablenpc)
{
@@ -9619,7 +9619,7 @@ BUILDIN_FUNC(enablenpc)
return 0;
}
/*==========================================
- * NPCの無効化
+ * NPCソスフ厄ソスソスソス
*------------------------------------------*/
BUILDIN_FUNC(disablenpc)
{
@@ -9630,7 +9630,7 @@ BUILDIN_FUNC(disablenpc)
}
/*==========================================
- * 隠れているNPCの表示
+ * ソスBソスソストゑソスソスソスNPCソスフ表ソスソス
*------------------------------------------*/
BUILDIN_FUNC(hideoffnpc)
{
@@ -9640,7 +9640,7 @@ BUILDIN_FUNC(hideoffnpc)
return 0;
}
/*==========================================
- * NPCをハイディング
+ * NPCソスソスソスnソスCソスfソスBソスソスソスO
*------------------------------------------*/
BUILDIN_FUNC(hideonnpc)
{
@@ -9802,7 +9802,7 @@ BUILDIN_FUNC(sc_end)
}
/*==========================================
- * 状態異常耐性を計算した確率を返す
+ * ソスソスヤ異擾ソスマ撰ソスソスソスソスvソスZソスソスソスソスソスmソスソスソスソスヤゑソス
*------------------------------------------*/
BUILDIN_FUNC(getscrate)
{
@@ -9811,7 +9811,7 @@ BUILDIN_FUNC(getscrate)
type=script_getnum(st,2);
rate=script_getnum(st,3);
- if( script_hasdata(st,4) ) //指定したキャラの耐性を計算する
+ if( script_hasdata(st,4) ) //ソスwソス閧オソスソスソスLソスソスソスソスソスフ耐撰ソスソスソスソスvソスZソスソスソスソス
bl = map_id2bl(script_getnum(st,4));
else
bl = map_id2bl(st->rid);
@@ -9885,7 +9885,7 @@ BUILDIN_FUNC(debugmes)
}
/*==========================================
- *捕獲アイテム使用
+ *ソス゚獲ソスAソスCソスeソスソスソスgソスp
*------------------------------------------*/
BUILDIN_FUNC(catchpet)
{
@@ -10039,7 +10039,7 @@ BUILDIN_FUNC(resetlvl)
return 0;
}
/*==========================================
- * ステータスリセット
+ * ソスXソスeソス[ソス^ソスXソスソスソスZソスbソスg
*------------------------------------------*/
BUILDIN_FUNC(resetstatus)
{
@@ -10110,7 +10110,7 @@ BUILDIN_FUNC(changebase)
}
/*==========================================
- * 性別変換
+ * ソスソスソスハ変奇ソス
*------------------------------------------*/
BUILDIN_FUNC(changesex)
{
@@ -10135,16 +10135,16 @@ BUILDIN_FUNC(globalmes)
struct npc_data *nd = (struct npc_data *)bl;
const char *name=NULL,*mes;
- mes=script_getstr(st,2); // メッセージの取得
+ mes=script_getstr(st,2); // ソスソスソスbソスZソス[ソスWソスフ取得
if(mes==NULL) return 0;
- if(script_hasdata(st,3)){ // NPC名の取得(123#456)
+ if(script_hasdata(st,3)){ // NPCソスソスソスフ取得(123#456)
name=script_getstr(st,3);
} else {
name=nd->name;
}
- npc_globalmessage(name,mes); // グローバルメッセージ送信
+ npc_globalmessage(name,mes); // ソスOソスソスソス[ソスoソスソスソスソスソスbソスZソス[ソスWソスソスソスM
return 0;
}
@@ -10379,7 +10379,7 @@ static void script_detach_rid(struct script_state* st)
}
/*==========================================
- * RIDのアタッチ
+ * RIDソスフアソス^ソスbソス`
*------------------------------------------*/
BUILDIN_FUNC(attachrid)
{
@@ -10397,7 +10397,7 @@ BUILDIN_FUNC(attachrid)
return 0;
}
/*==========================================
- * RIDのデタッチ
+ * RIDソスフデソス^ソスbソス`
*------------------------------------------*/
BUILDIN_FUNC(detachrid)
{
@@ -10405,7 +10405,7 @@ BUILDIN_FUNC(detachrid)
return 0;
}
/*==========================================
- * 存在チェック
+ * ソスソスソスンチソスFソスbソスN
*------------------------------------------*/
BUILDIN_FUNC(isloggedin)
{
@@ -11029,7 +11029,7 @@ BUILDIN_FUNC(setcastledata)
}
/* =====================================================================
- * ギルド情報を要求する
+ * ソスMソスソスソスhソスソスソスソスvソスソスソスソスソスソス
* ---------------------------------------------------------------------*/
BUILDIN_FUNC(requestguildinfo)
{
@@ -11107,14 +11107,14 @@ BUILDIN_FUNC(successremovecards) {
item_tmp.nameid = sd->status.inventory[i].card[c];
item_tmp.identify = 1;
- if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // 持てないならドロップ
+ if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // ソスソスソストなゑソスソスネゑソスhソスソスソスbソスv
clif_additem(sd,0,0,flag);
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
}
}
- if(cardflag == 1) {// カードを取り除いたアイテム所得
+ if(cardflag == 1) {// ソスJソス[ソスhソスソスソスソス闖懶ソスソスソスソスソスAソスCソスeソスソスソスソスソスソス
int flag;
struct item item_tmp;
memset(&item_tmp,0,sizeof(item_tmp));
@@ -11129,7 +11129,7 @@ BUILDIN_FUNC(successremovecards) {
item_tmp.card[j]=sd->status.inventory[i].card[j];
pc_delitem(sd,i,1,0,3,LOG_TYPE_SCRIPT);
- if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // もてないならドロップ
+ if((flag=pc_additem(sd,&item_tmp,1,LOG_TYPE_SCRIPT))){ // ソスソスソストなゑソスソスネゑソスhソスソスソスbソスv
clif_additem(sd,0,0,flag);
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}
@@ -11183,10 +11183,10 @@ BUILDIN_FUNC(failedremovecards) {
}
if(cardflag == 1) {
- if(typefail == 0 || typefail == 2){ // 武具損失
+ if(typefail == 0 || typefail == 2){ // ソスソスソス損ソスソス
pc_delitem(sd,i,1,0,2,LOG_TYPE_SCRIPT);
}
- if(typefail == 1){ // カードのみ損失(武具を返す)
+ if(typefail == 1){ // ソスJソス[ソスhソスフみ托ソスソスソスソスiソスソスソスソスソスヤゑソスソスj
int flag;
struct item item_tmp;
@@ -11590,7 +11590,7 @@ BUILDIN_FUNC(guardianinfo)
}
/*==========================================
- * IDからItem名
+ * IDソスソスソスソスItemソスソス
*------------------------------------------*/
BUILDIN_FUNC(getitemname)
{
@@ -11830,7 +11830,7 @@ BUILDIN_FUNC(petloot)
return 0;
}
/*==========================================
- * PCの所持品情報読み取り
+ * PCソスフ擾ソスソスソスソスiソスソスソスヌみ趣ソスソス
*------------------------------------------*/
BUILDIN_FUNC(getinventorylist)
{
@@ -11928,9 +11928,9 @@ BUILDIN_FUNC(undisguise)
}
/*==========================================
- * NPCクラスチェンジ
- * classは変わりたいclass
- * typeは通常0なのかな?
+ * NPCソスNソスソスソスXソス`ソスFソスソスソスW
+ * classソスヘ変ゑソス閧スソスソスclass
+ * typeソスヘ通擾ソス0ソスネのゑソスソスネ?
*------------------------------------------*/
BUILDIN_FUNC(classchange)
{
@@ -11946,7 +11946,7 @@ BUILDIN_FUNC(classchange)
}
/*==========================================
- * NPCから発生するエフェクト
+ * NPCソスソスソス逕ュソスソスソスソスソスソスGソスtソスFソスNソスg
*------------------------------------------*/
BUILDIN_FUNC(misceffect)
{
@@ -12033,7 +12033,7 @@ BUILDIN_FUNC(playBGMall)
}
/*==========================================
- * サウンドエフェクト
+ * ソスTソスEソスソスソスhソスGソスtソスFソスNソスg
*------------------------------------------*/
BUILDIN_FUNC(soundeffect)
{
@@ -12441,7 +12441,7 @@ BUILDIN_FUNC(recovery)
status_revive(&sd->bl, 100, 100);
else
status_percent_heal(&sd->bl, 100, 100);
- clif_displaymessage(sd->fd,"You have been recovered!");
+ clif_displaymessage(sd->fd,msg_txt(680));
}
mapit_free(iter);
return 0;
diff --git a/src/map/skill.c b/src/map/skill.c
index f7aac952a..93eb3bf36 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -1259,7 +1259,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
else if( dstmd && !is_boss(bl) )
sc_start(bl, SC_STUN, 100, skilllv, 1000 + 1000 * (rnd() %3));
break;
- case SR_GENTLETOUCH_QUIET: // [(Skill Level x 5) + (Caster痴 DEX + Caster痴 Base Level) / 10]
+ case SR_GENTLETOUCH_QUIET: // [(Skill Level x 5) + (Casterソスs DEX + Casterソスs Base Level) / 10]
sc_start(bl, SC_SILENCE, 5 * skilllv + (sstatus->dex + status_get_lv(src)) / 10, skilllv, skill_get_time(skillid, skilllv));
break;
case SR_EARTHSHAKER:
@@ -1323,7 +1323,7 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
sc_start(bl, SC_MELON_BOMB, 100, skilllv, skill_get_time(GN_SLINGITEM, skilllv)); // Reduces ASPD and moviment speed
break;
case 13264:
- sc_start(bl, SC_BANANA_BOMB, 100, skilllv, skill_get_time(GN_SLINGITEM, skilllv)); // Reduces LUK タ?Needed confirm it, may be it's bugged in kRORE?
+ sc_start(bl, SC_BANANA_BOMB, 100, skilllv, skill_get_time(GN_SLINGITEM, skilllv)); // Reduces LUK ソス?Needed confirm it, may be it's bugged in kRORE?
sc_start(bl, SC_BANANA_BOMB_SITDOWN, 75, skilllv, skill_get_time(GN_SLINGITEM_RANGEMELEEATK,skilllv)); // Sitdown for 3 seconds.
break;
}
@@ -2739,12 +2739,12 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
}
/*==========================================
- * スキル範??U?用(map_foreachinareaから呼ばれる)
- * flagについて?F16?i?を確認
+ * ソスXソスLソスソスソスソス??U?ソスp(map_foreachinareaソスソスソスソストばゑソスソス)
+ * flagソスノつゑソスソスソス?F16?i?ソスソスソスmソスF
* MSB <- 00fTffff ->LSB
- * T =タ?ゲット選?用(BCT_*)
- * ffff=自由に使用可能
- * 0 =予約?B0に固定
+ * T =ソス^?ソスQソスbソスgソスI?ソスp(BCT_*)
+ * ffff=ソスソスソスRソスノ使ソスpソスツ能
+ * 0 =ソス\ソスソス?B0ソスノ固抵ソス
*------------------------------------------*/
typedef int (*SkillFunc)(struct block_list *, struct block_list *, int, int, unsigned int, int);
int skill_area_sub (struct block_list *bl, va_list ap)
@@ -5959,7 +5959,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
break;
}
if(!battle_config.duel_allow_teleport && sd->duel_group && skilllv <= 2) { // duel restriction [LuzZza]
- clif_displaymessage(sd->fd, "Duel: Can't use teleport in duel.");
+ char output[128]; sprintf(output, msg_txt(365), skill_get_name(AL_TELEPORT));
+ clif_displaymessage(sd->fd, output); //"Duel: Can't use %s in duel."
break;
}
@@ -7861,7 +7862,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case RA_WUGDASH:
if( tsce ) {
- clif_skill_nodamage(src,bl,skillid,skilllv,status_change_end(bl, type, -1));
+ clif_skill_nodamage(src,bl,skillid,skilllv,status_change_end(bl, type, INVALID_TIMER));
map_freeblock_unlock();
return 0;
}
@@ -12208,7 +12209,8 @@ int skill_check_condition_castbegin(struct map_session_data* sd, short skill, sh
break;
case AL_WARP:
if(!battle_config.duel_allow_teleport && sd->duel_group) { // duel restriction [LuzZza]
- clif_displaymessage(sd->fd, "Duel: Can't use warp in duel.");
+ char output[128]; sprintf(output, msg_txt(365), skill_get_name(AL_WARP));
+ clif_displaymessage(sd->fd, output); //"Duel: Can't use %s in duel."
return 0;
}
break;
@@ -13402,12 +13404,12 @@ int skill_castfix_sc (struct block_list *bl, int time)
time += time * sc->data[SC_SLOWCAST]->val2 / 100;
if (sc->data[SC_SUFFRAGIUM]) {
time -= time * sc->data[SC_SUFFRAGIUM]->val2 / 100;
- status_change_end(bl, SC_SUFFRAGIUM, -1);
+ status_change_end(bl, SC_SUFFRAGIUM, INVALID_TIMER);
}
if (sc->data[SC_MEMORIZE]) {
time>>=1;
if ((--sc->data[SC_MEMORIZE]->val2) <= 0)
- status_change_end(bl, SC_MEMORIZE, -1);
+ status_change_end(bl, SC_MEMORIZE, INVALID_TIMER);
}
if (sc->data[SC_POEMBRAGI])
time -= time * sc->data[SC_POEMBRAGI]->val2 / 100;
@@ -15762,8 +15764,8 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in
difficulty = (620 - 20 * skilllv);// (620 - 20 * Skill Level)
- make_per = status->int_ + status->dex/2 + status->luk + sd->status.job_level + (30+rnd()%120) + // (Caster痴 INT) + (Caster痴 DEX / 2) + (Caster痴 LUK) + (Caster痴 Job Level) + Random number between (30 ~ 150) +
- (sd->status.base_level-100) + pc_checkskill(sd, AM_LEARNINGPOTION) + pc_checkskill(sd, CR_FULLPROTECTION)*(4+rnd()%6); // (Caster痴 Base Level - 100) + (Potion Research x 5) + (Full Chemical Protection Skill Level) x (Random number between 4 ~ 10)
+ make_per = status->int_ + status->dex/2 + status->luk + sd->status.job_level + (30+rnd()%120) + // (Casterソスs INT) + (Casterソスs DEX / 2) + (Casterソスs LUK) + (Casterソスs Job Level) + Random number between (30 ~ 150) +
+ (sd->status.base_level-100) + pc_checkskill(sd, AM_LEARNINGPOTION) + pc_checkskill(sd, CR_FULLPROTECTION)*(4+rnd()%6); // (Casterソスs Base Level - 100) + (Potion Research x 5) + (Full Chemical Protection Skill Level) x (Random number between 4 ~ 10)
switch(nameid){// difficulty factor
case 12422: case 12425:
@@ -15804,7 +15806,7 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in
{
int difficulty = 30 + rnd()%120; // Random number between (30 ~ 150)
- make_per = sd->status.job_level / 4 + status->luk / 2 + status->dex / 3; // (Caster痴 Job Level / 4) + (Caster痴 LUK / 2) + (Caster痴 DEX / 3)
+ make_per = sd->status.job_level / 4 + status->luk / 2 + status->dex / 3; // (Casterソスs Job Level / 4) + (Casterソスs LUK / 2) + (Casterソスs DEX / 3)
qty = ~(5 + rnd()%5) + 1;
switch(nameid){// difficulty factor
diff --git a/src/map/skill.h b/src/map/skill.h
index 509c53bdb..5225afb77 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -87,7 +87,8 @@ struct skill_condition {
int itemid[MAX_SKILL_ITEM_REQUIRE],amount[MAX_SKILL_ITEM_REQUIRE];
};
-// スキルデ?タベ?ス
+// Database skills
+
struct s_skill_db {
char name[NAME_LENGTH];
char desc[40];
@@ -116,7 +117,7 @@ struct s_skill_db {
extern struct s_skill_db skill_db[MAX_SKILL_DB];
#define MAX_SKILL_UNIT_LAYOUT 50
-#define MAX_SQUARE_LAYOUT 5 // 11*11のユニット配置が最大
+#define MAX_SQUARE_LAYOUT 5 // 11*11 Placement of a maximum unit
#define MAX_SKILL_UNIT_COUNT ((MAX_SQUARE_LAYOUT*2+1)*(MAX_SQUARE_LAYOUT*2+1))
struct s_skill_unit_layout {
int count;
@@ -195,7 +196,8 @@ enum {
UF_DUALMODE = 0x0800, // Spells should trigger both ontimer and onplace/onout/onleft effects.
};
-// アイテム作成デ?タベ?ス
+// Create Database item
+
struct s_skill_produce_db {
int nameid, trigger;
int req_skill,req_skill_lv,itemlv;
@@ -203,14 +205,16 @@ struct s_skill_produce_db {
};
extern struct s_skill_produce_db skill_produce_db[MAX_SKILL_PRODUCE_DB];
-// 矢作成デ?タベ?ス
+// Creating database arrow
+
struct s_skill_arrow_db {
int nameid, trigger;
int cre_id[MAX_ARROW_RESOURCE],cre_amount[MAX_ARROW_RESOURCE];
};
extern struct s_skill_arrow_db skill_arrow_db[MAX_SKILL_ARROW_DB];
-// アブラカダブラデ?タベ?ス
+// Abracadabra database
+
struct s_skill_abra_db {
int skillid;
int req_lv;
@@ -227,7 +231,8 @@ int do_final_skill(void);
//Returns the cast type of the skill: ground cast, castend damage, castend no damage
enum { CAST_GROUND, CAST_DAMAGE, CAST_NODAMAGE };
int skill_get_casttype(int id); //[Skotlex]
-// スキルデ?タベ?スへのアクセサ
+
+// Accessor to the skills database
//
int skill_get_index( int id );
int skill_get_type( int id );
@@ -277,13 +282,13 @@ int skill_castend_map( struct map_session_data *sd,short skill_num, const char *
int skill_cleartimerskill(struct block_list *src);
int skill_addtimerskill(struct block_list *src,unsigned int tick,int target,int x,int y,int skill_id,int skill_lv,int type,int flag);
-// 追加?果
+// Results? Added
int skill_additional_effect( struct block_list* src, struct block_list *bl,int skillid,int skilllv,int attack_type,int dmg_lv,unsigned int tick);
int skill_counter_additional_effect( struct block_list* src, struct block_list *bl,int skillid,int skilllv,int attack_type,unsigned int tick);
int skill_blown(struct block_list* src, struct block_list* target, int count, int direction, int flag);
int skill_break_equip(struct block_list *bl, unsigned short where, int rate, int flag);
int skill_strip_equip(struct block_list *bl, unsigned short where, int rate, int lv, int time);
-// ユニットスキル
+// Skills unit
struct skill_unit_group* skill_id2group(int group_id);
struct skill_unit_group *skill_unitsetting(struct block_list* src, short skillid, short skilllv, short x, short y, int flag);
struct skill_unit *skill_initunit (struct skill_unit_group *group, int idx, int x, int y, int val1, int val2);
@@ -321,7 +326,7 @@ struct skill_unit_group *skill_check_dancing( struct block_list *src );
// Guild skills [celest]
int skill_guildaura_sub (struct map_session_data* sd, int id, int strvit, int agidex);
-// 詠唱キャンセル
+// Chant canceled
int skill_castcancel(struct block_list *bl,int type);
int skill_sit (struct map_session_data *sd, int type);
@@ -335,7 +340,7 @@ int skill_calc_heal(struct block_list *src, struct block_list *target, int skill
bool skill_check_cloaking(struct block_list *bl, struct status_change_entry *sce);
-// ステ?タス異常
+// Abnormal status
int skill_enchant_elemental_end(struct block_list *bl, int type);
int skillnotok(int skillid, struct map_session_data *sd);
int skillnotok_hom(int skillid, struct homun_data *hd);
@@ -343,13 +348,13 @@ int skillnotok_mercenary(int skillid, struct mercenary_data *md);
int skill_chastle_mob_changetarget(struct block_list *bl,va_list ap);
-// アイテム作成
+// Item creation
int skill_can_produce_mix( struct map_session_data *sd, int nameid, int trigger, int qty);
int skill_produce_mix( struct map_session_data *sd, int skill_id, int nameid, int slot1, int slot2, int slot3, int qty );
int skill_arrow_create( struct map_session_data *sd,int nameid);
-// mobスキルのため
+// skills for the mob
int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skilllv,unsigned int tick,int flag);
@@ -365,7 +370,7 @@ int skill_blockmerc_start (struct mercenary_data*,int,int);
((id) >= BD_ADAPTATION && (id) <= DC_SERVICEFORYOU) || ((id) >= CG_ARROWVULCAN && (id) <= CG_MARIONETTE) || \
((id) >= CG_LONGINGFREEDOM && (id) <= CG_TAROTCARD) || ((id) >= WA_SWING_DANCE && (id) <= WM_UNLIMITED_HUMMING_VOICE))
-// スキル攻?一括?理
+// Skill action, (return dmg,heal)
int skill_attack( int attack_type, struct block_list* src, struct block_list *dsrc,struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
void skill_reload(void);
diff --git a/src/map/status.c b/src/map/status.c
index 585b90fe9..9300a2082 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -66,7 +66,7 @@ static struct {
int randombonus_max[MAX_REFINE]; // cumulative maximum random bonus damage
} refine_info[REFINE_TYPE_MAX];
-static int atkmods[3][MAX_WEAPON_TYPE]; // 武器ATKサイズ修正(size_fix.txt)
+static int atkmods[3][MAX_WEAPON_TYPE]; //ATK weapon modification for size (size_fix.txt)
static char job_bonus[CLASS_COUNT][MAX_LEVEL];
static struct eri *sc_data_ers; //For sc_data entries
@@ -2059,7 +2059,7 @@ int status_calc_mob_(struct mob_data* md, bool first)
if (flag&2)
{ // change for sized monsters [Valaris]
- if (md->special_state.size==1) {
+ if (md->special_state.size==SZ_MEDIUM) {
status->max_hp>>=1;
status->max_sp>>=1;
if (!status->max_hp) status->max_hp = 1;
@@ -2078,7 +2078,7 @@ int status_calc_mob_(struct mob_data* md, bool first)
if (!status->int_) status->int_ = 1;
if (!status->dex) status->dex = 1;
if (!status->luk) status->luk = 1;
- } else if (md->special_state.size==2) {
+ } else if (md->special_state.size==SZ_BIG) {
status->max_hp<<=1;
status->max_sp<<=1;
status->hp=status->max_hp;
@@ -2280,7 +2280,7 @@ int status_calc_pc_(struct map_session_data* sd, bool first)
b_max_weight = sd->max_weight;
b_cart_weight_max = sd->cart_weight_max;
- pc_calc_skilltree(sd); // スキルツリ?の計算
+ pc_calc_skilltree(sd); // ソスXソスLソスソスソスcソスソス?ソスフ計ソスZ
sd->max_weight = max_weight_base[pc_class2idx(sd->status.class_)]+sd->status.str*300;
@@ -5555,8 +5555,8 @@ const char* status_get_name(struct block_list *bl) {
}
/*==========================================
- * 対象のClassを返す(汎用)
- * 戻りは整数で0以上
+ * ソスホ象ゑソスClassソスソスヤゑソス(ソスト用)
+ * ソス゚ゑソスヘ撰ソスソスソスソスソス0ソスネ擾ソス
*------------------------------------------*/
int status_get_class(struct block_list *bl) {
nullpo_ret(bl);
@@ -5572,8 +5572,8 @@ int status_get_class(struct block_list *bl) {
return 0;
}
/*==========================================
- * 対象のレベルを返す(汎用)
- * 戻りは整数で0以上
+ * ソスホ象のソスソスxソスソスソスソスヤゑソス(ソスト用)
+ * ソス゚ゑソスヘ撰ソスソスソスソスソス0ソスネ擾ソス
*------------------------------------------*/
int status_get_lv(struct block_list *bl) {
nullpo_ret(bl);
@@ -7196,7 +7196,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
status_zap(bl, diff, 0);
}
// fall through
- case SC_POISON: /* 毒 */
+ case SC_POISON: /* ソスソス */
val3 = tick/1000; //Damage iterations
if(val3 < 1) val3 = 1;
tick_time = 1000; // [GodLesZ] tick time
@@ -7269,7 +7269,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
else
val4 |= battle_config.monster_cloak_check_type&7;
break;
- case SC_SIGHT: /* サイト/ルアフ */
+ case SC_SIGHT: /* ソスTソスCソスg/ソスソスソスAソスt */
case SC_RUWACH:
case SC_SIGHTBLASTER:
val3 = skill_get_splash(val2, val1); //Val2 should bring the skill-id.
@@ -8179,9 +8179,9 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_GT_CHANGE:
{// take note there is no def increase as skill desc says. [malufett]
struct block_list * src;
- val3 = status->agi * val1 / 60; // ASPD increase: [(Target痴 AGI x Skill Level) / 60] %
+ val3 = status->agi * val1 / 60; // ASPD increase: [(Targetソスs AGI x Skill Level) / 60] %
if( (src = map_id2bl(val2)) )
- val4 = ( 200/status_get_int(src) ) * val1;// MDEF decrease: MDEF [(200 / Caster痴 INT) x Skill Level]
+ val4 = ( 200/status_get_int(src) ) * val1;// MDEF decrease: MDEF [(200 / Casterソスs INT) x Skill Level]
}
break;
case SC_GT_REVITALIZE:
@@ -8189,7 +8189,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
struct block_list * src;
val3 = val1 * 30 + 150; // Natural HP recovery increase: [(Skill Level x 30) + 50] %
if( (src = map_id2bl(val2)) ) // the stat def is not shown in the status window and it is process differently
- val4 = ( status_get_vit(src)/4 ) * val1; // STAT DEF increase: [(Caster痴 VIT / 4) x Skill Level]
+ val4 = ( status_get_vit(src)/4 ) * val1; // STAT DEF increase: [(Casterソスs VIT / 4) x Skill Level]
}
break;
case SC_PYROTECHNIC_OPTION:
@@ -8679,7 +8679,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
return 1;
}
/*==========================================
- * ステータス異常全解除
+ * ソスXソスeソス[ソス^ソスXソスル擾ソスSソスソスソスソス
* type:
* 0 - ???
* 1 - ???
@@ -8778,7 +8778,7 @@ int status_change_clear(struct block_list* bl, int type)
}
/*==========================================
- * ステータス異常終了
+ * ソスXソスeソス[ソス^ソスXソスル擾ソスIソスソス
*------------------------------------------*/
int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const char* file, int line)
{
@@ -9475,7 +9475,7 @@ int kaahi_heal_timer(int tid, unsigned int tick, int id, intptr_t data)
}
/*==========================================
- * ステータス異常終了タイマー
+ * ソスXソスeソス[ソス^ソスXソスル擾ソスIソスソスソス^ソスCソス}ソス[
*------------------------------------------*/
int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
{
@@ -9681,7 +9681,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
}
break;
- case SC_DANCING: //ダンススキルの時間SP消費
+ case SC_DANCING: //ソス_ソスソスソスXソスXソスLソスソスソスフ趣ソスソスソスSPソスソスソスソス
{
int s = 0;
int sp = 1;
@@ -10293,7 +10293,7 @@ int status_change_timer(int tid, unsigned int tick, int id, intptr_t data)
}
/*==========================================
- * ステータス異常タイマー範囲処理
+ * ソスXソスeソス[ソス^ソスXソスル擾ソス^ソスCソス}ソス[ソスヘ囲擾ソスソスソス
*------------------------------------------*/
int status_change_timer_sub(struct block_list* bl, va_list ap)
{
@@ -10310,7 +10310,7 @@ int status_change_timer_sub(struct block_list* bl, va_list ap)
tsc = status_get_sc(bl);
switch( type ) {
- case SC_SIGHT: /* サイト */
+ case SC_SIGHT: /* ソスTソスCソスg */
if( tsc && tsc->data[SC__SHADOWFORM] && (sce && sce->val4 >0 && sce->val4%2000 == 0) && // for every 2 seconds do the checking
rnd()%100 < 100-tsc->data[SC__SHADOWFORM]->val1*10 ) // [100 - (Skill Level x 10)] %
status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER);
@@ -10321,7 +10321,7 @@ int status_change_timer_sub(struct block_list* bl, va_list ap)
status_change_end(bl, SC_CAMOUFLAGE, INVALID_TIMER);
status_change_end(bl, SC__INVISIBILITY, INVALID_TIMER);
break;
- case SC_RUWACH: /* ルアフ */
+ case SC_RUWACH: /* ソスソスソスAソスt */
if (tsc && (tsc->data[SC_HIDING] || tsc->data[SC_CLOAKING] ||
tsc->data[SC_CAMOUFLAGE] || tsc->data[SC_CLOAKINGEXCEED] ||
tsc->data[SC__INVISIBILITY])) {
@@ -10888,6 +10888,13 @@ static bool status_readdb_refine(char* fields[], int columns, int current)
return true;
}
+/*
+* Read status db
+* job1.txt
+* job2.txt
+* size_fixe.txt
+* refine_db.txt
+*/
int status_readdb(void)
{
int i, j;
@@ -10895,13 +10902,13 @@ int status_readdb(void)
// initialize databases to default
//
- // job_db1.txt
+ // reset job_db1.txt data
memset(max_weight_base, 0, sizeof(max_weight_base));
memset(hp_coefficient, 0, sizeof(hp_coefficient));
memset(hp_coefficient2, 0, sizeof(hp_coefficient2));
memset(sp_coefficient, 0, sizeof(sp_coefficient));
memset(aspd_base, 0, sizeof(aspd_base));
- // job_db2.txt
+ // reset job_db2.txt data
memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
// size_fix.txt
@@ -10937,7 +10944,7 @@ int status_readdb(void)
}
/*==========================================
- * スキル関係初期化処理
+ * Status db init and destroy.
*------------------------------------------*/
int do_init_status(void)
{
diff --git a/src/map/storage.c b/src/map/storage.c
index 0bf575c84..c66f12852 100644
--- a/src/map/storage.c
+++ b/src/map/storage.c
@@ -27,7 +27,7 @@
static DBMap* guild_storage_db; // int guild_id -> struct guild_storage*
/*==========================================
- * 倉庫内アイテムソート
+ * Sort items in the warehouse
*------------------------------------------*/
static int storage_comp_item(const void *_i1, const void *_i2)
{
@@ -43,6 +43,7 @@ static int storage_comp_item(const void *_i1, const void *_i2)
return i1->nameid - i2->nameid;
}
+//Sort item by storage_comp_item (nameid)
static void storage_sortitem(struct item* items, unsigned int size)
{
nullpo_retv(items);
@@ -54,9 +55,9 @@ static void storage_sortitem(struct item* items, unsigned int size)
}
/*==========================================
- * 初期化とか
+ * Init/Terminate
*------------------------------------------*/
-int do_init_storage(void) // map.c::do_init()から呼ばれる
+int do_init_storage(void) // Called from map.c::do_init()
{
guild_storage_db=idb_alloc(DB_OPT_RELEASE_DATA);
return 1;
@@ -110,7 +111,9 @@ int storage_storageopen(struct map_session_data *sd)
return 0;
}
-// helper function
+/* helper function
+ * checking if 2 item structure are identique
+ */
int compare_item(struct item *a, struct item *b)
{
if( a->nameid == b->nameid &&
@@ -202,6 +205,10 @@ int storage_delitem(struct map_session_data* sd, int n, int amount)
/*==========================================
* Add an item to the storage from the inventory.
+ * @index : inventory idx
+ * return
+ * 0 : fail
+ * 1 : success
*------------------------------------------*/
int storage_storageadd(struct map_session_data* sd, int index, int amount)
{
@@ -226,7 +233,11 @@ int storage_storageadd(struct map_session_data* sd, int index, int amount)
}
/*==========================================
- * Retrieve an item from the storage.
+ * Retrieve an item from the storage into inventory
+ * @index : storage idx
+ * return
+ * 0 : fail
+ * 1 : success
*------------------------------------------*/
int storage_storageget(struct map_session_data* sd, int index, int amount)
{
@@ -251,6 +262,10 @@ int storage_storageget(struct map_session_data* sd, int index, int amount)
/*==========================================
* Move an item from cart to storage.
+ * @index : cart inventory index
+ * return
+ * 0 : fail
+ * 1 : success
*------------------------------------------*/
int storage_storageaddfromcart(struct map_session_data* sd, int index, int amount)
{
@@ -275,7 +290,11 @@ int storage_storageaddfromcart(struct map_session_data* sd, int index, int amoun
}
/*==========================================
- * Get from Storage to the Cart
+ * Get from Storage to the Cart inventory
+ * @index : storage index
+ * return
+ * 0 : fail
+ * 1 : success
*------------------------------------------*/
int storage_storagegettocart(struct map_session_data* sd, int index, int amount)
{
@@ -344,8 +363,9 @@ struct guild_storage *guild2storage(int guild_id)
return gs;
}
+//For just locating a storage without creating one. [Skotlex]
struct guild_storage *guild2storage2(int guild_id)
-{ //For just locating a storage without creating one. [Skotlex]
+{
return (struct guild_storage*)idb_get(guild_storage_db,guild_id);
}
@@ -355,6 +375,13 @@ int guild_storage_delete(int guild_id)
return 0;
}
+/*==========================================
+* Attempt to open guild storage for sd
+* return
+* 0 : success (open or req to create a new one)
+* 1 : fail
+* 2 : no guild for sd
+ *------------------------------------------*/
int storage_guild_storageopen(struct map_session_data* sd)
{
struct guild_storage *gstor;
@@ -387,6 +414,12 @@ int storage_guild_storageopen(struct map_session_data* sd)
return 0;
}
+/*==========================================
+* Attempt to add an item in guild storage, then refresh it
+* return
+* 0 : success
+* 1 : fail
+ *------------------------------------------*/
int guild_storage_additem(struct map_session_data* sd, struct guild_storage* stor, struct item* item_data, int amount)
{
struct item_data *data;
@@ -439,6 +472,12 @@ int guild_storage_additem(struct map_session_data* sd, struct guild_storage* sto
return 0;
}
+/*==========================================
+* Attempt to delete an item in guild storage, then refresh it
+* return
+* 0 : success
+* 1 : fail
+ *------------------------------------------*/
int guild_storage_delitem(struct map_session_data* sd, struct guild_storage* stor, int n, int amount)
{
nullpo_retr(1, sd);
@@ -458,6 +497,13 @@ int guild_storage_delitem(struct map_session_data* sd, struct guild_storage* sto
return 0;
}
+/*==========================================
+* Attempt to add an item in guild storage from inventory, then refresh it
+* @index : inventory idx
+* return
+* 0 : fail
+* 1 : succes
+ *------------------------------------------*/
int storage_guild_storageadd(struct map_session_data* sd, int index, int amount)
{
struct guild_storage *stor;
@@ -483,6 +529,13 @@ int storage_guild_storageadd(struct map_session_data* sd, int index, int amount)
return 1;
}
+/*==========================================
+* Attempt to retrieve an item from guild storage to inventory, then refresh it
+* @index : storage idx
+* return
+* 0 : fail
+* 1 : succes
+ *------------------------------------------*/
int storage_guild_storageget(struct map_session_data* sd, int index, int amount)
{
struct guild_storage *stor;
@@ -505,13 +558,20 @@ int storage_guild_storageget(struct map_session_data* sd, int index, int amount)
if((flag = pc_additem(sd,&stor->items[index],amount,LOG_TYPE_GSTORAGE)) == 0)
guild_storage_delitem(sd,stor,index,amount);
- else
+ else //inform fail
clif_additem(sd,0,0,flag);
// log_fromstorage(sd, index, 1);
return 0;
}
+/*==========================================
+* Attempt to add an item in guild storage from cart, then refresh it
+* @index : cart inventory idx
+* return
+* 0 : fail
+* 1 : succes
+ *------------------------------------------*/
int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int amount)
{
struct guild_storage *stor;
@@ -537,6 +597,13 @@ int storage_guild_storageaddfromcart(struct map_session_data* sd, int index, int
return 1;
}
+/*==========================================
+* Attempt to retrieve an item from guild storage to cart, then refresh it
+* @index : storage idx
+* return
+* 0 : fail
+* 1 : succes
+ *------------------------------------------*/
int storage_guild_storagegettocart(struct map_session_data* sd, int index, int amount)
{
struct guild_storage *stor;
@@ -562,6 +629,12 @@ int storage_guild_storagegettocart(struct map_session_data* sd, int index, int a
return 1;
}
+/*==========================================
+* Request to save guild storage
+* return
+* 0 : fail (no storage)
+* 1 : succes
+ *------------------------------------------*/
int storage_guild_storagesave(int account_id, int guild_id, int flag)
{
struct guild_storage *stor = guild2storage2(guild_id);
@@ -577,6 +650,12 @@ int storage_guild_storagesave(int account_id, int guild_id, int flag)
return 0;
}
+/*==========================================
+* ACK save of guild storage
+* return
+* 0 : fail (no storage)
+* 1 : succes
+ *------------------------------------------*/
int storage_guild_storagesaved(int guild_id)
{
struct guild_storage *stor;
@@ -591,6 +670,7 @@ int storage_guild_storagesaved(int guild_id)
return 0;
}
+//Close storage for sd and save it
int storage_guild_storageclose(struct map_session_data* sd)
{
struct guild_storage *stor;
diff --git a/src/map/trade.c b/src/map/trade.c
index e8a58fd9b..a423b4118 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -510,7 +510,7 @@ void trade_tradecancel(struct map_session_data *sd)
}
/*==========================================
- * 取引許諾(trade押し)
+ * lock sd and tsd trade data, execute the trade, clear, then save players
*------------------------------------------*/
void trade_tradecommit(struct map_session_data *sd)
{
diff --git a/src/map/unit.c b/src/map/unit.c
index 52d378879..89aaf9bd6 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -137,7 +137,7 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
return 0;
}
ud->walktimer = INVALID_TIMER;
- if( bl->prev == NULL ) return 0; // block_list から抜けているので移動停止する
+ if (bl->prev == NULL) return 0; // Stop moved because it is missing from the block_list
if(ud->walkpath.path_pos>=ud->walkpath.path_len)
return 0;
@@ -156,8 +156,7 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr_t data
if(map_getcell(bl->m,x+dx,y+dy,CELL_CHKNOPASS))
return unit_walktoxy_sub(bl);
- // バシリカ判定
-
+ //Refresh view for all those we lose sight
map_foreachinmovearea(clif_outsight, bl, AREA_SIZE, dx, dy, sd?BL_ALL:BL_PC, bl);
x += dx;
@@ -347,8 +346,8 @@ int unit_walktoxy( struct block_list *bl, short x, short y, int flag)
map_random_dir(bl, &ud->to_x, &ud->to_y);
if(ud->walktimer != INVALID_TIMER) {
- // 現在歩いている最中の目的地変更なのでマス目の中心に来た時に
- // timer関数からunit_walktoxy_subを呼ぶようにする
+ // When you come to the center of the grid because the change of destination while you're walking right now
+ // Call a function from a timer unit_walktoxy_sub
ud->state.change_walk_target = 1;
return 1;
}
@@ -1023,7 +1022,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
nullpo_ret(src);
if(status_isdead(src))
- return 0; // 死んでいないか
+ return 0; //Do not continue source is dead
sd = BL_CAST(BL_PC, src);
ud = unit_bl2ud(src);
@@ -1112,7 +1111,7 @@ int unit_skilluse_id2(struct block_list *src, int target_id, short skill_num, sh
return 0;
tstatus = status_get_status_data(target);
- //直前のスキル状況の記録
+ // Record the status of the previous skill)
if(sd) {
switch(skill_num){
case SA_CASTCANCEL:
@@ -1362,7 +1361,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
nullpo_ret(src);
- if(!src->prev) return 0; // map 上に存在するか
+ if (!src->prev) return 0; // not on the map
if(status_isdead(src)) return 0;
sd = BL_CAST(BL_PC, src);
@@ -1399,7 +1398,7 @@ int unit_skilluse_pos2( struct block_list *src, short skill_x, short skill_y, sh
return 0;
}
- /* 射程と障害物チェック */
+ /* Check range and obstacle */
bl.type = BL_NUL;
bl.m = src->m;
bl.x = skill_x;
@@ -1522,8 +1521,8 @@ int unit_unattackable(struct block_list *bl)
}
/*==========================================
- * 攻撃要求
- * typeが1なら継続攻撃
+ * Attack request
+ * If type is an ongoing attack
*------------------------------------------*/
int unit_attack(struct block_list *src,int target_id,int continuous)
{
@@ -1604,7 +1603,7 @@ bool unit_can_reach_pos(struct block_list *bl,int x,int y, int easy)
{
nullpo_retr(false, bl);
- if( bl->x==x && bl->y==y ) // 同じマス
+ if (bl->x == x && bl->y == y) //Same place
return true;
return path_search(NULL,bl->m,bl->x,bl->y,x,y,easy,CELL_CHKNOREACH);
@@ -1648,7 +1647,7 @@ bool unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range,
return path_search(NULL,bl->m,bl->x,bl->y,tbl->x-dx,tbl->y-dy,easy,CELL_CHKNOREACH);
}
/*==========================================
- * Calculates position of Pet/Mercenary/Homunculus
+ * Calculates position of Pet/Mercenary/Homunculus/Elemental
*------------------------------------------*/
int unit_calc_pos(struct block_list *bl, int tx, int ty, int dir)
{
@@ -1706,7 +1705,7 @@ int unit_calc_pos(struct block_list *bl, int tx, int ty, int dir)
}
/*==========================================
- * PCの攻撃 (timer関数)
+ * Continuous Attack (function timer)
*------------------------------------------*/
static int unit_attack_timer_sub(struct block_list* src, int tid, unsigned int tick)
{
@@ -1908,7 +1907,7 @@ int unit_skillcastcancel(struct block_list *bl,int type)
return 1;
}
-// unit_data の初期化処理
+// unit_data initialization process
void unit_dataset(struct block_list *bl)
{
struct unit_data *ud;
@@ -1949,7 +1948,7 @@ int unit_fixdamage(struct block_list *src,struct block_list *target,unsigned int
}
/*==========================================
- * 見た目のサイズを変更する
+ * To change the size of the char (player or mob only)
*------------------------------------------*/
int unit_changeviewsize(struct block_list *bl,short size)
{
diff --git a/src/map/vending.c b/src/map/vending.c
index ba243f13f..a61e6fc79 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -279,7 +279,7 @@ void vending_openvending(struct map_session_data* sd, const char* message, bool
clif_skill_fail(sd, MC_VENDING, USESKILL_FAIL_LEVEL, 0);
return;
}
-
+ //check if nearby npc, (perhaps we should check for nearby shop too
if( vending_checknearnpc(&sd->bl) ) {
char output[150];
sprintf(output,"You're too close to a NPC, you must be at least %d cells away from any NPC.",battle_config.min_npc_vending_distance);
diff --git a/src/map/vending.h b/src/map/vending.h
index b67f22916..2ed52b9bd 100644
--- a/src/map/vending.h
+++ b/src/map/vending.h
@@ -10,9 +10,9 @@ struct map_session_data;
struct s_search_store_search;
struct s_vending {
- short index;
- short amount;
- unsigned int value;
+ short index; //cart index (return item data)
+ short amount; //amout of the item for vending
+ unsigned int value; //at wich price
};
void vending_closevending(struct map_session_data* sd);