Hi devs, I focused this easy topic on extra managing attributes by GMs (testing new bonus stuff etc)
Here we go:
open cmd_gm.cpp and find
ACMD(do_change_attr)
next replace whole function with
ACMD(do_change_attr)
{
char cArg1[256];
one_argument(argument, cArg1, sizeof(cArg1));
if (!*cArg1)
{
ch->ChatPacket(CHAT_TYPE_INFO, "Syntax: /change_attr <EWearPositions>");
return;
}
BYTE byType = 0;
str_to_number(byType, cArg1);
BYTE byFlags = WEAR_BODY | WEAR_HEAD | WEAR_FOOTS | WEAR_WRIST | WEAR_WEAPON | WEAR_NECK | WEAR_EAR | WEAR_SHIELD;
assert(byFlags & ~(WEAR_MAX-1) == 0);
if (byFlags & byType)
{
LPITEM item = ch->GetWear(byType);
if (item)
item->ChangeAttribute();
}
}
That's it. Usage /change_attr and one argument based on EWearPositions enum in length.h (from 0 to 10 excluding 7,8,9)
As you can see this function could be easily adapted to your needs. Try add more arguments and set sth. In this form you can also enable particular wear flags to be opened to if statement or.. disable some Do it similarly with add attribute function (or rare attr), just remember to change last function to thier equivalents.
Post feedback and have nice day.