[devRev4] Refining does not update ZULIE FIX

Welcome in the osRose emulator Project.

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

[devRev4] Refining does not update ZULIE FIX

Postby kismetbecomes on Fri Apr 26, 2013 7:24 pm

Hello OsRose. Here I'am again. Reporting. :D

So, it came to my attention that when refining an item, the client fails to update the zulie ingame, tho - the server is recognizing the zulie requirement and subtracts them when a player refines. So, when the player don't notice it, IF the zulie rans out and he keeps refining the item, the server would think it is a hack which would then crash the client. I still don't know how it affects the server, it doesn't crash or logs anything weird tho.

I'm assuming this is a packet issue?
I'm online at NaRose right now and hopefully I could get my level 9 character to zant and refine items..
I don't take it as every refine has a different packet data structure? o.O

If this is no packet issue, then, please help me figure it out.Thank you.
Last edited by kismetbecomes on Tue May 07, 2013 8:18 pm, edited 2 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: [devRev4] Refining do not update ZULIE

Postby Circa on Fri Apr 26, 2013 8:57 pm

If the coding is correct in the server, and the client acts differently, then either packets don't match, or the client was hardcoded and needs editing.
Circa
Clown
Clown
 
Posts: 404
Joined: Sun Aug 23, 2009 5:52 am
Location: CA

Re: [devRev4] Refining do not update ZULIE

Postby kismetbecomes on Fri Apr 26, 2013 10:23 pm

These are the packets I captured from naRose earlier.

  1.  
  2.  
  3. [Sat Apr 27 02:41:19 2013 ][world]OUT 0x7bc - 05 12 00 0f 50 00 00 00 01 00 00 00 00 00 00 00
  4. [Sat Apr 27 02:41:19 2013 ][world]IN  0x797 - 04 6f 00 00 8f 06 61 61 01 49 51 52 ff 48 a8 a4 01
  5. [Sat Apr 27 02:41:19 2013 ][world]IN  0x7ec - b4 01 00 00 78 00 00 00 02 00 00 00 01 00 00 00
  6. [Sat Apr 27 02:41:19 2013 ][world]IN  0x797 - b0 49 00 00 39 01 46 47 01 49 e0 4f 02 49 00 00 00
  7. [Sat Apr 27 02:41:19 2013 ][world]IN  0x7bc - 10 03 50 00 ec 08 00 00 09 00 00 00 00 00 00 00 00 00 0f 00 a8 2f 00 00 00 32 e8 13 00 00 00 00 00 00 00 00 00 cd cd cd 94 1a 00 00 cd cd cd cd cd cd
  8. [Sat Apr 27 02:41:19 2013 ][world]OUT 0x7d8 - 04 08 7d 01
  9. [Sat Apr 27 02:41:19 2013 ][world]IN  0x797 - 45 e6 00 00 4f 01 34 17 fc 48 cd 35 02 49 00 00 00
  10. [Sat Apr 27 02:41:19 2013 ][world]IN  0x797 - b7 a0 00 00 79 00 e9 53 fe 48 69 c0 02 49 ce 03 00
  11.  
  12.  
  13.  
  14.  
  15. [Sat Apr 27 02:44:03 2013 ][world]IN  0x7bc - 10 03 50 00 ec 08 00 00 06 00 00 00 00 00 00 00 00 00 0f 00 a8 2f 00 00 00 32 e8 33 00 00 00 00 00 00 00 00 47 45 52 5f c4 05 00 00 40 00 5f 73 65 72
  16. [Sat Apr 27 02:44:03 2013 ][world]OUT 0x808 - 00 00 00 00 00 00 00 00 0f 00 00 00 00 00 00 00 00 00 00 00 0b 00 0e 00 1b 01 08 01 60 a4 33 01 68 a5 33 01 70 a6 33 01 78 a7 33 01 80 a8 33 01 88 a9 33 01 90 aa 33 01 98 ab 33 01 a0 ac 33 01 a8 ad 33 01 b0 ae 33 01 b8 af 33 01 c0 b0 33 01 c8 b1 33 01 d0 b2 33 01 d8 b3 33 01 e0 b4 33 01 e8 b5 33 01 f0 b6 33 01 f8 b7 33 01 21 00 0b 00 10 01 08 01 30 00 50 30
  17. [Sat Apr 27 02:44:03 2013 ][world]OUT 0x7d8 - 04 08 7d 01
  18. [Sat Apr 27 02:44:04 2013 ][world]IN  0x7ec - b4 01 00 00 78 00 00 00 02 00 00 00 01 00 00 00
  19. [Sat Apr 27 02:44:04 2013 ][world]IN  0x797 - ce 96 00 00 24 01 b1 1e 01 49 80 a8 02 49 00 00 00
  20. [Sat Apr 27 02:44:04 2013 ][world]IN  0x797 - 19 a4 00 00 be 00 99 5f 01 49 2f 83 02 49 00 00 00
  21. [Sat Apr 27 02:44:04 2013 ][world]IN  0x7d8 - 2f c0 04 08 7d 01
  22.  
  23.  
  24. FAILED
  25. [Sat Apr 27 02:42:59 2013 ][world]IN  0x71d - 88 77 02 01 00 00 00 00
  26. [Sat Apr 27 02:42:59 2013 ][world]IN  0x7bc - 11 03 50 00 ec 08 00 00 07 00 00 00 00 00 00 00 00 00 0f 00 a8 2f 00 00 00 32 e8 23 00 00 00 00 00 00 00 00 00 00 00 00 80 23 00 00 00 cd cd cd cd cd
  27. [Sat Apr 27 02:42:59 2013 ][world]IN  0x797 - b4 ba 00 00 8b 03 7a 4a ff 48 0c 5e 02 49 00 00 00
  28. [Sat Apr 27 02:42:59 2013 ][world]OUT 0x7d8 - 05 08 7d 01
  29. [Sat Apr 27 02:42:59 2013 ][world]IN  0x797 - 7a ca 00 00 3a 05 4c e6 fe 48 3b 0c 00 49 00 00 00
  30. [Sat Apr 27 02:43:00 2013 ][world]IN  0x797 - b0 49 00 00 2b 01 70 8b 01 49 2d 0f 02 49 00 00 00
  31. [Sat Apr 27 02:43:00 2013 ][world]IN  0x7d8 - 2f c0 05 08 7d 01
  32. [Sat Apr 27 02:43:00 2013 ][world]IN  0x7ec - b4 01 00 00 78 00 00 00 02 00 00 00 01 00 00 00
  33. [Sat Apr 27 02:43:00 2013 ][world]IN  0x797 - e9 10 00 00 33 05 6f 66 fe 48 81 93 ff 48 00 00 00


I have my eyes on this [world]OUT 0x7d8 - 04 08 7d 01
Or I could be wrong. :)
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] Refining do not update ZULIE

Postby Circa on Fri Apr 26, 2013 10:35 pm

when you refined thats what happened right after?
Circa
Clown
Clown
 
Posts: 404
Joined: Sun Aug 23, 2009 5:52 am
Location: CA

Re: [devRev4] Refining do not update ZULIE

Postby kismetbecomes on Sat Apr 27, 2013 12:22 am

Okay I'm re-posting the packets here. Not much has changed. I removed 0x797s..

  1.  
  2. //--------First Attempt
  3. [Sat Apr 27 06:54:16 2013 ][world]OUT 0x7bc - 05 12 00 15 4f 00 00 00 01 00 00 00 00 00 00 00  
  4. [Sat Apr 27 06:54:17 2013 ][world]IN  0x71d - f5 0e ff 00 00 00 00 00
  5. [Sat Apr 27 06:54:17 2013 ][world]IN  0x7bc - 11 03 4f 00 2c 0a 00 00 53 00 00 00 00 00 00 00 00 00 15 00 e3 03 00 00 00 34 b5 93 00 00 00 00 00 00 00 00 00 cd cd cd af 13 00 00 cd cd cd cd cd cd
  6. [Sat Apr 27 06:54:17 2013 ][world]OUT 0x7d8 - 05 03 1f 00
  7. [Sat Apr 27 06:54:17 2013 ][world]IN  0x7d8 - 4b f3 05 03 1f 00
  8. [Sat Apr 27 06:54:17 2013 ][world]IN  0x792 - 2b b0 97 94 fe 48 59 67 fe 48 56 8a fe 48 db 70 fe 48 01 00 00 00 00 00 01 08 01 00 00 64 00 00 00 00 00 00 00 cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd cd 2d 01 00 00
  9.  
  10. //------Second Attempt
  11. [Sat Apr 27 06:55:29 2013 ][world]OUT 0x7bc - 05 12 00 15 4f 00 00 00 01 00 00 00 00 00 00 00
  12. [Sat Apr 27 06:55:29 2013 ][world]IN  0x71d - 0b ab fe 00 00 00 00 00
  13. [Sat Apr 27 06:55:29 2013 ][world]IN  0x7bc - 11 03 4f 00 2c 0a 00 00 52 00 00 00 00 00 00 00 00 00 15 00 e3 03 00 00 00 34 b5 93 00 00 00 00 00 00 00 00 00 00 00 00 41 0c 00 00 00 00 00 00 00 00
  14. [Sat Apr 27 06:55:30 2013 ][world]OUT 0x7d8 - 05 03 1f 00
  15. [Sat Apr 27 06:55:30 2013 ][world]IN  0x794 - 93 12
  16. [Sat Apr 27 06:55:30 2013 ][world]IN  0x7d8 - 4b f3 05 03 1f 00
  17.  
  18. //-----Third Attempt
  19.  
  20. [Sat Apr 27 07:04:05 2013 ][world]OUT 0x7bc - 05 12 00 16 4f 00 00 00 01 00 00 00 00 00 00 00
  21. [Sat Apr 27 07:04:05 2013 ][world]IN  0x799 - 4b 26 51 f9 57 00 00 00 01 00 00 00
  22. [Sat Apr 27 07:04:05 2013 ][world]IN  0x71d - cb 45 fe 00 00 00 00 00
  23. [Sat Apr 27 07:04:05 2013 ][world]IN  0x7bc - 11 03 4f 00 2c 0a 00 00 4e 00 00 00 00 00 00 00 00 00 16 00 e3 03 00 00 00 34 b5 93 00 00 00 00 00 00 00 00 00 cd cd cd 5d 18 00 00 cd cd cd cd cd cd
  24. [Sat Apr 27 07:04:05 2013 ][world]OUT 0x7d8 - 05 03 1f 00
  25. [Sat Apr 27 07:04:06 2013 ][world]IN  0x7ec - ba 01 00 00 78 00 00 00 02 00 00 00 01 00 00 00
  26. [Sat Apr 27 07:04:06 2013 ][world]IN  0x7d8 - 56 46 05 03 1f 00
  27. [Sat Apr 27 07:04:06 2013 ][world]IN  0x7b2 - a1 48 07 0c 06
  28. [Sat Apr 27 07:04:06 2013 ][world]IN  0x7b5 - cb 26 a1 48 07 0c df 00 01



