summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-02 14:55:14 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-02 14:55:14 +0000
commit187b83fe68d75e457d3fd1aa2af32ddc2005d036 (patch)
treed6fdf004f5755ab192624282b98104eea35316b4 /src/map
parent24fd0a33070755eeb6cc25f442716fa0dddf159a (diff)
downloadhercules-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')
-rw-r--r--src/map/mercenary.c2
-rw-r--r--src/map/skill.c27
-rw-r--r--src/map/status.c16
-rw-r--r--src/map/unit.c14
4 files changed, 29 insertions, 30 deletions
diff --git a/src/map/mercenary.c b/src/map/mercenary.c
index 7a5a8217c..d35aefe9b 100644
--- a/src/map/mercenary.c
+++ b/src/map/mercenary.c
@@ -657,7 +657,7 @@ static int merc_hom_hungry(int tid,unsigned int tick,int id,int data)
merc_stop_attack(hd);
// Send homunculus_dead to client
sd->homunculus.hp = 0;
- clif_hominfo(sd, 0);
+ clif_hominfo(sd, hd, 0);
merc_hom_delete(hd,1);
clif_emotion(&sd->bl, 23) ; //omg
return 0 ;
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;
}
/*==========================================
diff --git a/src/map/status.c b/src/map/status.c
index 437be3cdf..8ac13bb3a 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2916,8 +2916,8 @@ static unsigned short status_calc_str(struct block_list *bl, struct status_chang
str += sc->data[SC_STRFOOD].val1;
if(sc->data[SC_BATTLEORDERS].timer!=-1)
str += 5;
- if(sc->data[SC_GUILDAURA].timer != -1 && ((sc->data[SC_GUILDAURA].val4>>12)&0xF))
- str += (sc->data[SC_GUILDAURA].val4>>12)&0xF;
+ if(sc->data[SC_GUILDAURA].timer != -1 && sc->data[SC_GUILDAURA].val3>>16)
+ str += sc->data[SC_GUILDAURA].val3>>16;
if(sc->data[SC_LOUD].timer!=-1)
str += 4;
if(sc->data[SC_TRUESIGHT].timer!=-1)
@@ -2957,8 +2957,8 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang
agi += sc->data[SC_INCAGI].val1;
if(sc->data[SC_AGIFOOD].timer!=-1)
agi += sc->data[SC_AGIFOOD].val1;
- if(sc->data[SC_GUILDAURA].timer != -1 && ((sc->data[SC_GUILDAURA].val4>>4)&0xF))
- agi += (sc->data[SC_GUILDAURA].val4>>4)&0xF;
+ if(sc->data[SC_GUILDAURA].timer != -1 && sc->data[SC_GUILDAURA].val4>>16)
+ agi += sc->data[SC_GUILDAURA].val4>>16;
if(sc->data[SC_TRUESIGHT].timer!=-1)
agi += 5;
if(sc->data[SC_INCREASEAGI].timer!=-1)
@@ -2992,8 +2992,8 @@ static unsigned short status_calc_vit(struct block_list *bl, struct status_chang
vit += sc->data[SC_INCVIT].val1;
if(sc->data[SC_VITFOOD].timer!=-1)
vit += sc->data[SC_VITFOOD].val1;
- if(sc->data[SC_GUILDAURA].timer != -1 && ((sc->data[SC_GUILDAURA].val4>>8)&0xF))
- vit += (sc->data[SC_GUILDAURA].val4>>8)&0xF;
+ if(sc->data[SC_GUILDAURA].timer != -1 && sc->data[SC_GUILDAURA].val3&0xFFFF)
+ vit += sc->data[SC_GUILDAURA].val3&0xFFFF;
if(sc->data[SC_TRUESIGHT].timer!=-1)
vit += 5;
if(sc->data[SC_STRIPARMOR].timer!=-1)
@@ -3063,8 +3063,8 @@ static unsigned short status_calc_dex(struct block_list *bl, struct status_chang
dex += sc->data[SC_DEXFOOD].val1;
if(sc->data[SC_BATTLEORDERS].timer!=-1)
dex += 5;
- if(sc->data[SC_GUILDAURA].timer != -1 && (sc->data[SC_GUILDAURA].val4&0xF))
- dex += sc->data[SC_GUILDAURA].val4&0xF;
+ if(sc->data[SC_GUILDAURA].timer != -1 && sc->data[SC_GUILDAURA].val4&0xFFFF)
+ dex += sc->data[SC_GUILDAURA].val4&0xFFFF;
if(sc->data[SC_TRUESIGHT].timer!=-1)
dex += 5;
if(sc->data[SC_QUAGMIRE].timer!=-1)
diff --git a/src/map/unit.c b/src/map/unit.c
index 9c8f66517..e35a8005c 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -176,14 +176,14 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
if (sd->state.gmaster_flag)
{ //Guild Aura: Likely needs to be recoded, this method seems inefficient.
struct guild *g = sd->state.gmaster_flag;
- int skill, guildflag = 0;
- if ((skill = guild_checkskill(g, GD_LEADERSHIP)) > 0) guildflag |= skill<<12;
- if ((skill = guild_checkskill(g, GD_GLORYWOUNDS)) > 0) guildflag |= skill<<8;
- if ((skill = guild_checkskill(g, GD_SOULCOLD)) > 0) guildflag |= skill<<4;
- if ((skill = guild_checkskill(g, GD_HAWKEYES)) > 0) guildflag |= skill;
- if (guildflag)
+ int skill, strvit= 0, agidex = 0;
+ if ((skill = guild_checkskill(g, GD_LEADERSHIP)) > 0) strvit |= (skill&0xFFFF)<<16;
+ if ((skill = guild_checkskill(g, GD_GLORYWOUNDS)) > 0) strvit |= (skill&0xFFFF);
+ if ((skill = guild_checkskill(g, GD_SOULCOLD)) > 0) agidex |= (skill&0xFFFF)<<16;
+ if ((skill = guild_checkskill(g, GD_HAWKEYES)) > 0) agidex |= skill&0xFFFF;
+ if (strvit || agidex)
map_foreachinrange(skill_guildaura_sub, bl,2, BL_PC,
- bl->id, sd->status.guild_id, &guildflag);
+ bl->id, sd->status.guild_id, strvit, agidex);
}
if (
(sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR &&