summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-20 14:32:10 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-20 14:32:10 +0000
commit9b318079b61e0582e91c1e20786bf9ab3df857c5 (patch)
tree79044c2bff59d6664787a4d472646ff0251e9c6e /src/map/skill.c
parent5c4b7e349d1ac6e251cb6ee139bb365afb083083 (diff)
downloadhercules-9b318079b61e0582e91c1e20786bf9ab3df857c5.tar.gz
hercules-9b318079b61e0582e91c1e20786bf9ab3df857c5.tar.bz2
hercules-9b318079b61e0582e91c1e20786bf9ab3df857c5.tar.xz
hercules-9b318079b61e0582e91c1e20786bf9ab3df857c5.zip
- Fixed a comparison whn doing item searches
- Fixed hom_setting&0x2 conflicting with the 'view-range' limit check. - Stone curse now uses status_percent_damage instead of a precalculated value. - Merged the SA_MONOCELL and SA_CLASSCHANGE code. After changing class all the status changes that cannot be triggered on bosses are dispelled. - SA_CLASSCHANGE now uses the bloody branch list to pick a target MVP class. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12098 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a35968b13..e40658d85 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3088,20 +3088,19 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
clif_skill_nodamage(src,bl,skillid,skilllv,1);
break;
case SA_CLASSCHANGE:
- {
- static int changeclass[]={1038,1039,1046,1059,1086,1087,1112,1115
- ,1157,1159,1190,1272,1312,1373,1492};
- int class_ = mob_random_class (changeclass,ARRAYLENGTH(changeclass));
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(dstmd) mob_class_change(dstmd,class_);
- }
- break;
case SA_MONOCELL:
+ if (dstmd)
{
- static int poringclass[]={1002};
- int class_ = mob_random_class (poringclass,ARRAYLENGTH(poringclass));
+ int class_ = skillid==SA_MONOCELL?1002:mob_get_random_id(2, 1, 0);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(dstmd) mob_class_change(dstmd,class_);
+ mob_class_change(dstmd,class_);
+ if (tsc) {
+ const int scs[] = { SC_QUAGMIRE, SC_PROVOKE, SC_ROKISWEIL, SC_GRAVITATION, SC_SUITON, SC_STRIPWEAPON, SC_STRIPSHIELD, SC_STRIPARMOR, SC_STRIPHELM, SC_BLADESTOP };
+ for (i = SC_COMMON_MIN; i <= SC_COMMON_MAX; i++)
+ if (tsc->data[i]) status_change_end(bl, i, -1);
+ for (i = 0; i < ARRAYLENGTH(scs); i++)
+ if (tsc->data[scs[i]]) status_change_end(bl, scs[i], -1);
+ }
}
break;
case SA_DEATH: