Exemplo n.º 1
0
 public static bool CheckItemAsChair(int itemId, out ChairData value)
 {
     if (_chairs.TryGetValue(itemId, out value))
     {
         return(true);
     }
     value = ChairData.Null;
     return(false);
 }
Exemplo n.º 2
0
        /// <summary>
        /// Sets owner for a prop and makes the creature sit on it.
        /// </summary>
        /// <param name="creature"></param>
        /// <param name="prop"></param>
        /// <param name="chair">For temporary props from items.</param>
        private void SitOnProp(Creature creature, Prop prop, ChairData chair = null)
        {
            // Move char
            Send.AssignSittingProp(creature, prop.EntityId, 1);

            // Update chair
            prop.Xml.SetAttributeValue("SITCHAR", creature.EntityId);

            Send.PropUpdate(prop);

            creature.Temp.CurrentChairData = chair;
            creature.Temp.SittingProp      = prop;
        }
Exemplo n.º 3
0
 public static bool CheckItemAsChair(int itemID, out ChairData value)
 {
     if (m_Chairs.TryGetValue(itemID, out value))
     {
         return true;
     }
     else
     {
         value = ChairData.Null;
         return false;
     }
 }
Exemplo n.º 4
0
		/// <summary>
		/// Sets owner for a prop and makes the creature sit on it.
		/// </summary>
		/// <param name="creature"></param>
		/// <param name="prop"></param>
		/// <param name="chair">For temporary props from items.</param>
		private void SitOnProp(Creature creature, Prop prop, ChairData chair = null)
		{
			// Move char
			Send.AssignSittingProp(creature, prop.EntityId, 1);

			// Update chair
			prop.Xml.SetAttributeValue("SITCHAR", creature.EntityId);

			Send.PropUpdate(prop);

			creature.Temp.CurrentChairData = chair;
			creature.Temp.SittingProp = prop;
		}