Exemplo n.º 1
0
    //Delegate implementation
    public void showing(GMenu menu)
    {
        GMenu current = this.Current;
        if (current != null) {
            current.background();
        }

        this.showed.Add(menu);
    }
Exemplo n.º 2
0
    public void hidden(GMenu menu)
    {
        GMenu oldCurrent = this.Current;
        if (oldCurrent != menu) {
            //What ?
        }

        this.showed.Remove(menu);

        GMenu newCurrent = this.Current;
        if (newCurrent != null && newCurrent != oldCurrent) {
            newCurrent.foreground();
        }
        else if (newCurrent == null)
            RunTimeData.InIGMenu = false; //CLAUDE todo
    }
Exemplo n.º 3
0
 void Start()
 {
     this.menu = this.GetComponent<GMenu>();
 }
Exemplo n.º 4
0
        /// <summary>
        /// General Dialogs from character
        /// changed: 01.10.05
        /// </summary>
        public override void OnHello(Character c)
        {
            if (Reputation(c) > 0.5f)
            {
                GMenu  gMenu  = new GMenu();
                GQMenu gQMenu = new GQMenu();

                if (HaveQuests)
                {
                    if (HaveRewardOnHello(c))
                    {
                        return;                                                                 // if ready Rewarded onHello
                    }
                    BaseQuest[] Qlist = GetQuestsFor(c);                                        // get all quests for this character

                    if (Qlist.Length == 1)
                    {
                        DoQuestEvents(c, Qlist[0]);
                        return;
                    }
                    for (int i = 0; i < Qlist.Length; i++)
                    {
                        gQMenu.Add((uint)Qlist[i].Id, Qlist[i].QuestStatus(this, c), Qlist[i].Name);
                    }
                    if (OnlyQuests)
                    {
                        if (gQMenu.Count > 0)
                        {
                            c.QuestList(this, GetRndQLMessage, GetQLEmote, Qlist);
                        }
                        else
                        {
                            c.SendGossip(this, (int)NPCMenuId.Hello, null, null);
                            //c.ResponseMessage( this, (int)NPCMenuId.Hello, Message_Hello );
                        }
                        return;
                    }
                }

                if (Taxi)
                {
                    gMenu.Add((int)NPCSubMenuId.Taxi, GMenuIcons.Taxi, false, Dialog_Taxi);
                }
                if (Vendor)
                {
                    gMenu.Add((int)NPCSubMenuId.Vendor, GMenuIcons.Vendor, false, Dialog_Vendor);
                }
                if (Trainer)
                {
                    gMenu.Add((int)NPCSubMenuId.Trainer, GMenuIcons.Trainer, false, Dialog_Teach);
                }
                if (Banker)
                {
                    gMenu.Add((int)NPCSubMenuId.Banker, GMenuIcons.Banker, false, Dialog_Bank);
                }
                if (InKeeper)
                {
                    gMenu.Add((int)NPCSubMenuId.Vendor, GMenuIcons.Vendor, false, Dialog_Vendor);
                    gMenu.Add((int)NPCSubMenuId.InKeeperBind, GMenuIcons.Binder, false, Dialog_Inkeeper_Bind);
                    //NPCSubMenuId.InKeeperMsg
                }

                if (gMenu.Count > 0 || gQMenu.Count > 0)
                {
                    c.SendGossip(this, (int)NPCMenuId.MainMenu, gMenu, gQMenu);
                }
                else
                {
                    c.SendGossip(this, (int)NPCMenuId.Hello, null, null);
                    //c.ResponseMessage( this, (int)NPCMenuId.Hello, Message_Hello );
                }
            }
            else
            {
                c.SendGossip(this, (int)NPCMenuId.HelloBad, null, null);               //*/
            }
            //else c.ResponseMessage( this, (int)NPCMenuId.HelloBad, "Get lost skum.." );
        }