Added EVENT_COMBINE_VALIDATE to facilitate special case tradeskill combines

This commit is contained in:
Uleat
2019-11-18 19:39:03 -05:00
parent 598204d75c
commit a325a9978b
6 changed files with 59 additions and 1 deletions
+9
View File
@@ -392,6 +392,15 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
}
}
// final check for any additional quest requirements .. "check_zone" in this case - exported as variable [validate_type]
if (parse->EventPlayer(EVENT_COMBINE_VALIDATE, user, fmt::format("check_zone {}", zone->GetZoneID()), spec.recipe_id) != 0) {
user->Message(Chat::Emote, "You cannot make this combine because the location requirement has not been met.");
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
safe_delete(outapp);
return;
}
// Send acknowledgement packets to client
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);