Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't consider npc type for attitudes #660

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Conversation

thokkat
Copy link
Contributor

@thokkat thokkat commented Jul 27, 2024

Special handling for npc type friend in GameScript::personAttitude is preventing a guru from having the default dialog lines. The "don't talk to me" Gurus have this dialog check:

FUNC INT DIA_BaalTyon_NoTalk_Condition()
{
	if ( Npc_IsInState(self,ZS_TALK) && (BaalTyon_Ansprechbar==FALSE) && (Npc_GetPermAttitude(self,other)!=ATT_FRIENDLY) )
	{
		return 1;
	};
};

This is a problem for Baal Tyon who has npc type friend and therefore the attitude check returns false. Other gurus are npc type main and dialogs have no issues.

For testing: goto vob gur_1210_baaltyon

In GameScript::isFriendlyFire there's the check if(personAttitude(src, dst)==ATT_FRIENDLY). Don't know if this should check for npc type now instead of attitude considering that like for gururs npc type seems a bit arbitrary.

@Try
Copy link
Owner

Try commented Jul 30, 2024

Don't know if this should check for npc type now instead of attitude considering that like for gururs npc type seems a bit arbitrary.

Removing this check from fight, will causes problems when interacting with Diego in oldworld and maybe with other archers:

instance PC_ThiefOW(Npc_Default)
{
	name[0] = "Diego";
	guild = GIL_NONE;
	...
	npcType = NPCTYPE_FRIEND;

Afaik GIL_NONE to GIL_NONE has neutral relation, and without NPCTYPE_FRIEND Diego might shoot you in a back.
Lets' keep isFriend check in isFriendlyFire, at least until we found a case when it doesn't work correct.

@thokkat thokkat force-pushed the fix-BaalTyonDialog branch from 7cf7f50 to a9c8f36 Compare July 30, 2024 19:49
@thokkat
Copy link
Contributor Author

thokkat commented Jul 30, 2024

Lets' keep isFriend check in isFriendlyFire

Makes sense, done.

@Try Try merged commit bcb49b8 into Try:master Jul 30, 2024
1 check was pending
@Try
Copy link
Owner

Try commented Jul 30, 2024

Merged, thanks!

@thokkat thokkat deleted the fix-BaalTyonDialog branch July 30, 2024 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants