can only repair at a repair vendor
This commit is contained in:
parent
ebcb1631a4
commit
9353cdbb39
@ -8490,7 +8490,7 @@ void Client::BuyItem(int32 item_id, int16 quantity) {
|
|||||||
|
|
||||||
void Client::RepairItem(int32 item_id) {
|
void Client::RepairItem(int32 item_id) {
|
||||||
Spawn* spawn = GetMerchantTransaction();
|
Spawn* spawn = GetMerchantTransaction();
|
||||||
if (spawn) {
|
if (spawn && (spawn->GetMerchantType() & MERCHANT_TYPE_REPAIR)) {
|
||||||
Item* item = player->item_list.GetItemFromID(item_id);
|
Item* item = player->item_list.GetItemFromID(item_id);
|
||||||
if (!item)
|
if (!item)
|
||||||
item = player->GetEquipmentList()->GetItemFromItemID(item_id);
|
item = player->GetEquipmentList()->GetItemFromItemID(item_id);
|
||||||
@ -8528,7 +8528,7 @@ void Client::RepairItem(int32 item_id) {
|
|||||||
|
|
||||||
void Client::RepairAllItems() {
|
void Client::RepairAllItems() {
|
||||||
Spawn* spawn = GetMerchantTransaction();
|
Spawn* spawn = GetMerchantTransaction();
|
||||||
if (spawn) {
|
if (spawn && (spawn->GetMerchantType() & MERCHANT_TYPE_REPAIR)) {
|
||||||
vector<Item*>* repairable_items = GetRepairableItems();
|
vector<Item*>* repairable_items = GetRepairableItems();
|
||||||
if (repairable_items && repairable_items->size() > 0) {
|
if (repairable_items && repairable_items->size() > 0) {
|
||||||
vector<Item*>::iterator itr;
|
vector<Item*>::iterator itr;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user