Allow Honor Gain For Killing Own Faction

I recently was questioned by a friend of mine if it was possible to allow honor gaining for killing your own faction (think of FFA zones like the Gurubashi Arena). I figured it out and thought, why not share it right away? /emoticons/default_smile.png

Here’s a topic with the bad version.

http://www.trinityco…h__1#entry19124

For rewarding honor at all times when killing own faction, follow these steps

  1. Go into Player.cpp and find line 7114 (Ctrl + G).

  2. Add comments in front of line 7114 and 7115, like this:

//if (GetTeam() == pVictim->GetTeam() && !sWorld->IsFFAPvPRealm()) // return false;

  1. Compile, test and give me feedback. /emoticons/default_smile.png

If you want to only reward honor if they are in a specific area and kill each other (thus same faction), follow these steps instead:

  1. Go into Player.cpp and find line 7114 (Ctrl + G).

  2. Add comments in front of line 7114 and 7115, like this:

//if (GetTeam() == pVictim->GetTeam() && !sWorld->IsFFAPvPRealm()) // return false;

  1. Add the following code right under there:

// If both players are for example alliance and are not in area XX, do not execute code if (GetTeam() == pVictim->GetTeam() && GetAreaId() != area_id_here && pVictim->GetAreaId() != area_id_here) return false;

  1. So now it should look like this:

[code] //if (GetTeam() == pVictim->GetTeam() && !sWorld->IsFFAPvPRealm())
// return false;

        // If both players are for example alliance and are not in area XX, do not execute code
        if (GetTeam() == pVictim->GetTeam() && GetAreaId() != area_id_here && pVictim->GetAreaId() != area_id_here)
            return false;

[/CODE]
5. Compile, test and give me feedback. /emoticons/default_smile.png

AWESOME WORK DISCOVER! /emoticons/default_smile.png I think ill be trying this, could be very awesome! Blizzard should read these forums, alot of the stuff posted here is what they need to save wow haha /emoticons/default_tongue.png

If i want to do all around world(except sanctuary’s) i set realm to FFAPvPRealm?

Yep, you’re correct.

This can easily be added as a config aswell, i think that would be appreciated by many people! /emoticons/default_wink.png

error when compiling :

3>…servergameEntitiesPlayerPlayer.cpp(7118): error C2059: syntax error : ‘if’