summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/map/status.c85
-rw-r--r--src/map/status.h85
2 files changed, 104 insertions, 66 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 5a9ce2531..1fe6ec122 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6097,20 +6097,22 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
case SC_DPOISON: sc->opt2 |= OPT2_DPOISON; break;
//OPT3
case SC_TWOHANDQUICKEN:
+ case SC_ONEHAND:
case SC_SPEARQUICKEN:
case SC_CONCENTRATION:
- sc->opt3 |= 0x1;
+ case SC_MERC_QUICKEN:
+ sc->opt3 |= OPT3_QUICKEN;
opt_flag = 0;
break;
case SC_MAXOVERTHRUST:
case SC_OVERTHRUST:
case SC_SWOO: //Why does it shares the same opt as Overthrust? Perhaps we'll never know...
- sc->opt3 |= 0x2;
+ sc->opt3 |= OPT3_OVERTHRUST;
opt_flag = 0;
break;
case SC_ENERGYCOAT:
case SC_SKE:
- sc->opt3 |= 0x4;
+ sc->opt3 |= OPT3_ENERGYCOAT;
opt_flag = 0;
break;
case SC_INCATKRATE:
@@ -6120,66 +6122,66 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
break;
}
case SC_EXPLOSIONSPIRITS:
- sc->opt3 |= 0x8;
+ sc->opt3 |= OPT3_EXPLOSIONSPIRITS;
opt_flag = 0;
break;
case SC_STEELBODY:
case SC_SKA:
- sc->opt3 |= 0x10;
+ sc->opt3 |= OPT3_STEELBODY;
opt_flag = 0;
break;
case SC_BLADESTOP:
- sc->opt3 |= 0x20;
+ sc->opt3 |= OPT3_BLADESTOP;
opt_flag = 0;
break;
case SC_AURABLADE:
- sc->opt3 |= 0x40;
+ sc->opt3 |= OPT3_AURABLADE;
opt_flag = 0;
break;
case SC_BERSERK:
- sc->opt3 |= 0x80;
+ sc->opt3 |= OPT3_BERSERK;
opt_flag = 0;
break;
-// case ???: // OPT3_LIGHTBLADE, doesn't seem to do anything
-// sc->opt3 |= 0x100;
+// case ???: // doesn't seem to do anything
+// sc->opt3 |= OPT3_LIGHTBLADE;
// opt_flag = 0;
// break;
case SC_DANCING:
if ((val1&0xFFFF) == CG_MOONLIT)
- sc->opt3 |= 0x200;
+ sc->opt3 |= OPT3_MOONLIT;
opt_flag = 0;
break;
case SC_MARIONETTE:
case SC_MARIONETTE2:
- sc->opt3 |= 0x400;
+ sc->opt3 |= OPT3_MARIONETTE;
opt_flag = 0;
break;
case SC_ASSUMPTIO:
- sc->opt3 |= 0x800;
+ sc->opt3 |= OPT3_ASSUMPTIO;
opt_flag = 0;
break;
case SC_WARM: //SG skills [Komurka]
- sc->opt3 |= 0x1000;
+ sc->opt3 |= OPT3_WARM;
opt_flag = 0;
break;
case SC_KAITE:
- sc->opt3 |= 0x2000;
+ sc->opt3 |= OPT3_KAITE;
opt_flag = 0;
break;
case SC_BUNSINJYUTSU:
- sc->opt3 |= 0x4000;
+ sc->opt3 |= OPT3_BUNSIN;
opt_flag = 0;
break;
case SC_SPIRIT:
- sc->opt3 |= 0x8000;
+ sc->opt3 |= OPT3_SOULLINK;
opt_flag = 0;
break;
case SC_CHANGEUNDEAD:
- sc->opt3 |= 0x10000;
+ sc->opt3 |= OPT3_UNDEAD;
opt_flag = 0;
break;
-// case ???: // OPT3_CONTRACT, from DA_CONTRACT (looks like biolab mobs aura)
-// sc->opt3 |= 0x20000;
+// case ???: // from DA_CONTRACT (looks like biolab mobs aura)
+// sc->opt3 |= OPT3_CONTRACT;
// opt_flag = 0;
// break;
//OPTION
@@ -6732,18 +6734,18 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
case SC_SPEARQUICKEN:
case SC_CONCENTRATION:
case SC_MERC_QUICKEN:
- sc->opt3 &= ~0x1;
+ sc->opt3 &= ~OPT3_QUICKEN;
opt_flag = 0;
break;
case SC_OVERTHRUST:
case SC_MAXOVERTHRUST:
case SC_SWOO:
- sc->opt3 &= ~0x2;
+ sc->opt3 &= ~OPT3_OVERTHRUST;
opt_flag = 0;
break;
case SC_ENERGYCOAT:
case SC_SKE:
- sc->opt3 &= ~0x4;
+ sc->opt3 &= ~OPT3_ENERGYCOAT;
opt_flag = 0;
break;
case SC_INCATKRATE: //Simulated Explosion spirits effect.
@@ -6753,59 +6755,66 @@ int status_change_end(struct block_list* bl, enum sc_type type, int tid)
break;
}
case SC_EXPLOSIONSPIRITS:
- sc->opt3 &= ~0x8;
+ sc->opt3 &= ~OPT3_EXPLOSIONSPIRITS;
opt_flag = 0;
break;
case SC_STEELBODY:
case SC_SKA:
- sc->opt3 &= ~0x10;
+ sc->opt3 &= ~OPT3_STEELBODY;
opt_flag = 0;
break;
case SC_BLADESTOP:
- sc->opt3 &= ~0x20;
+ sc->opt3 &= ~OPT3_BLADESTOP;
+ opt_flag = 0;
+ break;
+ case SC_AURABLADE:
+ sc->opt3 &= ~OPT3_AURABLADE;
opt_flag = 0;
break;
case SC_BERSERK:
- sc->opt3 &= ~0x80;
+ sc->opt3 &= ~OPT3_BERSERK;
opt_flag = 0;
break;
+// case ???: // doesn't seem to do anything
+// sc->opt3 &= ~OPT3_LIGHTBLADE;
+// opt_flag = 0;
+// break;
case SC_DANCING:
if ((sce->val1&0xFFFF) == CG_MOONLIT)
- sc->opt3 &= ~0x200;
+ sc->opt3 &= ~OPT3_MOONLIT;
opt_flag = 0;
break;
case SC_MARIONETTE:
case SC_MARIONETTE2:
- sc->opt3 &= ~0x400;
+ sc->opt3 &= ~OPT3_MARIONETTE;
opt_flag = 0;
break;
case SC_ASSUMPTIO:
- sc->opt3 &= ~0x800;
+ sc->opt3 &= ~OPT3_ASSUMPTIO;
opt_flag = 0;
break;
case SC_WARM: //SG skills [Komurka]
- sc->opt3 &= ~0x1000;
+ sc->opt3 &= ~OPT3_WARM;
opt_flag = 0;
break;
case SC_KAITE:
- sc->opt3 &= ~0x2000;
+ sc->opt3 &= ~OPT3_KAITE;
opt_flag = 0;
break;
case SC_BUNSINJYUTSU:
- sc->opt3 &= ~0x4000;
+ sc->opt3 &= ~OPT3_BUNSIN;
opt_flag = 0;
break;
case SC_SPIRIT:
- sc->opt3 &= ~0x8000;
+ sc->opt3 &= ~OPT3_SOULLINK;
opt_flag = 0;
break;
case SC_CHANGEUNDEAD:
- sc->opt3 &= ~0x10000;
+ sc->opt3 &= ~OPT3_UNDEAD;
opt_flag = 0;
break;
-// TODO:
-// case ???:
-// sc->opt3 &= ~0x20000;
+// case ???: // from DA_CONTRACT (looks like biolab mobs aura)
+// sc->opt3 &= ~OPT3_CONTRACT;
// opt_flag = 0;
// break;
default:
diff --git a/src/map/status.h b/src/map/status.h
index f77fa4af5..ef10d7811 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -669,6 +669,7 @@ extern int percentrefinery[5][MAX_REFINE+1]; //The last slot always has a 0% suc
//Status change option definitions (options are what makes status changes visible to chars
//who were not on your field of sight when it happened)
+
//opt1: Non stackable status changes.
enum {
OPT1_STONE = 1, //Petrified
@@ -680,34 +681,62 @@ enum {
};
//opt2: Stackable status changes.
-#define OPT2_POISON 0x0001
-#define OPT2_CURSE 0x0002
-#define OPT2_SILENCE 0x0004
-#define OPT2_SIGNUMCRUCIS 0x0008
-#define OPT2_BLIND 0x0010
-#define OPT2_ANGELUS 0x0020
-#define OPT2_BLEEDING 0x0040
-#define OPT2_DPOISON 0x0080
-
-#define OPTION_SIGHT 0x00000001
-#define OPTION_HIDE 0x00000002
-#define OPTION_CLOAK 0x00000004
-#define OPTION_CART1 0x00000008
-#define OPTION_FALCON 0x00000010
-#define OPTION_RIDING 0x00000020
-#define OPTION_INVISIBLE 0x00000040
-#define OPTION_CART2 0x00000080
-#define OPTION_CART3 0x00000100
-#define OPTION_CART4 0x00000200
-#define OPTION_CART5 0x00000400
-#define OPTION_ORCISH 0x00000800
-#define OPTION_WEDDING 0x00001000
-#define OPTION_RUWACH 0x00002000
-#define OPTION_CHASEWALK 0x00004000
-//Note that clientside Flying and Xmas are 0x8000 for clients prior to 2007.
-#define OPTION_FLYING 0x0008000
-#define OPTION_XMAS 0x00010000
-#define OPTION_SUMMER 0x00040000
+enum {
+ OPT2_POISON = 0x0001,
+ OPT2_CURSE = 0x0002,
+ OPT2_SILENCE = 0x0004,
+ OPT2_SIGNUMCRUCIS = 0x0008,
+ OPT2_BLIND = 0x0010,
+ OPT2_ANGELUS = 0x0020,
+ OPT2_BLEEDING = 0x0040,
+ OPT2_DPOISON = 0x0080,
+};
+
+//opt3: (SHOW_EFST_*)
+enum {
+ OPT3_NORMAL = 0x00000000,
+ OPT3_QUICKEN = 0x00000001,
+ OPT3_OVERTHRUST = 0x00000002,
+ OPT3_ENERGYCOAT = 0x00000004,
+ OPT3_EXPLOSIONSPIRITS = 0x00000008,
+ OPT3_STEELBODY = 0x00000010,
+ OPT3_BLADESTOP = 0x00000020,
+ OPT3_AURABLADE = 0x00000040,
+ OPT3_BERSERK = 0x00000080,
+ OPT3_LIGHTBLADE = 0x00000100,
+ OPT3_MOONLIT = 0x00000200,
+ OPT3_MARIONETTE = 0x00000400,
+ OPT3_ASSUMPTIO = 0x00000800,
+ OPT3_WARM = 0x00001000,
+ OPT3_KAITE = 0x00002000,
+ OPT3_BUNSIN = 0x00004000,
+ OPT3_SOULLINK = 0x00008000,
+ OPT3_UNDEAD = 0x00010000,
+ OPT3_CONTRACT = 0x00020000,
+};
+
+enum {
+ OPTION_NOTHING = 0x00000000,
+ OPTION_SIGHT = 0x00000001,
+ OPTION_HIDE = 0x00000002,
+ OPTION_CLOAK = 0x00000004,
+ OPTION_CART1 = 0x00000008,
+ OPTION_FALCON = 0x00000010,
+ OPTION_RIDING = 0x00000020,
+ OPTION_INVISIBLE = 0x00000040,
+ OPTION_CART2 = 0x00000080,
+ OPTION_CART3 = 0x00000100,
+ OPTION_CART4 = 0x00000200,
+ OPTION_CART5 = 0x00000400,
+ OPTION_ORCISH = 0x00000800,
+ OPTION_WEDDING = 0x00001000,
+ OPTION_RUWACH = 0x00002000,
+ OPTION_CHASEWALK = 0x00004000,
+ OPTION_FLYING = 0x00008000, //Note that clientside Flying and Xmas are 0x8000 for clients prior to 2007.
+ OPTION_XMAS = 0x00010000,
+ OPTION_TRANSFORM = 0x00020000,
+ OPTION_SUMMER = 0x00040000,
+};
#define OPTION_CART (OPTION_CART1|OPTION_CART2|OPTION_CART3|OPTION_CART4|OPTION_CART5)