PDA

View Full Version : Tradeskill Group Emotes


seveianrex
10-18-2008, 09:56 AM
{tradeskills.cpp}

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


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:


const Item_Struct* item = NULL;


locate:


_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:


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


locate:

_log(TRADESKILLS__TRACE, "Tradeskill failed");


add immediately after:

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 :)