summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-22 19:14:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-22 19:14:42 +0000
commit1f9c70b90fa41a531dd1dfbd386c3b576d770e97 (patch)
treed8e3f198e67500d1a7bbf56e4825e34adc1fe692 /src
parente828c8642a637a3e3f63450b75ebc93f2bd4bce4 (diff)
downloadhercules-1f9c70b90fa41a531dd1dfbd386c3b576d770e97.tar.gz
hercules-1f9c70b90fa41a531dd1dfbd386c3b576d770e97.tar.bz2
hercules-1f9c70b90fa41a531dd1dfbd386c3b576d770e97.tar.xz
hercules-1f9c70b90fa41a531dd1dfbd386c3b576d770e97.zip
- Removed the include of features.h from the console.c plugin. It is apparently not needed (and it was preventing compilation on FreeBSD)
- Fixed bug which totally broke item group bonuses. - Added warnings when setting a pvp/gvg flag removes the other flags on the same map (gvg and pvp can't coexist on the same map) - Optimized the unequip loop when changing sex. - Removed the check that prevented you from casting soul-collect when you already have 5 spirits. - Corrected Magic Rod so it doesn't displays any skill-use animation until it triggers. - Debuff on logout&2 is again set to default, instead of removing food bonuses now it removes Maximize Power, Maximum Overthrust and Steel Body. - Corrected Steel Body's icon (it actually belongs to AutoBerserk) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10317 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/chrif.c6
-rw-r--r--src/map/itemdb.c2
-rw-r--r--src/map/npc.c9
-rw-r--r--src/map/skill.c8
-rw-r--r--src/map/status.c4
-rw-r--r--src/map/status.h2
-rw-r--r--src/map/unit.c28
-rw-r--r--src/plugins/console.c1
8 files changed, 21 insertions, 39 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c
index 2af51c20d..d163dab77 100644
--- a/src/map/chrif.c
+++ b/src/map/chrif.c
@@ -821,9 +821,9 @@ int chrif_changedsex(int fd)
sd->status.sex = !sd->status.sex;
// to avoid any problem with equipment and invalid sex, equipment is unequiped.
- for (i = 0; i < MAX_INVENTORY; i++) {
- if (sd->status.inventory[i].nameid && sd->status.inventory[i].equip)
- pc_unequipitem((struct map_session_data*)sd, i, 2);
+ for (i = 0; i < EQI_MAX; i++) {
+ if (sd->equip_index[i] >= 0)
+ pc_unequipitem((struct map_session_data*)sd, sd->equip_index[i], 2);
}
// reset skill of some job
if ((sd->class_&MAPID_UPPERMASK) == MAPID_BARDDANCER) {
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index e6dc8d9c3..f872d386e 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -109,7 +109,7 @@ int itemdb_group_bonus(const int itemgrouphealrate[MAX_ITEMGROUP], int itemid)
{
int bonus = 0, i, j;
for (i=0; i < MAX_ITEMGROUP; i++) {
- if (itemgrouphealrate[i])
+ if (!itemgrouphealrate[i])
continue;
for (j=0; j < itemgroup_db[i].qty; j++) {
if (itemgroup_db[i].nameid[j] == itemid)
diff --git a/src/map/npc.c b/src/map/npc.c
index 8e9182beb..97034402e 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2579,7 +2579,8 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
else if (strcmpi(w3,"pvp")==0) {
map[m].flag.pvp=state;
if (state) {
- map[m].flag.gvg=0;
+ if (map[m].flag.gvg || map[m].flag.gvg_dungeon || map[m].flag.gvg_castle)
+ ShowWarning("You can't set PvP and GvG flags for the same map! Removing GvG flags from %s\n", map[m].name);
map[m].flag.gvg=0;
map[m].flag.gvg_dungeon=0;
map[m].flag.gvg_castle=0;
@@ -2626,7 +2627,11 @@ static int npc_parse_mapflag (char *w1, char *w2, char *w3, char *w4)
}
else if (strcmpi(w3,"gvg")==0) {
map[m].flag.gvg=state;
- if (state) map[m].flag.pvp=0;
+ if (state && map[m].flag.pvp)
+ {
+ map[m].flag.pvp=0;
+ ShowWarning("You can't set PvP and GvG flags for the same map! Removing PvP flag from %s\n", map[m].name);
+ }
}
else if (strcmpi(w3,"gvg_noparty")==0) {
map[m].flag.gvg_noparty=state;
diff --git a/src/map/skill.c b/src/map/skill.c
index aa62dd4ee..254c89aa7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -4805,7 +4805,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
}
break;
case SA_MAGICROD:
- clif_skill_nodamage(src,bl,skillid,-1,0); //Skill animation with no yell.
+ //It activates silently, no use animation.
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv));
break;
case SA_AUTOSPELL:
@@ -8164,12 +8164,6 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
return 0;
}
break;
- case CH_SOULCOLLECT:
- if(sd->spiritball >= 5) {
- clif_skill_fail(sd,skill,0,0);
- return 0;
- }
- break;
case MO_FINGEROFFENSIVE: //指弾
case GS_FLING:
if (sd->spiritball > 0 && sd->spiritball < spiritball) {
diff --git a/src/map/status.c b/src/map/status.c
index 24d347b72..d8921ef70 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -189,7 +189,7 @@ void initChangeTables(void) {
add_sc(AS_VENOMDUST, SC_POISON);
add_sc(AS_SPLASHER, SC_SPLASHER);
set_sc(NV_TRICKDEAD, SC_TRICKDEAD, SI_TRICKDEAD, SCB_REGEN);
- set_sc(SM_AUTOBERSERK, SC_AUTOBERSERK, SI_STEELBODY, SCB_NONE);
+ set_sc(SM_AUTOBERSERK, SC_AUTOBERSERK, SI_AUTOBERSERK, SCB_NONE);
add_sc(TF_SPRINKLESAND, SC_BLIND);
add_sc(TF_THROWSTONE, SC_STUN);
set_sc(MC_LOUD, SC_LOUD, SI_LOUD, SCB_STR);
@@ -238,7 +238,7 @@ void initChangeTables(void) {
set_sc(CR_PROVIDENCE, SC_PROVIDENCE, SI_PROVIDENCE, SCB_PC);
set_sc(CR_DEFENDER, SC_DEFENDER, SI_DEFENDER, SCB_SPEED|SCB_ASPD);
set_sc(CR_SPEARQUICKEN, SC_SPEARQUICKEN, SI_SPEARQUICKEN, SCB_ASPD);
- set_sc(MO_STEELBODY, SC_STEELBODY, SI_STEELBODY, SCB_DEF|SCB_MDEF|SCB_ASPD|SCB_SPEED);
+ set_sc(MO_STEELBODY, SC_STEELBODY, SI_BLANK, SCB_DEF|SCB_MDEF|SCB_ASPD|SCB_SPEED);
add_sc(MO_BLADESTOP, SC_BLADESTOP_WAIT);
add_sc(MO_BLADESTOP, SC_BLADESTOP);
set_sc(MO_EXPLOSIONSPIRITS, SC_EXPLOSIONSPIRITS, SI_EXPLOSIONSPIRITS, SCB_CRI|SCB_REGEN);
diff --git a/src/map/status.h b/src/map/status.h
index c49bd38c4..cb101450c 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -353,7 +353,7 @@ enum {
SI_BLEEDING = 124,
SI_JOINTBEAT = 125,
SI_BABY = 130,
- SI_STEELBODY = 132,
+ SI_AUTOBERSERK = 132,
SI_RUN = 133,
SI_BUMP = 134,
SI_READYSTORM = 135,
diff --git a/src/map/unit.c b/src/map/unit.c
index 1e152b24a..182133f9b 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1787,28 +1787,12 @@ int unit_free(struct block_list *bl, int clrtype) {
}
if (battle_config.debuff_on_logout&2)
{ //Food items are removed on logout.
- if(sd->sc.data[SC_STRFOOD].timer!=-1)
- status_change_end(bl,SC_STRFOOD,-1);
- if(sd->sc.data[SC_AGIFOOD].timer!=-1)
- status_change_end(bl,SC_AGIFOOD,-1);
- if(sd->sc.data[SC_VITFOOD].timer!=-1)
- status_change_end(bl,SC_VITFOOD,-1);
- if(sd->sc.data[SC_INTFOOD].timer!=-1)
- status_change_end(bl,SC_INTFOOD,-1);
- if(sd->sc.data[SC_DEXFOOD].timer!=-1)
- status_change_end(bl,SC_DEXFOOD,-1);
- if(sd->sc.data[SC_LUKFOOD].timer!=-1)
- status_change_end(bl,SC_LUKFOOD,-1);
- if(sd->sc.data[SC_HITFOOD].timer!=-1)
- status_change_end(bl,SC_HITFOOD,-1);
- if(sd->sc.data[SC_FLEEFOOD].timer!=-1)
- status_change_end(bl,SC_FLEEFOOD,-1);
- if(sd->sc.data[SC_BATKFOOD].timer!=-1)
- status_change_end(bl,SC_BATKFOOD,-1);
- if(sd->sc.data[SC_WATKFOOD].timer!=-1)
- status_change_end(bl,SC_WATKFOOD,-1);
- if(sd->sc.data[SC_MATKFOOD].timer!=-1)
- status_change_end(bl,SC_MATKFOOD,-1);
+ if(sd->sc.data[SC_MAXIMIZEPOWER].timer!=-1)
+ status_change_end(bl,SC_MAXIMIZEPOWER,-1);
+ if(sd->sc.data[SC_MAXOVERTHRUST].timer!=-1)
+ status_change_end(bl,SC_MAXOVERTHRUST,-1);
+ if(sd->sc.data[SC_STEELBODY].timer!=-1)
+ status_change_end(bl,SC_STEELBODY,-1);
}
}
if (sd->followtimer != -1)
diff --git a/src/plugins/console.c b/src/plugins/console.c
index df847ea54..f5f512dcb 100644
--- a/src/plugins/console.c
+++ b/src/plugins/console.c
@@ -8,7 +8,6 @@
#include <windows.h>
#else
#define __USE_XOPEN
- #include <features.h>
#include <sys/types.h>
#include <unistd.h>
#include <poll.h>