summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-07-17 15:17:19 +0300
committerAndrei Karas <akaras@inbox.ru>2015-07-25 14:49:05 +0300
commit58a97dc5edd22bbc7abb40554d19876a43077376 (patch)
treebfeb34a14947e14c7bc2bb301cd843b50cc3d739
parentc654c6d8d29d41f404545342cceb41aa7f3c5817 (diff)
downloadhercules-58a97dc5edd22bbc7abb40554d19876a43077376.tar.gz
hercules-58a97dc5edd22bbc7abb40554d19876a43077376.tar.bz2
hercules-58a97dc5edd22bbc7abb40554d19876a43077376.tar.xz
hercules-58a97dc5edd22bbc7abb40554d19876a43077376.zip
Reduce memory usage in HPM in status.c
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/status.c772
-rw-r--r--src/map/status.h26
3 files changed, 404 insertions, 398 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 0b6c088d3..cbe22dbb0 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -1370,7 +1370,7 @@ bool clif_spawn(struct block_list *bl)
if( sd->bg_id && map->list[sd->bl.m].flag.battleground )
clif->sendbgemblem_area(sd);
for( i = 0; i < sd->sc_display_count; i++ ) {
- clif->sc_load(&sd->bl, sd->bl.id,AREA,status->IconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3);
+ clif->sc_load(&sd->bl, sd->bl.id,AREA,status->dbs->IconChangeTable[sd->sc_display[i]->type],sd->sc_display[i]->val1,sd->sc_display[i]->val2,sd->sc_display[i]->val3);
}
if (sd->charm_type != CHARM_TYPE_NONE && sd->charm_count > 0)
clif->spiritcharm(sd);
@@ -4005,7 +4005,7 @@ void clif_getareachar_pc(struct map_session_data* sd,struct map_session_data* ds
clif->charm_single(sd->fd, dstsd);
for( i = 0; i < dstsd->sc_display_count; i++ ) {
- clif->sc_load(&sd->bl,dstsd->bl.id,SELF,status->IconChangeTable[dstsd->sc_display[i]->type],dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3);
+ clif->sc_load(&sd->bl,dstsd->bl.id,SELF,status->dbs->IconChangeTable[dstsd->sc_display[i]->type],dstsd->sc_display[i]->val1,dstsd->sc_display[i]->val2,dstsd->sc_display[i]->val3);
}
if( (sd->status.party_id && dstsd->status.party_id == sd->status.party_id) || //Party-mate, or hpdisp setting.
(sd->bg_id && sd->bg_id == dstsd->bg_id) || //BattleGround
diff --git a/src/map/status.c b/src/map/status.c
index 7af887f81..c21e81aab 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -44,6 +44,7 @@
#include <time.h>
struct status_interface status_s;
+struct s_status_dbs statusdbs;
/**
* Returns the status change associated with a skill.
@@ -56,7 +57,7 @@ sc_type status_skill2sc(int skill_id) {
ShowError("status_skill2sc: Unsupported skill id %d\n", skill_id);
return SC_NONE;
}
- return status->Skill2SCTable[idx];
+ return status->dbs->Skill2SCTable[idx];
}
/**
@@ -72,7 +73,7 @@ int status_sc2skill(sc_type sc)
return 0;
}
- return status->SkillChangeTable[sc];
+ return status->dbs->SkillChangeTable[sc];
}
/**
@@ -87,7 +88,7 @@ unsigned int status_sc2scb_flag(sc_type sc)
return SCB_NONE;
}
- return status->ChangeFlagTable[sc];
+ return status->dbs->ChangeFlagTable[sc];
}
/**
@@ -102,7 +103,7 @@ int status_type2relevant_bl_types(int type)
return BL_NUL;
}
- return status->RelevantBLTypes[type];
+ return status->dbs->RelevantBLTypes[type];
}
static void set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) {
@@ -116,35 +117,35 @@ static void set_sc(uint16 skill_id, sc_type sc, int icon, unsigned int flag) {
return;
}
- if( status->SkillChangeTable[sc] == 0 )
- status->SkillChangeTable[sc] = skill_id;
- if( status->IconChangeTable[sc] == SI_BLANK )
- status->IconChangeTable[sc] = icon;
- status->ChangeFlagTable[sc] |= flag;
+ if( status->dbs->SkillChangeTable[sc] == 0 )
+ status->dbs->SkillChangeTable[sc] = skill_id;
+ if( status->dbs->IconChangeTable[sc] == SI_BLANK )
+ status->dbs->IconChangeTable[sc] = icon;
+ status->dbs->ChangeFlagTable[sc] |= flag;
- if( status->Skill2SCTable[idx] == SC_NONE )
- status->Skill2SCTable[idx] = sc;
+ if( status->dbs->Skill2SCTable[idx] == SC_NONE )
+ status->dbs->Skill2SCTable[idx] = sc;
}
void initChangeTables(void) {
#define add_sc(skill,sc) set_sc((skill),(sc),SI_BLANK,SCB_NONE)
// indicates that the status displays a visual effect for the affected unit, and should be sent to the client for all supported units
-#define set_sc_with_vfx(skill, sc, icon, flag) do { set_sc((skill), (sc), (icon), (flag)); if((icon) < SI_MAX) status->RelevantBLTypes[(icon)] |= BL_SCEFFECT; } while(0)
+#define set_sc_with_vfx(skill, sc, icon, flag) do { set_sc((skill), (sc), (icon), (flag)); if((icon) < SI_MAX) status->dbs->RelevantBLTypes[(icon)] |= BL_SCEFFECT; } while(0)
int i;
for (i = 0; i < SC_MAX; i++)
- status->IconChangeTable[i] = SI_BLANK;
+ status->dbs->IconChangeTable[i] = SI_BLANK;
for (i = 0; i < MAX_SKILL; i++)
- status->Skill2SCTable[i] = SC_NONE;
+ status->dbs->Skill2SCTable[i] = SC_NONE;
for (i = 0; i < SI_MAX; i++)
- status->RelevantBLTypes[i] = BL_PC;
+ status->dbs->RelevantBLTypes[i] = BL_PC;
- memset(status->SkillChangeTable, 0, sizeof(status->SkillChangeTable));
- memset(status->ChangeFlagTable, 0, sizeof(status->ChangeFlagTable));
- memset(status->DisplayType, 0, sizeof(status->DisplayType));
+ memset(status->dbs->SkillChangeTable, 0, sizeof(status->dbs->SkillChangeTable));
+ memset(status->dbs->ChangeFlagTable, 0, sizeof(status->dbs->ChangeFlagTable));
+ memset(status->dbs->DisplayType, 0, sizeof(status->dbs->DisplayType));
//First we define the skill for common ailments. These are used in skill_additional_effect through sc cards. [Skotlex]
set_sc( NPC_PETRIFYATTACK , SC_STONE , SI_BLANK , SCB_DEF_ELE|SCB_DEF|SCB_MDEF );
@@ -754,303 +755,303 @@ void initChangeTables(void) {
set_sc_with_vfx( GN_ILLUSIONDOPING , SC_ILLUSIONDOPING , SI_ILLUSIONDOPING , SCB_HIT );
// Storing the target job rather than simply SC_SOULLINK simplifies code later on.
- status->Skill2SCTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST,
- status->Skill2SCTable[SL_MONK] = (sc_type)MAPID_MONK,
- status->Skill2SCTable[SL_STAR] = (sc_type)MAPID_STAR_GLADIATOR,
- status->Skill2SCTable[SL_SAGE] = (sc_type)MAPID_SAGE,
- status->Skill2SCTable[SL_CRUSADER] = (sc_type)MAPID_CRUSADER,
- status->Skill2SCTable[SL_SUPERNOVICE] = (sc_type)MAPID_SUPER_NOVICE,
- status->Skill2SCTable[SL_KNIGHT] = (sc_type)MAPID_KNIGHT,
- status->Skill2SCTable[SL_WIZARD] = (sc_type)MAPID_WIZARD,
- status->Skill2SCTable[SL_PRIEST] = (sc_type)MAPID_PRIEST,
- status->Skill2SCTable[SL_BARDDANCER] = (sc_type)MAPID_BARDDANCER,
- status->Skill2SCTable[SL_ROGUE] = (sc_type)MAPID_ROGUE,
- status->Skill2SCTable[SL_ASSASIN] = (sc_type)MAPID_ASSASSIN,
- status->Skill2SCTable[SL_BLACKSMITH] = (sc_type)MAPID_BLACKSMITH,
- status->Skill2SCTable[SL_HUNTER] = (sc_type)MAPID_HUNTER,
- status->Skill2SCTable[SL_SOULLINKER] = (sc_type)MAPID_SOUL_LINKER,
+ status->dbs->Skill2SCTable[SL_ALCHEMIST] = (sc_type)MAPID_ALCHEMIST,
+ status->dbs->Skill2SCTable[SL_MONK] = (sc_type)MAPID_MONK,
+ status->dbs->Skill2SCTable[SL_STAR] = (sc_type)MAPID_STAR_GLADIATOR,
+ status->dbs->Skill2SCTable[SL_SAGE] = (sc_type)MAPID_SAGE,
+ status->dbs->Skill2SCTable[SL_CRUSADER] = (sc_type)MAPID_CRUSADER,
+ status->dbs->Skill2SCTable[SL_SUPERNOVICE] = (sc_type)MAPID_SUPER_NOVICE,
+ status->dbs->Skill2SCTable[SL_KNIGHT] = (sc_type)MAPID_KNIGHT,
+ status->dbs->Skill2SCTable[SL_WIZARD] = (sc_type)MAPID_WIZARD,
+ status->dbs->Skill2SCTable[SL_PRIEST] = (sc_type)MAPID_PRIEST,
+ status->dbs->Skill2SCTable[SL_BARDDANCER] = (sc_type)MAPID_BARDDANCER,
+ status->dbs->Skill2SCTable[SL_ROGUE] = (sc_type)MAPID_ROGUE,
+ status->dbs->Skill2SCTable[SL_ASSASIN] = (sc_type)MAPID_ASSASSIN,
+ status->dbs->Skill2SCTable[SL_BLACKSMITH] = (sc_type)MAPID_BLACKSMITH,
+ status->dbs->Skill2SCTable[SL_HUNTER] = (sc_type)MAPID_HUNTER,
+ status->dbs->Skill2SCTable[SL_SOULLINKER] = (sc_type)MAPID_SOUL_LINKER,
//Status that don't have a skill associated.
- status->IconChangeTable[SC_WEIGHTOVER50] = SI_WEIGHTOVER50;
- status->IconChangeTable[SC_WEIGHTOVER90] = SI_WEIGHTOVER90;
- status->IconChangeTable[SC_ATTHASTE_POTION1] = SI_ATTHASTE_POTION1;
- status->IconChangeTable[SC_ATTHASTE_POTION2] = SI_ATTHASTE_POTION2;
- status->IconChangeTable[SC_ATTHASTE_POTION3] = SI_ATTHASTE_POTION3;
- status->IconChangeTable[SC_ATTHASTE_INFINITY] = SI_ATTHASTE_INFINITY;
- status->IconChangeTable[SC_MOVHASTE_HORSE] = SI_MOVHASTE_HORSE;
- status->IconChangeTable[SC_MOVHASTE_INFINITY] = SI_MOVHASTE_INFINITY;
- status->IconChangeTable[SC_CHASEWALK2] = SI_INCSTR;
- status->IconChangeTable[SC_MIRACLE] = SI_SOULLINK;
- status->IconChangeTable[SC_CLAIRVOYANCE] = SI_CLAIRVOYANCE;
- status->IconChangeTable[SC_FOOD_STR] = SI_FOOD_STR;
- status->IconChangeTable[SC_FOOD_AGI] = SI_FOOD_AGI;
- status->IconChangeTable[SC_FOOD_VIT] = SI_FOOD_VIT;
- status->IconChangeTable[SC_FOOD_INT] = SI_FOOD_INT;
- status->IconChangeTable[SC_FOOD_DEX] = SI_FOOD_DEX;
- status->IconChangeTable[SC_FOOD_LUK] = SI_FOOD_LUK;
- status->IconChangeTable[SC_FOOD_BASICAVOIDANCE]= SI_FOOD_BASICAVOIDANCE;
- status->IconChangeTable[SC_FOOD_BASICHIT] = SI_FOOD_BASICHIT;
- status->IconChangeTable[SC_MANU_ATK] = SI_MANU_ATK;
- status->IconChangeTable[SC_MANU_DEF] = SI_MANU_DEF;
- status->IconChangeTable[SC_SPL_ATK] = SI_SPL_ATK;
- status->IconChangeTable[SC_SPL_DEF] = SI_SPL_DEF;
- status->IconChangeTable[SC_MANU_MATK] = SI_MANU_MATK;
- status->IconChangeTable[SC_SPL_MATK] = SI_SPL_MATK;
- status->IconChangeTable[SC_PLUSATTACKPOWER] = SI_PLUSATTACKPOWER;
- status->IconChangeTable[SC_PLUSMAGICPOWER] = SI_PLUSMAGICPOWER;
+ status->dbs->IconChangeTable[SC_WEIGHTOVER50] = SI_WEIGHTOVER50;
+ status->dbs->IconChangeTable[SC_WEIGHTOVER90] = SI_WEIGHTOVER90;
+ status->dbs->IconChangeTable[SC_ATTHASTE_POTION1] = SI_ATTHASTE_POTION1;
+ status->dbs->IconChangeTable[SC_ATTHASTE_POTION2] = SI_ATTHASTE_POTION2;
+ status->dbs->IconChangeTable[SC_ATTHASTE_POTION3] = SI_ATTHASTE_POTION3;
+ status->dbs->IconChangeTable[SC_ATTHASTE_INFINITY] = SI_ATTHASTE_INFINITY;
+ status->dbs->IconChangeTable[SC_MOVHASTE_HORSE] = SI_MOVHASTE_HORSE;
+ status->dbs->IconChangeTable[SC_MOVHASTE_INFINITY] = SI_MOVHASTE_INFINITY;
+ status->dbs->IconChangeTable[SC_CHASEWALK2] = SI_INCSTR;
+ status->dbs->IconChangeTable[SC_MIRACLE] = SI_SOULLINK;
+ status->dbs->IconChangeTable[SC_CLAIRVOYANCE] = SI_CLAIRVOYANCE;
+ status->dbs->IconChangeTable[SC_FOOD_STR] = SI_FOOD_STR;
+ status->dbs->IconChangeTable[SC_FOOD_AGI] = SI_FOOD_AGI;
+ status->dbs->IconChangeTable[SC_FOOD_VIT] = SI_FOOD_VIT;
+ status->dbs->IconChangeTable[SC_FOOD_INT] = SI_FOOD_INT;
+ status->dbs->IconChangeTable[SC_FOOD_DEX] = SI_FOOD_DEX;
+ status->dbs->IconChangeTable[SC_FOOD_LUK] = SI_FOOD_LUK;
+ status->dbs->IconChangeTable[SC_FOOD_BASICAVOIDANCE]= SI_FOOD_BASICAVOIDANCE;
+ status->dbs->IconChangeTable[SC_FOOD_BASICHIT] = SI_FOOD_BASICHIT;
+ status->dbs->IconChangeTable[SC_MANU_ATK] = SI_MANU_ATK;
+ status->dbs->IconChangeTable[SC_MANU_DEF] = SI_MANU_DEF;
+ status->dbs->IconChangeTable[SC_SPL_ATK] = SI_SPL_ATK;
+ status->dbs->IconChangeTable[SC_SPL_DEF] = SI_SPL_DEF;
+ status->dbs->IconChangeTable[SC_MANU_MATK] = SI_MANU_MATK;
+ status->dbs->IconChangeTable[SC_SPL_MATK] = SI_SPL_MATK;
+ status->dbs->IconChangeTable[SC_PLUSATTACKPOWER] = SI_PLUSATTACKPOWER;
+ status->dbs->IconChangeTable[SC_PLUSMAGICPOWER] = SI_PLUSMAGICPOWER;
//Cash Items
- status->IconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH;
- status->IconChangeTable[SC_FOOD_AGI_CASH] = SI_FOOD_AGI_CASH;
- status->IconChangeTable[SC_FOOD_VIT_CASH] = SI_FOOD_VIT_CASH;
- status->IconChangeTable[SC_FOOD_DEX_CASH] = SI_FOOD_DEX_CASH;
- status->IconChangeTable[SC_FOOD_INT_CASH] = SI_FOOD_INT_CASH;
- status->IconChangeTable[SC_FOOD_LUK_CASH] = SI_FOOD_LUK_CASH;
- status->IconChangeTable[SC_CASH_PLUSEXP] = SI_CASH_PLUSEXP;
- status->IconChangeTable[SC_CASH_RECEIVEITEM] = SI_CASH_RECEIVEITEM;
- status->IconChangeTable[SC_CASH_PLUSONLYJOBEXP] = SI_CASH_PLUSONLYJOBEXP;
- status->IconChangeTable[SC_CASH_DEATHPENALTY] = SI_CASH_DEATHPENALTY;
- status->IconChangeTable[SC_CASH_BOSS_ALARM] = SI_CASH_BOSS_ALARM;
- status->IconChangeTable[SC_PROTECT_DEF] = SI_PROTECT_DEF;
- status->IconChangeTable[SC_PROTECT_MDEF] = SI_PROTECT_MDEF;
- status->IconChangeTable[SC_CRITICALPERCENT] = SI_CRITICALPERCENT;
- status->IconChangeTable[SC_PLUSAVOIDVALUE] = SI_PLUSAVOIDVALUE;
- status->IconChangeTable[SC_HEALPLUS] = SI_HEALPLUS;
- status->IconChangeTable[SC_S_LIFEPOTION] = SI_S_LIFEPOTION;
- status->IconChangeTable[SC_L_LIFEPOTION] = SI_L_LIFEPOTION;
- status->IconChangeTable[SC_ATKER_BLOOD] = SI_ATKER_BLOOD;
- status->IconChangeTable[SC_TARGET_BLOOD] = SI_TARGET_BLOOD;
+ status->dbs->IconChangeTable[SC_FOOD_STR_CASH] = SI_FOOD_STR_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_AGI_CASH] = SI_FOOD_AGI_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_VIT_CASH] = SI_FOOD_VIT_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_DEX_CASH] = SI_FOOD_DEX_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_INT_CASH] = SI_FOOD_INT_CASH;
+ status->dbs->IconChangeTable[SC_FOOD_LUK_CASH] = SI_FOOD_LUK_CASH;
+ status->dbs->IconChangeTable[SC_CASH_PLUSEXP] = SI_CASH_PLUSEXP;
+ status->dbs->IconChangeTable[SC_CASH_RECEIVEITEM] = SI_CASH_RECEIVEITEM;
+ status->dbs->IconChangeTable[SC_CASH_PLUSONLYJOBEXP] = SI_CASH_PLUSONLYJOBEXP;
+ status->dbs->IconChangeTable[SC_CASH_DEATHPENALTY] = SI_CASH_DEATHPENALTY;
+ status->dbs->IconChangeTable[SC_CASH_BOSS_ALARM] = SI_CASH_BOSS_ALARM;
+ status->dbs->IconChangeTable[SC_PROTECT_DEF] = SI_PROTECT_DEF;
+ status->dbs->IconChangeTable[SC_PROTECT_MDEF] = SI_PROTECT_MDEF;
+ status->dbs->IconChangeTable[SC_CRITICALPERCENT] = SI_CRITICALPERCENT;
+ status->dbs->IconChangeTable[SC_PLUSAVOIDVALUE] = SI_PLUSAVOIDVALUE;
+ status->dbs->IconChangeTable[SC_HEALPLUS] = SI_HEALPLUS;
+ status->dbs->IconChangeTable[SC_S_LIFEPOTION] = SI_S_LIFEPOTION;
+ status->dbs->IconChangeTable[SC_L_LIFEPOTION] = SI_L_LIFEPOTION;
+ status->dbs->IconChangeTable[SC_ATKER_BLOOD] = SI_ATKER_BLOOD;
+ status->dbs->IconChangeTable[SC_TARGET_BLOOD] = SI_TARGET_BLOOD;
// Mercenary Bonus Effects
- status->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE;
- status->IconChangeTable[SC_MER_ATK] = SI_MER_ATK;
- status->IconChangeTable[SC_MER_HP] = SI_MER_HP;
- status->IconChangeTable[SC_MER_SP] = SI_MER_SP;
- status->IconChangeTable[SC_MER_HIT] = SI_MER_HIT;
+ status->dbs->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE;
+ status->dbs->IconChangeTable[SC_MER_ATK] = SI_MER_ATK;
+ status->dbs->IconChangeTable[SC_MER_HP] = SI_MER_HP;
+ status->dbs->IconChangeTable[SC_MER_SP] = SI_MER_SP;
+ status->dbs->IconChangeTable[SC_MER_HIT] = SI_MER_HIT;
// Warlock Spheres
- status->IconChangeTable[SC_SUMMON1] = SI_SPHERE_1;
- status->IconChangeTable[SC_SUMMON2] = SI_SPHERE_2;
- status->IconChangeTable[SC_SUMMON3] = SI_SPHERE_3;
- status->IconChangeTable[SC_SUMMON4] = SI_SPHERE_4;
- status->IconChangeTable[SC_SUMMON5] = SI_SPHERE_5;
+ status->dbs->IconChangeTable[SC_SUMMON1] = SI_SPHERE_1;
+ status->dbs->IconChangeTable[SC_SUMMON2] = SI_SPHERE_2;
+ status->dbs->IconChangeTable[SC_SUMMON3] = SI_SPHERE_3;
+ status->dbs->IconChangeTable[SC_SUMMON4] = SI_SPHERE_4;
+ status->dbs->IconChangeTable[SC_SUMMON5] = SI_SPHERE_5;
// Warlock Preserved spells
- status->IconChangeTable[SC_SPELLBOOK1] = SI_SPELLBOOK1;
- status->IconChangeTable[SC_SPELLBOOK2] = SI_SPELLBOOK2;
- status->IconChangeTable[SC_SPELLBOOK3] = SI_SPELLBOOK3;
- status->IconChangeTable[SC_SPELLBOOK4] = SI_SPELLBOOK4;
- status->IconChangeTable[SC_SPELLBOOK5] = SI_SPELLBOOK5;
- status->IconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6;
- status->IconChangeTable[SC_SPELLBOOK7] = SI_SPELLBOOK7;
-
- status->IconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER;
- status->IconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER;
- status->IconChangeTable[SC_OVERHEAT] = SI_OVERHEAT;
- status->IconChangeTable[SC_OVERHEAT_LIMITPOINT] = SI_OVERHEAT_LIMITPOINT;
-
- status->IconChangeTable[SC_HALLUCINATIONWALK_POSTDELAY] = SI_HALLUCINATIONWALK_POSTDELAY;
- status->IconChangeTable[SC_TOXIN] = SI_TOXIN;
- status->IconChangeTable[SC_PARALYSE] = SI_PARALYSE;
- status->IconChangeTable[SC_VENOMBLEED] = SI_VENOMBLEED;
- status->IconChangeTable[SC_MAGICMUSHROOM] = SI_MAGICMUSHROOM;
- status->IconChangeTable[SC_DEATHHURT] = SI_DEATHHURT;
- status->IconChangeTable[SC_PYREXIA] = SI_PYREXIA;
- status->IconChangeTable[SC_OBLIVIONCURSE] = SI_OBLIVIONCURSE;
- status->IconChangeTable[SC_LEECHESEND] = SI_LEECHESEND;
-
- status->IconChangeTable[SC_SHIELDSPELL_DEF] = SI_SHIELDSPELL_DEF;
- status->IconChangeTable[SC_SHIELDSPELL_MDEF] = SI_SHIELDSPELL_MDEF;
- status->IconChangeTable[SC_SHIELDSPELL_REF] = SI_SHIELDSPELL_REF;
- status->IconChangeTable[SC_BANDING_DEFENCE] = SI_BANDING_DEFENCE;
-
- status->IconChangeTable[SC_CURSEDCIRCLE_ATKER] = SI_CURSEDCIRCLE_ATKER;
-
- status->IconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE;
- status->IconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER;
- status->IconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB;
- status->IconChangeTable[SC_BANANA_BOMB] = SI_BANANA_BOMB;
- status->IconChangeTable[SC_BANANA_BOMB_SITDOWN_POSTDELAY] = SI_BANANA_BOMB_SITDOWN_POSTDELAY;
+ status->dbs->IconChangeTable[SC_SPELLBOOK1] = SI_SPELLBOOK1;
+ status->dbs->IconChangeTable[SC_SPELLBOOK2] = SI_SPELLBOOK2;
+ status->dbs->IconChangeTable[SC_SPELLBOOK3] = SI_SPELLBOOK3;
+ status->dbs->IconChangeTable[SC_SPELLBOOK4] = SI_SPELLBOOK4;
+ status->dbs->IconChangeTable[SC_SPELLBOOK5] = SI_SPELLBOOK5;
+ status->dbs->IconChangeTable[SC_SPELLBOOK6] = SI_SPELLBOOK6;
+ status->dbs->IconChangeTable[SC_SPELLBOOK7] = SI_SPELLBOOK7;
+
+ status->dbs->IconChangeTable[SC_NEUTRALBARRIER_MASTER] = SI_NEUTRALBARRIER_MASTER;
+ status->dbs->IconChangeTable[SC_STEALTHFIELD_MASTER] = SI_STEALTHFIELD_MASTER;
+ status->dbs->IconChangeTable[SC_OVERHEAT] = SI_OVERHEAT;
+ status->dbs->IconChangeTable[SC_OVERHEAT_LIMITPOINT] = SI_OVERHEAT_LIMITPOINT;
+
+ status->dbs->IconChangeTable[SC_HALLUCINATIONWALK_POSTDELAY] = SI_HALLUCINATIONWALK_POSTDELAY;
+ status->dbs->IconChangeTable[SC_TOXIN] = SI_TOXIN;
+ status->dbs->IconChangeTable[SC_PARALYSE] = SI_PARALYSE;
+ status->dbs->IconChangeTable[SC_VENOMBLEED] = SI_VENOMBLEED;
+ status->dbs->IconChangeTable[SC_MAGICMUSHROOM] = SI_MAGICMUSHROOM;
+ status->dbs->IconChangeTable[SC_DEATHHURT] = SI_DEATHHURT;
+ status->dbs->IconChangeTable[SC_PYREXIA] = SI_PYREXIA;
+ status->dbs->IconChangeTable[SC_OBLIVIONCURSE] = SI_OBLIVIONCURSE;
+ status->dbs->IconChangeTable[SC_LEECHESEND] = SI_LEECHESEND;
+
+ status->dbs->IconChangeTable[SC_SHIELDSPELL_DEF] = SI_SHIELDSPELL_DEF;
+ status->dbs->IconChangeTable[SC_SHIELDSPELL_MDEF] = SI_SHIELDSPELL_MDEF;
+ status->dbs->IconChangeTable[SC_SHIELDSPELL_REF] = SI_SHIELDSPELL_REF;
+ status->dbs->IconChangeTable[SC_BANDING_DEFENCE] = SI_BANDING_DEFENCE;
+
+ status->dbs->IconChangeTable[SC_CURSEDCIRCLE_ATKER] = SI_CURSEDCIRCLE_ATKER;
+
+ status->dbs->IconChangeTable[SC_STOMACHACHE] = SI_STOMACHACHE;
+ status->dbs->IconChangeTable[SC_MYSTERIOUS_POWDER] = SI_MYSTERIOUS_POWDER;
+ status->dbs->IconChangeTable[SC_MELON_BOMB] = SI_MELON_BOMB;
+ status->dbs->IconChangeTable[SC_BANANA_BOMB] = SI_BANANA_BOMB;
+ status->dbs->IconChangeTable[SC_BANANA_BOMB_SITDOWN_POSTDELAY] = SI_BANANA_BOMB_SITDOWN_POSTDELAY;
//Genetics New Food Items Status Icons
- status->IconChangeTable[SC_SAVAGE_STEAK] = SI_SAVAGE_STEAK;
- status->IconChangeTable[SC_COCKTAIL_WARG_BLOOD] = SI_COCKTAIL_WARG_BLOOD;
- status->IconChangeTable[SC_MINOR_BBQ] = SI_MINOR_BBQ;
- status->IconChangeTable[SC_SIROMA_ICE_TEA] = SI_SIROMA_ICE_TEA;
- status->IconChangeTable[SC_DROCERA_HERB_STEAMED] = SI_DROCERA_HERB_STEAMED;
- status->IconChangeTable[SC_PUTTI_TAILS_NOODLES] = SI_PUTTI_TAILS_NOODLES;
-
- status->IconChangeTable[SC_BOOST500] |= SI_BOOST500;
- status->IconChangeTable[SC_FULL_SWING_K] |= SI_FULL_SWING_K;
- status->IconChangeTable[SC_MANA_PLUS] |= SI_MANA_PLUS;
- status->IconChangeTable[SC_MUSTLE_M] |= SI_MUSTLE_M;
- status->IconChangeTable[SC_LIFE_FORCE_F] |= SI_LIFE_FORCE_F;
- status->IconChangeTable[SC_EXTRACT_WHITE_POTION_Z] |= SI_EXTRACT_WHITE_POTION_Z;
- status->IconChangeTable[SC_VITATA_500] |= SI_VITATA_500;
- status->IconChangeTable[SC_EXTRACT_SALAMINE_JUICE] |= SI_EXTRACT_SALAMINE_JUICE;
+ status->dbs->IconChangeTable[SC_SAVAGE_STEAK] = SI_SAVAGE_STEAK;
+ status->dbs->IconChangeTable[SC_COCKTAIL_WARG_BLOOD] = SI_COCKTAIL_WARG_BLOOD;
+ status->dbs->IconChangeTable[SC_MINOR_BBQ] = SI_MINOR_BBQ;
+ status->dbs->IconChangeTable[SC_SIROMA_ICE_TEA] = SI_SIROMA_ICE_TEA;
+ status->dbs->IconChangeTable[SC_DROCERA_HERB_STEAMED] = SI_DROCERA_HERB_STEAMED;
+ status->dbs->IconChangeTable[SC_PUTTI_TAILS_NOODLES] = SI_PUTTI_TAILS_NOODLES;
+
+ status->dbs->IconChangeTable[SC_BOOST500] |= SI_BOOST500;
+ status->dbs->IconChangeTable[SC_FULL_SWING_K] |= SI_FULL_SWING_K;
+ status->dbs->IconChangeTable[SC_MANA_PLUS] |= SI_MANA_PLUS;
+ status->dbs->IconChangeTable[SC_MUSTLE_M] |= SI_MUSTLE_M;
+ status->dbs->IconChangeTable[SC_LIFE_FORCE_F] |= SI_LIFE_FORCE_F;
+ status->dbs->IconChangeTable[SC_EXTRACT_WHITE_POTION_Z] |= SI_EXTRACT_WHITE_POTION_Z;
+ status->dbs->IconChangeTable[SC_VITATA_500] |= SI_VITATA_500;
+ status->dbs->IconChangeTable[SC_EXTRACT_SALAMINE_JUICE] |= SI_EXTRACT_SALAMINE_JUICE;
// Elemental Spirit's 'side' status change icons.
- status->IconChangeTable[SC_CIRCLE_OF_FIRE] = SI_CIRCLE_OF_FIRE;
- status->IconChangeTable[SC_FIRE_CLOAK] = SI_FIRE_CLOAK;
- status->IconChangeTable[SC_WATER_SCREEN] = SI_WATER_SCREEN;
- status->IconChangeTable[SC_WATER_DROP] = SI_WATER_DROP;
- status->IconChangeTable[SC_WIND_STEP] = SI_WIND_STEP;
- status->IconChangeTable[SC_WIND_CURTAIN] = SI_WIND_CURTAIN;
- status->IconChangeTable[SC_SOLID_SKIN] = SI_SOLID_SKIN;
- status->IconChangeTable[SC_STONE_SHIELD] = SI_STONE_SHIELD;
- status->IconChangeTable[SC_PYROTECHNIC] = SI_PYROTECHNIC;
- status->IconChangeTable[SC_HEATER] = SI_HEATER;
- status->IconChangeTable[SC_TROPIC] = SI_TROPIC;
- status->IconChangeTable[SC_AQUAPLAY] = SI_AQUAPLAY;
- status->IconChangeTable[SC_COOLER] = SI_COOLER;
- status->IconChangeTable[SC_CHILLY_AIR] = SI_CHILLY_AIR;
- status->IconChangeTable[SC_GUST] = SI_GUST;
- status->IconChangeTable[SC_BLAST] = SI_BLAST;
- status->IconChangeTable[SC_WILD_STORM] = SI_WILD_STORM;
- status->IconChangeTable[SC_PETROLOGY] = SI_PETROLOGY;
- status->IconChangeTable[SC_CURSED_SOIL] = SI_CURSED_SOIL;
- status->IconChangeTable[SC_UPHEAVAL] = SI_UPHEAVAL;
- status->IconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
- status->IconChangeTable[SC_REBOUND] = SI_REBOUND;
- status->IconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
- status->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
- status->IconChangeTable[SC_MOONSTAR] = SI_MOONSTAR;
- status->IconChangeTable[SC_SUPER_STAR] = SI_SUPER_STAR;
- status->IconChangeTable[SC_STRANGELIGHTS] = SI_STRANGELIGHTS;
- status->IconChangeTable[SC_DECORATION_OF_MUSIC] = SI_DECORATION_OF_MUSIC;
+ status->dbs->IconChangeTable[SC_CIRCLE_OF_FIRE] = SI_CIRCLE_OF_FIRE;
+ status->dbs->IconChangeTable[SC_FIRE_CLOAK] = SI_FIRE_CLOAK;
+ status->dbs->IconChangeTable[SC_WATER_SCREEN] = SI_WATER_SCREEN;
+ status->dbs->IconChangeTable[SC_WATER_DROP] = SI_WATER_DROP;
+ status->dbs->IconChangeTable[SC_WIND_STEP] = SI_WIND_STEP;
+ status->dbs->IconChangeTable[SC_WIND_CURTAIN] = SI_WIND_CURTAIN;
+ status->dbs->IconChangeTable[SC_SOLID_SKIN] = SI_SOLID_SKIN;
+ status->dbs->IconChangeTable[SC_STONE_SHIELD] = SI_STONE_SHIELD;
+ status->dbs->IconChangeTable[SC_PYROTECHNIC] = SI_PYROTECHNIC;
+ status->dbs->IconChangeTable[SC_HEATER] = SI_HEATER;
+ status->dbs->IconChangeTable[SC_TROPIC] = SI_TROPIC;
+ status->dbs->IconChangeTable[SC_AQUAPLAY] = SI_AQUAPLAY;
+ status->dbs->IconChangeTable[SC_COOLER] = SI_COOLER;
+ status->dbs->IconChangeTable[SC_CHILLY_AIR] = SI_CHILLY_AIR;
+ status->dbs->IconChangeTable[SC_GUST] = SI_GUST;
+ status->dbs->IconChangeTable[SC_BLAST] = SI_BLAST;
+ status->dbs->IconChangeTable[SC_WILD_STORM] = SI_WILD_STORM;
+ status->dbs->IconChangeTable[SC_PETROLOGY] = SI_PETROLOGY;
+ status->dbs->IconChangeTable[SC_CURSED_SOIL] = SI_CURSED_SOIL;
+ status->dbs->IconChangeTable[SC_UPHEAVAL] = SI_UPHEAVAL;
+ status->dbs->IconChangeTable[SC_PUSH_CART] = SI_ON_PUSH_CART;
+ status->dbs->IconChangeTable[SC_REBOUND] = SI_REBOUND;
+ status->dbs->IconChangeTable[SC_ALL_RIDING] = SI_ALL_RIDING;
+ status->dbs->IconChangeTable[SC_MONSTER_TRANSFORM] = SI_MONSTER_TRANSFORM;
+ status->dbs->IconChangeTable[SC_MOONSTAR] = SI_MOONSTAR;
+ status->dbs->IconChangeTable[SC_SUPER_STAR] = SI_SUPER_STAR;
+ status->dbs->IconChangeTable[SC_STRANGELIGHTS] = SI_STRANGELIGHTS;
+ status->dbs->IconChangeTable[SC_DECORATION_OF_MUSIC] = SI_DECORATION_OF_MUSIC;
//Other SC which are not necessarily associated to skills.
- status->ChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
- status->ChangeFlagTable[SC_ATTHASTE_POTION2] = SCB_ASPD;
- status->ChangeFlagTable[SC_ATTHASTE_POTION3] = SCB_ASPD;
- status->ChangeFlagTable[SC_ATTHASTE_INFINITY] = SCB_ASPD;
- status->ChangeFlagTable[SC_MOVHASTE_HORSE] = SCB_SPEED;
- status->ChangeFlagTable[SC_MOVHASTE_INFINITY] = SCB_SPEED;
- status->ChangeFlagTable[SC_PLUSATTACKPOWER] = SCB_BATK;
- status->ChangeFlagTable[SC_PLUSMAGICPOWER] = SCB_MATK;
- status->ChangeFlagTable[SC_INCALLSTATUS] |= SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK;
- status->ChangeFlagTable[SC_CHASEWALK2] |= SCB_STR;
- status->ChangeFlagTable[SC_INCAGI] |= SCB_AGI;
- status->ChangeFlagTable[SC_INCVIT] |= SCB_VIT;
- status->ChangeFlagTable[SC_INCINT] |= SCB_INT;
- status->ChangeFlagTable[SC_INCDEX] |= SCB_DEX;
- status->ChangeFlagTable[SC_INCLUK] |= SCB_LUK;
- status->ChangeFlagTable[SC_INCHIT] |= SCB_HIT;
- status->ChangeFlagTable[SC_INCHITRATE] |= SCB_HIT;
- status->ChangeFlagTable[SC_INCFLEE] |= SCB_FLEE;
- status->ChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE;
- status->ChangeFlagTable[SC_MTF_HITFLEE] |= SCB_HIT|SCB_FLEE;
- status->ChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI;
- status->ChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD;
- status->ChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2;
- status->ChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_INCMHP] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_MTF_MHP] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_INCMSP] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_MTF_MSP] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK;
- status->ChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK;
- status->ChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF;
- status->ChangeFlagTable[SC_FOOD_STR] |= SCB_STR;
- status->ChangeFlagTable[SC_FOOD_AGI] |= SCB_AGI;
- status->ChangeFlagTable[SC_FOOD_VIT] |= SCB_VIT;
- status->ChangeFlagTable[SC_FOOD_INT] |= SCB_INT;
- status->ChangeFlagTable[SC_FOOD_DEX] |= SCB_DEX;
- status->ChangeFlagTable[SC_FOOD_LUK] |= SCB_LUK;
- status->ChangeFlagTable[SC_FOOD_BASICHIT] |= SCB_HIT;
- status->ChangeFlagTable[SC_FOOD_BASICAVOIDANCE] |= SCB_FLEE;
- status->ChangeFlagTable[SC_BATKFOOD] |= SCB_BATK;
- status->ChangeFlagTable[SC_WATKFOOD] |= SCB_WATK;
- status->ChangeFlagTable[SC_MATKFOOD] |= SCB_MATK;
- status->ChangeFlagTable[SC_ARMORPROPERTY] |= SCB_ALL;
- status->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL;
- status->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL;
- status->ChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
- status->ChangeFlagTable[SC_ITEMSCRIPT] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION1] = SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION2] = SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_ATTHASTE_POTION3] = SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_ATTHASTE_INFINITY] = SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_MOVHASTE_HORSE] = SCB_SPEED;
+ status->dbs->ChangeFlagTable[SC_MOVHASTE_INFINITY] = SCB_SPEED;
+ status->dbs->ChangeFlagTable[SC_PLUSATTACKPOWER] = SCB_BATK;
+ status->dbs->ChangeFlagTable[SC_PLUSMAGICPOWER] = SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_INCALLSTATUS] |= SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_CHASEWALK2] |= SCB_STR;
+ status->dbs->ChangeFlagTable[SC_INCAGI] |= SCB_AGI;
+ status->dbs->ChangeFlagTable[SC_INCVIT] |= SCB_VIT;
+ status->dbs->ChangeFlagTable[SC_INCINT] |= SCB_INT;
+ status->dbs->ChangeFlagTable[SC_INCDEX] |= SCB_DEX;
+ status->dbs->ChangeFlagTable[SC_INCLUK] |= SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_INCHIT] |= SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_INCHITRATE] |= SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_INCFLEE] |= SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_INCFLEERATE] |= SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_MTF_HITFLEE] |= SCB_HIT|SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_CRITICALPERCENT] |= SCB_CRI;
+ status->dbs->ChangeFlagTable[SC_INCASPDRATE] |= SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_PLUSAVOIDVALUE] |= SCB_FLEE2;
+ status->dbs->ChangeFlagTable[SC_INCMHPRATE] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_INCMSPRATE] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_INCMHP] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_MTF_MHP] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_INCMSP] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_MTF_MSP] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_INCATKRATE] |= SCB_BATK|SCB_WATK;
+ status->dbs->ChangeFlagTable[SC_INCMATKRATE] |= SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_INCDEFRATE] |= SCB_DEF;
+ status->dbs->ChangeFlagTable[SC_FOOD_STR] |= SCB_STR;
+ status->dbs->ChangeFlagTable[SC_FOOD_AGI] |= SCB_AGI;
+ status->dbs->ChangeFlagTable[SC_FOOD_VIT] |= SCB_VIT;
+ status->dbs->ChangeFlagTable[SC_FOOD_INT] |= SCB_INT;
+ status->dbs->ChangeFlagTable[SC_FOOD_DEX] |= SCB_DEX;
+ status->dbs->ChangeFlagTable[SC_FOOD_LUK] |= SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_FOOD_BASICHIT] |= SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_FOOD_BASICAVOIDANCE] |= SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_BATKFOOD] |= SCB_BATK;
+ status->dbs->ChangeFlagTable[SC_WATKFOOD] |= SCB_WATK;
+ status->dbs->ChangeFlagTable[SC_MATKFOOD] |= SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_ARMORPROPERTY] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_ARMOR_RESIST] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_ATKER_BLOOD] |= SCB_ALL;
+ status->dbs->ChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
+ status->dbs->ChangeFlagTable[SC_ITEMSCRIPT] |= SCB_ALL;
// Cash Items
- status->ChangeFlagTable[SC_FOOD_STR_CASH] = SCB_STR;
- status->ChangeFlagTable[SC_FOOD_AGI_CASH] = SCB_AGI;
- status->ChangeFlagTable[SC_FOOD_VIT_CASH] = SCB_VIT;
- status->ChangeFlagTable[SC_FOOD_DEX_CASH] = SCB_DEX;
- status->ChangeFlagTable[SC_FOOD_INT_CASH] = SCB_INT;
- status->ChangeFlagTable[SC_FOOD_LUK_CASH] = SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_FOOD_STR_CASH] = SCB_STR;
+ status->dbs->ChangeFlagTable[SC_FOOD_AGI_CASH] = SCB_AGI;
+ status->dbs->ChangeFlagTable[SC_FOOD_VIT_CASH] = SCB_VIT;
+ status->dbs->ChangeFlagTable[SC_FOOD_DEX_CASH] = SCB_DEX;
+ status->dbs->ChangeFlagTable[SC_FOOD_INT_CASH] = SCB_INT;
+ status->dbs->ChangeFlagTable[SC_FOOD_LUK_CASH] = SCB_LUK;
// Mercenary Bonus Effects
- status->ChangeFlagTable[SC_MER_FLEE] |= SCB_FLEE;
- status->ChangeFlagTable[SC_MER_ATK] |= SCB_WATK;
- status->ChangeFlagTable[SC_MER_HP] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_MER_SP] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_MER_HIT] |= SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_MER_FLEE] |= SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_MER_ATK] |= SCB_WATK;
+ status->dbs->ChangeFlagTable[SC_MER_HP] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_MER_SP] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_MER_HIT] |= SCB_HIT;
// Guillotine Cross Poison Effects
- status->ChangeFlagTable[SC_PARALYSE] |= SCB_FLEE|SCB_SPEED|SCB_ASPD;
- status->ChangeFlagTable[SC_VENOMBLEED] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_MAGICMUSHROOM] |= SCB_REGEN;
- status->ChangeFlagTable[SC_DEATHHURT] |= SCB_REGEN;
- status->ChangeFlagTable[SC_PYREXIA] |= SCB_HIT|SCB_FLEE;
- status->ChangeFlagTable[SC_OBLIVIONCURSE] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_PARALYSE] |= SCB_FLEE|SCB_SPEED|SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_VENOMBLEED] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_MAGICMUSHROOM] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_DEATHHURT] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_PYREXIA] |= SCB_HIT|SCB_FLEE;
+ status->dbs->ChangeFlagTable[SC_OBLIVIONCURSE] |= SCB_REGEN;
// RG status
- status->ChangeFlagTable[SC_SHIELDSPELL_DEF] |= SCB_WATK;
- status->ChangeFlagTable[SC_SHIELDSPELL_REF] |= SCB_DEF;
+ status->dbs->ChangeFlagTable[SC_SHIELDSPELL_DEF] |= SCB_WATK;
+ status->dbs->ChangeFlagTable[SC_SHIELDSPELL_REF] |= SCB_DEF;
// Meca status
- status->ChangeFlagTable[SC_STEALTHFIELD_MASTER] |= SCB_SPEED;
-
- status->ChangeFlagTable[SC_SAVAGE_STEAK] |= SCB_STR;
- status->ChangeFlagTable[SC_COCKTAIL_WARG_BLOOD] |= SCB_INT;
- status->ChangeFlagTable[SC_MINOR_BBQ] |= SCB_VIT;
- status->ChangeFlagTable[SC_SIROMA_ICE_TEA] |= SCB_DEX;
- status->ChangeFlagTable[SC_DROCERA_HERB_STEAMED] |= SCB_AGI;
- status->ChangeFlagTable[SC_PUTTI_TAILS_NOODLES] |= SCB_LUK;
- status->ChangeFlagTable[SC_BOOST500] |= SCB_ASPD;
- status->ChangeFlagTable[SC_FULL_SWING_K] |= SCB_BATK;
- status->ChangeFlagTable[SC_MANA_PLUS] |= SCB_MATK;
- status->ChangeFlagTable[SC_MUSTLE_M] |= SCB_MAXHP;
- status->ChangeFlagTable[SC_LIFE_FORCE_F] |= SCB_MAXSP;
- status->ChangeFlagTable[SC_EXTRACT_WHITE_POTION_Z] |= SCB_REGEN;
- status->ChangeFlagTable[SC_VITATA_500] |= SCB_REGEN;
- status->ChangeFlagTable[SC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD;
- status->ChangeFlagTable[SC_REBOUND] |= SCB_SPEED|SCB_REGEN;
- status->ChangeFlagTable[SC_DEFSET] |= SCB_DEF|SCB_DEF2;
- status->ChangeFlagTable[SC_MDEFSET] |= SCB_MDEF|SCB_MDEF2;
- status->ChangeFlagTable[SC_MYSTERIOUS_POWDER] |= SCB_MAXHP;
-
- status->ChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED;
- status->ChangeFlagTable[SC_WEDDING] = SCB_SPEED;
-
- status->ChangeFlagTable[SC_MTF_ASPD] = SCB_ASPD|SCB_HIT;
- status->ChangeFlagTable[SC_MTF_MATK] = SCB_MATK;
- status->ChangeFlagTable[SC_MTF_MLEATKED] |= SCB_ALL;
-
- status->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
- status->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE;
- status->ChangeFlagTable[SC_STRANGELIGHTS] |= SCB_NONE;
- status->ChangeFlagTable[SC_DECORATION_OF_MUSIC] |= SCB_NONE;
-
- /* status->DisplayType Table [Ind/Hercules] */
- status->DisplayType[SC_ALL_RIDING] = true;
- status->DisplayType[SC_PUSH_CART] = true;
- status->DisplayType[SC_SUMMON1] = true;
- status->DisplayType[SC_SUMMON2] = true;
- status->DisplayType[SC_SUMMON3] = true;
- status->DisplayType[SC_SUMMON4] = true;
- status->DisplayType[SC_SUMMON5] = true;
- status->DisplayType[SC_CAMOUFLAGE] = true;
- status->DisplayType[SC_DUPLELIGHT] = true;
- status->DisplayType[SC_ORATIO] = true;
- status->DisplayType[SC_FROSTMISTY] = true;
- status->DisplayType[SC_VENOMIMPRESS] = true;
- status->DisplayType[SC_HALLUCINATIONWALK] = true;
- status->DisplayType[SC_ROLLINGCUTTER] = true;
- status->DisplayType[SC_BANDING] = true;
- status->DisplayType[SC_COLD] = true;
- status->DisplayType[SC_DEEP_SLEEP] = true;
- status->DisplayType[SC_CURSEDCIRCLE_ATKER] = true;
- status->DisplayType[SC_CURSEDCIRCLE_TARGET] = true;
- status->DisplayType[SC_BLOOD_SUCKER] = true;
- status->DisplayType[SC__SHADOWFORM] = true;
- status->DisplayType[SC_MONSTER_TRANSFORM] = true;
- status->DisplayType[SC_MOONSTAR] = true;
- status->DisplayType[SC_SUPER_STAR] = true;
- status->DisplayType[SC_STRANGELIGHTS] = true;
- status->DisplayType[SC_DECORATION_OF_MUSIC] = true;
+ status->dbs->ChangeFlagTable[SC_STEALTHFIELD_MASTER] |= SCB_SPEED;
+
+ status->dbs->ChangeFlagTable[SC_SAVAGE_STEAK] |= SCB_STR;
+ status->dbs->ChangeFlagTable[SC_COCKTAIL_WARG_BLOOD] |= SCB_INT;
+ status->dbs->ChangeFlagTable[SC_MINOR_BBQ] |= SCB_VIT;
+ status->dbs->ChangeFlagTable[SC_SIROMA_ICE_TEA] |= SCB_DEX;
+ status->dbs->ChangeFlagTable[SC_DROCERA_HERB_STEAMED] |= SCB_AGI;
+ status->dbs->ChangeFlagTable[SC_PUTTI_TAILS_NOODLES] |= SCB_LUK;
+ status->dbs->ChangeFlagTable[SC_BOOST500] |= SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_FULL_SWING_K] |= SCB_BATK;
+ status->dbs->ChangeFlagTable[SC_MANA_PLUS] |= SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_MUSTLE_M] |= SCB_MAXHP;
+ status->dbs->ChangeFlagTable[SC_LIFE_FORCE_F] |= SCB_MAXSP;
+ status->dbs->ChangeFlagTable[SC_EXTRACT_WHITE_POTION_Z] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_VITATA_500] |= SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD;
+ status->dbs->ChangeFlagTable[SC_REBOUND] |= SCB_SPEED|SCB_REGEN;
+ status->dbs->ChangeFlagTable[SC_DEFSET] |= SCB_DEF|SCB_DEF2;
+ status->dbs->ChangeFlagTable[SC_MDEFSET] |= SCB_MDEF|SCB_MDEF2;
+ status->dbs->ChangeFlagTable[SC_MYSTERIOUS_POWDER] |= SCB_MAXHP;
+
+ status->dbs->ChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED;
+ status->dbs->ChangeFlagTable[SC_WEDDING] = SCB_SPEED;
+
+ status->dbs->ChangeFlagTable[SC_MTF_ASPD] = SCB_ASPD|SCB_HIT;
+ status->dbs->ChangeFlagTable[SC_MTF_MATK] = SCB_MATK;
+ status->dbs->ChangeFlagTable[SC_MTF_MLEATKED] |= SCB_ALL;
+
+ status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE;
+ status->dbs->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE;
+ status->dbs->ChangeFlagTable[SC_STRANGELIGHTS] |= SCB_NONE;
+ status->dbs->ChangeFlagTable[SC_DECORATION_OF_MUSIC] |= SCB_NONE;
+
+ /* status->dbs->DisplayType Table [Ind/Hercules] */
+ status->dbs->DisplayType[SC_ALL_RIDING] = true;
+ status->dbs->DisplayType[SC_PUSH_CART] = true;
+ status->dbs->DisplayType[SC_SUMMON1] = true;
+ status->dbs->DisplayType[SC_SUMMON2] = true;
+ status->dbs->DisplayType[SC_SUMMON3] = true;
+ status->dbs->DisplayType[SC_SUMMON4] = true;
+ status->dbs->DisplayType[SC_SUMMON5] = true;
+ status->dbs->DisplayType[SC_CAMOUFLAGE] = true;
+ status->dbs->DisplayType[SC_DUPLELIGHT] = true;
+ status->dbs->DisplayType[SC_ORATIO] = true;
+ status->dbs->DisplayType[SC_FROSTMISTY] = true;
+ status->dbs->DisplayType[SC_VENOMIMPRESS] = true;
+ status->dbs->DisplayType[SC_HALLUCINATIONWALK] = true;
+ status->dbs->DisplayType[SC_ROLLINGCUTTER] = true;
+ status->dbs->DisplayType[SC_BANDING] = true;
+ status->dbs->DisplayType[SC_COLD] = true;
+ status->dbs->DisplayType[SC_DEEP_SLEEP] = true;
+ status->dbs->DisplayType[SC_CURSEDCIRCLE_ATKER] = true;
+ status->dbs->DisplayType[SC_CURSEDCIRCLE_TARGET] = true;
+ status->dbs->DisplayType[SC_BLOOD_SUCKER] = true;
+ status->dbs->DisplayType[SC__SHADOWFORM] = true;
+ status->dbs->DisplayType[SC_MONSTER_TRANSFORM] = true;
+ status->dbs->DisplayType[SC_MOONSTAR] = true;
+ status->dbs->DisplayType[SC_SUPER_STAR] = true;
+ status->dbs->DisplayType[SC_STRANGELIGHTS] = true;
+ status->dbs->DisplayType[SC_DECORATION_OF_MUSIC] = true;
if( !battle_config.display_hallucination ) //Disable Hallucination.
- status->IconChangeTable[SC_ILLUSION] = SI_BLANK;
+ status->dbs->IconChangeTable[SC_ILLUSION] = SI_BLANK;
#undef add_sc
#undef set_sc_with_vfx
}
@@ -2089,7 +2090,7 @@ int status_calc_pet_(struct pet_data *pd, enum e_status_calc_opt opt)
unsigned int status_get_base_maxsp(struct map_session_data* sd, struct status_data *st) {
uint64 val = pc->class2idx(sd->status.class_);
- val = status->SP_table[val][sd->status.base_level];
+ val = status->dbs->SP_table[val][sd->status.base_level];
if ( sd->class_&JOBL_UPPER )
val += val * 25 / 100;
@@ -2106,7 +2107,7 @@ unsigned int status_get_base_maxsp(struct map_session_data* sd, struct status_da
unsigned int status_get_base_maxhp(struct map_session_data *sd, struct status_data *st) {
uint64 val = pc->class2idx(sd->status.class_);
- val = status->HP_table[val][sd->status.base_level];
+ val = status->dbs->HP_table[val][sd->status.base_level];
if ( (sd->class_&MAPID_UPPERMASK) == MAPID_SUPER_NOVICE && sd->status.base_level >= 99 )
val += 2000; //Supernovice lvl99 hp bonus.
@@ -2148,7 +2149,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
pc->calc_skilltree(sd); // SkillTree calculation
- sd->max_weight = status->max_weight_base[pc->class2idx(sd->status.class_)]+sd->status.str*300;
+ sd->max_weight = status->dbs->max_weight_base[pc->class2idx(sd->status.class_)]+sd->status.str*300;
if(opt&SCO_FIRST) {
//Load Hp/SP from char-received data.
@@ -2285,18 +2286,18 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
}
wa->atk += sd->inventory_data[index]->atk;
if ( (r = sd->status.inventory[index].refine) )
- wa->atk2 = status->refine_info[wlv].bonus[r-1] / 100;
+ wa->atk2 = status->dbs->refine_info[wlv].bonus[r-1] / 100;
#ifdef RENEWAL
wa->matk += sd->inventory_data[index]->matk;
wa->wlv = wlv;
if( r && sd->weapontype1 != W_BOW ) // renewal magic attack refine bonus
- wa->matk += status->refine_info[wlv].bonus[r-1] / 100;
+ wa->matk += status->dbs->refine_info[wlv].bonus[r-1] / 100;
#endif
//Overrefined bonus.
if (r)
- wd->overrefine = status->refine_info[wlv].randombonus_max[r-1] / 100;
+ wd->overrefine = status->dbs->refine_info[wlv].randombonus_max[r-1] / 100;
wa->range += sd->inventory_data[index]->range;
if(sd->inventory_data[index]->script) {
@@ -2324,7 +2325,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
else if(sd->inventory_data[index]->type == IT_ARMOR) {
int r;
if ( (r = sd->status.inventory[index].refine) )
- refinedef += status->refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
+ refinedef += status->dbs->refine_info[REFINE_TYPE_ARMOR].bonus[r-1];
if(sd->inventory_data[index]->script) {
if( i == EQI_HAND_L ) //Shield
sd->state.lr_flag = 3;
@@ -2467,12 +2468,12 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
sd->bonus.splash_range += sd->bonus.splash_add_range;
// Damage modifiers from weapon type
- sd->right_weapon.atkmods[0] = status->atkmods[0][sd->weapontype1];
- sd->right_weapon.atkmods[1] = status->atkmods[1][sd->weapontype1];
- sd->right_weapon.atkmods[2] = status->atkmods[2][sd->weapontype1];
- sd->left_weapon.atkmods[0] = status->atkmods[0][sd->weapontype2];
- sd->left_weapon.atkmods[1] = status->atkmods[1][sd->weapontype2];
- sd->left_weapon.atkmods[2] = status->atkmods[2][sd->weapontype2];
+ sd->right_weapon.atkmods[0] = status->dbs->atkmods[0][sd->weapontype1];
+ sd->right_weapon.atkmods[1] = status->dbs->atkmods[1][sd->weapontype1];
+ sd->right_weapon.atkmods[2] = status->dbs->atkmods[2][sd->weapontype1];
+ sd->left_weapon.atkmods[0] = status->dbs->atkmods[0][sd->weapontype2];
+ sd->left_weapon.atkmods[1] = status->dbs->atkmods[1][sd->weapontype2];
+ sd->left_weapon.atkmods[2] = status->dbs->atkmods[2][sd->weapontype2];
if ((pc_isridingpeco(sd) || pc_isridingdragon(sd))
&& (sd->status.weapon==W_1HSPEAR || sd->status.weapon==W_2HSPEAR)
@@ -2488,9 +2489,9 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) {
// Job bonuses
index = pc->class2idx(sd->status.class_);
for(i=0;i<(int)sd->status.job_level && i<MAX_LEVEL;i++){
- if(!status->job_bonus[index][i])
+ if(!status->dbs->job_bonus[index][i])
continue;
- switch(status->job_bonus[index][i]) {
+ switch(status->dbs->job_bonus[index][i]) {
case 1: bstatus->str++; break;
case 2: bstatus->agi++; break;
case 3: bstatus->vit++; break;
@@ -3925,11 +3926,11 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
#ifdef RENEWAL_ASPD /* [malufett/Hercules] */
float temp;
int skill_lv, val = 0;
- amotion = status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1];
+ amotion = status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1];
if ( sd->status.weapon > MAX_WEAPON_TYPE )
- amotion += status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] / 4;
+ amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2] / 4;
if ( sd->status.shield )
- amotion += status->aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE];
+ amotion += status->dbs->aspd_base[pc->class2idx(sd->status.class_)][MAX_WEAPON_TYPE];
switch ( sd->status.weapon ) {
case W_BOW: case W_MUSICAL:
case W_WHIP: case W_REVOLVER:
@@ -3949,8 +3950,8 @@ int status_base_amotion_pc(struct map_session_data *sd, struct status_data *st)
#else
// base weapon delay
amotion = (sd->status.weapon < MAX_WEAPON_TYPE)
- ? (status->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
- : (status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + status->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 7 / 10; // dual-wield
+ ? (status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->status.weapon]) // single weapon
+ : (status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype1] + status->dbs->aspd_base[pc->class2idx(sd->status.class_)][sd->weapontype2]) * 7 / 10; // dual-wield
// percentual delay reduction from stats
amotion -= amotion * (4 * st->agi + st->dex) / 1000;
@@ -7525,7 +7526,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
}
vd = status->get_viewdata(bl);
- calc_flag = status->ChangeFlagTable[type];
+ calc_flag = status->dbs->ChangeFlagTable[type];
if(!(flag&SCFLAG_LOADED)) { // Do not parse val settings when loading SCs
switch(type) {
case SC_ADORAMUS:
@@ -9056,7 +9057,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
val2 = 20+(20*val1);
break;
default:
- if (calc_flag == SCB_NONE && status->SkillChangeTable[type] == 0 && status->IconChangeTable[type] == 0) {
+ if (calc_flag == SCB_NONE && status->dbs->SkillChangeTable[type] == 0 && status->dbs->IconChangeTable[type] == 0) {
//Status change with no calc, no icon, and no skill associated...?
ShowError("UnknownStatusChange [%d]\n", type);
return 0;
@@ -9210,7 +9211,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
}
/* [Ind/Hercules] */
- if( sd && status->DisplayType[type] ) {
+ if( sd && status->dbs->DisplayType[type] ) {
int dval1 = 0, dval2 = 0, dval3 = 0;
switch( type ) {
case SC_ALL_RIDING:
@@ -9503,8 +9504,8 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
calc_flag&=~SCB_DYE;
}
- if(!(flag&SCFLAG_NOICON) && !(flag&SCFLAG_LOADED && status->DisplayType[type]))
- clif->status_change(bl,status->IconChangeTable[type],1,tick,(val_flag&1)?val1:1,(val_flag&2)?val2:0,(val_flag&4)?val3:0);
+ if(!(flag&SCFLAG_NOICON) && !(flag&SCFLAG_LOADED && status->dbs->DisplayType[type]))
+ clif->status_change(bl,status->dbs->IconChangeTable[type],1,tick,(val_flag&1)?val1:1,(val_flag&2)?val2:0,(val_flag&4)?val3:0);
/**
* used as temporary storage for scs with interval ticks, so that the actual duration is sent to the client first.
@@ -9751,7 +9752,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
sc->data[type] = NULL;
- if( sd && status->DisplayType[type] ) {
+ if( sd && status->dbs->DisplayType[type] ) {
status->display_remove(sd,type);
}
@@ -9761,7 +9762,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
#endif
vd = status->get_viewdata(bl);
- calc_flag = status->ChangeFlagTable[type];
+ calc_flag = status->dbs->ChangeFlagTable[type];
switch(type) {
case SC_GRANITIC_ARMOR:
{
@@ -10405,7 +10406,7 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
//On Aegis, when turning off a status change, first goes the sc packet, then the option packet.
- clif->sc_end(bl,bl->id,AREA,status->IconChangeTable[type]);
+ clif->sc_end(bl,bl->id,AREA,status->dbs->IconChangeTable[type]);
if( opt_flag&8 ) //bugreport:681
clif->changeoption2(bl);
@@ -10584,7 +10585,7 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) {
sc->opt1 = OPT1_STONE;
clif->changeoption(bl);
sc_timer_next(1000+tick, status->change_timer, bl->id, data );
- status_calc_bl(bl, status->ChangeFlagTable[type]);
+ status_calc_bl(bl, status->dbs->ChangeFlagTable[type]);
return 0;
}
if(--(sce->val3) > 0) {
@@ -11449,7 +11450,7 @@ int status_get_weapon_atk(struct block_list *bl, struct weapon_atk *watk, int fl
short index = sd->equip_index[EQI_HAND_R], refine;
if ( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON
&& (refine = sd->status.inventory[index].refine) < 16 && refine ) {
- int r = status->refine_info[watk->wlv].randombonus_max[refine + (4 - watk->wlv)] / 100;
+ int r = status->dbs->refine_info[watk->wlv].randombonus_max[refine + (4 - watk->wlv)] / 100;
if ( r )
max += (rnd() % 100) % r + 1;
}
@@ -11548,7 +11549,7 @@ void status_get_matk_sub(struct block_list *bl, int flag, unsigned short *matk_m
short index = sd->equip_index[EQI_HAND_R], refine;
if ( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON
&& (refine = sd->status.inventory[index].refine) < 16 && refine ) {
- int r = status->refine_info[sd->inventory_data[index]->wlv].randombonus_max[refine + (4 - sd->inventory_data[index]->wlv)] / 100;
+ int r = status->dbs->refine_info[sd->inventory_data[index]->wlv].randombonus_max[refine + (4 - sd->inventory_data[index]->wlv)] / 100;
if ( r )
*matk_max += (rnd() % 100) % r + 1;
}
@@ -11991,7 +11992,7 @@ int status_get_refine_chance(enum refine_type wlv, int refine) {
if ( refine < 0 || refine >= MAX_REFINE)
return 0;
- return status->refine_info[wlv].chance[refine];
+ return status->dbs->refine_info[wlv].chance[refine];
}
int status_get_sc_type(sc_type type) {
@@ -11999,7 +12000,7 @@ int status_get_sc_type(sc_type type) {
if( type <= SC_NONE || type >= SC_MAX )
return 0;
- return status->sc_conf[type];
+ return status->dbs->sc_conf[type];
}
void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
@@ -12050,25 +12051,25 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
continue;
}
iidx = pc->class2idx(iclass);
- status->max_weight_base[idx] = status->max_weight_base[iidx];
- memcpy(&status->aspd_base[idx], &status->aspd_base[iidx], sizeof(status->aspd_base[iidx]));
+ status->dbs->max_weight_base[idx] = status->dbs->max_weight_base[iidx];
+ memcpy(&status->dbs->aspd_base[idx], &status->dbs->aspd_base[iidx], sizeof(status->dbs->aspd_base[iidx]));
- for (i = 1; i <= MAX_LEVEL && status->HP_table[iidx][i]; i++) {
- status->HP_table[idx][i] = status->HP_table[iidx][i];
+ for (i = 1; i <= MAX_LEVEL && status->dbs->HP_table[iidx][i]; i++) {
+ status->dbs->HP_table[idx][i] = status->dbs->HP_table[iidx][i];
}
- base = (i > 1 ? status->HP_table[idx][1] : 35); // Safe value if none are specified
- avg_increment = (i > 2 ? (status->HP_table[idx][i] - base) / (i-1) : 5); // Safe value if none are specified
+ base = (i > 1 ? status->dbs->HP_table[idx][1] : 35); // Safe value if none are specified
+ avg_increment = (i > 2 ? (status->dbs->HP_table[idx][i] - base) / (i-1) : 5); // Safe value if none are specified
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->HP_table[idx][i] = min(base + avg_increment * i, battle_config.max_hp);
+ status->dbs->HP_table[idx][i] = min(base + avg_increment * i, battle_config.max_hp);
}
- for (i = 1; i <= MAX_LEVEL && status->SP_table[iidx][i]; i++) {
- status->SP_table[idx][i] = status->SP_table[iidx][i];
+ for (i = 1; i <= MAX_LEVEL && status->dbs->SP_table[iidx][i]; i++) {
+ status->dbs->SP_table[idx][i] = status->dbs->SP_table[iidx][i];
}
- base = (i > 1 ? status->SP_table[idx][1] : 10); // Safe value if none are specified
- avg_increment = (i > 2 ? (status->SP_table[idx][i] - base) / (i-1) : 1); // Safe value if none are specified
+ base = (i > 1 ? status->dbs->SP_table[idx][1] : 10); // Safe value if none are specified
+ avg_increment = (i > 2 ? (status->dbs->SP_table[idx][i] - base) / (i-1) : 1); // Safe value if none are specified
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->SP_table[idx][i] = min(base + avg_increment * i, battle_config.max_sp);
+ status->dbs->SP_table[idx][i] = min(base + avg_increment * i, battle_config.max_sp);
}
}
}
@@ -12082,13 +12083,13 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
continue;
}
iidx = pc->class2idx(iclass);
- for (i = 1; i <= MAX_LEVEL && status->HP_table[iidx][i]; i++) {
- status->HP_table[idx][i] = status->HP_table[iidx][i];
+ for (i = 1; i <= MAX_LEVEL && status->dbs->HP_table[iidx][i]; i++) {
+ status->dbs->HP_table[idx][i] = status->dbs->HP_table[iidx][i];
}
- base = (i > 1 ? status->HP_table[idx][1] : 35); // Safe value if none are specified
- avg_increment = (i > 2 ? (status->HP_table[idx][i] - base) / (i-1) : 5); // Safe value if none are specified
+ base = (i > 1 ? status->dbs->HP_table[idx][1] : 35); // Safe value if none are specified
+ avg_increment = (i > 2 ? (status->dbs->HP_table[idx][i] - base) / (i-1) : 5); // Safe value if none are specified
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->HP_table[idx][i] = min(base + avg_increment * i, battle_config.max_hp);
+ status->dbs->HP_table[idx][i] = min(base + avg_increment * i, battle_config.max_hp);
}
}
}
@@ -12102,21 +12103,21 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
continue;
}
iidx = pc->class2idx(iclass);
- for (i = 1; i <= MAX_LEVEL && status->SP_table[iidx][i]; i++) {
- status->SP_table[idx][i] = status->SP_table[iidx][i];
+ for (i = 1; i <= MAX_LEVEL && status->dbs->SP_table[iidx][i]; i++) {
+ status->dbs->SP_table[idx][i] = status->dbs->SP_table[iidx][i];
}
- base = (i > 1 ? status->SP_table[idx][1] : 10); // Safe value if none are specified
- avg_increment = (i > 2 ? (status->SP_table[idx][i] - base) / (i-1) : 1); // Safe value if none are specified
+ base = (i > 1 ? status->dbs->SP_table[idx][1] : 10); // Safe value if none are specified
+ avg_increment = (i > 2 ? (status->dbs->SP_table[idx][i] - base) / (i-1) : 1); // Safe value if none are specified
for ( ; i <= pc->max_level[idx][0]; i++) {
- status->SP_table[idx][i] = min(avg_increment * i, battle_config.max_sp);
+ status->dbs->SP_table[idx][i] = min(avg_increment * i, battle_config.max_sp);
}
}
}
if (libconfig->setting_lookup_int(jdb, "Weight", &i32))
- status->max_weight_base[idx] = i32;
- else if (!status->max_weight_base[idx])
- status->max_weight_base[idx] = 20000;
+ status->dbs->max_weight_base[idx] = i32;
+ else if (!status->dbs->max_weight_base[idx])
+ status->dbs->max_weight_base[idx] = 20000;
if ((temp = libconfig->setting_get_member(jdb, "BaseASPD"))) {
int widx = 0;
@@ -12127,7 +12128,7 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
ARR_FIND(0, wlen, w, strcmp(wnames[w].name, wname) == 0);
if (w != wlen) {
- status->aspd_base[idx][wnames[w].id] = libconfig->setting_get_int(wpn);
+ status->dbs->aspd_base[idx][wnames[w].id] = libconfig->setting_get_int(wpn);
} else {
ShowWarning("status_read_job_db: unknown weapon type '%s'!\n", wname);
}
@@ -12139,12 +12140,12 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
config_setting_t *hp = NULL;
while (level <= MAX_LEVEL && (hp = libconfig->setting_get_elem(temp, level))) {
i32 = libconfig->setting_get_int(hp);
- status->HP_table[idx][++level] = min(i32, battle_config.max_hp);
+ status->dbs->HP_table[idx][++level] = min(i32, battle_config.max_hp);
}
- base = (level > 0 ? status->HP_table[idx][1] : 35); // Safe value if none are specified
- avg_increment = (level > 1 ? (status->HP_table[idx][level] - base) / level : 5); // Safe value if none are specified
+ base = (level > 0 ? status->dbs->HP_table[idx][1] : 35); // Safe value if none are specified
+ avg_increment = (level > 1 ? (status->dbs->HP_table[idx][level] - base) / level : 5); // Safe value if none are specified
for (++level; level <= pc->max_level[idx][0]; ++level) { /* limit only to possible maximum level of the given class */
- status->HP_table[idx][level] = min(base + avg_increment * level, battle_config.max_hp); /* some are still empty? then let's use the average increase */
+ status->dbs->HP_table[idx][level] = min(base + avg_increment * level, battle_config.max_hp); /* some are still empty? then let's use the average increase */
}
}
@@ -12153,12 +12154,12 @@ void status_read_job_db_sub(int idx, const char *name, config_setting_t *jdb)
config_setting_t *sp = NULL;
while (level <= MAX_LEVEL && (sp = libconfig->setting_get_elem(temp, level))) {
i32 = libconfig->setting_get_int(sp);
- status->SP_table[idx][++level] = min(i32, battle_config.max_sp);
+ status->dbs->SP_table[idx][++level] = min(i32, battle_config.max_sp);
}
- base = (level > 0 ? status->SP_table[idx][1] : 10); // Safe value if none are specified
- avg_increment = (level > 1 ? (status->SP_table[idx][level] - base) / level : 1);
+ base = (level > 0 ? status->dbs->SP_table[idx][1] : 10); // Safe value if none are specified
+ avg_increment = (level > 1 ? (status->dbs->SP_table[idx][level] - base) / level : 1);
for ( ; level <= pc->max_level[idx][0]; level++ ) {
- status->SP_table[idx][level] = min(base + avg_increment * level, battle_config.max_sp);
+ status->dbs->SP_table[idx][level] = min(base + avg_increment * level, battle_config.max_sp);
}
}
}
@@ -12216,7 +12217,7 @@ bool status_readdb_job2(char* fields[], int columns, int current)
for(i = 1; i < columns; i++)
{
- status->job_bonus[idx][i-1] = atoi(fields[i]);
+ status->dbs->job_bonus[idx][i-1] = atoi(fields[i]);
}
return true;
}
@@ -12227,7 +12228,7 @@ bool status_readdb_sizefix(char* fields[], int columns, int current)
for(i = 0; i < MAX_WEAPON_TYPE; i++)
{
- status->atkmods[current][i] = atoi(fields[i]);
+ status->dbs->atkmods[current][i] = atoi(fields[i]);
}
return true;
}
@@ -12254,14 +12255,14 @@ bool status_readdb_refine(char* fields[], int columns, int current)
*delim = '\0';
- status->refine_info[current].chance[i] = atoi(fields[4+i]);
+ status->dbs->refine_info[current].chance[i] = atoi(fields[4+i]);
if (i >= random_bonus_start_level - 1)
- status->refine_info[current].randombonus_max[i] = random_bonus * (i - random_bonus_start_level + 2);
+ status->dbs->refine_info[current].randombonus_max[i] = random_bonus * (i - random_bonus_start_level + 2);
- status->refine_info[current].bonus[i] = bonus_per_level + atoi(delim+1);
+ status->dbs->refine_info[current].bonus[i] = bonus_per_level + atoi(delim+1);
if (i > 0)
- status->refine_info[current].bonus[i] += status->refine_info[current].bonus[i-1];
+ status->dbs->refine_info[current].bonus[i] += status->dbs->refine_info[current].bonus[i-1];
}
return true;
}
@@ -12275,7 +12276,7 @@ bool status_readdb_scconfig(char* fields[], int columns, int current) {
return false;
}
- status->sc_conf[val] = (int)strtol(fields[1], NULL, 0);
+ status->dbs->sc_conf[val] = (int)strtol(fields[1], NULL, 0);
return true;
}
@@ -12294,39 +12295,39 @@ int status_readdb(void)
//
if( runflag == MAPSERVER_ST_RUNNING ) {//not necessary during boot
// reset job_db.conf data
- memset(status->max_weight_base, 0, sizeof(status->max_weight_base));
- memset(status->HP_table, 0, sizeof(status->HP_table));
- memset(status->SP_table, 0, sizeof(status->SP_table));
+ memset(status->dbs->max_weight_base, 0, sizeof(status->dbs->max_weight_base));
+ memset(status->dbs->HP_table, 0, sizeof(status->dbs->HP_table));
+ memset(status->dbs->SP_table, 0, sizeof(status->dbs->SP_table));
// reset job_db2.txt data
- memset(status->job_bonus,0,sizeof(status->job_bonus)); // Job-specific stats bonus
+ memset(status->dbs->job_bonus,0,sizeof(status->dbs->job_bonus)); // Job-specific stats bonus
}
for ( i = 0; i < CLASS_COUNT; i++ ) {
for ( j = 0; j < MAX_WEAPON_TYPE; j++ )
- status->aspd_base[i][j] = 2000;
+ status->dbs->aspd_base[i][j] = 2000;
#ifdef RENEWAL_ASPD
- status->aspd_base[i][MAX_WEAPON_TYPE] = 0;
+ status->dbs->aspd_base[i][MAX_WEAPON_TYPE] = 0;
#endif
}
// size_fix.txt
- for(i = 0; i < ARRAYLENGTH(status->atkmods); i++)
+ for(i = 0; i < ARRAYLENGTH(status->dbs->atkmods); i++)
for(j = 0; j < MAX_WEAPON_TYPE; j++)
- status->atkmods[i][j] = 100;
+ status->dbs->atkmods[i][j] = 100;
// refine_db.txt
- for(i=0;i<ARRAYLENGTH(status->refine_info);i++) {
+ for(i=0;i<ARRAYLENGTH(status->dbs->refine_info);i++) {
for(j=0;j<MAX_REFINE; j++) {
- status->refine_info[i].chance[j] = 100;
- status->refine_info[i].bonus[j] = 0;
- status->refine_info[i].randombonus_max[j] = 0;
+ status->dbs->refine_info[i].chance[j] = 100;
+ status->dbs->refine_info[i].bonus[j] = 0;
+ status->dbs->refine_info[i].randombonus_max[j] = 0;
}
}
// read databases
//
sv->readdb(map->db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, status->readdb_job2);
- sv->readdb(map->db_path, DBPATH"size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(status->atkmods), status->readdb_sizefix);
- sv->readdb(map->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(status->refine_info), status->readdb_refine);
+ sv->readdb(map->db_path, DBPATH"size_fix.txt", ',', MAX_WEAPON_TYPE, MAX_WEAPON_TYPE, ARRAYLENGTH(status->dbs->atkmods), status->readdb_sizefix);
+ sv->readdb(map->db_path, DBPATH"refine_db.txt", ',', 4+MAX_REFINE, 4+MAX_REFINE, ARRAYLENGTH(status->dbs->refine_info), status->readdb_refine);
sv->readdb(map->db_path, "sc_config.txt", ',', 2, 2, SC_MAX, status->readdb_scconfig);
status->read_job_db();
@@ -12362,6 +12363,7 @@ void do_final_status(void) {
*-------------------------------------*/
void status_defaults(void) {
status = &status_s;
+ status->dbs = &statusdbs;
/* vars */
//we need it for new cards 15 Feb 2005, to check if the combo cards are insrerted into the CURRENT weapon only
@@ -12370,7 +12372,7 @@ void status_defaults(void) {
status->current_equip_card_id = 0; //To prevent card-stacking (from jA) [Skotlex]
// These macros are used instead of a sum of sizeof(), to ensure that padding won't interfere with our size, and code won't rot when adding more fields
- memset(ZEROED_BLOCK_POS(status), 0, ZEROED_BLOCK_SIZE(status));
+ memset(ZEROED_BLOCK_POS(status->dbs), 0, ZEROED_BLOCK_SIZE(status->dbs));
status->data_ers = NULL;
memset(&status->dummy, 0, sizeof(status->dummy));
diff --git a/src/map/status.h b/src/map/status.h
index 4bda57fa9..9143df6ae 100644
--- a/src/map/status.h
+++ b/src/map/status.h
@@ -1928,17 +1928,7 @@ struct s_refine_info {
int randombonus_max[MAX_REFINE]; // cumulative maximum random bonus damage
};
-/*=====================================
-* Interface : status.h
-* Generated by HerculesInterfaceMaker
-* created by Susu
-*-------------------------------------*/
-struct status_interface {
-
- /* vars */
- int current_equip_item_index;
- int current_equip_card_id;
-
+struct s_status_dbs {
BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */
int max_weight_base[CLASS_COUNT];
int HP_table[CLASS_COUNT][MAX_LEVEL + 1];
@@ -1957,6 +1947,20 @@ BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when sta
char job_bonus[CLASS_COUNT][MAX_LEVEL];
sc_conf_type sc_conf[SC_MAX];
END_ZEROED_BLOCK; /* End */
+};
+
+/*=====================================
+* Interface : status.h
+* Generated by HerculesInterfaceMaker
+* created by Susu
+*-------------------------------------*/
+struct status_interface {
+
+ /* vars */
+ int current_equip_item_index;
+ int current_equip_card_id;
+
+ struct s_status_dbs *dbs;
struct eri *data_ers; //For sc_data entries
struct status_data dummy;