/Realm Issue

For any problems with Dawn of Light website or game server, please direct questions and problems here.

Moderator: Support Team

/Realm Issue

Postby Trixster » Thu Mar 13, 2014 2:39 pm

I had made custom keeps and it is all working great.
Capture, adds to count, opens DF...etc

The only issue I'm having is the /realm window.
It displays the keeps twice, rather than once. And when I capture a keep, both will change.

Feels like a duplicate command somewhere, but when I looked under /realm command under "Commands > Player > realm.cs"
I cant find anything there that would duplicate the name.
Code: Select all
using DOL.GS.PacketHandler; using System.Collections; using System.Collections.Generic; using DOL.Language; using DOL.GS.Keeps; using DOL.GS.ServerRules; namespace DOL.GS.Commands { [CmdAttribute( "&realm", ePrivLevel.Player, "Displays the current realm status.", "/realm")] public class RealmCommandHandler : AbstractCommandHandler, ICommandHandler { /* Realm status * * Albion Keeps: * Caer Benowyc: OwnerRealm (Guild) * Caer Berkstead: OwnerRealm (Guild) * Caer Erasleigh: OwnerRealm (Guild) * Caer Boldiam: OwnerRealm (Guild) * Caer Sursbrooke: OwnerRealm (Guild) * Caer Hurbury: OwnerRealm (Guild) * Caer Renaris: OwnerRealm (Guild) * * Midgard Keeps: * Bledmeer Faste: OwnerRealm (Guild) * Notmoor Faste: OwnerRealm (Guild) * Hlidskialf Faste: OwnerRealm (Guild) * Blendrake Faste: OwnerRealm (Guild) * Glenlock Faste: OwnerRealm (Guild) * Fensalir Faste: OwnerRealm (Guild) * Arvakr Faste: OwnerRealm (Guild) * * Hibernia Keeps: * Dun Chrauchon: OwnerRealm (Guild) * Dun Crimthainn: OwnerRealm (Guild) * Dun Bolg: OwnerRealm (Guild) * Dun na nGed: OwnerRealm (Guild) * Dun da Behnn: OwnerRealm (Guild) * Dun Scathaig: OwnerRealm (Guild) * Dun Ailinne: OwnerRealm (Guild) * * Darkness Falls: DFOwnerRealm * * Type '/relic' to display the relic status. */ public void OnCommand(GameClient client, string[] args) { if (IsSpammingCommand(client.Player, "realm")) return; string albKeeps = ""; string midKeeps = ""; string hibKeeps = ""; ICollection<AbstractGameKeep> keepList = GameServer.KeepManager.GetFrontierKeeps(); foreach (AbstractGameKeep keep in keepList) { if (keep is GameKeep) { switch (keep.OriginalRealm) { case eRealm.Albion: albKeeps += KeepStringBuilder(keep); break; case eRealm.Hibernia: hibKeeps += KeepStringBuilder(keep); break; case eRealm.Midgard: midKeeps += KeepStringBuilder(keep); break; } } } var realmInfo = new List<string>(); realmInfo.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Realm.AlbKeeps") + ":"); realmInfo.Add(albKeeps); realmInfo.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Realm.MidKeeps") + ":"); realmInfo.Add(midKeeps); realmInfo.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Realm.HibKeeps") + ":"); realmInfo.Add(hibKeeps); realmInfo.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Realm.DarknessFalls") + ": " + GlobalConstants.RealmToName(DFEnterJumpPoint.DarknessFallOwner)); realmInfo.Add(" "); realmInfo.Add(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Realm.UseRelicCommand")); client.Out.SendCustomTextWindow(LanguageMgr.GetTranslation(client.Account.Language, "Scripts.Players.Realm.Title"), realmInfo); } private string KeepStringBuilder(AbstractGameKeep keep) { string buffer = ""; buffer += keep.Name + ": " + GlobalConstants.RealmToName(keep.Realm); if (keep.Guild != null) { buffer += " (" + keep.Guild.Name + ")"; } buffer += "\n"; return buffer; } } }
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm

Re: /Realm Issue

Postby Tolakram » Thu Mar 13, 2014 2:52 pm

What is your server property setting for use new keeps? You may have both a new and old keep loaded.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: /Realm Issue

Postby Trixster » Thu Mar 13, 2014 3:05 pm

Currently set to "0"
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm

Re: /Realm Issue

Postby Tolakram » Thu Mar 13, 2014 3:16 pm

Currently set to "0"
Pretend I have a full time job and lack access to be able to read what 0 means. :)

If 0 is both, set it to old only and see what happens.
- Mark
User avatar
Tolakram
Storm / Storm-D2 Admin
 
Posts: 9189
Joined: Tue Jun 13, 2006 1:49 am
Location: Kentucky, USA

Re: /Realm Issue

Postby Trixster » Thu Mar 13, 2014 5:53 pm

Ah sorry. 0 is for Old Keeps only.
1 = New Keeps
2 = Both Keeps
Trixster
DOL Visitor
 
Posts: 12
Joined: Thu Feb 27, 2014 9:49 pm

Re: /Realm Issue

Postby stephenxpimentel » Sat Mar 15, 2014 7:54 pm

Your problem is this line here.
Code: Select all
ICollection<AbstractGameKeep> keepList = GameServer.KeepManager.GetFrontierKeeps();
Your keeps are not part of KeepManager.GetFrontierKeeps();

You can manually search your keeps and add them at the top/bottom, or you can rework the GetFrontierKeeps method.

Hope this helps ya :)
Lets have some fun.
stephenxpimentel
Contributor
 
Posts: 1300
Joined: Wed Sep 19, 2007 5:09 pm


Return to “%s” Support

Who is online

Users browsing this forum: No registered users and 1 guest