The 0x7bc and 0x7d8 packets are, well, the refine packets? Sending instruction to the server that a client is refining an item. The Rev4 server is sending these two out too, and that proves refining works perfect. I'm guessing the UPDATE THE CLIENTS' ZULIE PACKET is somewhere after 0x7bc? 0x71d Always comes after 0x7bc, maybe that's it? :? But, I could be VERY wrong about that, since I'm only assuming. :lol:
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] Refining do not update ZULIE

Postby Rakoon on Mon Apr 29, 2013 8:42 am

i try this one it will not upadate direct but try to relog it will be updated, i thinks it will not update in the same time by somehow or its not showen that ingame :roll:
Rakoon
Rackie
Rackie
 
Posts: 204
Joined: Sat Oct 20, 2012 5:49 am

Re: [devRev4] Refining do not update ZULIE

Postby PurpleYouko on Mon Apr 29, 2013 2:01 pm

you are right. Those are the packets that are used for refining.

0x7bc is created in the server and contains all the relevent information.
0x7d8 comes back from the client when it is complete and we return another 0x7d8 in function pakModifiedItemDone in worldpackets.

I don't have the time to really get into any details today or for the rest of this week most likely.
Try searching through the code on the packet ids and see what is going on.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Re: [devRev4] Refining does not update ZULIE

Postby kismetbecomes on Wed May 01, 2013 6:15 pm

These are the places I found ZULY.

