Thanks. Knowing how to put them in the lines was my main concern (syntax).
I can reference the functions anytime I forget something, which is often. Regardless, I got it to work and according to the logsys, it's working as intended, just as the graph shows. EDIT: btw Uleat, that's the exact page I used to figure it out =) |
Never said it was pretty:
Code:
double param, result; |
I removed the Spellshield and the "cast on other" messages which appear when attacking an npc with a rune. The Spellshield message seemed correct but, the "cast on other" message displays the damage shield "cast on other" each time the npc hits the client. This only occurs if the client has a DS and the NPC has a rune. The "was pierced by thorns" message also appears, as normal.
My main concern is if the second line I commented out will affect anything else. I tested this by casting a rune on myself and having an npc attack and dispel the rune. It appears to work normal. I left larger spaces between lines to accentuate the lines I commented out. Code:
\zone\attack.cpp(3548 - 3571) Thanks |
It's been about a week since I started making changes to my server code. I'm very green in this aspect but, I learn quickly and understand concepts more than syntax. I also understand the implications of things. Not everything though!
I want to thank those that have given assistance if I haven't already. My question/issue at the bottom. I've added a few lines to <\zone\zonedb.cpp(3177)> and created a couple rules <\common\ruletypes.h(151) - RULE_CATEGORY(Pets)>. It works as I expected. Below is what I added: ruletypes.h Code:
RULE_BOOL(Pets, PetZonePersistence, true) // if true, pets will zone with players Code:
void ZoneDatabase::LoadPetInfo(Client *client) Code:
Added lines to remove pet persistence after 30 minutes when logged off - `ZoneDatabase::LoadPetInfo` - \zone\zonedb.cpp(3177) Code:
- issue remains on logging out and keeping pet for 30 min if `PetZonePersistence` is false I am open to suggestions. Thanks |
Check out where this is being called: https://github.com/EQEmu/Server/blob...ocess.cpp#L757 ..
.. in this function: https://github.com/EQEmu/Server/blob...cket.cpp#L1685 Very similar methodology for norent (temporary) items. |
I pored over NoRentExpired, bool deletenorent and some other areas until I came to zonedb and saw some things I was familiar with. As this is all so foreign to me, knowing what to search for and then processing it consumes much more time than actually changing it to something different.
I was thinking of trying to work it in with the norent code but, my concern was with keeping suspended pets suspended. My intention was to cover as many possibilities as I could think of with that. The difference with no rent items and what I'm trying to do is the additional option of having pets poof when zoning (a la classic) while not having them go away like norent items when logging for under 30 minutes. It really isn't a big deal as far as the game goes. I enjoy trying to solve the problem. Thanks for the response, it got me thinking about it a little different. |
Adding that methodology to LoadPets will cause that to be processed every time that LoadPets is called..as in zone changes.
You may need to split the methodology up to have one portion processed on zone entry, and the other on zone change. You could create handlers for the actions that you want to process in Database(SharedDatabase?) (ref: https://github.com/EQEmu/Server/comm...5353f5ed8d8044) .. and handle the returns appropriately. I know it's a pain to figure out what does what, where and why..but, it comes with exposure. |
Yes! That's exactly what I was thinking (in regards to splitting it up) but didn't understand and still having a hard time understanding. I'll probably get it a little with, like you said, more exposure.
|
I am extremely slow when it comes to picking up new material...
Intellisense has been my friend since day one! |
I have to say that feature is wonderful, really helps in learning it.
Compiling the new code now. Hopefully it works. |
Epic EMU did some work on pets zoning, can look what they did here:
https://github.com/epicemu/Server/bl...oning.cpp#L329 |
Thank you!
I've used <SetPet(0);> as kinda my mulligan. (I've had a few) Trying to learn some other ways but... |
I think I figured the pet rules to work as they should. It took way too long to figure out but, I learned a bit more about the system.
Everything appears to work although client crashed twice during testing. I logged into the emu well over a dozen times. I am unsure if these rules will trump suspended minion AA. I will need to test that another time. I put a couple very simple lines into two places and reverted everything I did previous. Code:
near <void Client::BulkSendInventoryItems()> \zone\client_process.cpp(848) The following was put in just before what appears to send the client to the new coords, when zoning. This was a little more tricky because I didn't know how the zoning process worked. I ended up turning on all the logsys features to sleuth it out. Rencro made mention of this although at the time, I couldn't make sense of it. If this could be improved, please let me know. Thanks for your help. |
I would probably move your 'log persistence' check to here: https://github.com/EQEmu/Server/blob...cket.cpp#L1628
.. you could even make the database.LoadPetsInfo(this) call an else clause of the con check (PetLogPersistence == true) I'm not 100% sure..but, that may clear up your client crashes too. (Looks like the profile packet was already sent to the client - with pet info - and you were deleting the pet on the server afterwards.) Mixing system methodologies can lead to issues down the road if you need to make changes, or if changes are made, to a code section. The 'zone persistence' is probably ok (didn't look at the actual location) .. but, consider what you want to default behavior to be in case of a server crash, client ld, etc... (Some) players will find a way to manipulate your best thought plans..even accidental actions can lead to exploitable discoveries. |
Yes, the pets actually show up on the UI for a fraction of a second after logging in. I have been watching what happens in the DB the entire time and...
Quote:
The zone part deletes the entry immediately. I will make it better. It's not exactly how I want even though it functions. I'll check this out a little later, let it sit for a bit. Thanks for your help. EDIT: I tried as many variations as there are in that exact location you recommended Uleat. Although, I did not try anything after moving the bit to \zoning.cpp. I think I've let it sit long enough. |
All times are GMT -4. The time now is 02:59 AM. |
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.