Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Development] OffSet release limit of wings MuEmu

Joined
May 21, 2012
Messages
708
Reaction score
300
Limiti wings

#define MAX_CUSTOM_WING 40

Fixa SetPreviwerChar

Procurar no Item.cpp

__declspec(naked) void WingMakePreviewCharSet() // OK
{
static DWORD WingMakePreviewCharSetAddress1 = 0x004F71DE;
static DWORD WingMakePreviewCharSetAddress2 = 0x004F717D;


_asm
{
Mov Ecx,Dword Ptr Ss:[Ebp+0x0C]
Movzx Edx,Byte Ptr Ds:[Ecx+0x10]
Sar Edx,0x01
And Edx,0xF
Test Edx,Edx
Je EXIT
Mov Eax,Dword Ptr Ss:[Ebp+0x0C]
Movzx Ecx,Byte Ptr Ds:[Eax+0x10]
Sar Ecx,0x01
And Ecx,0xF
Sub Ecx,0x01
Push Ecx
Lea Ecx,gCustomWing
Call [CCustomWing::CheckCustomWing]
Test Eax,Eax
Je EXIT
Mov Edx,Dword Ptr Ss:[Ebp+0x0C]
Movzx Eax,Byte Ptr Ds:[Edx+0x10]
Sar Eax,0x01
And Eax,0xF
Sub Eax,0x01
Push Eax
Lea Ecx,gCustomWing
Call [CCustomWing::GetCustomWingItem]
Add Eax,ITEM_BASE_MODEL
Mov Ecx,Dword Ptr Ss:[Ebp-0x08]
Mov Word Ptr Ds:[Ecx+0x1C0],Ax
Jmp [WingMakePreviewCharSetAddress1]
EXIT:
Mov Eax,Dword Ptr Ss:[Ebp-0x04]
And Eax,0xFF
Jmp [WingMakePreviewCharSetAddress2]
}
}



__declspec(naked) void WingMakePreviewCharSet() // OK
{
static DWORD WingMakePreviewCharSetAddress1 = 0x004F71DE;
static DWORD WingMakePreviewCharSetAddress2 = 0x004F717D;


_asm
{
Mov Ecx,Dword Ptr Ss:[Ebp+0x0C]
Movzx Edx,Byte Ptr Ds:[Ecx+0x10]
Sar Edx,0x01
And Edx,0x0FF
Test Edx,Edx
Je EXIT
Mov Eax,Dword Ptr Ss:[Ebp+0x0C]
Movzx Ecx,Byte Ptr Ds:[Eax+0x10]
Sar Ecx,0x01
And Ecx,0x0FF
Sub Ecx,0x01
Push Ecx
Lea Ecx,gCustomWing
Call [CCustomWing::CheckCustomWing]
Test Eax,Eax
Je EXIT
Mov Edx,Dword Ptr Ss:[Ebp+0x0C]
Movzx Eax,Byte Ptr Ds:[Edx+0x10]
Sar Eax,0x01
And Eax,0x0FF
Sub Eax,0x01
Push Eax
Lea Ecx,gCustomWing
Call [CCustomWing::GetCustomWingItem]
Add Eax,ITEM_BASE_MODEL
Mov Ecx,Dword Ptr Ss:[Ebp-0x08]
Mov Word Ptr Ds:[Ecx+0x1C0],Ax
Jmp [WingMakePreviewCharSetAddress1]
EXIT:
Mov Eax,Dword Ptr Ss:[Ebp-0x04]
And Eax,0xFF
Jmp [WingMakePreviewCharSetAddress2]
}
}

Credits
s00x
boris160
 
Last edited:
Joined
Oct 29, 2007
Messages
1,267
Reaction score
1,284
Why in asm bro ?... I can't understand this :mellow: If this code is for Season 8 main.exe (packed/obsfuscated main.exe code) then I can understand.. but If this source code is for: Season 6.3 1.04d main.exe or 4.6 then... is not more easy make decompilation and directly re-program all function using: C++ variant (using: IDA Pseudo-code) ?

PS: I'm only saying... and sure that you know that: Assembler Inline code, I mean... using calling convention: __declspec(naked) for function from a function: C/C++ is ugly/poor code, that if you don't know exactly what are you making... can be: NO-Stable.
 
Last edited:
Newbie Spellweaver
Joined
Aug 2, 2017
Messages
6
Reaction score
2
Why in asm bro ?... I can't understand this :mellow: If this code is for Season 8 main.exe (packed/obsfuscated main.exe code) then I can understand.. but If this source code is for: Season 6.3 1.04d main.exe or 4.6 then... is not more easy make decompilation and directly re-program all function using: C++ variant (using: IDA Pseudo-code) ?

PS: I'm only saying... and sure that you know that: Assembler Inline code, I mean... using calling convention: __declspec(naked) for function from a function: C/C++ is ugly/poor code, that if you don't know exactly what are you making... can be: NO-Stable.

the code is totally stable, and in my current version, it's a decompilation... its just to help a member of the community.
 
Newbie Spellweaver
Joined
Sep 9, 2013
Messages
87
Reaction score
12
I used it for S9 client, if I go with #define MAX_CUSTOM_WING 15 then It's all fine but if I will set bigger value like ex. 16 or topic default 40 then main is not starting. What's wrong with that ?
 
Newbie Spellweaver
Joined
Sep 24, 2015
Messages
97
Reaction score
35
how can I raise the effect limit 300 > 3000
#define MAX_CUSTOM_WING_EFFECT 3000

the client does not start
 
Back
Top