There's this UINT zulyamount=0; inside this code. Dunno if its important.
  1. case 0x05://Refine
  2.         {
  3.                 //LMA: Refine version after the 2010/05
  4.                 BYTE item = GETBYTE((*P),3);
  5.                 //BYTE material = GETBYTE((*P),4);
  6.  
  7.                 //LMA: 4 slots now
  8.                 BYTE material_list[4];
  9.                 BYTE nb_material_list[4];
  10.                 for (int k=0;k<4;k++)
  11.                 {
  12.                     material_list[k]=0;
  13.                     nb_material_list[k]=0;
  14.                 }
  15.  
  16.                 material_list[0]=GETBYTE((*P),4);
  17.                 material_list[1]=GETBYTE((*P),5);
  18.                 material_list[2]=GETBYTE((*P),6);
  19.                 material_list[3]=GETBYTE((*P),7);
  20.  
  21.                 nb_material_list[0]=GETBYTE((*P),8);
  22.                 nb_material_list[1]=GETBYTE((*P),10);
  23.                 nb_material_list[2]=GETBYTE((*P),12);
  24.                 nb_material_list[3]=GETBYTE((*P),14);
  25.  
  26.                 if(!CheckInventorySlot( thisclient, item))
  27.                 {
  28.                     Log(MSG_WARNING,"%s (refine):: wrong slot for item in slot %i",thisclient->CharInfo->charname,item);
  29.                     return false;
  30.                 }
  31.  
  32.                 for (int k=0;k<4;k++)
  33.                 {
  34.                     if(material_list[k]==0)
  35.                     {
  36.                         nb_material_list[k]=0;
  37.                     }
  38.  
  39.                     if(nb_material_list[k]==0)
  40.                     {
  41.                         material_list[k]=0;
  42.                     }
  43.  
  44.                     if(material_list[k]>0&&!CheckInventorySlot( thisclient, material_list[k]))
  45.                     {
  46.                         Log(MSG_WARNING,"%s (refine):: wrong slot for material %i in slot %i",thisclient->CharInfo->charname,k,material_list[k]);
  47.                         return false;
  48.                     }
  49.  
  50.                 }
  51.  
  52.  
  53.                 //LMA: We need to get the "real" item needed for upgrade.
  54.                 if (thisclient->items[item].itemtype==0||thisclient->items[item].itemtype>14||thisclient->items[item].itemnum==0||thisclient->items[item].itemnum>=EquipList[thisclient->items[item].itemtype].max)
  55.                 {
  56.                     Log(MSG_HACK,"Player %s tried to refine an item with wrong values slot %u, item %u::%u",thisclient->CharInfo->charname,item,thisclient->items[item].itemtype,thisclient->items[item].itemnum);
  57.                     return false;
  58.                 }
  59.  
  60.                 UINT gradeIndex=EquipList[thisclient->items[item].itemtype].Index[thisclient->items[item].itemnum]->itemgradeID;
  61.  
  62.                 if(gradeIndex==0||gradeIndex>=ProductList.max)
  63.                 {
  64.                     Log(MSG_HACK,"Player %s can't refine %u::%u, index %u",thisclient->CharInfo->charname,thisclient->items[item].itemtype,thisclient->items[item].itemnum,gradeIndex);
  65.                     return false;
  66.                 }
  67.  
  68.                 UINT zulyamount=0;
  69.                 int quality=0;
  70.  
  71.                 UINT needed_amount=ProductList.Index[gradeIndex]->amount[0];
  72.                 UINT needed_itemtype=gi(ProductList.Index[gradeIndex]->item[0],0);
  73.                 UINT needed_itemnum=gi(ProductList.Index[gradeIndex]->item[0],1);
  74.  




Here, I think this is more significant.
  1. //LMA: taking the money, we need the quality.
  2.                 if(thisclient->items[item].itemtype<=0||thisclient->items[item].itemtype>=11)
  3.                 {
  4.                     Log(MSG_WARNING,"Error, player %s tryes to refine item %u::%u (wrong itemtype)",thisclient->CharInfo->charname,thisclient->items[item].itemtype,thisclient->items[item].itemnum);
  5.                 }
  6.                 else
  7.                 {
  8.                     if(thisclient->items[item].itemnum>=EquipList[thisclient->items[item].itemtype].max)
  9.                     {
  10.                         Log(MSG_WARNING,"Error, player %s tryes to refine itemn %u::%u but >= %u ",thisclient->CharInfo->charname,thisclient->items[item].itemtype,thisclient->items[item].itemnum,EquipList[thisclient->items[item].itemtype].max);
  11.                     }
  12.                     else
  13.                     {
  14.                         quality=EquipList[thisclient->items[item].itemtype].Index[thisclient->items[item].itemnum]->quality;
  15.                     }
  16.  
  17.                 }
  18.  
  19.                 //end of zuly check.



And also this.
  1.      //LMA: How much zuly? :)
  2.                 if(quality>0&&nextlevel>1)
  3.                 {
  4.                     float basis=(pow(quality,3)*(float)((float)127/(float)7685496)+pow(quality,2)*(float)((float)435665/(float)1097928)+quality*(float)((float)31437683/(float)3842748)-(float)((float)77200/(float)24633));
  5.                     float quant=((float)(nextlevel-1)*nextlevel)/2;
  6.                     zulyamount=(UINT)(basis*quant);
  7.                     Log(MSG_INFO,"Trying to get %u Z for quality %i (basis %f, quant %f)",zulyamount,quality,basis,quant);
  8.                 }
  9.  
  10.                 if(zulyamount>0)
  11.                 {
  12.                     if (thisclient->CharInfo->Zulies<zulyamount)
  13.                     {
  14.                         SendPM(thisclient,"You don't have enough money to refine, %u needed");
  15.                         Log(MSG_WARNING,"Error, player %s tryes to refine item %u::%u but hasn't enough money, %u needed, he has %li",thisclient->CharInfo->charname,thisclient->items[item].itemtype,thisclient->items[item].itemnum,zulyamount,thisclient->CharInfo->Zulies);
  16.                         return true;
  17.                     }
  18.  
  19.                     //taking the money (packet not needed).
  20.                     thisclient->CharInfo->Zulies-=zulyamount;
  21.                     /*
  22.                     BEGINPACKET( pak, 0x71d );
  23.                     ADDQWORD( pak, thisclient->CharInfo->Zulies );
  24.                     thisclient->client->SendPacket( &pak );*/
  25.                 }




I also got this at the very end of the craft/refining/etc code.. dunno too. :lol:

  1. bool CWorldServer::pakModifiedItemDone( CPlayer* thisclient, CPacket* P )
  2. {
  3.      DWORD result = GETDWORD((*P), 0x00 );
  4.      BEGINPACKET( pak, 0x07d8);
  5.      ADDWORD( pak, thisclient->clientid );
  6.      ADDDWORD( pak, result);
  7.      SendToVisible( &pak , thisclient);
  8.      return true;
  9.  
  10. }
  11.  
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] Refining does not update ZULIE

