Pets are like state workers

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Pets are like state workers

Post by Gangrenous » Wed May 22, 2019 3:12 pm

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);
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Pets are like state workers

Post by Gangrenous » Wed May 22, 2019 4:21 pm

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.
Resident Dirty Hippy

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Pets are like state workers

Post by Gangrenous » Wed May 22, 2019 5:59 pm

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())
Resident Dirty Hippy

tyrbo
Team Member
Posts: 271
Joined: Thu Feb 18, 2016 12:33 pm

Re: Pets are like state workers

Post by tyrbo » Wed May 22, 2019 11:34 pm

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.

User avatar
Gangrenous
Posts: 812
Joined: Sun Apr 24, 2016 6:54 am
Characters: Dinsmoor

Re: Pets are like state workers

Post by Gangrenous » Thu May 23, 2019 5:05 am

Exactly, I had already thought about that one.
Resident Dirty Hippy

User avatar
Eradani
Posts: 192
Joined: Wed May 05, 2010 6:25 am
Location: Saskatchewan

Re: Pets are like state workers

Post by Eradani » Sun Jun 30, 2019 12:14 pm

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:
my client version: 12682L, 2016/06/06
last one that will run on XP cause i'm just a stick-in-the-mud

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest