[devRev4] Mage AOE targetted skill no damage. [FIX]

Welcome in the osRose emulator Project.

Moderators: osRose dev team, ospRose dev team, osiRose dev team, Moderators

[devRev4] Mage AOE targetted skill no damage. [FIX]

Postby kismetbecomes on Sun Nov 18, 2012 11:09 am

Devrev4
RoseZa Client 437

Hi guys - I was wondering why Mage skills don't work again after compiling revision 7 of devrev4.
I did some adjustments with the return scrolls so I have to use my compiled worldserver.exe.
Anyway - the original worldserver from the svn worked just fine with the Mage's AOE skills -
could the source be not updated?

I hope - altho I'm sure - I did not broke anything while adding my scroll codes.

I'm no programmer, I'm sorry. I don't wanna mess up anything inside the source until
I'm sure and have asked what should be the best action. Thanks.

If I don't get an answer from anyone soon - I will have to try http://forum.dev-osrose.com/viewtopic.php?f=30&t=5325 by deadlycrow.
Thanks a lot. :D
Last edited by kismetbecomes on Tue Dec 04, 2012 7:42 pm, edited 3 times in total.
RoseZa v437 - HueRose Test Project -- http://hueroseonline.no-ip.biz
kismetbecomes
Rackie
Rackie
 
Posts: 299
Joined: Mon Feb 06, 2012 12:41 am

Re: Mage AOE skills don't work in dev4 after compiling.

Postby Circa on Sun Nov 18, 2012 11:47 am

Don't think they fixed it in dev rev 4, so just try out his code, and report back if it fixes the problem, you can always change it back to the old code anyways.
Circa
Clown
Clown
 
Posts: 404
Joined: Sun Aug 23, 2009 5:52 am
Location: CA

Re: Mage AOE skills don't work in dev4 after compiling.

Postby kismetbecomes on Mon Nov 19, 2012 12:37 am

Deadlycrow's fix worked - with a very small revision.
All attacks miss when adding a new unsigned int to chartype.h
(I don't understand why :( )

Maybe today we can omit adding a new unsigned int tho. :)
Since this skill needs a target to execute - we can use unsigned int atktarget; for targeted AOE case.
(Or am I just missing something? :? I don't really know what exactly I'm doing here, I just edited and
worked on what makes sense to a non programmer like myself. So anyway...)


The Original thread of the fix is here if you want to try it (it might work for you.)
http://forum.dev-osrose.com/viewtopic.php?f=30&t=5325

Since an unsigned int (the atktarget;) already exist in chartype.h we can
proceed to charfunction.ccp to find this:


  1.  
  2. case AOE_TARGET:
  3.         {
  4.             //LMA 2008/09/02: new version, the target is a zone, not a monster... so we stick with aoedestiny ;)
  5.  
  6.             RESETPACKET( pak, 0x7b4 );
  7.             ADDWORD    ( pak, clientid );
  8.             ADDWORD    ( pak, skillid );
  9.             ADDFLOAT   ( pak, Position->aoedestiny.x*100 );
  10.             ADDFLOAT   ( pak, Position->aoedestiny.y*100 );
  11.             Battle->atktype = action;
  12.             Battle->skillid = skillid;
  13.             Battle->target = 0;
  14.             Battle->skilltarget = 0;
  15.             Position->destiny  = Position->aoedestiny;
  16.             Position->lastMoveTime = clock( );
  17.             Log(MSG_INFO,"StartAction, AOE_TARGET, target (%.2f,%.2f)",Position->aoedestiny.x,Position->aoedestiny.y);
  18.         }
  19.         break;
  20.  



and change it to this:
(notice Battle->target = 0; is now Battle->target = Battle->atktarget;)

  1.  
  2. case AOE_TARGET:
  3.         {
  4.             //LMA 2008/09/02: new version, the target is a zone, not a monster... so we stick with aoedestiny ;)
  5.             RESETPACKET( pak, 0x7b4 );
  6.             ADDWORD    ( pak, clientid );
  7.             ADDWORD    ( pak, skillid );
  8.             ADDFLOAT   ( pak, Position->aoedestiny.x*100 );
  9.             ADDFLOAT   ( pak, Position->aoedestiny.y*100 );
  10.             Battle->atktype = action;
  11.             Battle->skillid = skillid;
  12.             Battle->skilltarget = 0;
  13.             Battle->target = Battle->atktarget;
  14.             Position->destiny  = Position->aoedestiny;
  15.             Position->lastMoveTime = clock( );
  16.             Log(MSG_INFO,"StartAction, AOE_TARGET, target (%.2f,%.2f)",Position->aoedestiny.x,Position->aoedestiny.y);
  17.         }
  18.         break;
  19.  


the case will now execute on the players' targeted mob - it works fine inside as the skill is declared with a radius in stb.. so instead of targeting the area/zone - the new target is the selected monster.


and then:
deadlycrow's additional fix is moving case AOE_TARGET;
find this:

  1. bool CCharacter::IsOnBattle( )
  2. {
  3.     //Bonfire don't attack...
  4.     if(Battle->atktype==0) return false;
  5.     switch(Battle->atktype)
  6.     {
  7.         case NORMAL_ATTACK:
  8.         {
  9.             if(Battle->atktarget!=0) return true;
  10.         }
  11.         break;
  12.         case SKILL_ATTACK:
  13.        case AOE_TARGET:
  14.         {
  15.             if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
  16.         }
  17.         break;
  18.         case SKILL_BUFF:
  19.         {
  20.             if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
  21.         }
  22.         break;
  23.         case SUMMON_BUFF:
  24.         {
  25.              if(Battle->bufftarget!=0&&Battle->skillid!=0) return true;
  26.         }
  27.         break;
  28.         case MONSTER_SKILL_BUFF:
  29.         {
  30.              if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
  31.         }
  32.         break;
  33.         case MONSTER_SKILL_ATTACK:
  34.         {
  35.              if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
  36.         }
  37.         break;
  38.         case MONSTER_BUFF_SELF:
  39.         case SKILL_AOE:
  40.         case SKILL_SELF:
  41.         case BUFF_SELF:
  42.         case BUFF_AOE:
  43.        
  44.         {
  45.             if(Battle->skillid!=0) return true;
  46.         }
  47.         break;
  48.         case STAY_STILL_ATTACK:
  49.         {
  50.               //LMA: Very special case where the monster don't really attack (mc)
  51.               return true;
  52.          }
  53.         default: return false;
  54.     }
  55. }


replace with this:


  1.  
  2. bool CCharacter::IsOnBattle( )
  3. {
  4.     //Bonfire don't attack...
  5.     if(Battle->atktype==0) return false;
  6.     switch(Battle->atktype)
  7.     {
  8.         case NORMAL_ATTACK:
  9.         {
  10.             if(Battle->atktarget!=0) return true;
  11.         }
  12.         break;
  13.         case SKILL_ATTACK:
  14.  
  15.         {
  16.             if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
  17.         }
  18.         break;
  19.         case SKILL_BUFF:
  20.         {
  21.             if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
  22.         }
  23.         break;
  24.         case SUMMON_BUFF:
  25.         {
  26.              if(Battle->bufftarget!=0&&Battle->skillid!=0) return true;
  27.         }
  28.         break;
  29.         case MONSTER_SKILL_BUFF:
  30.         {
  31.              if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
  32.         }
  33.         break;
  34.         case MONSTER_SKILL_ATTACK:
  35.         {
  36.              if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
  37.         }
  38.         break;
  39.         case MONSTER_BUFF_SELF:
  40.         case SKILL_AOE:
  41.         case SKILL_SELF:
  42.         case BUFF_SELF:
  43.         case BUFF_AOE:
  44.         case AOE_TARGET:
  45.         {
  46.             if(Battle->skillid!=0) return true;
  47.         }
  48.         break;
  49.         case STAY_STILL_ATTACK:
  50.         {
  51.               //LMA: Very special case where the monster don't really attack (mc)
  52.               return true;
  53.          }
  54.         default: return false;
  55.     }
  56. }
  57.  


Thanks. Hope this works for all using the rev4. :D
RoseZa v437 - HueRose Test Project -- http://hueroseonline.no-ip.biz
kismetbecomes
Rackie
Rackie
 
Posts: 299
Joined: Mon Feb 06, 2012 12:41 am

Re: Mage AOE skills don't work in dev4 after compiling.

Postby rl2171 on Mon Nov 19, 2012 1:12 am

If it all worked out ok, go ahead and update the SVN with your changes.


kismetbecomes wrote:Deadlycrow's fix worked - with a very small revision.
All attacks miss when adding a new unsigned int to chartype.h
(I don't understand why :( )

Maybe today we can omit adding a new unsigned int tho. :)
Since this skill needs a target to execute - we can use unsigned int atktarget; for targeted AOE case.
(Or am I just missing something? :? I don't really know what exactly I'm doing here, I just edited and
worked on what makes sense to a non programmer like myself. So anyway...)


The Original thread of the fix is here if you want to try it (it might work for you.)
http://forum.dev-osrose.com/viewtopic.php?f=30&t=5325

Since an unsigned int (the atktarget;) already exist in chartype.h we can
proceed to charfunction.ccp to find this:


  1.  
  2. case AOE_TARGET:
  3.         {
  4.             //LMA 2008/09/02: new version, the target is a zone, not a monster... so we stick with aoedestiny ;)
  5.  
  6.             RESETPACKET( pak, 0x7b4 );
  7.             ADDWORD    ( pak, clientid );
  8.             ADDWORD    ( pak, skillid );
  9.             ADDFLOAT   ( pak, Position->aoedestiny.x*100 );
  10.             ADDFLOAT   ( pak, Position->aoedestiny.y*100 );
  11.             Battle->atktype = action;
  12.             Battle->skillid = skillid;
  13.             Battle->target = 0;
  14.             Battle->skilltarget = 0;
  15.             Position->destiny  = Position->aoedestiny;
  16.             Position->lastMoveTime = clock( );
  17.             Log(MSG_INFO,"StartAction, AOE_TARGET, target (%.2f,%.2f)",Position->aoedestiny.x,Position->aoedestiny.y);
  18.         }
  19.         break;
  20.  



and change it to this:
(notice Battle->target = 0; is now Battle->target = Battle->atktarget;)

  1.  
  2. case AOE_TARGET:
  3.         {
  4.             //LMA 2008/09/02: new version, the target is a zone, not a monster... so we stick with aoedestiny ;)
  5.             RESETPACKET( pak, 0x7b4 );
  6.             ADDWORD    ( pak, clientid );
  7.             ADDWORD    ( pak, skillid );
  8.             ADDFLOAT   ( pak, Position->aoedestiny.x*100 );
  9.             ADDFLOAT   ( pak, Position->aoedestiny.y*100 );
  10.             Battle->atktype = action;
  11.             Battle->skillid = skillid;
  12.             Battle->skilltarget = 0;
  13.             Battle->target = Battle->atktarget;
  14.             Position->destiny  = Position->aoedestiny;
  15.             Position->lastMoveTime = clock( );
  16.             Log(MSG_INFO,"StartAction, AOE_TARGET, target (%.2f,%.2f)",Position->aoedestiny.x,Position->aoedestiny.y);
  17.         }
  18.         break;
  19.  


the case will now execute on the players' targeted mob - it works fine inside as the skill is declared with a radius in stb.. so instead of targeting the area/zone - the new target is the selected monster.


and then:
deadlycrow's additional fix is moving case AOE_TARGET;
find this:

  1. bool CCharacter::IsOnBattle( )
  2. {
  3.     //Bonfire don't attack...
  4.     if(Battle->atktype==0) return false;
  5.     switch(Battle->atktype)
  6.     {
  7.         case NORMAL_ATTACK:
  8.         {
  9.             if(Battle->atktarget!=0) return true;
  10.         }
  11.         break;
  12.         case SKILL_ATTACK:
  13.        case AOE_TARGET:
  14.         {
  15.             if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
  16.         }
  17.         break;
  18.         case SKILL_BUFF:
  19.         {
  20.             if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
  21.         }
  22.         break;
  23.         case SUMMON_BUFF:
  24.         {
  25.              if(Battle->bufftarget!=0&&Battle->skillid!=0) return true;
  26.         }
  27.         break;
  28.         case MONSTER_SKILL_BUFF:
  29.         {
  30.              if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
  31.         }
  32.         break;
  33.         case MONSTER_SKILL_ATTACK:
  34.         {
  35.              if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
  36.         }
  37.         break;
  38.         case MONSTER_BUFF_SELF:
  39.         case SKILL_AOE:
  40.         case SKILL_SELF:
  41.         case BUFF_SELF:
  42.         case BUFF_AOE:
  43.        
  44.         {
  45.             if(Battle->skillid!=0) return true;
  46.         }
  47.         break;
  48.         case STAY_STILL_ATTACK:
  49.         {
  50.               //LMA: Very special case where the monster don't really attack (mc)
  51.               return true;
  52.          }
  53.         default: return false;
  54.     }
  55. }


replace with this:


  1.  
  2. bool CCharacter::IsOnBattle( )
  3. {
  4.     //Bonfire don't attack...
  5.     if(Battle->atktype==0) return false;
  6.     switch(Battle->atktype)
  7.     {
  8.         case NORMAL_ATTACK:
  9.         {
  10.             if(Battle->atktarget!=0) return true;
  11.         }
  12.         break;
  13.         case SKILL_ATTACK:
  14.  
  15.         {
  16.             if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
  17.         }
  18.         break;
  19.         case SKILL_BUFF:
  20.         {
  21.             if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
  22.         }
  23.         break;
  24.         case SUMMON_BUFF:
  25.         {
  26.              if(Battle->bufftarget!=0&&Battle->skillid!=0) return true;
  27.         }
  28.         break;
  29.         case MONSTER_SKILL_BUFF:
  30.         {
  31.              if(Battle->bufftarget!=0 && Battle->skillid!=0) return true;
  32.         }
  33.         break;
  34.         case MONSTER_SKILL_ATTACK:
  35.         {
  36.              if(Battle->skilltarget!=0 && Battle->skillid!=0) return true;
  37.         }
  38.         break;
  39.         case MONSTER_BUFF_SELF:
  40.         case SKILL_AOE:
  41.         case SKILL_SELF:
  42.         case BUFF_SELF:
  43.         case BUFF_AOE:
  44.         case AOE_TARGET:
  45.         {
  46.             if(Battle->skillid!=0) return true;
  47.         }
  48.         break;
  49.         case STAY_STILL_ATTACK:
  50.         {
  51.               //LMA: Very special case where the monster don't really attack (mc)
  52.               return true;
  53.          }
  54.         default: return false;
  55.     }
  56. }
  57.  


Thanks. Hope this works for all using the rev4. :D
Image
rl2171
Admin
Admin
 
Posts: 1706
Joined: Mon Aug 06, 2007 5:17 pm
Location: Sacramento, CA USA - GMT-8

Re: [devRev4] Mage AOE targetted skill no damage. [FIX]

Postby Scalawag on Sun Nov 25, 2012 2:04 pm

Going to check it out, if so, i'll update the SVN with his changes.

Edit: It's working just fine! :3
Scalawag
Jelly Bean
Jelly Bean
 