Postby WiseGuy on Thu May 02, 2013 1:04 am

uncomment this part with delete the red mark:


  1.                    //taking the money (packet not needed).
  2.                     thisclient->CharInfo->Zulies-=zulyamount;
  3.                     /*
  4.                     BEGINPACKET( pak, 0x71d );
  5.                     ADDQWORD( pak, thisclient->CharInfo->Zulies );
  6.                     thisclient->client->SendPacket( &pak );*/
  7.  
It is nice to be important
but very very important to be nice
User avatar
WiseGuy
Pomic
Pomic
 
Posts: 112
Joined: Sat Nov 21, 2009 4:03 am
Location: Jakarta

Re: [devRev4] Refining does not update ZULIE

Postby PurpleYouko on Thu May 02, 2013 2:01 pm

wonder why that was commented out.
There had to be a valid reason for that.
Need to lookup information on NARose items, skills, quests?
Now featuring a newly completed skill tree for all classes
Formatting fixed for different resolutions
Image

"A Gazelle is nothing but a giraffe plotted logarithmicaly"
User avatar
PurpleYouko
Rose Guru
Rose Guru
 
Posts: 4733
Joined: Fri Aug 10, 2007 2:05 pm

Next

Return to Support - OsRose Emulator

Who is online

Users browsing this forum: No registered users and 14 guests