1) Guard die Message 2) Character Parking

A place to submit .patch fixes for the DOL SVN

Moderator: Developer Team

1) Guard die Message 2) Character Parking

Postby whria78 » Sun Dec 21, 2014 1:31 am

I think it will be good to add this source with <server_property> DB option

1) Guard die Message

If guard are killed by other realm, the message is sent to the realm players.


Code: Select all
/// <summary>
      /// When guards Die and it isnt a keep reset (this killer) we call GuardSpam function
      /// </summary>
      /// <param name="killer"></param>
      public override void Die(GameObject killer)
            if (killer != this)

                // WHRIA START
                if (killer is GamePlayer)
                    if (killer.Realm != this.Realm)
                        int inArea = this.GetEnemyCountInArea();

                     eChatType messageType;
                        switch ((eRealm)killer.Realm)
                            case eRealm.Albion: messageType = eChatType.CT_KilledByAlb; break;
                            case eRealm.Midgard: messageType = eChatType.CT_KilledByMid; break;
                            case eRealm.Hibernia: messageType = eChatType.CT_KilledByHib; break;
                            default: messageType = eChatType.CT_PlayerDied; break; // killed by mob

                        string message = LanguageMgr.GetTranslation(ServerProperties.Properties.SERV_LANGUAGE, "GameKeepGuard.GuardSpam.Killed", this.Name, this.Component.AbstractKeep.Name, inArea);

                        foreach (GameClient thisClient in WorldMgr.GetAllPlayingClients())
                            if (thisClient.Player.Realm == this.Realm)
                                thisClient.Player.Out.SendMessage(message, messageType, eChatLoc.CL_SystemWindow);

                // WHRIA END

         if (RespawnInterval == -1)

      #region Guard Spam
      /// <summary>
      /// Sends message to guild for guard death with enemy count in area
      /// </summary>
      /// <param na

2) Character Parking Problem

ABUSE : Some player creates multiple account , park the character in some location ,and use the character for scouting.(RvR scouting or watching for Boss mob respawn)

SOLUTION : If one logout, the location will be shift to the binding location.


Code: Select all
public void LoadPlayer(int accountindex, string playerClass)
         m_activeCharIndex = accountindex;
         GamePlayer player = null;

         // refreshing Account to load any changes from the DB

         DOLCharacters dolChar = m_account.Characters[m_activeCharIndex];

            dolChar.Xpos = dolChar.BindXpos;
            dolChar.Ypos = dolChar.BindYpos;
            dolChar.Zpos = dolChar.BindZpos;

         Assembly gasm = Assembly.GetAssembly(typeof(GameServer));
User avatar
Posts: 128
Joined: Fri Sep 21, 2007 11:27 pm

Re: 1) Guard die Message 2) Character Parking

Postby Leodagan » Sun Dec 21, 2014 8:44 am

Hello Whria :)

For "2)" this is a custom need, you should definitely make a server script to handle this kind of need ;) (even if it's not easy, that will allow you to keep custom behavior even when upgrading SVN of DOL)

You can take example on "GameServerScripts\gameevent\DOLTestServer.cs", reproduce the "Event Listener" for GamePlayerEvent.GameEntered

And you should be able to trigger a "return to bind" on first time a player enter world ;) (GameEntered event is only triggered on first zoning when login in !)

Edit : If you don't want to trigger a "double zoning" upon each player connection, use GamePlayerEvent.Quit to reset player position to bind when they log out :)
Anyway try to use event listener for custom use, I'll be glad to improve them if you miss any needs ;)
User avatar
Posts: 1350
Joined: Tue May 01, 2012 9:30 am
Location: Lyon

Re: 1) Guard die Message 2) Character Parking

Postby Foraneka » Mon Sep 28, 2015 9:44 am

I think this was a very long time.
DOL Guest
Posts: 1
Joined: Mon Sep 28, 2015 8:34 am

Return to DOL Code Contributions

Who is online

Users browsing this forum: No registered users and 1 guest