ProcessFactions change

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

ProcessFactions change

Post by John Adams » Sat Jul 04, 2009 8:54 am

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?
John Adams
EQ2Emulator - Project Ghost
"Everything should work now, except the stuff that doesn't" ~Xinux

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: ProcessFactions change

Post by LethalEncounter » Sat Jul 11, 2009 4:01 pm

See if the latest I am going to upload solves your problems with this.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: ProcessFactions change

Post by Scatman » Sat Jul 11, 2009 6:44 pm

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?

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Re: ProcessFactions change

Post by LethalEncounter » Sun Jul 12, 2009 10:32 am

I think setting it to 0 will solve that problem and not require an additional field.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: ProcessFactions change

Post by John Adams » Sun Jul 12, 2009 12:40 pm

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.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: ProcessFactions change

Post by John Adams » Sun Jul 12, 2009 1:36 pm

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 ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests