Jump to content

Change Adder/Switchers from permanent to normal


Recommended Posts

Hey.

I've searched the site for removing the permanent switchers/adders. From the guides to make an item permanent, they say I need to edit this 

if (!g_bUnlimitedAddAttributes)
	item->SetCount(item->GetCount() - 1);
	break;

How do I edit this in char_item to make them lose 1 when used? Do I just delete the column, or?

Appreciate all help 🙂

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Active+ Member
//Search for:
											LogManager::instance().ItemLog(this, item, "ADD_ATTRIBUTE_FAIL", buf);
										}

//Add after:
item->SetCount(item->GetCount() - 1);

//Search for:
										LogManager::instance().ItemLog(this, item, "CHANGE_ATTRIBUTE", buf);
									}

//Add after:
item->SetCount(item->GetCount() - 1);

 

With best regards,

Doose.

Link to comment
Share on other sites

Posted (edited)

I've changed it but it doesn't work. I've linked the code on the change attribute for vnum 71151. I've tried everything I can from my knowledge. Is there anything on here that looks odd to u that I need to change? And how would u change it

if (item->GetVnum() == 71151 || item->GetVnum() == 76023)
					{
						if ((item2->GetType() == ITEM_WEAPON) || (item2->GetType() == ITEM_ARMOR && item2->GetSubType() == ARMOR_BODY))
						{
							bool bCanUse = true;
							for (int i = 0; i < ITEM_LIMIT_MAX_NUM; ++i)
							{
								if (item2->GetLimitType(i) == LIMIT_LEVEL && item2->GetLimitValue(i) > 40)
								{
									bCanUse = false;
									break;
								}
							}
							if (false == bCanUse)
							{
								ChatPacket(CHAT_TYPE_INFO, LC_TEXT("���� �������� ���� ����� �Ұ����մϴ�."));
								break;
							}
						}
						else
						{
							ChatPacket(CHAT_TYPE_INFO, LC_TEXT("����� ���ʿ��� ��� �����մϴ�."));
							break;
						}
					}
					item2->ChangeAttribute();
				}

				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("�Ӽ��� �����Ͽ����ϴ�."));
				{
					char buf[21];
					snprintf(buf, sizeof(buf), "%u", item2->GetID());
					LogManager::instance().ItemLog(this, item, "CHANGE_ATTRIBUTE", buf);
				}
					item->SetCount(item->GetCount() - 1); 

 

Edited by DonEow
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



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