summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-18 14:26:26 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-18 14:26:26 +0000
commit424938aa953e6384f59eb593d6f5f377e007a443 (patch)
treef6d1c8d1c6697bfada6ebb91ec2a9439e4539ed6
parent67213795d8e2c020d0e7d743e98238b65b35630e (diff)
downloadhercules-424938aa953e6384f59eb593d6f5f377e007a443.tar.gz
hercules-424938aa953e6384f59eb593d6f5f377e007a443.tar.bz2
hercules-424938aa953e6384f59eb593d6f5f377e007a443.tar.xz
hercules-424938aa953e6384f59eb593d6f5f377e007a443.zip
- 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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8342 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt3
-rw-r--r--conf-tmpl/Changelog.txt4
-rw-r--r--conf-tmpl/battle/skill.conf11
-rw-r--r--src/map/battle.c4
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/skill.c4
-rw-r--r--src/map/unit.c6
7 files changed, 31 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 24be9c9e0..6611c6c6a 100644
--- a/Changelog-Trunk.txt
+++ b/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]
diff --git a/conf-tmpl/Changelog.txt b/conf-tmpl/Changelog.txt
index f2e5fc9c0..f74d0a024 100644
--- a/conf-tmpl/Changelog.txt
+++ b/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
diff --git a/conf-tmpl/battle/skill.conf b/conf-tmpl/battle/skill.conf
index a5b2d4108..99bf07ffe 100644
--- a/conf-tmpl/battle/skill.conf
+++ b/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
diff --git a/src/map/battle.c b/src/map/battle.c
index 0441164b9..c481d0034 100644
--- a/src/map/battle.c
+++ b/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;
diff --git a/src/map/battle.h b/src/map/battle.h
index 3c1a9fe2d..2d4651b65 100644
--- a/src/map/battle.h
+++ b/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;
diff --git a/src/map/skill.c b/src/map/skill.c
index ff184fb20..33fd6eb89 100644
--- a/src/map/skill.c
+++ b/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);
diff --git a/src/map/unit.c b/src/map/unit.c
index 4d6fdc29f..52284d83d 100644
--- a/src/map/unit.c
+++ b/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;