Pour_OnTarget() public method

public Pour_OnTarget ( Server.Mobile from, object targ ) : void
from Server.Mobile
targ object
return void
コード例 #1
0
ファイル: Container.cs プロジェクト: jacquesc1/UO-Live-Server
        public void Pour(Mobile from, BaseBeverage beverage)
        {
            if (beverage.Content == BeverageType.Water)
            {
                if (Items.Count > 0)
                {
                    from.SendLocalizedMessage(500848);                                                             // Couldn't pour it there.  It was already full.
                    beverage.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0, 500841, from.NetState); // that has somethign in it.
                }
                else
                {
                    var barrel = new WaterBarrel();
                    barrel.Movable = false;
                    barrel.MoveToWorld(Location, Map);

                    beverage.Pour_OnTarget(from, barrel);
                    Delete();
                }
            }
        }