EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Archive::Development (https://www.eqemulator.org/forums/forumdisplay.php?f=621)
-   -   Trainer enhancement. (https://www.eqemulator.org/forums/showthread.php?t=7063)

killspree 05-05-2003 03:06 PM

Trainer enhancement.
 
The other day while collecting data, I noticed something EQLive trainers do that EMU trainers dont do. Each time you train a point in a skill on live, it gives the You've become better at <insert skill>! (new value) that also displays when you increase the skill through use. I thought to myself, hey, that'd be a simple and neat addition, so here it is.

client_process.cpp - case OP_GMTrainSkill:

line 944, change:
Code:

                                                if (gmskill->skillbank == 0x01) {
                                                        // languages go here
                                                        if (gmskill->skill_id > 25) {
                                                                cout << "Wrong Training Skill (languages)" << endl;
                                                                DumpPacket(app);
                                                                break;
                                                                }
                                                                cout << "Training language: " << gmskill->skill_id << endl;
                                                                IncreaseLanguageSkill(gmskill->skill_id);
                                                                pp.points--;
                                                }

To:
Code:

                                                        if (gmskill->skillbank == 0x01) {
                                                        // languages go here
                                                        if (gmskill->skill_id > 25) {
                                                                cout << "Wrong Training Skill (languages)" << endl;
                                                                DumpPacket(app);
                                                                break;
                                                                }
                                                                cout << "Training language: " << gmskill->skill_id << endl;
                                                                IncreaseLanguageSkill(gmskill->skill_id);
                                                                pp.points--;
        {
                APPLAYER* outapp = new APPLAYER(OP_SkillUpdate, sizeof(SkillUpdate_Struct));
                SkillUpdate_Struct* skill = (SkillUpdate_Struct*)outapp->pBuffer;
            skill->skillId=gmskill->skill_id;
                skill->value=GetSkill(gmskill->skill_id);
                QueuePacket(outapp);
                delete outapp;
        }
                                                }

line 983 change:
Code:

                                                                else if (GetSkill(gmskill->skill_id) >= 0 && GetSkill(gmskill->skill_id) <= 251) {
                                                                        // Client train a valid skill
                                                                        // FIXME If the client doesn't do the "You are more skilled than I" check we should do it here
                                                                        IncreaseSkill(gmskill->skill_id);
                                                                }

To:
Code:

                                                                else if (GetSkill(gmskill->skill_id) >= 0 && GetSkill(gmskill->skill_id) <= 251) {
                                                                        // Client train a valid skill
                                                                        // FIXME If the client doesn't do the "You are more skilled than I" check we should do it here
                                                                        IncreaseSkill(gmskill->skill_id);
        {
                APPLAYER* outapp = new APPLAYER(OP_SkillUpdate, sizeof(SkillUpdate_Struct));
                SkillUpdate_Struct* skill = (SkillUpdate_Struct*)outapp->pBuffer;
            skill->skillId=gmskill->skill_id;
                skill->value=GetSkill(gmskill->skill_id);
                QueuePacket(outapp);
                delete outapp;
        }
                                                                }



All times are GMT -4. The time now is 07:56 PM.

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