Hello,
I would like to change the range of ActionID. Now its from 100 to 65535, its INT, and I would like to change it to LongINT. Any idea how to do that?
EDIT:
It is very simple.
On item.h you have to change these lines :
into
ITEM.cpp
This:
into this:
Now you have range from 1(!!) to 4,294,967,295
Regards,
Mateusz
I would like to change the range of ActionID. Now its from 100 to 65535, its INT, and I would like to change it to LongINT. Any idea how to do that?
EDIT:
It is very simple.
On item.h you have to change these lines :
PHP:
void setActionId(uint16_t n) {setIntAttr(ATTR_ITEM_ACTIONID, (uint16_t)std::max((uint16_t)100, n));}
uint16_t getActionId() const {return getIntAttr(ATTR_ITEM_ACTIONID);}
PHP:
void setActionId(uint32_t n) {setIntAttr(ATTR_ITEM_ACTIONID, (uint32_t)std::max((uint32_t)1, n));}
uint32_t getActionId() const {return getIntAttr(ATTR_ITEM_ACTIONID);}
ITEM.cpp
This:
PHP:
uint16_t _actionid = 0;
if(!propStream.GET_USHORT(_actionid))
PHP:
uint32_t _actionid = 0;
uint16_t _actionid_a = 0;
if(propStream.GET_ULONG(_actionid))
setActionId(_actionid);
else
{
if( propStream.GET_USHORT(_actionid_a))
setActionId(_actionid_a);
else
return false;
}
Now you have range from 1(!!) to 4,294,967,295
Regards,
Mateusz
Last edited: