Jump to content
  • 0

Mob Tetra Vortex Animation


Slyx

Question


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  57
  • Reputation:   9
  • Joined:  03/05/18
  • Last Seen:  

Hello guys,

Tetravortex skill, when cast by monster, gives a black rectangular-shaped on skill animation as shown in gif below. I am not sure where the source of this problem but I suspect it might be from clif_skill_nodamage function?

Thank you in advance for your comment and support

Animation (1).gif

Edited by Slyx
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  303
  • Reputation:   117
  • Joined:  12/10/16
  • Last Seen:  

I don't know if this will work but I don't lose anything trying...

Change:

	case WL_TETRAVORTEX:
		if( sd && sc ) { // No SC? No spheres
			int spheres[5] = { 0, 0, 0, 0, 0 },
				positions[5] = {-1,-1,-1,-1,-1 },
				i, j = 0, k, subskill = 0;

			for( i = SC_SPHERE_1; i <= SC_SPHERE_5; i++ )
				if( sc->data[i] ) {
					spheres[j] = i;
					positions[j] = sc->data[i]->val2;
					j++;
				}

			// Sphere Sort, this time from new to old
			for( i = 0; i <= j - 2; i++ )
				for( k = i + 1; k <= j - 1; k++ )
					if( positions[i] < positions[k] ) {
						SWAP(positions[i],positions[k]);
						SWAP(spheres[i],spheres[k]);
					}

			if(j == 5) { // If 5 spheres, remove last one and only do 4 actions (Official behavior)
				status_change_end(src, static_cast<sc_type>(spheres[4]), INVALID_TIMER);
				j = 4;
			}

			k = 0;
			for( i = 0; i < j; i++ ) { // Loop should always be 4 for regular players, but unconditional_skill could be less
				switch( sc->data[spheres[i]]->val1 ) {
					case WLS_FIRE:  subskill = WL_TETRAVORTEX_FIRE; k |= 1; break;
					case WLS_WIND:  subskill = WL_TETRAVORTEX_WIND; k |= 4; break;
					case WLS_WATER: subskill = WL_TETRAVORTEX_WATER; k |= 2; break;
					case WLS_STONE: subskill = WL_TETRAVORTEX_GROUND; k |= 8; break;
				}
				skill_addtimerskill(src, tick + i * 200, bl->id, k, 0, subskill, skill_lv, i, flag);
				clif_skill_nodamage(src, bl, subskill, skill_lv, 1);
				status_change_end(src, static_cast<sc_type>(spheres[i]), INVALID_TIMER);
			}
		}
		break;

to:

	case WL_TETRAVORTEX:
		if( sd && sc ) { // No SC? No spheres
			int spheres[5] = { 0, 0, 0, 0, 0 },
				positions[5] = {-1,-1,-1,-1,-1 },
				i, j = 0, k, subskill = 0;

			for( i = SC_SPHERE_1; i <= SC_SPHERE_5; i++ )
				if( sc->data[i] ) {
					spheres[j] = i;
					positions[j] = sc->data[i]->val2;
					j++;
				}

			// Sphere Sort, this time from new to old
			for( i = 0; i <= j - 2; i++ )
				for( k = i + 1; k <= j - 1; k++ )
					if( positions[i] < positions[k] ) {
						SWAP(positions[i],positions[k]);
						SWAP(spheres[i],spheres[k]);
					}

			if(j == 5) { // If 5 spheres, remove last one and only do 4 actions (Official behavior)
				status_change_end(src, static_cast<sc_type>(spheres[4]), INVALID_TIMER);
				j = 4;
			}

			k = 0;
			for( i = 0; i < j; i++ ) { // Loop should always be 4 for regular players, but unconditional_skill could be less
				switch( sc->data[spheres[i]]->val1 ) {
					case WLS_FIRE:  subskill = WL_TETRAVORTEX_FIRE; k |= 1; break;
					case WLS_WIND:  subskill = WL_TETRAVORTEX_WIND; k |= 4; break;
					case WLS_WATER: subskill = WL_TETRAVORTEX_WATER; k |= 2; break;
					case WLS_STONE: subskill = WL_TETRAVORTEX_GROUND; k |= 8; break;
				}
				skill_addtimerskill(src, tick + i * 200, bl->id, k, 0, subskill, skill_lv, i, flag);
				clif_skill_nodamage(src, bl, subskill, skill_lv, 1);
				status_change_end(src, static_cast<sc_type>(spheres[i]), INVALID_TIMER);
			}
		} else if(!sd) {
			int k;
			for( i = 0; i < 4; i++ ) {
				switch( i ) {
					case 0:  subskill = WL_TETRAVORTEX_FIRE; k |= 1; break;
					case 1:  subskill = WL_TETRAVORTEX_WIND; k |= 4; break;
					case 2:  subskill = WL_TETRAVORTEX_WATER; k |= 2; break;
					case 3:  subskill = WL_TETRAVORTEX_GROUND; k |= 8; break;
				}
				skill_addtimerskill(src, tick + i * 200, bl->id, k, 0, subskill, skill_lv, i, flag);
				clif_skill_nodamage(src, bl, subskill, skill_lv, 1);
			}
		}
		break;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.01
  • Content Count:  57
  • Reputation:   9
  • Joined:  03/05/18
  • Last Seen:  

Thank you! It works!

Apparently if I want to assign all subskills to WL_TETRAVORTEX, the bugged animation re appeared.

		} else if(!sd) {
			int i, k, subskill = 0;
			for( i = 0; i < 4; i++ ) {
				switch( i ) {
					case 0:  subskill = WL_TETRAVORTEX; k |= 1; break;
					case 1:  subskill = WL_TETRAVORTEX; k |= 4; break;
					case 2:  subskill = WL_TETRAVORTEX; k |= 2; break;
					case 3:  subskill = WL_TETRAVORTEX; k |= 8; break;
				}
				skill_addtimerskill(src, tick + i * 200, bl->id, k, 0, subskill, skill_lv, i, flag);
				clif_skill_nodamage(src, bl, subskill, skill_lv, 1);
			}
		}	

This must be from the assigned k value in the code. May i know what does k value means?

EDIT:

Found the solution. I forced these skills to be neutral if cast by mob in battle.cpp and retain the animation of fire, water, lightning and earth. I think the animation sprite for WL_TETRAVORTEX is designed to be like that in grf file

 

Edited by Slyx
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  20
  • Reputation:   1
  • Joined:  02/03/16
  • Last Seen:  

Hi,

I do not have a display bug but the spell doesn't do any damage. An idea?

Thx

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...