EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=590)
-   -   Mercenaries (https://www.eqemulator.org/forums/showthread.php?t=35147)

bad_captain 01-26-2013 05:32 PM

Today, I committed the initial spell casting code & AI. The spell data is in the mercs.sql file, which should be rerun. With this commit, healers should heal and tanks will use their aggro discs. I'm still working on dps mercs. For now, stances don't factor in, but will be added in soon.

Another issue I'm working on is the built in merc focus effects. I have most of the data, they are just not implemented yet.

Feel free to comment.

Noport 01-26-2013 05:40 PM

i picked up on another opcode that might have to with mercs found in 1-16-13 patch [OPCode: 0x27af] OP_MercenaryUnknown2 [Server->Client] [Size: 68] Merc Name????????*** i'll look back on patch 12/12/12 and see if i can find it. 0x38e3 12/12/12 [Size: 68]

all found in patch 1-16-13
Code:

[OPCode: 0x60a8] OP_ZoneEntry [Client->Server] [Size: 76] Players Mercenary or Quest,Corpse,Mercenary Liaison, a_diseased_spiderling's_corpse
[OPCode: 0x39a1] OP_MercenaryTimerRequest [Client->Server] [Size: 0]
[OPCode: 0x6e0e] OP_MercenaryUnknown1 [Server->Client] [Size: 1]
[OPCode: 0x35cc] OP_GroupFollow [Server->Client] [Size: 148] Char Name with Merc Name
[OPCode: 0x27af] OP_MercenaryUnknown2 [Server->Client] [Size: 68] Merc Name????????***
[OPCode: 0x1919] OP_MercenaryDataUpdateRequest [Client->Server] [Size: 0]
[OPCode: 0x27a5] OP_MercenaryList [Server->Client] [Size: 94] Merc Name  ??? OP_MercenaryDataUpdate
[OPCode: 0x5de1] OP_Find [Server->Client] [Size: 112] Blightfire Moors Zone, Banker Etc, Quest,Mercenary Liaison ?? OP_SendFindableNPCs


Shiny151 01-26-2013 06:25 PM

Quote:

Originally Posted by bad_captain (Post 217133)
Today, I committed the initial spell casting code & AI. The spell data is in the mercs.sql file, which should be rerun. With this commit, healers should heal and tanks will use their aggro discs. I'm still working on dps mercs. For now, stances don't factor in, but will be added in soon.

Another issue I'm working on is the built in merc focus effects. I have most of the data, they are just not implemented yet.

Feel free to comment.

Great work. Looks to be working okay so far. They are buffing me; only thing I've noticed right away is I'm getting continuously spammed by their upkeep cost. Not tried combat with them yet. Thanks captain, impressive so far. Look forward to future updates.

gibroni 01-26-2013 07:00 PM

is there a specific order to run the sql for mercs? wanted to try em out, but having issues trying to run those sql's. only getting errors with em.

bad_captain 01-26-2013 07:31 PM

From the changelog:
REQUIRED SQL: utils/sql/svn/2383_required_group_ismerc.sql -- adds ismerc column to group_id table
OPTIONAL SQL: utils/sql/svn/2380_optional_merc_rules.sql -- Contains rules for mercs including rule to enable mercs
OPTIONAL SQL: utils/sql/svn/2380_optional_merc_merchant_npctypes_update.sql -- Contains npc_types & spawn updates for merc merchants in PoK
OPTIONAL SQL: utils/sql/svn/2380_optional_merc_data.sql -- Contains basic merc data, template info, & merc merchant entries
OPTIONAL SQL: utils/sql/svn/mercs.sql

Do them in that order. Actually, you just need to do 2380_optional_merc_merchant_npctypes_update.sql before 2380_optional_merc_data.sql, before mercs.sql

The rules one and isMerc for group_id can be done whenever.

sorvani 01-26-2013 07:31 PM

run mercs.sql last.

gibroni 01-26-2013 08:08 PM

thanks, that worked for the most part. at the end of sourcing the last one (mercs.sql) i get an error that says " column spell_id cannot be null". gives me four of those errors right at the end.

bad_captain 01-26-2013 09:07 PM

Yeah, that happens if the spells_new table doesn't have all of the correct spells. On the default peq spells_new (at least from a while ago), many if not most of the 75-80 spells are duplicates of the 70-75 spells, so it's not matching the spell name.

You can remove the ones it didn't find by doing:
DELETE FROM merc_spell_list_entries WHERE spell_id = 0;

Or, update the spells_new table to have all of the correct spells.

I'll see if I can add the missing spells as needed later.

gibroni 01-26-2013 10:44 PM

ok just a question now that i had a second to install and see it for myself. Upkeep is charging every 3 minutes, not sure if that has been changed, but back a few years when i played upkeep was charged every 10 minutes.


nm i see it can be set in the db

trevius 01-26-2013 11:14 PM

Yeah, I think the SQL for the upkeep cost was committed as testing settings, where it is easier to tell if upkeep is working properly when you don't have to wait 15 minutes between each one. On live, it is 15 minutes for upkeep and 3 minutes for the suspend interval. If you want to set that, you can run the following SQL:

Code:

UPDATE rule_values SET rule_value = 900000 WHERE rule_name = 'Mercs:UpkeepIntervalMS';
UPDATE rule_values SET rule_value = 900 WHERE rule_name = 'Mercs:UpkeepIntervalS';
UPDATE rule_values SET rule_value = 180000 WHERE rule_name = 'Mercs:SuspendIntervalMS';
UPDATE rule_values SET rule_value = 180 WHERE rule_name = 'Mercs:SuspendIntervalS';

I think the upkeep timers are still a bit flakey, but hopefully we can get that stuff ironed out along with a few other things soon.

gibroni 01-27-2013 03:05 AM

noticed that after zoning the mercs mana goes to zero. so it isnt retaining their mana when zoning.

bad_captain 01-27-2013 01:43 PM

Yeah, nothing is saved currently. I plan on working on buffs & other stuff in the next couple days.

Drajor 02-04-2013 11:27 AM

I left Trevius a message on IRC but I am really not sure who this should go to.
After looking into the dbstr_us.txt file changes I was able to pull out data for 2375 mercs. The data includes ID, Race, Type, Confidence, Proficiency and Tier.

Anyone want it?

bad_captain 02-04-2013 04:01 PM

What's in there that's not already in game? I haven't looked at RoF to see if there were any new mercs, but the rest should be in there ( then again, half or more of them are only available through expansion purchases, special merchant contracts, and other methods that may not be available in game).

Drajor 02-05-2013 12:17 AM

Quote:

Originally Posted by bad_captain (Post 217672)
What's in there that's not already in game? I haven't looked at RoF to see if there were any new mercs, but the rest should be in there ( then again, half or more of them are only available through expansion purchases, special merchant contracts, and other methods that may not be available in game).

I don't know. I haven't played live since PoP!

thepoetwarrior 02-07-2013 11:35 AM

Some of these rule values seem duplicated.

Mercs:SuspendIntervalMS
Mercs:SuspendIntervalS

Mercs:UpkeepIntervalMS
Mercs:UpkeepIntervalS

Mercs:AggroRadius
Mercs:AggroRadiusPuller

Is one or the other obsolete?

bad_captain 02-07-2013 08:47 PM

The top two sets are, and I think were done for convenience. The last pair are not, as it allows two different aggro radii, depending on if the mob's target is the puller or not (puller radius is smaller, or they would run out to attack before you want them to.)

trevius 02-08-2013 12:39 PM

Here are the default rule settings from ruletypes.h for the merc timer stuff:

Code:

RULE_INT (Mercs, SuspendIntervalMS, 10000)
RULE_INT (Mercs, UpkeepIntervalMS,  180000)
RULE_INT (Mercs, SuspendIntervalS, 10)
RULE_INT (Mercs, UpkeepIntervalS, 180)


I dunno why they were done in seconds and ms, since we could just multiple or divide by 1000 in the source to switch from seconds to ms. I think the reasoning was because some places use seconds and some use ms, so it might be a bit less resources to not have to do the math even though the math is pretty simple/quick. We can probably remove whichever rule is used the least and just do the math for the seconds or ms depending on which one is kept. Either way, for now, just make sure they are the same amount of time for the MS and S rules with the same name (as shown in the defaults).

To be Live-Like, the UpkeepIntervals should actually be 15 minutes, otherwise you get spammed every 3 minutes about upkeep costs. Currently, upkeep costs are disabled until the merc stuff is more finalized, so there is no actual charge that happens, just a message about it.

Thuz989 02-24-2013 10:56 PM

I would love to see mercs succeed. That being said here is what i am observing..

ROF clients trying to zone with most mercs = zone crash Ill have to compile with debug and try this...

Cleric mercs just chain cast group loyalty buffs
Cleric mercs just keep chain casting group hp buff if it cant buff pet of PC.

When you dismis a bot, it still hows on your screen, and is targetable, but strangely enough you can do anything to it. Still shows in group. Zoning seems to clear the issue ONLY for the PC that zoned. everyone else can still see merc in group and standing there doing nothing.

After you dismiss a merc it is not deleted from database.

I realize its an enormous amount of work, and i appreciate your efforts.

Shiny151 02-25-2013 01:29 AM

Quote:

Originally Posted by bad_captain (Post 217830)
The top two sets are, and I think were done for convenience. The last pair are not, as it allows two different aggro radii, depending on if the mob's target is the puller or not (puller radius is smaller, or they would run out to attack before you want them to.)

So since the 2/18 merc update with:

REQUIRED SQL: 2013_02_18_Merc_Rules_and_Tables.sql
OPTIONAL SQL: 2013_02_18_Merc_Spells.sql

...is the mercs.sql in the utils\sql\svn still required as well?

myeqsf 02-25-2013 07:40 AM

How unlock mercs slot one more?

trevius 02-25-2013 08:18 AM

Quote:

Originally Posted by myeqsf (Post 218842)
How unlock mercs slot one more?

That is not possible yet in EQEmu. The only client we have that can even support that option is RoF. And there are probably some new packets that deal with owning multiple mercs that we have not yet looked into.

bad_captain 02-25-2013 09:51 AM

Quote:

Originally Posted by Shiny151 (Post 218837)
So since the 2/18 merc update with:

REQUIRED SQL: 2013_02_18_Merc_Rules_and_Tables.sql
OPTIONAL SQL: 2013_02_18_Merc_Spells.sql

...is the mercs.sql in the utils\sql\svn still required as well?

No, from now on, all sql scripts will be in the git folder. They are basically the same file.


Edit: the file referenced in my git commit about merc spells is the same as the one you referenced. The earlier files are required as they add the necessary tables, if this is an initial install. If it is just an update, then just use the version in the git sql folder.

Thuz989 02-25-2013 11:41 AM

Can this code even work anymore now that mercs have own table?? I assume they dont have NPC ids that i have seen?? I assume since they dont have a special attack field this wont ever be true?

Code:

//try main hand first
                                if(attack_timer.Check()) {
                                        Attack(GetTarget(), SLOT_PRIMARY);

                                        bool tripleSuccess = false;

                                        if(GetOwner() && GetTarget() && CanThisClassDoubleAttack()) {

                                                if(GetOwner()) {
                                                        Attack(GetTarget(), SLOT_PRIMARY, true);
                                                }

                                                if(GetOwner() && GetTarget() && SpecAttacks[SPECATK_TRIPLE]) {
                                                        tripleSuccess = true;
                                                        Attack(GetTarget(), SLOT_PRIMARY, true);
                                                }

                                                //quad attack, does this belong here??
                                                if(GetOwner() && GetTarget() && SpecAttacks[SPECATK_QUAD]) {
                                                        Attack(GetTarget(), SLOT_PRIMARY, true);
                                                }
                                        }


bad_captain 02-25-2013 11:59 AM

I haven't tested it specifically, but mercs have a specialattks field. They also have an attack_count field. I'm pretty sure I've at least seen my merc triple, but I'd have to look. I dont think there's any data in the specialattks field, whereas attack_count should match where client get double, triple, and quad attacks. I know there will be a lot of little things that need tweaked, but I am focusing on the major issues right now.

The best way to test is to parse or do some debugging to see for sure.

Shiny151 02-25-2013 12:01 PM

Quote:

Originally Posted by bad_captain (Post 218847)
No, from now on, all sql scripts will be in the git folder. They are basically the same file.


Edit: the file referenced in my git commit about merc spells is the same as the one you referenced. The earlier files are required as they add the necessary tables, if this is an initial install. If it is just an update, then just use the version in the git svn folder.

Okay great because how you described the update is how i followed it. I just wanted to make sure i didn't miss anything. And by the way, thank for for working on Mercs; I have a half a dozen folks who play on my server and we have really been enjoying the greater possibilities they bring. We appreciate all the work you've done to bring this to us.

Armm 02-25-2013 09:49 PM

Using ROF and UF client with latest 32 bit GIT build, running latest PEQ and patches, up to and including git sql patches.

These problems happen on both ROF and UF clients every time:

Suspend and Dismiss merc leaves merc standing there, targetable, but only has an entity number. Cant use #kill or #damage on him. If you zone you cant see them anymore.


With 2PC in group with mercs, if you suspend a bot, UNSUSPEND him and then zone, you end up with 2 mercs with same name in database. Repeat and you get more mercs in database with same name. The old ones show as suspended. If you start chain dismissing them you can get rid of some but not all of dupes.


Assuming 2 PCs and mercs in group, 1 tank merc, 1 healer merc... 2 pets. Healer will chain cast loyalty group buff series because it wont stick on pets im guessing. Get rid of pets, problem goes away.


Thank you for working on mercs! they seem to zone better than bots. If the ghost/dupe thing was figured out it would be great.

bad_captain 02-26-2013 01:44 AM

I'm working on the dismiss/suspend issue. I'm not sure why that broke, but I'm working on it.

I'll check out the duplicate save entries as well.

About the spell, do you mean Blessing of Loyalty, the spell haste buff? I'll have to look more into this, as I don't see this issue at 65. What level and what kind of pet?

Thanks for the feedback.


Edit: I think I've fixed the duplicate saves, and will try to commit tomorrow after more testing.

myeqsf 02-26-2013 05:00 AM

Quote:

Originally Posted by trevius (Post 218846)
That is not possible yet in EQEmu. The only client we have that can even support that option is RoF. And there are probably some new packets that deal with owning multiple mercs that we have not yet looked into.

I realize its an enormous amount of work, and i appreciate your efforts.

Armm 02-26-2013 08:47 AM

I had level 85 characters, not sure what level the spell is but the spell haste cleric buff yes. If you have pets in the group who dont have pet affinity ( and thus cant get buffs) the cleric chain casts it. If you give the characters pet affinity, the buff sticks on pets and the clerics stop casting it.

bad_captain 02-26-2013 10:07 AM

Gotcha. Thanks, that should give me what I need. I was using pet affinity, so that's why I didn't see it.

Now, a good question would be why a level 85 character wouldn't have pet affinity.. :)

Armm 02-26-2013 05:01 PM

For servers that pets can be used by all classes :) Yes i will likely change AA but i thought id let you know because ive seen it happen on bots also.

Thank you for your willingness to converse about this stuff. It is appreciated.

Armm 02-27-2013 07:25 PM

I am not sure if this is the right place for this but since it happens only when i am trying to purchase a fungusman or orc tier 2 journeyman healer. Right after i purchase them the zone crashes... debug info below (this is using ROF client)

Code:

---------------------------------------------
[02.27. - 17:15:14] Starting Log: logs/crash_zone_3860.log
[02.27. - 17:15:14] EXCEPTION_ACCESS_VIOLATION
[02.27. - 17:15:14] SymInit: Symbol-SearchPath: '.;C:\EQEMU;C:\EQEMU;C:\Windows;C:\Windows\system32;SRV*C:\websymbols*http://msdl.microsoft.com/download/symbols;', symOptions: 530, UserName: 'Administrator'
[02.27. - 17:15:14] OS-Version: 6.2.9200 () 0x110-0x3
[02.27. - 17:15:14] C:\EQEMU\zone.exe:zone.exe (00D00000), size: 24731648 (result: 0), SymType: 'PDB', PDB: 'C:\EQEMU\zone.exe'
[02.27. - 17:15:14] C:\Windows\SYSTEM32\ntdll.dll:ntdll.dll (777D0000), size: 1404928 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\ntdll.dll', fileVersion: 6.2.9200.16420
[02.27. - 17:15:14] C:\Windows\SYSTEM32\KERNEL32.DLL:KERNEL32.DLL (76680000), size: 1245184 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\KERNEL32.DLL', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\KERNELBASE.dll:KERNELBASE.dll (77420000), size: 679936 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\KERNELBASE.dll', fileVersion: 6.2.9200.16451
[02.27. - 17:15:14] C:\Windows\system32\apphelp.dll:apphelp.dll (71850000), size: 684032 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\apphelp.dll', fileVersion: 6.2.9200.16420
[02.27. - 17:15:14] C:\Windows\AppPatch\AcLayers.DLL:AcLayers.DLL (70530000), size: 2555904 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\AppPatch\AcLayers.DLL', fileVersion: 6.2.9200.16420
[02.27. - 17:15:14] C:\Windows\SYSTEM32\msvcrt.dll:msvcrt.dll (75440000), size: 724992 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\msvcrt.dll', fileVersion: 7.0.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\USER32.dll:USER32.dll (76E50000), size: 1138688 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\USER32.dll', fileVersion: 6.2.9200.16420
[02.27. - 17:15:14] C:\Windows\SYSTEM32\GDI32.dll:GDI32.dll (76A10000), size: 1036288 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\GDI32.dll', fileVersion: 6.2.9200.16433
[02.27. - 17:15:14] C:\Windows\SYSTEM32\SHELL32.dll:SHELL32.dll (75500000), size: 17588224 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\SHELL32.dll', fileVersion: 6.2.9200.16496
[02.27. - 17:15:14] C:\Windows\SYSTEM32\SHLWAPI.dll:SHLWAPI.dll (76F70000), size: 262144 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\SHLWAPI.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\OLEAUT32.dll:OLEAUT32.dll (774D0000), size: 569344 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\OLEAUT32.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\MPR.dll:MPR.dll (727D0000), size: 77824 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\MPR.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\SETUPAPI.dll:SETUPAPI.dll (75020000), size: 1765376 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\SETUPAPI.dll', fileVersion: 6.2.9200.16496
[02.27. - 17:15:14] C:\Windows\SYSTEM32\sfc.dll:sfc.dll (746B0000), size: 12288 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\sfc.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\WINSPOOL.DRV:WINSPOOL.DRV (719D0000), size: 393216 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\WINSPOOL.DRV', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\RPCRT4.dll:RPCRT4.dll (751D0000), size: 704512 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\RPCRT4.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\combase.dll:combase.dll (77150000), size: 1269760 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\combase.dll', fileVersion: 6.2.9200.16420
[02.27. - 17:15:14] C:\Windows\SYSTEM32\CFGMGR32.dll:CFGMGR32.dll (76C10000), size: 286720 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\CFGMGR32.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\DEVOBJ.dll:DEVOBJ.dll (768E0000), size: 122880 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\DEVOBJ.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\SspiCli.dll:SspiCli.dll (74E60000), size: 114688 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\SspiCli.dll', fileVersion: 6.2.9200.16420
[02.27. - 17:15:14] C:\Windows\SYSTEM32\sfc_os.DLL:sfc_os.DLL (71900000), size: 57344 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\sfc_os.DLL', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\CRYPTBASE.dll:CRYPTBASE.dll (74E50000), size: 36864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\CRYPTBASE.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\sechost.dll:sechost.dll (74F80000), size: 212992 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\sechost.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\bcryptPrimitives.dll:bcryptPrimitives.dll (74DF0000), size: 331776 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\bcryptPrimitives.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\system32\IMM32.DLL:IMM32.DLL (76E10000), size: 131072 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\IMM32.DLL', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\MSCTF.dll:MSCTF.dll (74E80000), size: 905216 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\MSCTF.dll', fileVersion: 6.2.9200.16496
[02.27. - 17:15:14] C:\Perl\bin\perl512.dll:perl512.dll (28000000), size: 1273856 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\bin\perl512.dll', fileVersion: 5.12.3.1204
[02.27. - 17:15:14] C:\Windows\SYSTEM32\WS2_32.dll:WS2_32.dll (76BC0000), size: 327680 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\WS2_32.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\VERSION.dll:VERSION.dll (73840000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\VERSION.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\ADVAPI32.dll:ADVAPI32.dll (76B10000), size: 712704 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\ADVAPI32.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.dll:COMCTL32.dll (76900000), size: 552960 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.9200.16384_none_bf100cd445f4d954\COMCTL32.dll', fileVersion: 5.82.9200.16384
[02.27. - 17:15:14] C:\Windows\SYSTEM32\NSI.dll:NSI.dll (74F60000), size: 32768 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\NSI.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\system32\napinsp.dll:napinsp.dll (74D00000), size: 65536 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\napinsp.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\system32\NLAapi.dll:NLAapi.dll (74CF0000), size: 65536 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\system32\NLAapi.dll', fileVersion: 6.2.9200.16420
[02.27. - 17:15:14] C:\Windows\System32\mswsock.dll:mswsock.dll (74DA0000), size: 303104 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\mswsock.dll', fileVersion: 6.2.9200.16433
[02.27. - 17:15:14] C:\Windows\SYSTEM32\DNSAPI.dll:DNSAPI.dll (74C70000), size: 479232 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\DNSAPI.dll', fileVersion: 6.2.9200.16420
[02.27. - 17:15:14] C:\Windows\System32\winrnr.dll:winrnr.dll (74C60000), size: 36864 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\winrnr.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\Windows\System32\rasadhlp.dll:rasadhlp.dll (731D0000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\rasadhlp.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] C:\EQEMU\EMuShareMem.DLL:EMuShareMem.DLL (71910000), size: 622592 (result: 0), SymType: 'PDB', PDB: 'C:\EQEMU\EMuShareMem.DLL'
[02.27. - 17:15:14] C:\Perl\lib\auto\Cwd\Cwd.dll:Cwd.dll (10000000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\Cwd\Cwd.dll'
[02.27. - 17:15:14] C:\Perl\lib\auto\DBI\DBI.dll:DBI.dll (03020000), size: 98304 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\DBI\DBI.dll'
[02.27. - 17:15:14] C:\Perl\lib\auto\List\Util\Util.dll:Util.dll (04CC0000), size: 28672 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\List\Util\Util.dll'
[02.27. - 17:15:14] C:\Perl\lib\auto\Filter\Util\Call\Call.dll:Call.dll (04CD0000), size: 20480 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\Filter\Util\Call\Call.dll'
[02.27. - 17:15:14] C:\Perl\lib\auto\IO\IO.dll:IO.dll (04CE0000), size: 24576 (result: 0), SymType: '-exported-', PDB: 'C:\Perl\lib\auto\IO\IO.dll'
[02.27. - 17:15:14] C:\Windows\System32\fwpuclnt.dll:fwpuclnt.dll (740E0000), size: 258048 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\System32\fwpuclnt.dll', fileVersion: 6.2.9200.16465
[02.27. - 17:15:14] C:\Windows\SYSTEM32\dbghelp.dll:dbghelp.dll (71170000), size: 1216512 (result: 0), SymType: '-exported-', PDB: 'C:\Windows\SYSTEM32\dbghelp.dll', fileVersion: 6.2.9200.16384
[02.27. - 17:15:14] c:\eqemu\eqemuserver\zone\client_packet.cpp (13639): Client::Handle_OP_MercenaryHire
[02.27. - 17:15:14] c:\eqemu\eqemuserver\zone\client_packet.cpp (472): Client::HandlePacket
[02.27. - 17:15:14] c:\eqemu\eqemuserver\zone\client_process.cpp (712): Client::Process
[02.27. - 17:15:14] c:\eqemu\eqemuserver\zone\entity.cpp (509): EntityList::MobProcess
[02.27. - 17:15:14] c:\eqemu\eqemuserver\zone\net.cpp (492): main
[02.27. - 17:15:14] f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (278): __tmainCRTStartup
[02.27. - 17:15:14] f:\dd\vctools\crt_bld\self_x86\crt\src\crt0.c (189): mainCRTStartup
[02.27. - 17:15:14] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 766A8543)
[02.27. - 17:15:14] 766A8543 (KERNEL32): (filename not available): BaseThreadInitThunk
[02.27. - 17:15:14] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 7782AC69)
[02.27. - 17:15:14] 7782AC69 (ntdll): (filename not available): RtlInitializeExceptionChain
[02.27. - 17:15:14] ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 7782AC3C)
[02.27. - 17:15:14] 7782AC3C (ntdll): (filename not available): RtlInitializeExceptionChain


