# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- HEAD
+++ Modified In Working Tree
@@ -39,12 +39,12 @@
struct eventlist *next;
};
-// �M���h��EXP�L���b�V���̃t���b�V���Ɋ֘A����萔
-#define GUILD_SEND_XY_INVERVAL 5000 // ���W��g�o���M�̊Ԋu
-#define GUILD_PAYEXP_INVERVAL 10000 // �Ԋu(�L���b�V���̍ő吶�����ԁA�~���b)
-#define GUILD_PAYEXP_LIST 8192 // �L���b�V���̍ő吔
+//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
-// �M���h��EXP�L���b�V��
+//Guild EXP cache
struct guild_expcache {
int guild_id, account_id, char_id;
uint64 exp;
@@ -91,7 +91,7 @@
return guild_skill_tree[id-GD_SKILLBASE].max;
}
-// �M���h�X�L�������邩�m�F
+// Retrive skilllv learned by guild
int guild_checkskill(struct guild *g,int id)
{
int idx = id-GD_SKILLBASE;
@@ -261,7 +261,7 @@
return( i < g->max_member ) ? g->member[i].position : -1;
}
-// �����o�[���̍쐬
+//Creation of member information
void guild_makemember(struct guild_member *m,struct map_session_data *sd)
{
nullpo_retv(sd);
@@ -283,7 +283,7 @@
}
/**
- * �M���h��EXP�L���b�V����inter�I�Ƀt���b�V������
+ * 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 +392,7 @@
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,7 +400,7 @@
if(sd==NULL)
return 0;
if(!guild_id) {
- clif_guild_created(sd,2); // �쐬���s�i�����M���h���݁j
+ clif_guild_created(sd,2); // Creation failure (presence of the same name Guild)
return 0;
}
//struct guild *g;
@@ -411,13 +411,13 @@
return 0;
}
-// ���v��
+//Information request
int guild_request_info(int guild_id)
{
return intif_guild_request_info(guild_id);
}
-// �C�x���g�t�����v��
+//Information request with event
int guild_npc_request_info(int guild_id,const char *event)
{
if( guild_search(guild_id) )
@@ -442,7 +442,7 @@
return guild_request_info(guild_id);
}
-// �����L�����̊m�F
+//Confirmation of the character belongs to guild
int guild_check_member(struct guild *g)
{
int i;
@@ -469,7 +469,7 @@
return 0;
}
-// ������s�i����ID�̃L������S���������ɂ���j
+//Delete association with guild_id for all characters
int guild_recv_noinfo(int guild_id)
{
struct map_session_data *sd;
@@ -486,7 +486,7 @@
return 0;
}
-// ���
+//Get and display information for all member
int guild_recv_info(struct guild *sg)
{
struct guild *g,before;
@@ -504,7 +504,7 @@
idb_put(guild_db,sg->guild_id,g);
before=*sg;
- // �ŏ��̃��[�h�Ȃ̂Ń��[�U�[�̃`�F�b�N���s��
+ //Perform the check on the user because the first load
guild_check_member(sg);
if ((sd = map_nick2sd(sg->master)) != NULL)
{
@@ -539,32 +539,32 @@
bm++;
}
- for(i=0;i<g->max_member;i++){ // ���̑��M
+ 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); // ��{��M
- clif_guild_emblem(sd,g); // �G���u�������M
+ clif_guild_basicinfo(sd); //Submit basic information
+ clif_guild_emblem(sd,g); //Submit emblem
}
- if(bm!=m){ // �����o�[��M
+ if(bm!=m){ //Send members information
clif_guild_memberlist(g->member[i].sd);
}
if( before.skill_point!=g->skill_point)
- clif_guild_skillinfo(sd); // �X�L����M
+ clif_guild_skillinfo(sd); //Submit information skills
- if( guild_new ){ // �����M�Ȃ珊����������
+ 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;
}
}
- // �C�x���g�̔���
+ //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,8 +579,9 @@
return 0;
}
-
-// �M���h�ւ̊��U
+/*=============================================
+ * 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;
@@ -597,7 +598,7 @@
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 @@
return 0;
}
- // ����m�F
+ //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 @@
g->member[i].sd = sd;
}
-// �M���h�����o���lj����ꂽ
+/*==========================================
+ * 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 @@
return 0;
if(sd==NULL || sd->guild_invite==0){
- // �L�������ɓo�^�ł��Ȃ��������ߒE�ޗv�����o��
+ // 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 @@
sd->guild_invite = 0;
sd->guild_invite_account = 0;
- if(flag==1){ // ���s
+ 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 @@
return 0;
}
-// �M���h�E�ޗv��
+/*==========================================
+ * 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 @@
return 0;
}
-// �M���h�Ǖ�v��
+/*==========================================
+ * 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 @@
}
if(idx == -1 || c == 0) {
- // �M���h�̃����o�[�O�Ȃ̂ŒǕ�����
+ //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 @@
return 0;
}
-// �M���h��b���M
+
+/*====================================================
+ * 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 @@
return 0;
}
-// �M���h��b��M
+
+/*====================================================
+ * 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 @@
clif_guild_message(g,account_id,mes,len);
return 0;
}
-// �M���h�����o�̖�E�ύX
+
+/*====================================================
+ * 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));
}
-// �M���h�����o�̖�E�ύX�ʒm
+
+/*====================================================
+ * Notification of new position for member
+ *---------------------------------------------------*/
int guild_memberposition_changed(struct guild *g,int idx,int pos)
{
nullpo_ret(g);
@@ -995,7 +1014,10 @@
clif_charnameupdate(g->member[idx].sd);
return 0;
}
-// �M���h��E�ύX
+
+/*====================================================
+ * 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 @@
safestrncpy(p.name,name,NAME_LENGTH);
return intif_guild_position(guild_id,idx,&p);
}
-// �M���h��E�ύX�ʒm
+
+/*====================================================
+ * 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 @@
clif_charnameupdate(g->member[i].sd);
return 0;
}
-// �M���h���m�ύX
+
+/*====================================================
+ * 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 @@
return 0;
return intif_guild_notice(guild_id,mes1,mes2);
}
-// �M���h���m�ύX�ʒm
+
+/*====================================================
+ * 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 @@
}
return 0;
}
-// �M���h�G���u�����ύX
+
+/*====================================================
+ * Change guild emblem
+ *---------------------------------------------------*/
int guild_change_emblem(struct map_session_data *sd,int len,const char *data)
{
struct guild *g;
@@ -1066,7 +1100,10 @@
return intif_guild_emblem(sd->status.guild_id,len,data);
}
-// �M���h�G���u�����ύX�ʒm
+
+/*====================================================
+ * 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 @@
return db_ptr2data(c);
}
-// �M���h��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 @@
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 @@
return exp;
}
-// �X�L���|�C���g����U��
+/*====================================================
+ * Ask to increase guildskill skill_num
+ *---------------------------------------------------*/
int guild_skillup(TBL_PC* sd, int skill_num)
{
struct guild* g;
@@ -1216,7 +1261,10 @@
return 0;
}
-// �X�L���|�C���g����U��ʒm
+
+/*====================================================
+ * 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,7 +1286,7 @@
}
}
- // �S���ɒʒm
+ // inform all member
for(i=0;i<g->max_member;i++)
if((sd=g->member[i].sd)!=NULL)
clif_guild_skillinfo(sd);
@@ -1263,7 +1311,14 @@
}
return;
}
-// �M���h����������
+
+/*====================================================
+ * 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 @@
skill_blockpc_start(sd, skill_num[i], time);
}
-// �����W���ǂ����`�F�b�N
-// �����Ȃ�1�A����ȊO��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,7 +1362,9 @@
return( i < MAX_GUILDALLIANCE ) ? 1 : 0;
}
-// �M���h�����v��
+/*====================================================
+ * 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];
@@ -1343,7 +1405,7 @@
return 0;
}
- for(i=0;i<MAX_GUILDALLIANCE;i++){ // ���łɓ�����Ԃ��m�F
+ 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 @@
clif_guild_reqalliance(tsd,sd->status.account_id,g[0]->name);
return 0;
}
-// �M���h���U�ւ̕ԓ�
+
+/*====================================================
+ * 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 @@
return 0;
}
- if(sd->guild_alliance!=tsd->status.guild_id) // ���U�ƃM���hID���Ⴄ
+ 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; // �������Ċm�F
+ 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 @@
tsd->status.account_id,sd->status.account_id,9 );
}
- // inter�I�֓����v��
+ // 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,7 +1481,9 @@
return 0;
}
-// �M���h�W����
+/*====================================================
+ * 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);
@@ -1430,7 +1497,10 @@
return 0;
}
-// �M���h�G��
+
+/*====================================================
+ * 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 +1521,9 @@
return 0;
}
- for(i=0;i<MAX_GUILDALLIANCE;i++){ // ���łɊW�������Ă��邩�m�F
+ 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){ // ���łɓG��
+ if(g->alliance[i].opposition==1){ // check if not already hostile
clif_guild_oppositionack(sd,2);
return 0;
}
@@ -1465,13 +1535,15 @@
}
}
- // inter�I�ɓG�Ηv��
+ // 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;
}
-// �M���h����/�G�Βʒm
+/*====================================================
+ * 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 +1567,14 @@
sd[0]->guild_alliance_account=0;
}
- if(flag&0x70){ // ���s
+ 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)){ // �W�lj�
+ if(!(flag&0x08)){ // new relationship
for(i=0;i<2-(flag&1);i++)
{
if(g[i]!=NULL)
@@ -1516,7 +1588,7 @@
}
}
}
- }else{ // �W����
+ }else{ // remove relationship
for(i=0;i<2-(flag&1);i++)
{
if(g[i]!=NULL)
@@ -1525,21 +1597,21 @@
if( j < MAX_GUILDALLIANCE )
g[i]->alliance[j].guild_id = 0;
}
- if( sd[i]!=NULL ) // �����ʒm
+ if( sd[i]!=NULL ) // notify players
clif_guild_delalliance(sd[i],guild_id[1-i],(flag&1));
}
}
- if((flag&0x0f)==0){ // �����ʒm
+ if((flag&0x0f)==0){ // alliance notification
if( sd[1]!=NULL )
clif_guild_allianceack(sd[1],2);
- }else if((flag&0x0f)==1){ // �G�Βʒm
+ }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++){ // ����/�G���X�g�̍đ��M
+ 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++)
@@ -1549,10 +1621,9 @@
return 0;
}
-/**
- * �M���h���U�ʒm�p
- * @see DBApply
- */
+/*====================================================
+ * Notification for the guild disbanded
+ *---------------------------------------------------*/
int guild_broken_sub(DBKey key, DBData *data, va_list ap)
{
struct guild *g = db_data2ptr(data);
@@ -1562,7 +1633,7 @@
nullpo_ret(g);
- for(i=0;i<MAX_GUILDALLIANCE;i++){ // �W��j��
+ 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 @@
if(flag!=0 || g==NULL)
return 0;
- for(i=0;i<g->max_member;i++){ // �M���h���U��ʒm
+ for(i=0;i<g->max_member;i++){ //Notification to disband the guild at all remaining member
if((sd=g->member[i].sd)!=NULL){
if(sd->state.storage_flag == 2)
storage_guild_storage_quit(sd,1);
@@ -1700,7 +1771,10 @@
return 1;
}
-// �M���h���U
+
+/*====================================================
+ * Guild disbanded
+ *---------------------------------------------------*/
int guild_break(struct map_session_data *sd,char *name)
{
struct guild *g;
@@ -1850,7 +1924,10 @@
}
}
-// �M���h�f�[�^�ꊇ��M�i�����j
+
+/*====================================================
+ * Guild received bulk data (at initialization)
+ *---------------------------------------------------*/
int guild_castledataloadack(int len, struct guild_castle *gc)
{
int i;
@@ -1893,6 +1970,9 @@
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 +1980,9 @@
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 +1990,9 @@
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 +2000,9 @@
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");