Jump to content
  • 0

Source problem crashing when hit mob


IsabelaFernandez

Question


  • Group:  Members
  • Topic Count:  145
  • Topics Per Day:  0.07
  • Content Count:  354
  • Reputation:   8
  • Joined:  04/16/18
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  25
  • Topics Per Day:  0.01
  • Content Count:  924
  • Reputation:   166
  • Joined:  04/05/13
  • Last Seen:  

Can you rollback to original and try to add it one by one. That will show which line made an errors.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...