Преглед изворни кода

- Added guild_aura (skill.conf) setting so you can specify when it works and if it works on the guild-master itself. Defaults to working all the time on everyone except GM.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8342 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex пре 19 година
родитељ
комит
64b38ba4b7
7 измењених фајлова са 31 додато и 2 уклоњено
  1. 3 0
      Changelog-Trunk.txt
  2. 4 0
      conf-tmpl/Changelog.txt
  3. 11 0
      conf-tmpl/battle/skill.conf
  4. 3 1
      src/map/battle.c
  5. 1 0
      src/map/battle.h
  6. 4 0
      src/map/skill.c
  7. 5 1
      src/map/unit.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 2006/08/18
+	* Added guild_aura (skill.conf) setting so you can specify when it works
+	  and if it works on the guild-master itself. Defaults to working all the
+	  time on everyone except GM. [Skotlex]
 	* Little code cleanup [Toms]
 	* Cleaned merc_hom_evolution to avoid free'ing/realloc'ing [Toms]
 	* Fixed "args of aFree is freed pointer" on Homunc deletion [Toms]

+ 4 - 0
conf-tmpl/Changelog.txt

@@ -1,5 +1,9 @@
 Date	Added
 
+2006/08/18
+	* Added guild_aura (skill.conf) setting so you can specify when it works
+	  and if it works on the guild-master itself. Defaults to working all the
+	  time on everyone except GM. [Skotlex]
 2006/08/14
 	* Removed support for negative autosave intervals, instead added a
 	  minsave_interval setting which specifies which is the minimum time between

+ 11 - 0
conf-tmpl/battle/skill.conf

@@ -231,6 +231,17 @@ max_heal_lv: 11
 //    (note that by default all Castles have the nowarpto flag)
 emergency_call: 15
 
+// Guild Aura Skills setting (add as appropiate).
+// (This affects GD_LEADERSHIP, GD_GLORYWOUNDS, GD_SOULCOLD and GD_HAWKEYES)
+// Note that for the skill to be usable at all, 
+// you need at least one of 1/2 and 4/8
+// 1: Skill works outside of woe.
+// 2: Skill works during woe.
+// 4: Skill works outside of GvG grounds
+// 8: Skill works on GvG grounds
+//16: Disable skill from affecting Guild Master
+guild_aura: 31
+
 // Max Possible Level of Monster skills
 // Note: If your MVPs are too tough, reduce it to 10.
 mob_max_skilllvl: 100

+ 3 - 1
src/map/battle.c

@@ -3441,6 +3441,7 @@ static const struct battle_data_short {
 	{ "gtb_sc_immunity",                   &battle_config.gtb_sc_immunity},
 	{ "guild_max_castles",                 &battle_config.guild_max_castles		},
 	{ "emergency_call",                    &battle_config.emergency_call },
+	{ "guild_aura",                        &battle_config.guild_aura	},
 	{ "death_penalty_type",                &battle_config.death_penalty_type		},
 	{ "death_penalty_base",                &battle_config.death_penalty_base		},
 	{ "death_penalty_job",                 &battle_config.death_penalty_job		},
@@ -3864,7 +3865,8 @@ void battle_set_defaults() {
 	battle_config.gm_join_chat=0;
 	battle_config.gm_kick_chat=0;
 	battle_config.guild_max_castles=0;
-	battle_config.emergency_call=2;
+	battle_config.emergency_call=15;
+	battle_config.guild_aura=31;
 	battle_config.skillfree = 0;
 	battle_config.skillup_limit = 0;
 	battle_config.wp_rate=100;

+ 1 - 0
src/map/battle.h

@@ -165,6 +165,7 @@ extern struct Battle_Config {
 	unsigned short guild_exp_limit;
 	unsigned short guild_max_castles;
 	unsigned short emergency_call;
+	unsigned short guild_aura;
 	unsigned short pc_invincible_time;
 	unsigned short pet_catch_rate;
 	unsigned short pet_rename;

+ 4 - 0
src/map/skill.c

@@ -2321,6 +2321,10 @@ int skill_guildaura_sub (struct block_list *bl, va_list ap)
 	gid = va_arg(ap,int);
 	if (sd->status.guild_id != gid)
 		return 0;
+
+	if(id == sd->bl.id && battle_config.guild_aura&16)
+		return 0;
+
 	strvit = va_arg(ap,int);
 	agidex = va_arg(ap,int);
 

+ 5 - 1
src/map/unit.c

@@ -173,7 +173,11 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
 				return 0;
 		} else
 			sd->areanpc_id=0;
-		if (sd->state.gmaster_flag)
+		if (sd->state.gmaster_flag &&
+			(battle_config.guild_aura&(agit_flag?2:1)) &&
+			(battle_config.guild_aura&
+				(map[bl->m].flag.gvg || map[bl->m].flag.gvg_castle?8:4))
+		)
 		{ //Guild Aura: Likely needs to be recoded, this method seems inefficient.
 			struct guild *g = sd->state.gmaster_flag;
 			int skill, strvit= 0, agidex = 0;