Hello friends, I have a problem after making changes to source. When I hit a mob, or a mob hits me, the map.server generates an error and shuts down the
emulator.
I don't know which changes may have caused this, so I will list all the changes made:
battle.cpp
Change:
// Affected by target DEF bonuses
if( tsd && !(nk&NK_NO_CARDFIX_DEF) ) {
cardfix = 1000; // reset var for target
to:
// Affected by target DEF bonuses
if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !sd->special_state.ignore_resistances ) {
cardfix = 1000; // reset var for target
Change:
// Affected by target DEF bonuses
else if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !(left&2) ) {
if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses
to:
// Affected by target DEF bonuses
else if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !(left&2) && !sd->special_state.ignore_resistances ) {
if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses
Change:
// Affected by target DEF bonuses
if( tsd && !(nk&NK_NO_CARDFIX_DEF) ) {
if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses
to:
// Affected by target DEF bonuses
if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !sd->special_state.ignore_resistances ) {
if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses
map.hpp
Change:
SP_IGNORE_DEF_CLASS_RATE, SP_REGEN_PERCENT_HP, SP_REGEN_PERCENT_SP, SP_SKILL_DELAY //2088-2092
to:
SP_IGNORE_DEF_CLASS_RATE, SP_REGEN_PERCENT_HP, SP_REGEN_PERCENT_SP, SP_SKILL_DELAY, //2088-2092
SP_IGNORE_RESISTANCES //2093
pc.cpp
case SP_NO_MADO_FUEL:
if (sd->state.lr_flag != 2)
sd->special_state.no_mado_fuel = 1;
break;
Add below:
case SP_IGNORE_RESISTANCES:
if (sd->state.lr_flag != 2)
sd->special_state.ignore_resistances = 1;
break;
pc.hpp
unsigned int no_mado_fuel : 1; // Disable Magic_Gear_Fuel consumption [Secret]
Add below:
unsigned int ignore_resistances : 1; // Disable Magic_Gear_Fuel consumption [Secret]
script_constants.hpp
export_constant2("bSkillDelay",SP_SKILL_DELAY);
Add below:
export_constant2("bIgnoreResistances",SP_IGNORE_RESISTANCES);
If possible, I would like to continue with the added changes, just solve the crash problem with mobs ... Thank you guys!
Question
IsabelaFernandez
Hello friends, I have a problem after making changes to source. When I hit a mob, or a mob hits me, the map.server generates an error and shuts down the emulator. I don't know which changes may have caused this, so I will list all the changes made:
battle.cpp Change: // Affected by target DEF bonuses if( tsd && !(nk&NK_NO_CARDFIX_DEF) ) { cardfix = 1000; // reset var for target to: // Affected by target DEF bonuses if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !sd->special_state.ignore_resistances ) { cardfix = 1000; // reset var for target Change: // Affected by target DEF bonuses else if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !(left&2) ) { if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses to: // Affected by target DEF bonuses else if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !(left&2) && !sd->special_state.ignore_resistances ) { if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses Change: // Affected by target DEF bonuses if( tsd && !(nk&NK_NO_CARDFIX_DEF) ) { if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses to: // Affected by target DEF bonuses if( tsd && !(nk&NK_NO_CARDFIX_DEF) && !sd->special_state.ignore_resistances ) { if( !(nk&NK_NO_ELEFIX) ) { // Affected by Element modifier bonuses map.hpp Change: SP_IGNORE_DEF_CLASS_RATE, SP_REGEN_PERCENT_HP, SP_REGEN_PERCENT_SP, SP_SKILL_DELAY //2088-2092 to: SP_IGNORE_DEF_CLASS_RATE, SP_REGEN_PERCENT_HP, SP_REGEN_PERCENT_SP, SP_SKILL_DELAY, //2088-2092 SP_IGNORE_RESISTANCES //2093 pc.cpp case SP_NO_MADO_FUEL: if (sd->state.lr_flag != 2) sd->special_state.no_mado_fuel = 1; break; Add below: case SP_IGNORE_RESISTANCES: if (sd->state.lr_flag != 2) sd->special_state.ignore_resistances = 1; break; pc.hpp unsigned int no_mado_fuel : 1; // Disable Magic_Gear_Fuel consumption [Secret] Add below: unsigned int ignore_resistances : 1; // Disable Magic_Gear_Fuel consumption [Secret] script_constants.hpp export_constant2("bSkillDelay",SP_SKILL_DELAY); Add below: export_constant2("bIgnoreResistances",SP_IGNORE_RESISTANCES);
If possible, I would like to continue with the added changes, just solve the crash problem with mobs ... Thank you guys!
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.