Slyx Posted December 24, 2018 Posted December 24, 2018 (edited) 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 Edited December 24, 2018 by Slyx Quote
0 n0tttt Posted December 24, 2018 Posted December 24, 2018 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; Quote
0 Slyx Posted December 24, 2018 Author Posted December 24, 2018 (edited) 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 December 24, 2018 by Slyx 1 Quote
0 Tiki59 Posted August 25, 2019 Posted August 25, 2019 Hi, I do not have a display bug but the spell doesn't do any damage. An idea? Thx Quote
Question
Slyx
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
3 answers 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.