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
-
Go into Player.cpp and find line 7114 (Ctrl + G).
-
Add comments in front of line 7114 and 7115, like this:
//if (GetTeam() == pVictim->GetTeam() && !sWorld->IsFFAPvPRealm())
// return false;
- 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:
-
Go into Player.cpp and find line 7114 (Ctrl + G).
-
Add comments in front of line 7114 and 7115, like this:
//if (GetTeam() == pVictim->GetTeam() && !sWorld->IsFFAPvPRealm())
// return false;
- 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;
- 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