[COLOR="#808080"]
// honor points price
if (GetHonorPoints() < (iece->reqhonorpoints * count))
{
SendEquipError(EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS, NULL, NULL);
return false;
}
[/COLOR]
[COLOR="#808080"]
// honor points price
if (GetHonorPoints() < (iece->reqhonorpoints * count))
{
[COLOR="#FFD700"]//[/COLOR] SendEquipError(EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS, NULL, NULL);
[COLOR="#FFD700"]ChatHandler(GetSession()).PSendSysMessage("The `%s` requires %u Honor Points.", pProto->Name1, (iece->reqhonorpoints * count));[/COLOR]
return false;
}
[/COLOR]
[COLOR="#808080"]
// SendEquipError(EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS, NULL, NULL);
[/COLOR]
[COLOR="#808080"]
ChatHandler(GetSession()).PSendSysMessage("The `%s` requires %u Honor Points.", pProto->Name1, (iece->reqhonorpoints * count));
[/COLOR]
[COLOR="#808080"]
// arena points price
if (GetArenaPoints() < (iece->reqarenapoints * count))
{
[COLOR="#FFD700"]//[/COLOR] SendEquipError(EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS, NULL, NULL);
[COLOR="#FFD700"] ChatHandler(GetSession()).PSendSysMessage("The `%s` requires %u Arena Points.", pProto->Name1, (iece->reqarenapoints * count));[/COLOR]
return false;
}
[/COLOR]
[COLOR="#808080"]
// item base price
for (uint8 i = 0; i < MAX_ITEM_EXTENDED_COST_REQUIREMENTS; ++i)
{
if (iece->reqitem[i] && !HasItemCount(iece->reqitem[i], (iece->reqitemcount[i] * count)))
{
[COLOR="#FFD700"]//[/COLOR] SendEquipError(EQUIP_ERR_VENDOR_MISSING_TURNINS, NULL, NULL);
[COLOR="#FFD700"] ItemTemplate const* item = sObjectMgr->GetItemTemplate(iece->reqitem[i]);[/COLOR]
[COLOR="#FFD700"]ChatHandler(GetSession()).PSendSysMessage("The `%s` requires %u %s.", pProto->Name1, (iece->reqitemcount[i] * count), item->Name1);[/COLOR]
return false;
}
}
[/COLOR]
[COLOR="#808080"]
if (crItem->ExtendedCost)
{
bool return_type = true;
ItemExtendedCostEntry const* iece = sItemExtendedCostStore.LookupEntry(crItem->ExtendedCost);
if (!iece)
{
TC_LOG_ERROR("entities.player", "Item %u has wrong ExtendedCost field value %u", pProto->ItemId, crItem->ExtendedCost);
return_type = false;
}
// honor points price
if (GetHonorPoints() < (iece->reqhonorpoints * count))
{
// SendEquipError(EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS, NULL, NULL);
ChatHandler(GetSession()).PSendSysMessage("The `%s` requires %u Honor Points.", pProto->Name1, (iece->reqhonorpoints * count));
return_type = false;
}
// arena points price
if (GetArenaPoints() < (iece->reqarenapoints * count))
{
// SendEquipError(EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS, NULL, NULL);
ChatHandler(GetSession()).PSendSysMessage("The `%s` requires %u Arena Points.", pProto->Name1, (iece->reqarenapoints * count));
return_type = false;
}
// item base price
for (uint8 i = 0; i < MAX_ITEM_EXTENDED_COST_REQUIREMENTS; ++i)
{
if (iece->reqitem[i] && !HasItemCount(iece->reqitem[i], (iece->reqitemcount[i] * count)))
{
// SendEquipError(EQUIP_ERR_VENDOR_MISSING_TURNINS, NULL, NULL);
ItemTemplate const* item = sObjectMgr->GetItemTemplate(iece->reqitem[i]);
ChatHandler(GetSession()).PSendSysMessage("The `%s` requires %u %s.", pProto->Name1, (iece->reqitemcount[i] * count), item->Name1);
return_type = false;
}
}
// check for personal arena rating requirement
if (GetMaxPersonalArenaRatingRequirement(iece->reqarenaslot) < iece->reqpersonalarenarating)
{
// probably not the proper equip err
// SendEquipError(EQUIP_ERR_CANT_EQUIP_RANK, NULL, NULL);
ChatHandler(GetSession()).PSendSysMessage("The `%s` requires %u Personal Arena Rating.", pProto->Name1, iece->reqpersonalarenarating);
return_type = false;
}
return return_type;
}
[/COLOR]
Wow, I'm speechless ... it was exactly what I was looking for thanks again for the support, speechless!
:clap2: :clap2: :clap2: :clap2: :clap2: :clap2: