Jump to content

Block Enchant and Reinforce for weapons?


Go to solution Solved by Abel(Tiger),

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

  • Active+ Member
  • Solution

The official servers already did that for begginers weapons with antiflag.

Spoiler

/* 1. item_lenght.h <==> This step you need to repeat for ItemData.h (GameLib) */
// 1.1. Search:
	ITEM_ANTIFLAG_WOLFMAN		= (1 << 18),
// 1.1. Add after:
	ITEM_ANTIFLAG_REINFORCE		= (1 << 19),
	ITEM_ANTIFLAG_ENCHANT		= (1 << 20),
	
	
/* 2. char_item.cpp */
// 2.1. Search:
		case USE_CHANGE_ATTRIBUTE :
// 2.1. Add after:	< if(item2->GetAttributeSetIndex() == -1) >
			if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_ENCHANT))
			{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't change a bonus in this item."));
				return false;
			}
									
									
// 2.2. Search:
		case USE_ADD_ATTRIBUTE :
// 2.2. Add after:	< if (item2->GetAttributeSetIndex() == -1) >
			if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_REINFORCE))
			{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't add a bonus in this item."));
				return false;
			}
		
		
/* 3. ProtoReader.cpp <==> This step you need to repeat for ItemCSVReader.cpp (Dump Proto) */
// 3.1. Search:
	"ANTI_WOLFMAN",
// 3.1. Add after:
	"ANTI_REINFORCE", "ANTI_ENCHANT"
								

/* 4. PythonItemModule.cpp */
// 4.1. Search:
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_WOLFMAN",		CItemData::ITEM_ANTIFLAG_WOLFMAN);
// 4.1. Add after:
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_REINFORCE", 		CItemData::ITEM_ANTIFLAG_REINFORCE);
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_ENCHANT",		CItemData::ITEM_ANTIFLAG_ENCHANT);
								

 

 

  • Love 6
Link to comment
Share on other sites

  • Bot
4 hours ago, Abel(Tiger) said:

The official servers already did that for begginers weapons with antiflag.

  Reveal hidden contents


/* 1. item_lenght.h <==> This step you need to repeat for ItemData.h (GameLib) */
// 1.1. Search:
	ITEM_ANTIFLAG_WOLFMAN		= (1 << 18),
// 1.1. Add after:
	ITEM_ANTIFLAG_REINFORCE		= (1 << 19),
	ITEM_ANTIFLAG_ENCHANT		= (1 << 20),
	
	
/* 2. char_item.cpp */
// 2.1. Search:
		case USE_CHANGE_ATTRIBUTE :
// 2.1. Add after:	< if(item2->GetAttributeSetIndex() == -1) >
			if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_ENCHANT))
			{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't change a bonus in this item."));
				return false;
			}
									
									
// 2.2. Search:
		case USE_ADD_ATTRIBUTE :
// 2.2. Add after:	< if (item2->GetAttributeSetIndex() == -1) >
			if (IS_SET(item2->GetAntiFlag(), ITEM_ANTIFLAG_REINFORCE))
			{
				ChatPacket(CHAT_TYPE_INFO, LC_TEXT("You can't add a bonus in this item."));
				return false;
			}
		
		
/* 3. ProtoReader.cpp <==> This step you need to repeat for ItemCSVReader.cpp (Dump Proto) */
// 3.1. Search:
	"ANTI_WOLFMAN",
// 3.1. Add after:
	"ANTI_REINFORCE", "ANTI_ENCHANT"
								

/* 4. PythonItemModule.cpp */
// 4.1. Search:
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_WOLFMAN",		CItemData::ITEM_ANTIFLAG_WOLFMAN);
// 4.1. Add after:
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_REINFORCE", 		CItemData::ITEM_ANTIFLAG_REINFORCE);
	PyModule_AddIntConstant(poModule, "ITEM_ANTIFLAG_ENCHANT",		CItemData::ITEM_ANTIFLAG_ENCHANT);
								

 

 

It works perfectly. Thank you very much for the help.
:D

english_banner.gif

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.