EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Server Code Submissions (https://www.eqemulator.org/forums/forumdisplay.php?f=669)
-   -   Tradeskill Group Emotes (https://www.eqemulator.org/forums/showthread.php?t=26550)

seveianrex 10-18-2008 09:56 AM

Tradeskill Group Emotes
 
{tradeskills.cpp}

in bool Client::TradeskillExecute, at approx. line 700, locate:

Code:

        if(spec->tradeskill == JEWELRY_MAKING){
                switch(GetAA(aaJewelCraftMastery)){
                case 1:
                        AAChance = 10;
                        break;
                case 2:
                        AAChance = 25;
                        break;
                case 3:
                        AAChance = 50;
                        break;
                }
        }

add immediately after:

Code:

const Item_Struct* item = NULL;
locate:

Code:

                _log(TRADESKILLS__TRACE, "Tradeskill success");

                itr = spec->onsuccess.begin();
                while(itr != spec->onsuccess.end()) {
                        //should we check this crap?
                        SummonItem(itr->first, itr->second);

add immediately after:

Code:

                        item = database.GetItem(itr->first);
                        if (this->GetGroup())
                        {
                                entity_list.MessageGroup(this,true,MT_Skills,"%s has successfully fashioned %s!",GetName(),item->Name);
                        }

locate:
Code:

_log(TRADESKILLS__TRACE, "Tradeskill failed");
add immediately after:
Code:

if (this->GetGroup())
                {
                        entity_list.MessageGroup(this,true,MT_Skills,"%s was unsuccessful in %s tradeskill attempt.",GetName(),GetGender() == 0 ? "his" : "her");
                }


janusd 10-19-2008 02:33 PM

This is actually emoting as a general emote, not just to group members.

Derision 10-19-2008 02:47 PM

The second parameter to entity_list.MessageGroup determines whether it is group only, or group + other people nearby. Setting it to true will make it group only, if that was what was desired.

seveianrex 10-19-2008 04:00 PM

Whoops. My bad! Thanks Derision for the fix..

trevius 10-20-2008 12:10 AM

I corrected the submitted code with Derision's suggestion. If I didn't do it right, lemme know and we can either fix it or you can post the corrected code.

cavedude 10-20-2008 12:33 AM

Edit: Oh, sorry I thought you meant the SVN. We're good there :)


All times are GMT -4. The time now is 04:24 AM.

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