EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Fix for Recipe : Skill Needed (https://www.eqemulator.org/forums/showthread.php?t=36345)

Drajor 01-26-2013 10:15 AM

Fix for Recipe : Skill Needed
 
I am using the skillneeded field in 'tradeskill_recipe' and when I tested it I noticed that it not being checked in the source.

Change in tradeskills.cpp

Search for:
Code:

        if ((spec.must_learn&0xF) == 1 && !spec.has_learnt) {
                // Made up message for the client. Just giving a DNC is the other option.
                user->Message(4, "You need to learn how to combine these first.");
                EQApplicationPacket* outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
                user->QueuePacket(outapp);
                safe_delete(outapp);
                return;
        }

And insert below:
Code:

        // Character does not have the required skill.
        if(spec.skill_needed > 0 && user->GetSkill(spec.tradeskill) < spec.skill_needed ) {
                // Notify client.
                user->Message(4, "You are not skilled enough.");
                EQApplicationPacket* outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
                user->QueuePacket(outapp);
                safe_delete(outapp);
                return;
        }


demonstar55 02-01-2013 02:07 AM

This would be nice, especially since there are a bunch of GoD combines that are no fail but still require a min skill, but currently are doable with no skill...

cavedude 02-01-2013 02:39 AM

This is committed Rev r2475.


All times are GMT -4. The time now is 03:58 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.