[accepted] WrathOfChampions Fix
PostPosted: Thu Mar 12, 2009 7:45 am
Currently Phaseshifted players could take damage from WoC, and this is not correct.
- Code: Select all
Index: WrathOfChampionsAbility.cs
===================================================================
--- WrathOfChampionsAbility.cs (revision 1563)
+++ WrathOfChampionsAbility.cs (working copy)
@@ -6,6 +6,7 @@
using DOL.GS.Effects;
using DOL.Events;
using DOL.Database;
+using DOL.GS.Spells;
namespace DOL.GS.RealmAbilities
{
@@ -56,6 +57,15 @@
if (GameServer.ServerRules.IsAllowedToAttack(player, t_player, true) == false)
continue;
+ //Check to see if the player is phaseshifted
+ GameSpellEffect phaseshift;
+ phaseshift = SpellHandler.FindEffectOnTarget(t_player, "Phaseshift");
+ if (phaseshift != null)
+ {
+ player.Out.SendMessage(t_player.Name + " is Phaseshifted and can't be effected by this Spell!", eChatType.CT_SpellResisted, eChatLoc.CL_SystemWindow);
+ continue;
+ }
+
if (!player.IsWithinRadius( t_player, 200 ))
continue;
t_player.TakeDamage(player, eDamageType.Spirit, dmgValue, 0);