const int NEWS_SOURCE_WITNESS	= 0;
const int NEWS_SOURCE_GOSSIP	= 1;

// Je höher	die	ID,	desto wichtiger	ist	die	News ( Priorisierung ! )
const int NEWS_MURDER		= 200;
const int NEWS_ATTACK		= 195;
const int NEWS_THEFT		= 190;


FUNC VOID B_AssessAndMemorize(VAR INT newsid, VAR INT source)
// -> Einspeisen der News ins Gedächtnis
// -> Reaktion auf News	( Attitüdenänderung	)
// Für alle	Zeugen und News-Adressaten
// Geht	davon aus, dass	SC erkannt wurde
// *** Parameter ***
// newsid		:	News ID
// source >	0	:	"gossip", ansonsten	"witness"
// self			:	NSC, bei dem News eingespeist werden soll
// other		:	Täter
// victim		:	Opfer
{
	PrintDebug("B_AssessAndMemorize");
	
	//------------------------------------------------------------------------------------------
	if (newsid == NEWS_MURDER)
	{
		PrintDebug("...AssessAndMemMurder");
		// Und News	merken ( gesamte Gilde ist Opfer )
		Npc_MemoryEntryGuild (self,source,other,newsid,victim );
		PrintDebug("Npc_MemoryEntryGuild");

		if (Npc_GetAttitude (self, victim) == ATT_FRIENDLY)
		{
			if (Npc_IsPlayer (other))
			{
				if (Npc_GetAttitude (self,other) == ATT_ANGRY)
				{
					Npc_SetAttitude (other, ATT_HOSTILE);
				}
				else
				{
					Npc_SetAttitude (other, ATT_ANGRY);
				};
			};
		};
	}
	
	//------------------------------------------------------------------------------------------
	else if (newsid == NEWS_ATTACK)
	{
		PrintDebug("...AssessAndMemAttack");
		if (self.id == victim.id)
		{
			Npc_MemoryEntry (self,source,other,newsid,victim);
			if (Npc_GetAttitude (self,other)==ATT_ANGRY || Npc_GetAttitude(self,other)==ATT_NEUTRAL)
			{
				Npc_SetAttitude		(self,	ATT_ANGRY);
				Npc_SetTempAttitude	(self,	ATT_HOSTILE);
			}
			else	// also ATT_FRIENDLY
			{
				Npc_SetTempAttitude	(self,	ATT_ANGRY);
			};
		}
		else if (Npc_GetAttitude(self, victim) == ATT_FRIENDLY)
		{
			if (Npc_GetAttitude(self, other) == ATT_NEUTRAL || Npc_GetAttitude(self,other) == ATT_ANGRY)
			{
				Npc_SetTempAttitude(self, ATT_HOSTILE);
			}
			else	// also ATT_FRIENDLY
			{
				Npc_SetTempAttitude(self, ATT_ANGRY);
			};
		};
	}
	
	//------------------------------------------------------------------------------------------
	else if (newsid == NEWS_THEFT)
	{
		PrintDebug("...AssessAndMemTheft");
		// Bin ich das Opfer ?
		if (self.id	== victim.id)
		{
			Npc_MemoryEntryGuild (self, source, other, newsid, victim);
			if (Npc_GetAttitude(self, other) != ATT_HOSTILE)
			{
				if (Npc_IsPlayer(other))
				{
					Npc_SetAttitude		(self, ATT_ANGRY);
					Npc_SetTempAttitude (self, ATT_HOSTILE);
				};
			};
		}
		else if (Npc_GetAttitude(self, victim) == ATT_FRIENDLY)
		{
			Npc_MemoryEntryGuild (self, source, other, newsid, victim);
			if (item.owner_guild == victim.guild &&((Npc_GetAttitude(self, other)==ATT_FRIENDLY || Npc_GetAttitude(self,other)==ATT_NEUTRAL)))
			{
				if (Npc_IsPlayer(other))
				{
					Npc_SetAttitude		(self, ATT_ANGRY);
					Npc_SetTempAttitude (self, ATT_HOSTILE);
				};
			};
		};
	};
};



/*func int B_AssessAndMemorizeSLD (var int newsid, var int source)
{
	PrintDebug("B_AssessAndMemorizeSLD");
	
};

FUNC int B_AssessAndMemorize(VAR INT newsid, VAR INT source)
{
// -> Einspeisen der News ins Gedächtnis
// -> Reaktion auf News	( Attitüdenänderung	)
// Für alle	Zeugen und News-Adressaten
// Geht	davon aus, dass	SC erkannt wurde
// *** Parameter ***
// newsid		:	News ID
// source >	0	:	"gossip", ansonsten	"witness"
// self			:	NSC, bei dem News eingespeist werden soll
// other		:	Täter
// victim		:	Opfer
	
	if (self.guild == GIL_SLD)
	{
		B_AssessAndMemorizeSLD(newsid,source);
	}
	/*else if (self.guild == GIL_KDF)
	{
		B_AssessAndMemorizeKDF (newsid,source);
	}
	else if (self.guild == GIL_KDW)
	{
		B_AssessAndMemorizeKDW (newsid,source);
	}
	else if (self.guild == GIL_VLK)
	{
		B_AssessAndMemorizeVLK (newsid,source);
	}
	else if (self.guild == GIL_GRD)
	{
		B_AssessAndMemorizeGRD (newsid,source);
	}
	else if (self.guild == GIL_ORG)
	{
		B_AssessAndMemorizeORG (newsid,source);
	}
	else if (self.guild == GIL_BAU)
	{
		B_AssessAndMemorizeBAU (newsid,source);
	}
	else if ( self.guild == GIL_GUR)
	{
		B_AssessAndMemorizeGUR (newsid,source);
	}
	else if (self.guild == GIL_NOV)
	{
		B_AssessAndMemorizeNOV (newsid,source);
	}
	else if (self.guild == GIL_TPL)
	{
		B_AssessAndMemorizeTPL (newsid,source);
	}
	else
	{
		B_AssessAndMemorizeDEFAULT (newsid,source);
	};
/*	return 1;
};	

func void B_MemoryTalkSLD(VAR INT newsid)
{
	if (newsid == NEWS_MURDER)
	{
		if (victim.guild == GIL_VLK || victim.guild == GIL_STT)
		{
			B_Say (self,"$YouKilledDigger");
		}
		else if (victim.guild == GIL_KDW || victim.guild == GIL_KDF)
		{
			B_Say (self,"$YouKilledMAge");
		}
		else if (victim.guild == GIL_SLD)
		{
			if (other.guild == GIL_SLD)
			{
				B_Say (self,"$YouKilledOurGuild");
			}
			else
			{
				B_Say (self,"$YouKilledMyGuild");
			};
		}
		else if (victim.guild == GIL_ORG || victim.guild == GIL_GRD)
		{
			B_Say(self,"$YouKilledNewCampSucker");
		}
		else if (victim.guild == GIL_GUR || victim.guild == GIL_NOV || victim.guild == GIL_TPL)
		{
			B_Say(self,"$YouKilledSectSucker");
		};
	}
	else if (newsid == NEWS_ATTACK)
	{
		if (victim.id == self.id)
		{
			B_Say (self,"$YouAttackedMe");
		}
		else if ( victim.guild == GIL_KDF)
		{
			B_Say (self,"$YouAttackedKdF");
		};
	}
	else if (newsid == NEWS_THEFT)
	{
		if (victim.guild == GIL_SLD)
		{
			B_Say(self, "$YouStoleFromMyGuild");
		}
		else if (self.id  == victim.id)
		{
			B_Say(self,"$YouStoleFromMe");
		}
		else if (victim.guild == GIL_EBR)
		{
			B_Say(self,"$YouStoleFromEBr");
		};
	};
};
	*/

