Code: Select all
case Deities:
Dest.DWord = 0;
// count bits
cmp = GetItemFromContents(pItem)->Diety;
for (N = 0; N < 15; N++)
{
if (cmp&(1 << N))
Dest.DWord++;
}
Dest.Type = pIntType;
return true;
case Deity:
if (ISINDEX())
{
if (ISNUMBER())
{
DWORD Count = GETNUMBER();
if (!Count)
return false;
cmp = GetItemFromContents(pItem)->Diety;
for (N = 0; N < 15; N++)
{
if (cmp&(1 << N))
{
Count--;
if (Count == 0)
{
Dest.DWord = N + 200;
Dest.Type = pDeityType;
return true;
}
}
}
}
else
{
// by name
cmp = GetItemFromContents(pItem)->Diety;
for (N = 0; N < 16; N++) {
if (cmp&(1 << N)) {
if (!_stricmp(GETFIRST(), pEverQuest->GetDeityDesc(N + 200))) {
Dest.DWord = N + 200;
Dest.Type = pDeityType;
return true;
}
}
}
return false;
}
}
return false;
Code: Select all
case Deities:
Dest.DWord = 0;
// count bits
cmp = GetItemFromContents(pItem)->Diety;
for (N = 0; N < 16; N++)
{
if (cmp&(1 << N))
Dest.DWord++;
}
Dest.Type = pIntType;
return true;
case Deity:
if (ISINDEX())
{
if (ISNUMBER())
{
DWORD Count = GETNUMBER();
if (!Count)
return false;
cmp = GetItemFromContents(pItem)->Diety;
for (N = 0; N < 16; N++)
{
if (cmp&(1 << N))
{
Count--;
if (Count == 0)
{
Dest.DWord = N + 200;
Dest.Type = pDeityType;
return true;
}
}
}
}
else
{
// by name
cmp = GetItemFromContents(pItem)->Diety;
for (N = 0; N < 16; N++) {
if (cmp&(1 << N)) {
if (!_stricmp(GETFIRST(), pEverQuest->GetDeityDesc(N + 200))) {
Dest.DWord = N + 200;
Dest.Type = pDeityType;
return true;
}
}
}
return false;
}
}
return false;

