diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-02 14:55:14 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-02 14:55:14 +0000 |
commit | 187b83fe68d75e457d3fd1aa2af32ddc2005d036 (patch) | |
tree | d6fdf004f5755ab192624282b98104eea35316b4 /src/map/skill.c | |
parent | 24fd0a33070755eeb6cc25f442716fa0dddf159a (diff) | |
download | hercules-187b83fe68d75e457d3fd1aa2af32ddc2005d036.tar.gz hercules-187b83fe68d75e457d3fd1aa2af32ddc2005d036.tar.bz2 hercules-187b83fe68d75e457d3fd1aa2af32ddc2005d036.tar.xz hercules-187b83fe68d75e457d3fd1aa2af32ddc2005d036.zip |
- Recoded the GuildAura code to use val3 & val4, allowing much greater stat bonuses (in case someone wants to get Guild Skill level 20 or something crazy like that)
- Fixed compilation error...
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8053 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 605a02006..4992cce2c 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2274,29 +2274,28 @@ static int skill_check_unit_range2 (struct block_list *bl, int x, int y, int ski int skill_guildaura_sub (struct block_list *bl, va_list ap) { struct map_session_data *sd; - int gid, id, *flag; + int gid, id, strvit, agidex; - nullpo_retr(0, sd = (struct map_session_data *)bl); - nullpo_retr(0, ap); + sd = (struct map_session_data *)bl; id = va_arg(ap,int); gid = va_arg(ap,int); if (sd->status.guild_id != gid) return 0; - nullpo_retr(0, flag = va_arg(ap,int *)); + strvit = va_arg(ap,int); + agidex = va_arg(ap,int); - if (flag && *flag > 0) { - if (sd->sc.count && sd->sc.data[SC_GUILDAURA].timer != -1) { - if (sd->sc.data[SC_GUILDAURA].val4 != *flag) { - sd->sc.data[SC_GUILDAURA].val4 = *flag; - status_calc_bl(&sd->bl, StatusChangeFlagTable[SC_GUILDAURA]); - } - return 0; + if (sd->sc.count && sd->sc.data[SC_GUILDAURA].timer != -1) { + if (sd->sc.data[SC_GUILDAURA].val3 != strvit || + sd->sc.data[SC_GUILDAURA].val4 != agidex) { + sd->sc.data[SC_GUILDAURA].val3 = strvit; + sd->sc.data[SC_GUILDAURA].val4 = agidex; + status_calc_bl(&sd->bl, StatusChangeFlagTable[SC_GUILDAURA]); } - sc_start4(&sd->bl, SC_GUILDAURA,100, 1, id, 0, *flag, 1000); + return 0; } - - return 0; + sc_start4(&sd->bl, SC_GUILDAURA,100, 1, id, strvit, agidex, 1000); + return 1; } /*========================================== |