Page 1 of 1

Pets are like state workers

Posted: Wed May 22, 2019 3:12 pm
by Gangrenous
When you tell one to attack and then back off, then attack again they just sit there.

I think this is needed

Code: Select all

client->GetPlayer()->GetInfoStruct()->pet_behavior += 2;
So under attack in commands.cpp

Code: Select all

				if (client->GetPlayer()->GetPet()) {
					client->GetPlayer()->GetPet()->AddHate((Entity*)client->GetPlayer()->GetTarget(), 1);
					client->GetPlayer()->GetInfoStruct()->pet_behavior += 2;
				}
				if (client->GetPlayer()->GetCharmedPet())
					client->GetPlayer()->GetCharmedPet()->AddHate((Entity*)client->GetPlayer()->GetTarget(), 1);

Re: Pets are like state workers

Posted: Wed May 22, 2019 4:21 pm
by Gangrenous
Well that still is not quite right, you have to click attack twice. I tried several things and you always have to attack twice which is still not right.

Re: Pets are like state workers

Posted: Wed May 22, 2019 5:59 pm
by Gangrenous
Okay, you have to send a character sheet change, this works.

Code: Select all

				if (client->GetPlayer()->GetPet()) {
					client->GetPlayer()->GetInfoStruct()->pet_behavior = 2;
					client->GetPlayer()->GetPet()->AddHate((Entity*)client->GetPlayer()->GetTarget(), 1);
					client->GetPlayer()->SetCharSheetChanged(true);
				}

But also I noticed around line 2722, should this not be an assignment but a compare? I changed it to a compare

Code: Select all

if (collection == player->GetPendingCollectionReward())

Re: Pets are like state workers

Posted: Wed May 22, 2019 11:34 pm
by tyrbo
Side note - pets using the hate system ultimately caused me issues.

I made changes so that they obeyed the pet owner's commands rather than rely on hate.
Might consider doing the same thing.

Re: Pets are like state workers

Posted: Thu May 23, 2019 5:05 am
by Gangrenous
Exactly, I had already thought about that one.

Re: Pets are like state workers

Posted: Sun Jun 30, 2019 12:14 pm
by Eradani
tyrbo wrote: Wed May 22, 2019 11:34 pmSide note - pets using the hate system ultimately caused me issues.
just remembering a trip to nek castle with a merc and there's that epic in one of the rooms..... :shock: :x :lol: