Jump to content
  • We need you!

    You must register to discover all the features of our community!

  • 0

Restrict god blessing from quickslots


skizz

Question

Hello , i m trying to restrict the 6 item named "god blessing" from the quick slot
vnum : 71027, 71028, 71029, 71030, 71044, 71045
I m trying to change it in : char_quickslot.cpp

void CHARACTER::ChainQuickslotItem(LPITEM pItem, BYTE bType, BYTE bOldPos)
{
    if (pItem->IsDragonSoul() || pItem->GetVnum() == 71028 || pItem->GetVnum() == 71029 || pItem->GetVnum() == 71030 || pItem->GetVnum() == 71027 || pItem->GetVnum() == 71045 || pItem->GetVnum() == 71044)
        return;

But still no result, i get no error while compiling, but i still can use the items on the quickslot.

Does any1 know how to block using the quickslot after teleport or login? to avoid the usage of bugs like damage bug

Link to post

4 answers to this question

Recommended Posts

  • 0

UserInterface/PythonItemModule.cpp

PyObject * itemCanAddToQuickSlotItem(PyObject * poSelf, PyObject * poArgs):

//Find
	if (!pItemData)
		return Py_BuildException("Can't find select item data");

///Add
	static const auto block = { 71027, 71028, 71029, 71030, 71044, 71045 };
	if (std::find(block.begin(), block.end(), static_cast<decltype(block)::value_type>(pItemData->GetIndex())) != block.end())
		return Py_BuildValue("i", FALSE);

 

no paid service

use at least c++11 and VS19, otherwise I won't help.

Link to post

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.