-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Add 4 spell effects (KillCreditPersonal, WMOChange, WMORepair, WMOD…
…amage) - Update enum GameObjectFlags for type 33 (Destructible building) and enum ImplicitSpellTargetType - Typo in Map.cs
- Loading branch information
Showing
10 changed files
with
186 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
Services/WCell.RealmServer/Spells/Effects/KillCreditPersonal.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using WCell.Constants.Updates; | ||
using WCell.RealmServer.Entities; | ||
using WCell.RealmServer.NPCs; | ||
|
||
namespace WCell.RealmServer.Spells.Effects | ||
{ | ||
public class KillCreditPersonal : SpellEffectHandler | ||
{ | ||
public KillCreditPersonal(SpellCast cast, SpellEffect effect) | ||
: base(cast, effect) | ||
{ | ||
} | ||
|
||
protected override void Apply(WorldObject target) | ||
{ | ||
var chr = target as Character; | ||
if (m_cast.CasterUnit != null && m_cast.CasterUnit is NPC) | ||
{ | ||
chr.QuestLog.OnNPCInteraction((NPC)m_cast.CasterUnit); | ||
} | ||
} | ||
|
||
public override ObjectTypes TargetType | ||
{ | ||
get | ||
{ | ||
return ObjectTypes.Player; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using WCell.Constants.GameObjects; | ||
using WCell.Constants.Spells; | ||
using WCell.Constants.Updates; | ||
using WCell.RealmServer.Entities; | ||
|
||
namespace WCell.RealmServer.Spells.Effects | ||
{ | ||
// TODO : Change the state of the GO according to the MiscValue (0 = Intact, 1 = Damaged, 2 = Destroyed, 3 = Rebuild) | ||
public class WMOChange : SpellEffectHandler | ||
{ | ||
public WMOChange(SpellCast cast, SpellEffect effect) | ||
: base(cast, effect) | ||
{ | ||
} | ||
|
||
public override SpellFailedReason InitializeTarget(WorldObject target) | ||
{ | ||
if (!(target is GameObject)) | ||
{ | ||
return SpellFailedReason.NoValidTargets; | ||
} | ||
|
||
if (((GameObject)target).GOType != GameObjectType.DestructibleBuilding) | ||
{ | ||
return SpellFailedReason.BadTargets; | ||
} | ||
|
||
return SpellFailedReason.Ok; | ||
} | ||
|
||
protected override void Apply(WorldObject target) | ||
{ | ||
} | ||
|
||
public override ObjectTypes TargetType | ||
{ | ||
get | ||
{ | ||
return ObjectTypes.GameObject; // Not sure (perhaps DynamicObject) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using WCell.Constants.GameObjects; | ||
using WCell.Constants.Spells; | ||
using WCell.Constants.Updates; | ||
using WCell.RealmServer.Entities; | ||
|
||
namespace WCell.RealmServer.Spells.Effects | ||
{ | ||
// TODO : Do damage to the GO | ||
public class WMODamage : SpellEffectHandler | ||
{ | ||
public WMODamage(SpellCast cast, SpellEffect effect) | ||
: base(cast, effect) | ||
{ | ||
} | ||
|
||
public override SpellFailedReason InitializeTarget(WorldObject target) | ||
{ | ||
if (!(target is GameObject)) | ||
{ | ||
return SpellFailedReason.NoValidTargets; | ||
} | ||
|
||
if (((GameObject)target).GOType != GameObjectType.DestructibleBuilding) | ||
{ | ||
return SpellFailedReason.BadTargets; | ||
} | ||
|
||
return SpellFailedReason.Ok; | ||
} | ||
|
||
protected override void Apply(WorldObject target) | ||
{ | ||
} | ||
|
||
public override ObjectTypes TargetType | ||
{ | ||
get | ||
{ | ||
return ObjectTypes.GameObject; // Not sure (perhaps DynamicObject) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
using WCell.Constants.GameObjects; | ||
using WCell.Constants.Spells; | ||
using WCell.Constants.Updates; | ||
using WCell.RealmServer.Entities; | ||
|
||
namespace WCell.RealmServer.Spells.Effects | ||
{ | ||
// TODO : Repair (set the max health to) the GO | ||
public class WMORepair : SpellEffectHandler | ||
{ | ||
public WMORepair(SpellCast cast, SpellEffect effect) | ||
: base(cast, effect) | ||
{ | ||
} | ||
|
||
public override SpellFailedReason InitializeTarget(WorldObject target) | ||
{ | ||
if (!(target is GameObject)) | ||
{ | ||
return SpellFailedReason.NoValidTargets; | ||
} | ||
|
||
if (((GameObject)target).GOType != GameObjectType.DestructibleBuilding) | ||
{ | ||
return SpellFailedReason.BadTargets; | ||
} | ||
|
||
return SpellFailedReason.Ok; | ||
} | ||
|
||
protected override void Apply(WorldObject target) | ||
{ | ||
} | ||
|
||
public override ObjectTypes TargetType | ||
{ | ||
get | ||
{ | ||
return ObjectTypes.GameObject; // Not sure (perhaps DynamicObject) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters