LCKB
Pet Bug (June Files) - Printable Version

+- LCKB (https://lckb.dev/forum)
+-- Forum: ** OLD LCKB DATABASE ** (https://lckb.dev/forum/forumdisplay.php?fid=109)
+--- Forum: Guides & Help Section (https://lckb.dev/forum/forumdisplay.php?fid=193)
+---- Forum: Help & Support (https://lckb.dev/forum/forumdisplay.php?fid=157)
+----- Forum: Ep4 Support (https://lckb.dev/forum/forumdisplay.php?fid=128)
+----- Thread: Pet Bug (June Files) (/showthread.php?tid=4837)



- PTR321 - 11-08-2021


Hi, 

i have a bug with the P2 Pets in the June Files so if i have equipped a P1 pet sometimes it also equips or shows me that i have equipped 2 Pets P1 and P2 Pet but just if i have another Pet in my Inventory. it looks like this

does anyone know the fix for this bug?

 /monthly_2021_11/Screenshot_244.png.ed8c140029b605dde1663432e41afda4.png" />




- Desarija - 11-08-2021


I have the same bug when i log in having ichi or scrachi in my inventory xd




- PTR321 - 11-12-2021


Found that the pet gets bugged if I have a pony in my inventory because if I login and it equips  2 pets it shows me the name Chang Thai - pony and than it’s bugged till I delete the pet 




- Joker - 11-13-2021


Maybe stop using crap files

 




- Nikolee - 11-25-2021


Did you truncate your tables?

 

Can you show a screenshot of t_apet and t_pet? 

 

I know this issue, i had a similar problem in the 2009 code which i fixxed




- PTR321 - 11-27-2021


Fixxed the problem was in the WearInvenManager can be closed 




- kravens - 11-28-2021


show the fix?




- PTR321 - 11-28-2021


WearInvenManager.cpp

Change in June Files

        _owner->m_inventory.addItemToInvenIndex(takeOffItem, tab, invenIndex);

to

        if(_owner->m_inventory.isUsable(tab) == true)

        {

            _owner->m_inventory.addItemToInvenIndex(takeOffItem, tab, invenIndex);

        }

        else

        {

            _owner->m_inventory.addItem(takeOffItem);

        }




- nicolasg - 12-02-2022


Has anyone had a similar problem, when having several pets in the inventory randomly, when entering the game any of these are eliminated?




- Cryden - 04-16-2023


WearInvenManager.cpp around l 86 



CAPet* pet = _owner->GetAPet(takeOffWearItem->getPlus());

            if( pet )

            {

                //if( pet && pet->IsMount() )

                    pet->Mount(false);

                pet->m_nDelay = pet->m_pProto->m_nDelay ;

                pet->Disappear();

            }



comment out this part like in the example above: if( pet && pet->IsMount() )