Jump to content

AME

Inactive Member
  • Posts

    3
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by AME

  1. Hi,

    I have problem in transfer pet system when add any pet dont monky in box and open box again give me monky !!!!

    like : when add namyer pet in tansfer box and open it again give me monky pet @@ !!!   

     

    any help ?

     

    this part for tansfer box in char_item.cpp

    Spoiler

        if (item->GetVnum() >= 55701 && item->GetVnum() <= 55704) {
            LPITEM item2;

            if (item2 = GetItem(DestCell)) {
                if (item2->GetVnum() == 55002) 
                {
                    if(item2->GetAttributeValue(0) > 0){
                        ChatPacket(CHAT_TYPE_INFO, "Cutia are deja un animalut inauntru.");
                    }
                    else
                    {
                        if (!IsValidItemPosition(DestCell) || !(item2 = GetItem(DestCell)))
                            return false;

                        if (item2->IsExchanging())
                            return false;

                        if (GetNewPetSystem()->IsActivePet()) {
                            ChatPacket(CHAT_TYPE_INFO, "You have to unsummon your pet first.");
                            return false;
                        }


                        for (int b = 0; b < 3; b++) {
                            item2->SetSocket(b, item->GetSocket(b));
                        }

                        item2->SetForceAttribute(0, 1, item->GetAttributeValue(0));
                        item2->SetForceAttribute(1, 1, item->GetAttributeValue(1));
                        item2->SetForceAttribute(2, 1, item->GetVnum()-55701);
                        DBManager::instance().DirectQuery("UPDATE new_petsystem SET id =%d WHERE id = %d", item2->GetID(), item->GetID());
                        ITEM_MANAGER::instance().RemoveItem(item);
                        return true;
                    }
                }
            }
        }


        if (item->GetVnum() == 55002 && item->GetAttributeValue(0) > 0) {

            int pos = GetEmptyInventory(item->GetSize());
            if(pos == -1)
            {
                ChatPacket(CHAT_TYPE_INFO, "You don't have enought space.");
                return false;
            }

            if (item->IsExchanging())
                return false;

            LPITEM item2 = AutoGiveItem(55701+item->GetSocket(2), 1);
            for (int b = 0; b < 3; b++) {
                item2->SetForceAttribute(b, 1, item->GetAttributeValue(b));
            }
            item2->SetForceAttribute(3, 1, item->GetAttributeValue(3));
            item2->SetForceAttribute(4, 1, item->GetAttributeValue(4));
            item2->SetSocket(1,item->GetSocket(1));
            DBManager::instance().DirectQuery("UPDATE new_petsystem SET id =%d WHERE id = %d", item2->GetID(), item->GetID());
            ITEM_MANAGER::instance().RemoveItem(item);
            return true;

        }

     

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.