mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Bug Fix] #augmentitem bypasses augment restrictions (#3332)
* [Bug Fix] #augmentitem bypasses augment restrictions # Notes - `Object::HandleAugmentation` did not properly check for `augrestrict` values. This allowed augment restrictions to be bypassed with `#augmentitem` or anything else that uses this method. - `Client::SummonItem` already properly checked these, so I just broke it out into a `Client::IsAugmentRestricted()` method. * Update item_instance.h
This commit is contained in:
+12
-1
@@ -117,7 +117,18 @@ void Object::HandleAugmentation(Client* user, const AugmentItem_Struct* in_augme
|
||||
return;
|
||||
}
|
||||
|
||||
if (!RuleB(Inventory, AllowMultipleOfSameAugment) && tobe_auged->ContainsAugmentByID(auged_with->GetID())) {
|
||||
if (
|
||||
RuleB(Inventory, EnforceAugmentRestriction) &&
|
||||
user->IsAugmentRestricted(tobe_auged->GetItemType(), auged_with->GetAugmentRestriction())
|
||||
) {
|
||||
user->MessageString(Chat::Red, AUGMENT_RESTRICTED);
|
||||
return;
|
||||
}
|
||||
|
||||
if (
|
||||
!RuleB(Inventory, AllowMultipleOfSameAugment) &&
|
||||
tobe_auged->ContainsAugmentByID(auged_with->GetID())
|
||||
) {
|
||||
user->Message(Chat::Red, "Error: Cannot put multiple of the same augment in an item.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user