SVN Rev - 3353Could you provide :
The SVN Revision you're using ?
The full "StackTrace" of the Exception (the log around the error message) ?
THANK YOU!!!!! This tip lead me in the right direction.Sounds like the issue i origionally had on Forsaken when it was PvP, Had something to do with Keeps, or at least, i removed anything that involved keeps in the serverrules, and the error went away. I believe the PvP Ruleset needs a good overhaul at some point.. If i have some time, ill try to add it to my ToDo list
#region Keep Guards
//guard vs guard / npc
if (attacker is GameKeepGuard)
{
if (defender is GameKeepGuard)
return false;
if (defender is GameNPC && (defender as GameNPC).Brain is IControlledBrain == false)
return false;
}
//player vs guard
if (defender is GameKeepGuard && attacker is GamePlayer
&& GameServer.KeepManager.IsEnemy(defender as GameKeepGuard, attacker as GamePlayer) == false)
{
if (quiet == false) MessageToLiving(attacker, "You can't attack a friendly NPC!");
return false;
}
//guard vs player
if (attacker is GameKeepGuard && defender is GamePlayer
&& GameServer.KeepManager.IsEnemy(attacker as GameKeepGuard, defender as GamePlayer) == false)
{
return false;
}
#endregion
#region Keep Guards
//guard vs guard / npc
if (attacker is GameKeepGuard)
{
if (defender is GameKeepGuard)
return false;
if (defender is GameNPC && (defender as GameNPC).Brain is IControlledBrain == false)
return false;
}
//Doesn't attack when not owned
if (attacker is GameKeepGuard && attacker.GuildName == "")
{
return false;
}
//player vs guard
if (defender is GameKeepGuard && attacker is GamePlayer && attacker.GuildName == defender.GuildName)
{
if (quiet == false) MessageToLiving(attacker, "You can't attack a friendly NPC!");
return false;
}
if (defender is GameKeepGuard && attacker is GamePlayer && defender.GuildName == "")
{
if (quiet == false) MessageToLiving(attacker, "You can't attack a friendly NPC!");
return false;
}
//guard vs player
if (defender is GameKeepGuard && attacker is GamePlayer && attacker.GuildName == defender.GuildName)
{
return false;
}
#endregion
Glad i could help, and Glad you found a better solution than just removing keepguard handlers completely, will help me out if i get to rewriting pvp serverrules, still need to look up the pvp rules from Mordred when i can and try to make some fixes.
It may be the case with Alliances however I personally can save I've never been in an alliance on mordred...And groups as well, or so i would think, which is why im going to literally read the entire ruleset ><
The question i'm wondering is. Do you feel that the change above is at-least stable and good enough to replace the old crashing code. Then if we feel we need to handle other things like alliances we can move forward to adding it at that time?Shouldn't PVP Rules handle Alliance of Players to check for isEnemy ?
Users browsing this forum: Bing [Bot] and 1 guest