diff --git a/Scripts/Items/Food/Beverage.cs b/Scripts/Items/Food/Beverage.cs index c4fb21f..14e87bf 100644 --- a/Scripts/Items/Food/Beverage.cs +++ b/Scripts/Items/Food/Beverage.cs @@ -794,6 +794,33 @@ namespace Server.Items from.SendLocalizedMessage( 1080197 ); // You fill the container with milk. } } + else if ( targ is StaticTarget ) + { + StaticTarget stat = (StaticTarget)targ; + // Strip the artwork ID down to its base number + int itemID = stat.ItemID & 0x3FFF; + + // 0xB41 to 0xB44 are standard water troughs. 0xE7B and 0x154D are water barrels. + if ( itemID == 0xB41 || itemID == 0xB42 || itemID == 0xB43 || itemID == 0xB44 || itemID == 0xE7B || itemID == 0x154D || itemID == 0x154D ) + { + if( !from.InRange( stat.Location, 2 ) || !from.InLOS( stat ) ) + { + from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that. + return; + } + + this.Content = BeverageType.Water; + this.Poison = null; + this.Poisoner = null; + this.Quantity = this.MaxQuantity; + + from.SendLocalizedMessage( 1010089 ); // You fill the container with water. + } + else + { + from.SendMessage( "You cannot fill the container from that." ); + } + } } private static int[] m_SwampTiles = new int[] @@ -1188,4 +1215,4 @@ namespace Server.Items } } } -} \ No newline at end of file +}