Bläddra i källkod

* Added' require_glory_guild'
* Fixed some --addrace variables' sizes

git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@1277 54d463be-8e91-2dee-dedb-b68131a5f0ec

celest 20 år sedan
förälder
incheckning
898d7024a9
6 ändrade filer med 22 tillägg och 11 borttagningar
  1. 3 0
      Changelog-SVN.txt
  2. 4 0
      conf-tmpl/battle_athena.conf
  3. 2 0
      src/map/battle.c
  4. 1 0
      src/map/battle.h
  5. 7 6
      src/map/guild.c
  6. 5 5
      src/map/map.h

+ 3 - 0
Changelog-SVN.txt

@@ -1,6 +1,9 @@
 Date	Added
 
 03/23
+	* Fixed some --addrace variables' sizes [celest]
+	* Added' require_glory_guild' - sets whether changing guild emblems require
+	  the Glory of Guild skill [celest]
 	* Fixed alot of memory leaks [celest]
 	* Added stray memory cleaning routine to db.c [celest]
 	* Fixed some compile errors, sorry xP [celest]

+ 4 - 0
conf-tmpl/battle_athena.conf

@@ -817,5 +817,9 @@ finding_ore_rate: 100
 //2 - eAthena's, using damage given / total damage as damage ratio
 exp_calc_type: 1
 
+// Does changing emblems require the guild skill "Glory of Guild"? (Note 1)
+// Note: This new guild skill only appears for 2004-10-25aSakexe or newer
+require_glory_guild: yes
+
 import: conf/import/battle_conf.txt
 

+ 2 - 0
src/map/battle.c

@@ -4133,6 +4133,7 @@ static const struct {
 	{ "finding_ore_rate",       &battle_config.finding_ore_rate}, // [celest]
 	{ "exp_calc_type",          &battle_config.exp_calc_type}, // [celest]
 	{ "min_skill_delay_limit",    &battle_config.min_skill_delay_limit}, // [celest]
+	{ "require_glory_guild",    &battle_config.require_glory_guild}, // [celest]
 
 //SQL-only options start
 #ifndef TXT_ONLY
@@ -4380,6 +4381,7 @@ void battle_set_defaults() {
 	battle_config.area_size = 14;
 	battle_config.exp_calc_type = 1;
 	battle_config.min_skill_delay_limit = 100;
+	battle_config.require_glory_guild = 1;
 
 //SQL-only options start
 #ifndef TXT_ONLY

+ 1 - 0
src/map/battle.h

@@ -311,6 +311,7 @@ extern struct Battle_Config {
 	int finding_ore_rate; // orn
 	int exp_calc_type;
 	int min_skill_delay_limit;
+	int require_glory_guild;
 
 #ifndef TXT_ONLY /* SQL-only options */
 	int mail_system; // [Valaris]

+ 7 - 6
src/map/guild.c

@@ -892,15 +892,16 @@ int guild_notice_changed(int guild_id,const char *mes1,const char *mes2)
 // ギルドエンブレム変更
 int guild_change_emblem(struct map_session_data *sd,int len,const char *data)
 {
-	struct guild *g = NULL;
-
+	struct guild *g;
 	nullpo_retr(0, sd);
 
-	if ((g = guild_search(sd->status.guild_id)) && guild_checkskill(g, GD_GLORYGUILD)>0)
-		return intif_guild_emblem(sd->status.guild_id,len,data);
+	if (battle_config.require_glory_guild &&
+		!((g = guild_search(sd->status.guild_id)) && guild_checkskill(g, GD_GLORYGUILD)>0)) {
+		clif_skill_fail(sd,GD_GLORYGUILD,0,0);
+		return 0;
+	}
 
-	clif_skill_fail(sd,GD_GLORYGUILD,0,0);
-	return 0;
+	return intif_guild_emblem(sd->status.guild_id,len,data);
 }
 // ギルドエンブレム変更通知
 int guild_emblem_changed(int len,int guild_id,int emblem_id,const char *data)

+ 5 - 5
src/map/map.h

@@ -295,16 +295,16 @@ struct map_session_data {
 	short ignore_def_mob, ignore_def_mob_;
 	int hp_loss_tick, hp_loss_rate;
 	short hp_loss_value, hp_loss_type;
-	int addrace2[6],addrace2_[6];
+	int addrace2[12],addrace2_[12];
 	int subsize[3];
 	short unequip_losehp[11];
 	short unequip_losesp[11];
 	int itemid;
-	int itemhealrate[6];
+	int itemhealrate[7];
 	//--- 03/15's new card effects
-	int expaddrace[6];
-	int subrace2[6];
-	short sp_gain_race[6];
+	int expaddrace[12];
+	int subrace2[12];
+	short sp_gain_race[12];
 
 	short spiritball, spiritball_old;
 	int spirit_timer[MAX_SKILL_LEVEL];