SVN Revision 2723 - IsAllowedToAttack vs IsSameRealm

View and discuss the latests SVN commits, to ensure the best efficiency in our work.

Moderators: Support Team, Developer Team

SVN Revision 2723 - IsAllowedToAttack vs IsSameRealm

Postby DOLBot » Mon Dec 13, 2010 7:56 pm

Commit from tolakram

Log Messages
- Bugfix: All combat oriented actions now use IsAllowedToAttack instead of IsSameRealm. This attempts to fix a bug with the pvp ruleset where spells of type 'realm' and other friendly spells would heal/buff enemy players because those players are still considered part of the same realm. On PvP there are two determinations for actions: Can we attack the player (group, guild, alliance checks) and can we invite the player to a group, or guild (SameRealm checks). You have to be able to invite 'enemy' players so the checks have to be separate. IsAllowedToAttack should always be used for combat actions (attack/heal/buff) while IsSameRealm should be used for all non-combat actions (group invite/guild invite/etc).

This may introduce a new problem if the PvP ruleset allows players to buff each other without being 'friendly'. This fix will no longer allow buffing on PvP outside of a group / guild / alliance.

- Bugfix: Ignore bind areas when showing kill messages

Files Changed:
MODIFY - DOLSharp/trunk/GameServer/ai/brain/Animist/TurretBrain.cs
MODIFY - DOLSharp/trunk/GameServer/ai/brain/ControlledNpcBrain.cs
MODIFY - DOLSharp/trunk/GameServer/ai/brain/GuardBrain.cs
MODIFY - DOLSharp/trunk/GameServer/ai/brain/StandardMobBrain.cs
MODIFY - DOLSharp/trunk/GameServer/commands/playercommands/GroundAssist.cs
MODIFY - DOLSharp/trunk/GameServer/commands/playercommands/target.cs
MODIFY - DOLSharp/trunk/GameServer/commands/playercommands/who.cs
MODIFY - DOLSharp/trunk/GameServer/gameobjects/GamePlayer.cs
MODIFY - DOLSharp/trunk/GameServer/minotaurrelics/MinotaurRelic.cs
MODIFY - DOLSharp/trunk/GameServer/realmabilities/handlers/PerfectRecoveryAbility.cs
MODIFY - DOLSharp/trunk/GameServer/serverrules/IServerRules.cs
MODIFY - DOLSharp/trunk/GameServer/spells/FocusShellHandler.cs
MODIFY - DOLSharp/trunk/GameServer/spells/Heretic/MonsterRez.cs
MODIFY - DOLSharp/trunk/GameServer/spells/Masterlevel/MasterLevelBase.cs
MODIFY - DOLSharp/trunk/GameServer/spells/ProcSpellHandler.cs
MODIFY - DOLSharp/trunk/GameServer/spells/SpellHandler.cs

View Changes:
http://dolserver.svn.sourceforge.net/do ... v&rev=2723
User avatar
DOLBot
DOL Bot
 
Posts: 1933
Joined: Sat Jan 08, 2011 1:23 pm

Re: SVN Revision 2723

Postby Shursan » Fri Jan 07, 2011 11:13 am

Can we make a serverrules IsAllowedtoCast ?

it seems IsAllowedtoAttack is not verry reliable, wrong message when you cast a spell.target == Realm

Or another possible possibility ?
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 375
Joined: Mon Jun 22, 2009 8:25 pm
Location: France

Re: SVN Revision 2723

Postby Tolakram » Fri Jan 07, 2011 12:38 pm

That would require massive changes to spellhandler which, whenever changed, breaks everything because the code is horrible. What exactly is the problem, besides safe areas not allowing buffs?
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: SVN Revision 2723 - IsAllowedToAttack vs IsSameRealm

Postby Shursan » Sat Jan 08, 2011 2:35 am

the two quiet message is wrong.

if (attacker == defender) send a message you can't attack yourself and you can't attack... must be you can't cast this spell on this target ? no ?
Origins/Genesis Administrator
Shursan
Server Representative
 
Posts: 375
Joined: Mon Jun 22, 2009 8:25 pm
Location: France


Return to “%s” DOL SVN Commits

Who is online

Users browsing this forum: No registered users and 0 guests