Beispiel #1
0
 private int Active(Mobile from, DressingMethods current)
 {
     if (Dressing.Method.ContainsKey(from))
     {
         if (Dressing.Method[from] == current)
         {
             return(211);
         }
     }
     return(210);
 }
Beispiel #2
0
            public override void OnResponse(NetState sender, RelayInfo info)
            {
                Mobile from = sender.Mobile;

                DressingMethods dressAction = DressingMethods.NoMethod;

                switch (info.ButtonID)
                {
                case (int)DressingMethods.QuitAllAndDressAll:
                {
                    dressAction = DressingMethods.QuitAllAndDressAll;
                    break;
                }

                case (int)DressingMethods.DressAllPossibleFromPack:
                {
                    dressAction = DressingMethods.DressAllPossibleFromPack;
                    break;
                }

                case (int)DressingMethods.DressIfLayerEmpty:
                {
                    dressAction = DressingMethods.DressIfLayerEmpty;
                    break;
                }

                case (int)DressingMethods.NoMethod:
                {
                    from.CloseGump(typeof(DressingGump));
                    if (CanBegin(from))
                    {
                        from.Target = new DressingCommand.InternalTarget();
                    }
                    return;
                }
                }

                if (dressAction != DressingMethods.NoMethod)
                {
                    if (Dressing.Method.ContainsKey(from))
                    {
                        Dressing.Method[from] = dressAction;
                    }
                    else
                    {
                        Dressing.Method.Add(from, dressAction);
                    }
                }

                from.SendGump(new DressingCommand.DressingGump(from));
            }