Jump to content
  • 0

Need Help With Char_Item.cpp


xbruntix

Question

Greetings! This will be my first post on the forum!

I'm currently working on an attribute system. I've played around with case USE_ADD_ATTRIBUTE codes but got stuck at one point.

The system uses an item "71353" which gives a specific attribute "APPLY_STR" to sword item.

The code seems to work but the problem is that everytime I try to use the item, I get random attributes on the sword.

Any help would be appreciated!

Quote

case USE_ADD_ATTRIBUTE3:
                                    if (item2->GetAttributeCount() < 4)
                                    {
                                        if (item->GetVnum() == 71353)
                                        {
                                            if (item2->GetType() == ITEM_WEAPON)
                                            {
                                                item2->ClearAttribute();
                                                item2->SetForceAttribute(0, APPLY_STR, 5); //Güç +5
                                                ChatPacket(CHAT_TYPE_INFO, "Başarıyla Eklendi");
                                            }
                                        }
                                        item->SetCount(item->GetCount() - 1);
                                    }
                                    else
                                    {
                                        ChatPacket(CHAT_TYPE_INFO, "Eklenemedi");
                                    }
                                    break;

item_length.h > defined case USE_ADD_ATTRIBUTE3

Link to comment
Share on other sites

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


×
×
  • 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.