Exemple #1
0
 /// <summary>
 /// Gibt die Instanz zurück
 /// </summary>
 public static NpcNames GetInstance()
 {
     if (instance == null)
     {
         instance = new NpcNames();
     }
     return(instance);
 }
Exemple #2
0
        private void onMyTargetSelected(L2Packet packet)
        {
            packet.Data.SetIndex(3);
            int objId = packet.Data.ReadInt32();

            if (this.lastTarget != objId)
            {
                this.labelClan.Text = "";
                if (this.knownNpcs.ContainsKey(objId))
                {
                    int npcId = this.knownNpcs[objId];
                    this.labelName.Text       = NpcNames.GetInstance().GetName(npcId);
                    this.labelName.ForeColor  = Color.LightGray;
                    this.labelTitle.Text      = NpcNames.GetInstance().GetTitle(npcId);
                    this.labelTitle.ForeColor = NpcNames.GetInstance().GetColor(npcId);

                    this.lastNpcId = npcId;
                }
                else if (this.knownPcs.ContainsKey(objId))
                {
                    L2Pc pc = this.knownPcs[objId];
                    this.labelName.Text       = pc.VisibleName;
                    this.labelTitle.Text      = pc.Title;
                    this.labelTitle.ForeColor = Color.LightGray;

                    // Karma/PvP
                    this.labelName.ForeColor = Color.LightGray;
                    if (pc.PvpFlag)
                    {
                        this.labelName.ForeColor = Color.Pink;
                    }
                    if (pc.Karma > 0)
                    {
                        this.labelName.ForeColor = Color.Red;
                    }

                    // Clan
                    if (this.knownPlegdes.ContainsKey(pc.ClanId))
                    {
                        this.labelClan.Text = "Clan: " + this.knownPlegdes[pc.ClanId].ClanName;
                    }
                }
                else if (this.myCharObjId == objId) // myself
                {
                    this.labelName.Text       = this.myCharName;
                    this.labelTitle.Text      = "";
                    this.labelTitle.ForeColor = Color.LightGray;
                }
                else
                {
                    this.labelName.Text      = "id:" + objId;
                    this.labelName.ForeColor = Color.LightGray;
                    this.labelTitle.Text     = "";
                }
                this.lastTarget = objId;
            }
        }
Exemple #3
0
        static void Main()
        {
#if DEBUG
            debugStream.AutoFlush = true;
            debugStream.WriteLine("Starting new Session " + System.DateTime.Now);
#endif

            // read Data
            NpcNames.GetInstance();
            ItemNames.GetInstance();

            DropData.GetInstance().OpenDb();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            OptionsForm.Instance.ReadIniFile();

            Application.Run(new Form1());
        }
Exemple #4
0
        public void Show(int mobId)
        {
            this.activeList = DropData.GetInstance().GetDrops(mobId);
            if (this.activeList.Count == 0)
            {
                this.myClose();
                return;
            }

            this.dataGridView1.DataSource = this.activeList;
            this.Size = calcNewSize();
            this.Text = NpcNames.GetInstance().GetName(mobId);


            // Show the Form
            if (!this.isShown)
            {
                this.isShown = true;
                this.Show();
            }
        }
Exemple #5
0
 /// <summary>
 /// Gibt die Instanz zurück
 /// </summary>
 public static NpcNames GetInstance()
 {
     if (instance == null)
         instance = new NpcNames();
     return instance;
 }