Merge branch 'master' into bot-rewrite

This commit is contained in:
nytmyr
2025-01-27 12:14:34 -06:00
23 changed files with 665 additions and 738 deletions
+11 -6
View File
@@ -3260,11 +3260,11 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
if (!new_aug) { // Shouldn't get the OP code without the augment on the user's cursor, but maybe it's h4x.
LogError("AugmentItem OpCode with 'Insert' or 'Swap' action received, but no augment on client's cursor");
Message(Chat::Red, "Error: No augment found on cursor for inserting.");
return;
break;
} else {
if (!RuleB(Inventory, AllowMultipleOfSameAugment) && tobe_auged->ContainsAugmentByID(new_aug->GetID())) {
Message(Chat::Red, "Error: Cannot put multiple of the same augment in an item.");
return;
break;
}
if (
@@ -3348,7 +3348,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
in_augment->augment_index
).c_str()
);
return;
break;
}
item_one_to_push = tobe_auged->Clone();
@@ -3420,7 +3420,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
}
} else {
Message(Chat::Red, "Error: Could not find augmentation to remove at index %i. Aborting.", in_augment->augment_index);
return;
break;
}
old_aug = tobe_auged->RemoveAugment(in_augment->augment_index);
@@ -3453,7 +3453,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
if (!PutItemInInventory(EQ::invslot::slotCursor, *item_two_to_push, true)) {
LogError("Problem returning augment to player's cursor after safe removal");
Message(Chat::Yellow, "Error: Failed to return augment after removal from item!");
return;
break;
}
}
break;
@@ -3498,7 +3498,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
in_augment->augment_index
).c_str()
);
return;
break;
}
tobe_auged->DeleteAugment(in_augment->augment_index);
@@ -3519,6 +3519,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
if (material != EQ::textures::materialInvalid) {
SendWearChange(material);
}
break;
default: // Unknown
LogInventory(
@@ -3532,9 +3533,12 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
);
break;
}
safe_delete(item_one_to_push);
safe_delete(item_two_to_push);
} else {
Object::HandleAugmentation(this, in_augment, m_tradeskill_object); // Delegate to tradeskill object to perform combine
}
return;
}
@@ -10896,6 +10900,7 @@ void Client::Handle_OP_MoveMultipleItems(const EQApplicationPacket *app)
InterrogateInventory(this, true, false, true, error);
}
}
safe_delete(mi);
}
// This is the swap.
// Client behavior is just to move stacks without combining them