Detransformation of mold type ornamentations.

This commit is contained in:
Natedog2012 2014-11-27 13:05:50 -08:00 committed by Michael Cook (mackal)
parent f0881d4aa9
commit 4e3842b9d8
2 changed files with 19 additions and 0 deletions

View File

@ -298,6 +298,7 @@
#define GUILD_BANK_EMPTY_HANDS 6108 // You must empty your hands to withdraw from the Guild Bank. #define GUILD_BANK_EMPTY_HANDS 6108 // You must empty your hands to withdraw from the Guild Bank.
#define TRANSFORM_FAILED 6326 //This mold cannot be applied to your %1. #define TRANSFORM_FAILED 6326 //This mold cannot be applied to your %1.
#define TRANSFORM_COMPLETE 6327 //You have successfully transformed your %1. #define TRANSFORM_COMPLETE 6327 //You have successfully transformed your %1.
#define DETRANSFORM_FAILED 6341 //%1 has no transformation that can be removed.
#define GENERIC_STRING 6688 //%1 (used to any basic message) #define GENERIC_STRING 6688 //%1 (used to any basic message)
#define SENTINEL_TRIG_YOU 6724 //You have triggered your sentinel. #define SENTINEL_TRIG_YOU 6724 //You have triggered your sentinel.
#define SENTINEL_TRIG_OTHER 6725 //%1 has triggered your sentinel. #define SENTINEL_TRIG_OTHER 6725 //%1 has triggered your sentinel.

View File

@ -304,6 +304,24 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
return; return;
} }
if (container->GetItem()->BagType == BagTypeDetransformationmold) {
const ItemInst* inst = container->GetItem(0);
if (inst && inst->GetOrnamentationIcon() && inst->GetOrnamentationIcon()) {
const Item_Struct* new_weapon = inst->GetItem();
user->DeleteItemInInventory(Inventory::CalcSlotId(in_combine->container_slot, 0), 0, true);
container->Clear();
user->SummonItem(new_weapon->ID, inst->GetCharges(), inst->GetAugmentItemID(0), inst->GetAugmentItemID(1), inst->GetAugmentItemID(2), inst->GetAugmentItemID(3), inst->GetAugmentItemID(4), inst->IsInstNoDrop(), MainCursor, 0, 0);
user->Message_StringID(4, TRANSFORM_COMPLETE, inst->GetItem()->Name);
}
else if (inst) {
user->Message_StringID(4, DETRANSFORM_FAILED, inst->GetItem()->Name);
}
EQApplicationPacket* outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
user->QueuePacket(outapp);
safe_delete(outapp);
return;
}
DBTradeskillRecipe_Struct spec; DBTradeskillRecipe_Struct spec;
if (!database.GetTradeRecipe(container, c_type, some_id, user->CharacterID(), &spec)) { if (!database.GetTradeRecipe(container, c_type, some_id, user->CharacterID(), &spec)) {
user->Message_StringID(MT_Emote,TRADESKILL_NOCOMBINE); user->Message_StringID(MT_Emote,TRADESKILL_NOCOMBINE);