Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Flyff > Flyff Private Server
You last visited: Today at 17:23

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



CBuffPet::Release - How does it work?

Discussion on CBuffPet::Release - How does it work? within the Flyff Private Server forum part of the Flyff category.

Reply
 
Old   #1
 
Offspringfan1234's Avatar
 
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
CBuffPet::Release - How does it work?

Hallo Epvpers,

Ich würde gerne wie der Titel schon sagt gerne diese Funktion verstehen:


Die Funktion wird gecallt, wenn man ein normales Pet (Unicorn, Lion, Tiger, etc) deaktiviert. Die Parameter des Pets werden scheinbar mit Buffs gehandelt. HIWORD und LOWORD von GetLevel() holen sich den Parameter sowie den Wert des Parameters vom aktuell aktivierten Pet.

- Wie aber funktioniert das?
- Wäre es möglich hier weitere Parameter des Pets abzufragen - wenn ja wie?

Wäre über jeden Tipp sehr dankbar, gerne auch über andere Messenger oder pn.

Liebe Grüße Offspring
Offspringfan1234 is offline  
Old 04/12/2016, 08:49   #2
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
If I recall, LOWORD returns the first 2 bytes of the value inserted into it, and HIWORD returns the last 2 bytes.
Avalion is offline  
Old 04/12/2016, 09:14   #3
 
Mognakor's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 465
Quote:
Originally Posted by Avalion View Post
If I recall, LOWORD returns the first 2 bytes of the value inserted into it, and HIWORD returns the last 2 bytes.
PC's usually use Little-Endian-Architecture, thus LOWORD returns the last 2 bytes because they store the lower values.


@:

Was willst du erreichen?
Mit etwas Fantasie und Können geht alles.
Mognakor is offline  
Old 04/12/2016, 17:34   #4
 
Offspringfan1234's Avatar
 
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
Mehr oder weniger habe ich das ja schon gesagt. Im Moment ruft er damit den einen Parameter und dessen Value vom Pet ab. Wenn man nun aber Pets mit mehreren Parametern hat, wie kann man es dann realisieren? Ich habe das im Moment mit einem ganz anderen Weg gelöst, da mir die Byte Variante aber neu ist würde ich diese gerne verstehen (was ich jetzt tue) und wissen ob es mit der Variante auch möglich ist mehrere Parameter + Value's abzurufen.

Vielen Dank schonmal!
Offspringfan1234 is offline  
Old 04/12/2016, 18:32   #5
 
Mognakor's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 465
Die Flyff Methode dass ein Pet ein Buff ist etc. ist designtechnischer Irrsinn.

Objekte die offensichtlich verschieden sind, sollten durch verschiedene Klassen realisiert werden.

Da die Methode ohnehin bereits der Klasse "CBuffPet" angehört gibt es keinen Grund Daten in Variablen zu verpacken die dafür nicht vorgesehen sind. Arbeitsspeicher hat heutzutage jeder Rechner mehr als genug also kommt es auf ein paar Byte mehr oder weniger auch nicht an.

Dafür verhindern eigene Variablen Bugs und funktionieren bei ordentlicher Benennung als Teil der Dokumentation auch ganz ohne Kommentare.

Am besten postest du mal deine Lösung.
Mognakor is offline  
Old 04/13/2016, 10:23   #6
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
Quote:
Originally Posted by Mognakor View Post
PC's usually use Little-Endian-Architecture, thus LOWORD returns the last 2 bytes because they store the lower values.
intsafe.h
Code:
#define LOWORD(_dw)     ((WORD)(((DWORD_PTR)(_dw)) & 0xffff))
#define HIWORD(_dw)     ((WORD)((((DWORD_PTR)(_dw)) >> 16) & 0xffff))
Avalion is offline  
Old 04/13/2016, 11:17   #7
 
Mognakor's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 465
Quote:
Originally Posted by Avalion View Post
intsafe.h
Code:
#define LOWORD(_dw)     ((WORD)(((DWORD_PTR)(_dw)) & 0xffff))
#define HIWORD(_dw)     ((WORD)((((DWORD_PTR)(_dw)) >> 16) & 0xffff))
The last bytes are on the right side..

Little-Endian Bit-Pattern:
Code:
fedc ba98 7654 3210
Big-Endian Bit-Pattern:
Code:
0123 4567 89ab cdef
Notice how HIWORD is shifted towards the end before using bit-AND.
Mognakor is offline  
Old 04/13/2016, 12:04   #8
 
elite*gold: 294
Join Date: Jun 2009
Posts: 407
Received Thanks: 587
Quote:
Originally Posted by Mognakor View Post
The last bytes are on the right side..
I was reading from right to left, which is why I was saying the 'last' two bytes were the 'first' two bytes.
Avalion is offline  
Old 04/27/2016, 22:39   #9
 
Offspringfan1234's Avatar
 
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
I'm sorry that I haven't answered for such a while, but due to a stupid occurence my source got killed and I had to reset the source x)

Now I'm back on track and still try to make this pet-parameter thingy possible.

The interessting function is this one I guess:


So with the #ifdef's you're able to see what I've changed.
But since all kinds of pets, so also buff-pets are using this function, I have to be really careful if I change something.
So The HasPet() function still returns FALSE, even if the EatPet (Just a normal Pet) is active. And so the Params are added in the tick-time of the worldserver and u get like every second the stats of the pet which should only be added once.

Any suggestion on how to do it the smartest way?

Thanks in advice!

Offspring
Offspringfan1234 is offline  
Old 04/27/2016, 23:53   #10
 
Mognakor's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 465
Can you just write a concise description what you are trying to achieve.

aka.

WHY you want to understand the function.


Assuming FlyFF is programmed properly, you should be able to simply add/remove Buffs in the functions for using/unusing the pet.
Mognakor is offline  
Old 04/28/2016, 09:06   #11
 
Offspringfan1234's Avatar
 
elite*gold: 0
Join Date: Jan 2012
Posts: 147
Received Thanks: 24
Maybe u could just add me on skype? I guess it's easier to explain things
Offspringfan1234 is offline  
Old 04/28/2016, 09:55   #12
 
Mognakor's Avatar
 
elite*gold: 0
Join Date: Mar 2008
Posts: 598
Received Thanks: 465
nope
Mognakor is offline  
Reply


Similar Threads Similar Threads
[Release] S4L Pen To AP wtf SRL WORK
12/16/2015 - S4 League Hacks, Bots, Cheats & Exploits - 12 Replies
12345678900ß1234567890ß12345678901234567890ß234567 8901234567890123456789
[RELEASE]F-CF MOD 3.4 [WORK]
04/13/2011 - CrossFire Hacks, Bots, Cheats & Exploits - 23 Replies
#closen bitte !!! DETECTED !!!
[Release] ReXIGNation (Anti-Xigncode+CRC Bypass) spam here work/no work
07/19/2010 - Dekaron - 9 Replies
F>Y>I the bypass still work for me reinstall the game and run the bypasss with Cheat engine only, no winhex or any other way will make you DC right away when log in, am a vista user and i testes 3 different way and only CE work now hope this help u guy :mofo:



All times are GMT +1. The time now is 17:23.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.