Armm 02-27-2013 07:32 PM

Happens whenever you purchase a merc and you are over level 85. Somewhat expected but i was suprised it crashed the zone. FYI

trevius 02-28-2013 03:25 AM

Odd, I thought I had fixed that particular crash and committed the fix, but maybe I only fixed it on my own server and forgot to commit it.

The problem is that in the handling for hiring a merc in client_packet.cpp, it makes the call to LoadMerc(), and then spawns the merc without first making sure it actually got one returned. I highlighted the line below where the issue is. We just need an "if (merc)" added right below that line to prevent the crash.
Code:

void Client::Handle_OP_MercenaryHire(const EQApplicationPacket *app)
{
// The payload is 16 bytes. First four bytes are the Merc ID (Template ID)
if(app->size != sizeof(MercenaryMerchantRequest_Struct))
{
LogFile->write(EQEMuLog::Debug, "Size mismatch in OP_MercenaryHire expected %i got %i", sizeof(MercenaryMerchantRequest_Struct), app->size);

DumpPacket(app);

return;
}

MercenaryMerchantRequest_Struct* mmrq = (MercenaryMerchantRequest_Struct*) app->pBuffer;
uint32 merc_template_id = mmrq->MercID;
uint32 merchant_id = mmrq->MercMerchantID;
uint32 merc_unk1 = mmrq->MercUnk01;
uint32 merc_unk2 = mmrq->MercUnk02;

DumpPacket(app);

if(MERC_DEBUG > 0)
Message(7, "Mercenary Debug: Template ID (%i), Merchant ID (%i), Unknown1 (%i), Unknown2 (%i)", merc_template_id, merchant_id, merc_unk1, merc_unk2);

//HirePending = true;
SetHoTT(0);
SendTargetCommand(0);

MercTemplate* merc_template = zone->GetMercTemplate(merc_template_id);

if(merc_template) {

if (GetMercID()) {
// 6 - You must dismiss the mercenary before hiring a new one.
SendMercMerchantResponsePacket(6);
}
else
{
// 0 is approved hire request
SendMercMerchantResponsePacket(0);

// Set time remaining to max on Hire
GetEPP().mercTimerRemaining = RuleI(Mercs, UpkeepIntervalMS);

// Get merc, assign it to client & spawn
Merc* merc = Merc::LoadMerc(this, merc_template, merchant_id);
SpawnMerc(merc);
}
}

}


bad_captain 02-28-2013 09:37 AM

I have this fix in (as well as others) , I just need some time to merge in all the recent changes and commit. The issue is there is only merc data through lvl 85. On my next stat update, I'll try to add merc data through lvl 100, since RoF can be used.

I've just been crazy busy and haven't had a chance to commit (I've also been trying to track down the depop bug).

bad_captain 03-01-2013 01:24 AM

It should no longer crash if a merc can't spawn, but I will have to add in mercs to 100 when I get a chance. It's more of an issue for spells and such for those levels as I have a script I use to generate the stats, but I'll see what i can do.

Armm 03-01-2013 08:52 AM

Thank you for that update! I hear yah on the crazy busy.

Armm 03-01-2013 12:26 PM

i compiled the latest version alright, i went to source in the merc_rules_and_equipment.sql statement and i get errors about primary key for first two lines which i fixed because they already exist...

However alter table also got tripped up claiming it couldnt find mercbuffs, in my case it was already named properly to merc_buffs??

The final error i couldnt get past and i tried this in mysqldump and heidesql... once it get to the part where it wants to create merc_inventory it throws an error saying..

Code:

DROP TABLE IF EXISTS merc_inventory;
CREATE TABLE merc_inventory (
        merc_inventory_id              int(10) unsigned NOT NULL auto_increment,
        merc_subtype_id              int(10) unsigned NOT NULL default '0',
        item_id                  int(11) unsigned NOT NULL default '0',
        min_level              int(10) unsigned NOT NULL default '0',
        max_level                  int(10) unsigned NOT NULL default '0',
        PRIMARY KEY  (merc_inventory_id),
        KEY FK_merc_inventory_1 (merc_subtype_id),
        CONSTRAINT FK_merc_inventory_1 FOREIGN KEY (merc_subtype_id) REFERENCES merc_subtypes (merc_subtype_id)
);
/* SQL Error (1005): Can't create table 'peq.merc_inventory' (errno: 150)

Foreign key constraint is incorrectly formed */


Armm 03-01-2013 01:05 PM

Also if you do a SHOW INNODB STATUS you get this relevant portion..

Code:

LATEST FOREIGN KEY ERROR\n------------------------\n130301 10:49:53 Error in foreign key constraint of table peq/merc_inventory:\n FOREIGN KEY (merc_subtype_id) REFERENCES merc_subtypes (merc_subtype_id)):\nCannot resolve table name close to:\n (merc_subtype_id))\n------------\n


All times are GMT -4. The time now is 10:39 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.