Posts: 16
Joined: Tue Apr 24, 2012 4:15 pm

Re: [devRev4] Mage AOE targetted skill no damage. [FIX]

Postby kismetbecomes on Mon Nov 26, 2012 4:19 am

Scalawag wrote:Going to check it out, if so, i'll update the SVN with his changes.

Edit: It's working just fine! :3


Have you tried the old fix?
I couldn't understand why adding a new int that will hold as the players' attack target during a targeted AOE casting makes all melee attacks miss. :? Anyway... Thanks for adding this to SVN. You might wanna test this durability issues too tho and add them if it workshttp://forum.dev-osrose.com/viewtopic.php?f=18&t=5376&start=0.. :D
RoseZa v437 - HueRose Test Project -- http://hueroseonline.no-ip.biz
kismetbecomes
Rackie
Rackie
 
Posts: 299
Joined: Mon Feb 06, 2012 12:41 am

Re: [devRev4] Mage AOE targetted skill no damage. [FIX]

Postby Scalawag on Mon Nov 26, 2012 9:04 pm

Yeah the old way just doesn't worked here... Actually I haven't commit the fix yet to the SVN since i'm not sure how to add a description, i'm getting an error message with a big red cross within it... :roll:

Working on this now. ^-^
Scalawag
Jelly Bean
Jelly Bean
 
Posts: 16
Joined: Tue Apr 24, 2012 4:15 pm

Re: [devRev4] Mage AOE targetted skill no damage. [FIX]

Postby kismetbecomes on Mon Nov 26, 2012 9:34 pm

Scalawag wrote:Yeah the old way just doesn't worked here... Actually I haven't commit the fix yet to the SVN since i'm not sure how to add a description, i'm getting an error message with a big red cross within it... :roll:

Working on this now. ^-^


Are fixes giving you errors? Or just the comments?
I have tested all three new fixes and they work just fine.
the isdead packet, mage skills and the item durability. :)

The links are here:
(for your convenience.. please do tell us if you have updated the SVN)
http://forum.dev-osrose.com/viewtopic.php?f=18&t=5377
http://forum.dev-osrose.com/viewtopic.php?f=18&t=5378
http://forum.dev-osrose.com/viewtopic.php?f=18&t=5376
RoseZa v437 - HueRose Test Project -- http://hueroseonline.no-ip.biz
kismetbecomes
Rackie
Rackie
 
Posts: 299
Joined: Mon Feb 06, 2012 12:41 am

Re: [devRev4] Mage AOE targetted skill no damage. [FIX]

Postby Scalawag on Mon Nov 26, 2012 9:48 pm

But I just told you... I was talking about the SVN not about the fixes :P they are working just fine. I just can't upload the fixes to the SVN yet because I can't add a description for them. People should know what they are doing with their code when they make a update via SVN. :)

I'll probably have to ask Rl to add a description if I upload something...
Scalawag
Jelly Bean
Jelly Bean
 
Posts: 16
Joined: Tue Apr 24, 2012 4:15 pm

Re: [devRev4] Mage AOE targetted skill no damage. [FIX]

Postby kismetbecomes on Mon Nov 26, 2012 9:53 pm

Scalawag wrote:But I just told you... I was talking about the SVN not about the fixes :P they are working just fine. I just can't upload the fixes to the SVN yet because I can't add a description for them. People should know what they are doing with their code when they make a update via SVN. :)

I'll probably have to ask Rl to add a description if I upload something...


Sorry there. :D
Honestly I don't know a thing about updating the SVN. :roll:
RoseZa v437 - HueRose Test Project -- http://hueroseonline.no-ip.biz
kismetbecomes
Rackie
Rackie
 
Posts: 299
Joined: Mon Feb 06, 2012 12:41 am

Next

Return to Support - OsRose Emulator

Who is online

Users browsing this forum: No registered users and 10 guests