PDA

View Full Version : Bot bug


Thuz989
12-29-2012, 10:02 AM
Hi,

There is a repeatable bug in source code rev 2334 (32 bit) fresh build using PEQ 2294 and the sql required 2300 stated below..

ALTER TABLE `character_` ADD COLUMN `inspectmessage` VARCHAR(256) NOT NULL DEFAULT '';
ALTER TABLE `bots` ADD COLUMN `BotInspectMessage` VARCHAR(256) NOT NULL DEFAULT '';


What is happening is that logging in with seemingly any character(tried 59 warrior and 65 mage), making a mage or beastlord BOT, and the mage or BST BOT summon a pet, then you try to zone or log out and it crashes the zone.

If i make a mage or beast BOT and then zone quickly before they have a chance to cast pet i can zone ok.

I have tried dropping and readding all bot pet tables, no change.

Rolling back code until this is figured out, anyone else run into this and have a workaround?

Thuz989
12-29-2012, 10:34 AM
Addition that rolling back code to 2314 fixes the issue.

Is this associated with the pet buff fix in the next revision??

Thuz989
12-29-2012, 10:49 AM
Confirmed it breaks again in the same way in revision 2322

Thuz989
12-29-2012, 11:25 AM
if i updated to 2337 and then replace zonedb.cpp things seem to work fine..

this piece of code seems to cause the problem from 3222..

Modify /trunk/EQEmuServer/zone/zonedb.cpp diff
...
2109 2109 }
2110 2110 safe_delete_array(query);
2111 2111
2112 - for(i=0; i<BUFF_COUNT; i++) {
2112 + for(i=0; i < RuleI(Spells, MaxTotalSlotsNPC); i++) {
2113 2113 if (petinfo->Buffs[i].spellid != SPELL_UNKNOWN && petinfo->Buffs[i].spellid != 0) {
2114 2114 database.RunQuery(query, MakeAnyLenString(&query,
2115 2115 "INSERT INTO `character_pet_buffs` (`char_id`, `pet`, `slot`, `spell_id`, `caster_level`, "
...
2241 2241 continue;
2242 2242
2243 2243 uint32 slot_id = atoul(row[1]);
2244 - if(slot_id >= BUFF_COUNT) {
2244 + if(slot_id >= RuleI(Spells, MaxTotalSlotsNPC)) {
2245 2245 continue;
2246 2246 }
2247 2247

sorvani
12-29-2012, 02:03 PM
The max buff slot code was changed to accommodate new player limits and we found that if pets have more than 25 buff slots it causes issues. originally all the buff slots were hard coded to max 25.
We fixed players last night but I do not have a bots compiled server or database. I'll look at adding in more logic here to handle pets.

Thuz989
12-29-2012, 02:44 PM
Thank you!!

sorvani
12-29-2012, 02:52 PM
this should be resolved in r2340.