Keep Hastener FIX!

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

Keep Hastener FIX!

Postby elcotek » Tue Nov 16, 2010 11:35 pm

Hasterner fix for KeepHasteners! :wink:

Hastener give only Speed if Player not in Combat and NPC Realm same as Player Realm, if Server rules PVP he give every one !
Code: Select all
Index: trunk/GameServer/keeps/Gameobjects/Guards/Hastener.cs
===================================================================
--- trunk/GameServer/keeps/Gameobjects/Guards/Hastener.cs (revision 2676)
+++ trunk/GameServer/keeps/Gameobjects/Guards/Hastener.cs (working copy)
@@ -24,40 +24,53 @@

namespace DOL.GS.Keeps
{
- /// <summary>
- /// Represents a keep hastener
- /// </summary>
- public class FrontierHastener : GameKeepGuard
- {
- public override eFlags Flags
- {
- get { return eFlags.PEACE; }
- }
+ /// <summary>
+ /// Represents a keep hastener
+ /// </summary>
+ public class FrontierHastener : GameKeepGuard
+ {
+ public override eFlags Flags
+ {
+ get { return eFlags.PEACE; }
+ }

- #region Examine/Interact Message
+ #region Examine/Interact Message

- /// <summary>
- /// Adds messages to ArrayList which are sent when object is targeted
- /// </summary>
- /// <param name="player">GamePlayer that is examining this object</param>
- /// <returns>list with string messages</returns>
- public override IList GetExamineMessages(GamePlayer player)
- {
- IList list = new ArrayList();
- list.Add("You examine " + GetName(0, false) + ". " + GetPronoun(0, true) + " is " + GetAggroLevelString(player, false) + " and is a hastener.");
- return list;
- }
+ /// <summary>
+ /// Adds messages to ArrayList which are sent when object is targeted
+ /// </summary>
+ /// <param name="player">GamePlayer that is examining this object</param>
+ /// <returns>list with string messages</returns>
+ public override IList GetExamineMessages(GamePlayer player)
+ {
+ IList list = new ArrayList();
+ list.Add("You examine " + GetName(0, false) + ". " + GetPronoun(0, true) + " is " + GetAggroLevelString(player, false) + " and is a hastener.");
+ return list;
+ }

- public override bool Interact(GamePlayer player)
- {
- if (!base.Interact(player))
- return false;
+ public override bool Interact(GamePlayer player)
+ {
+ if (!base.Interact(player))
+ return false;

- TurnTo(player, 5000);
- TargetObject = this;
- CastSpell(SkillBase.GetSpellByID(GameHastener.SPEEDOFTHEREALMID), SkillBase.GetSpellLine(GlobalSpellsLines.Mob_Spells));
- return true;
- }
- #endregion Examine/Interact Message
- }
-}
\ No newline at end of file
+ TurnTo(player, 5000);
+ if (player.InCombat)
+ {
+ player.Out.SendMessage("You are currently in Combat!", eChatType.CT_System, eChatLoc.CL_SystemWindow);
+ return false;
+ }
+ // Hastener give only Speed if NPC Realm = Player Realm, if Server rules PVP he give every one !
+ if (Realm != player.Realm && GameServer.Instance.Configuration.ServerType == eGameServerType.GST_Normal ||
+ GameServer.Instance.Configuration.ServerType == eGameServerType.GST_Roleplay || GameServer.Instance.Configuration.ServerType == eGameServerType.GST_PvE ||
+ GameServer.Instance.Configuration.ServerType == eGameServerType.GST_Roleplay || GameServer.Instance.Configuration.ServerType == eGameServerType.GST_Casual)
+ {
+ player.Out.SendMessage("You are crazy ?", eChatType.CT_System, eChatLoc.CL_SystemWindow);
+ return false;
+ }
+ TargetObject = this;
+ CastSpell(SkillBase.GetSpellByID(GameHastener.SPEEDOFTHEREALMID), SkillBase.GetSpellLine(GlobalSpellsLines.Mob_Spells));
+ return true;
+ }
+ #endregion Examine/Interact Message
+ }
+ }

Greetings, Schnitte :)
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 177
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: Keep Hastener FIX!

Postby geshi » Wed Nov 17, 2010 12:33 am

You are crazy? I love it :mrgreen: Though this would do..
Code: Select all
if (Realm != player.Realm && GameServer.Instance.Configuration.ServerType == eGameServerType.GST_Normal)
{
//msg
return false;
}
I think.. but I'm very tired at the moment so probably not :P
geshi
Contributor
 
Posts: 1826
Joined: Tue Oct 21, 2008 9:16 pm

Re: Keep Hastener FIX!

Postby Kadorien » Wed Nov 17, 2010 2:15 am

The grabbing speed from hastener has already been completed and committed - http://www.dolserver.net/viewtopic.php? ... 29#p121729

In regards to enemy realms being able to grab them, that is simply just making the NPC a certain realm so it's hostile to other realms.
Kadorien
DOL Novice
 
Posts: 57
Joined: Wed Sep 08, 2010 1:14 am

Re: Keep Hastener FIX!

Postby elcotek » Wed Nov 17, 2010 8:20 am

It its not fixed in your patch: DOL.GS.Keeps.FrontierHastener :wink: !
Brotherland Final RvR/PvE/ToA http://brotherland.phpbb8.de/
User avatar
elcotek
Server Representative
 
Posts: 177
Joined: Mon May 12, 2008 9:28 pm
Website: http://brotherland-2.de
Location: Germany

Re: Keep Hastener FIX!

Postby Kadorien » Thu Nov 18, 2010 1:26 am

It its not fixed in your patch: DOL.GS.Keeps.FrontierHastener :wink: !
Ah my apology, thanks for the heads up. You could just use my fix for it :-P
Kadorien
DOL Novice
 
Posts: 57
Joined: Wed Sep 08, 2010 1:14 am


Return to “%s” DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest