diff options
author | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-18 01:37:53 +0000 |
---|---|---|
committer | shennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-03-18 01:37:53 +0000 |
commit | aefef10ae8e198660785b9dbaa267751274ba672 (patch) | |
tree | cc3acdb6ce754e5d16cd458138ec98618db51f05 /src/map/guild.c | |
parent | 9374324b4198605a9ee57f31de010ae18af49256 (diff) | |
download | hercules-aefef10ae8e198660785b9dbaa267751274ba672.tar.gz hercules-aefef10ae8e198660785b9dbaa267751274ba672.tar.bz2 hercules-aefef10ae8e198660785b9dbaa267751274ba672.tar.xz hercules-aefef10ae8e198660785b9dbaa267751274ba672.zip |
Added Official Guild Aura Implementation bugreport:667
Before:
- Guild Aura would only trigger when guild master moved
Now:
- Guild Aura is triggered when master moves and/or when guild mate gets inside the area
- Guild Aura range is no longer hardcoded, you may modify it from skill_unit_db
Also:
- Added new skill_unit_db target type 'guild'
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15707 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/guild.c')
-rw-r--r-- | src/map/guild.c | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 47f5ee478..990cf16c4 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -286,8 +286,7 @@ void guild_makemember(struct guild_member *m,struct map_session_data *sd) * ギルドのEXPキャッシュをinter鯖にフラッシュする * @see DBApply */ -int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) -{ +int guild_payexp_timer_sub(DBKey key, DBData *data, va_list ap) { int i; struct guild_expcache *c; struct guild *g; @@ -1225,15 +1224,45 @@ int guild_skillupack(int guild_id,int skill_num,int account_id) int i; if(g==NULL) return 0; - if(sd!=NULL) + if( sd != NULL ) { clif_guild_skillup(sd,skill_num,g->skill[skill_num-GD_SKILLBASE].lv); + + /* Guild Aura handling */ + switch( skill_num ) { + case GD_LEADERSHIP: + case GD_GLORYWOUNDS: + case GD_SOULCOLD: + case GD_HAWKEYES: + guild_guildaura_refresh(sd,skill_num,g->skill[skill_num-GD_SKILLBASE].lv); + break; + } + } + // 全員に通知 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); + if( !(battle_config.guild_aura&((agit_flag || agit2_flag)?2:1)) && + !(battle_config.guild_aura&(map_flag_gvg2(sd->bl.m)?8:4)) ) + return; + if( skill_lv <= 0 ) + return; + if( sd->sc.data[type] && (group = skill_id2group(sd->sc.data[type]->val4)) ) { + skill_delunitgroup(group); + status_change_end(&sd->bl,type,INVALID_TIMER); + } + group = skill_unitsetting(&sd->bl,skill_num,skill_lv,sd->bl.x,sd->bl.y,0); + if( group ) { + sc_start4(&sd->bl,type,100,(battle_config.guild_aura&16)?0:skill_lv,0,0,group->group_id,600000);//duration doesn't matter these status never end with val4 + } + return; +} // ギルド同盟数所得 int guild_get_alliance_count(struct guild *g,int flag) { |