#ifdef NEW_PVM_ATTRIBUTE
case 78210 : // ???
{
LPITEM item2;
BYTE bApply = APPLY_PVM_NORM_HIT_BONUS;
if (!IsValidItemPosition (DestCell) || ! (item2 = GetInventoryItem (wDestCell)))
{
return false;
}
if (item2->IsExchanging() == true)
{
return false;
}
if (item2->GetAttributeSetIndex() == -1)
{
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("??? ??? ? ?? ??????."));
return false;
}
if (item2->GetAttributeCount() < 5)
{
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("en_az_5_efsun"));
return false;
}
short sValue = 10;
BYTE p = number (1, 100);
if (p >= 98)
{
sValue = number (9, 10);
}
else if (p >= 90 && p < 98)
{
sValue = number (6, 8);
}
else
{
sValue = number (1, 5);
}
if (item2->GetType() == ITEM_WEAPON || item2->GetType() == ITEM_ARMOR)
{
if (item2->GetAttributeType (5) == bApply)
{
item2->RemoveAttributeAt (5);
item2->SetForceAttribute (5, bApply, sValue);
}
else
{
item2->SetForceAttribute (5, bApply, sValue);
}
}
item->SetCount (item->GetCount() - 1);
}
break;
case 78211 : // ???
{
LPITEM item2;
BYTE bApply = APPLY_PVM_NORM_HIT_BONUS;
if (!IsValidItemPosition (DestCell) || ! (item2 = GetInventoryItem (wDestCell)))
{
return false;
}
if (item2->IsExchanging() == true)
{
return false;
}
if (item2->GetAttributeSetIndex() == -1)
{
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("??? ??? ? ?? ??????."));
return false;
}
if (item2->GetAttributeCount() < 5)
{
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("en_az_5_efsun"));
return false;
}
short sValue = 10;
BYTE p = number (1, 100);
if (p >= 98)
{
sValue = number (19, 20);
}
else if (p >= 90 && p < 98)
{
sValue = number (15, 18);
}
else
{
sValue = number (11, 14);
}
if (item2->GetType() == ITEM_WEAPON || item2->GetType() == ITEM_ARMOR)
{
if (item2->GetAttributeType (5) == bApply)
{
item2->RemoveAttributeAt (5);
item2->SetForceAttribute (5, bApply, sValue);
}
else
{
item2->SetForceAttribute (5, bApply, sValue);
}
}
item->SetCount (item->GetCount() - 1);
}
break;
case 78212 : // ???
{
LPITEM item2;
BYTE bApply = APPLY_PVM_NORM_HIT_BONUS;
if (!IsValidItemPosition (DestCell) || ! (item2 = GetInventoryItem (wDestCell)))
{
return false;
}
if (item2->IsExchanging() == true)
{
return false;
}
if (item2->GetAttributeSetIndex() == -1)
{
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("??? ??? ? ?? ??????."));
return false;
}
if (item2->GetAttributeCount() < 5)
{
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("en_az_5_efsun"));
return false;
}
short sValue = 10;
BYTE p = number (1, 100);
if (p >= 98)
{
sValue = number (28, 30);
}
else if (p >= 90 && p < 98)
{
sValue = number (25, 28);
}
else
{
sValue = number (21, 25);
}
if (item2->GetType() == ITEM_WEAPON || item2->GetType() == ITEM_ARMOR)
{
if (item2->GetAttributeType (5) == bApply)
{
item2->RemoveAttributeAt (5);
item2->SetForceAttribute (5, bApply, sValue);
}
else
{
item2->SetForceAttribute (5, bApply, sValue);
}
}
item->SetCount (item->GetCount() - 1);
}
break;
case 78213 : // ???
{
LPITEM item2;
BYTE bApply = APPLY_PVM_NORM_HIT_BONUS;
if (!IsValidItemPosition (DestCell) || ! (item2 = GetInventoryItem (wDestCell)))
{
return false;
}
if (item2->IsExchanging() == true)
{
return false;
}
if (item2->GetAttributeSetIndex() == -1)
{
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("??? ??? ? ?? ??????."));
return false;
}
if (item2->GetAttributeCount() < 5)
{
ChatPacket (CHAT_TYPE_INFO, LC_TEXT ("en_az_5_efsun"));
return false;
}
short sValue = 10;
BYTE p = number (1, 100);
if (p >= 98)
{
sValue = number (38, 40);
}
else if (p >= 90 && p < 98)
{
sValue = number (35, 38);
}
else
{
sValue = number (31, 35);
}
if (item2->GetType() == ITEM_WEAPON || item2->GetType() == ITEM_ARMOR)
{
if (item2->GetAttributeType (5) == bApply)
{
item2->RemoveAttributeAt (5);
item2->SetForceAttribute (5, bApply, sValue);
}
else
{
item2->SetForceAttribute (5, bApply, sValue);
}
}
item->SetCount (item->GetCount() - 1);
}
break;
#endif