Page 1 of 1

ProcessFactions change

Posted: Sat Jul 04, 2009 8:54 am
by John Adams
I would like to request a change to how increase/decrease factions work. Right now, there is a hard-coded faction ID check:

Code: Select all

void ZoneServer::ProcessFaction(Spawn* spawn, Client* client){
	Player* player = client->GetPlayer();
	if(client && !spawn->IsPlayer() && spawn->GetFactionID() > 10){
This does not offer the flexibility we need for some of the newer, non-player-effected factions we are adding in-game. For instance, I've added a TutorialFaction1 and TutorialFaction2 to assign to NPCs on the tutorial islands, so they are combative with one another - yet when a player kills one, a message is displayed that they gain one and lose the other faction - though the default_level, negative_change, positive_change values are all ZERO.

What I propose is that instead of checking if faction_id > 10, check if the neg/pos values are > 0, and if so, then process the faction change.

I see no reason to ever report "Your faction standing with <name> got worse." for internal faction ID's that have no +/- values.

Agreed?

Re: ProcessFactions change

Posted: Sat Jul 11, 2009 4:01 pm
by LethalEncounter
See if the latest I am going to upload solves your problems with this.

Re: ProcessFactions change

Posted: Sat Jul 11, 2009 6:44 pm
by Scatman
What if we add a bool field that when set to true, you'll get a faction update per kill. If false, you'll receive no faction hit?

Re: ProcessFactions change

Posted: Sun Jul 12, 2009 10:32 am
by LethalEncounter
I think setting it to 0 will solve that problem and not require an additional field.

Re: ProcessFactions change

Posted: Sun Jul 12, 2009 12:40 pm
by John Adams
LethalEncounter wrote:I think setting it to 0 will solve that problem and not require an additional field.
Agreed. Haven't tested this yet, but I will try to today.

Re: ProcessFactions change

Posted: Sun Jul 12, 2009 1:36 pm
by John Adams
Ok just tested this. I spawned an NPC with a custom faction (22) assigned with no +/- hit. killed it, and got no message (woot).

Also, set up the Outpost "Tunarians" on Qeynos City faction (11) and started murdering them - and got faction hits as expected.

This leads me to a new bug, however... coming next ;)