public override void OnResponse(NetState sender, RelayInfo info) { if (this.m_Head == null || this.m_Head.Deleted || this.m_House == null) { return; } DragonHead head = null; if (info.ButtonID == (int)Buttons.East) { head = new DragonHead(this.m_ItemID); } if (info.ButtonID == (int)Buttons.South) { head = new DragonHead(0x2234); } if (head != null) { this.m_House.Addons[head] = sender.Mobile; head.MoveToWorld(this.m_Location, sender.Mobile.Map); this.m_Head.Delete(); } }
public override void AddBodyParts( BodyPartsContainer bpc, Corpse corpse ) { base.AddBodyParts( bpc, corpse ); DragonHead head = new DragonHead(); head.Hue = 0; bpc.DropItem( head ); }
protected override void OnTarget(Mobile from, object targeted) { if (this.m_Head == null || this.m_Head.Deleted) { return; } if (this.m_Head.IsChildOf(from.Backpack)) { BaseHouse house = BaseHouse.FindHouseAt(from); if (house != null && house.IsOwner(from)) { IPoint3D p = targeted as IPoint3D; Map map = from.Map; if (p == null || map == null) { return; } Point3D p3d = new Point3D(p); ItemData id = TileData.ItemTable[this.m_ItemID & TileData.MaxItemValue]; if (map.CanFit(p3d, id.Height)) { house = BaseHouse.FindHouseAt(p3d, map, id.Height); if (house != null && house.IsCoOwner(from)) { bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map); bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map); if (north && west) { from.CloseGump(typeof(FacingGump)); from.SendGump(new FacingGump(this.m_Head, this.m_ItemID, p3d, house)); } else if (north || west) { DragonHead head = null; if (north) { head = new DragonHead(0x2234); } else if (west) { head = new DragonHead(this.m_ItemID); } house.Addons[head] = from; head.MoveToWorld(p3d, map); this.m_Head.Delete(); } else { from.SendLocalizedMessage(1049781); // This decoration must be placed next to a wall. } } else { from.SendLocalizedMessage(1042036); // That location is not in your house. } } else { from.SendLocalizedMessage(500269); // You cannot build that there. } } else { from.SendLocalizedMessage(502092); // You must be in your house to do this. } } else { from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it. } }
public override void OnResponse(NetState sender, RelayInfo info) { if (this.m_Head == null || this.m_Head.Deleted || this.m_House == null) return; DragonHead head = null; if (info.ButtonID == (int)Buttons.East) head = new DragonHead(this.m_ItemID); if (info.ButtonID == (int)Buttons.South) head = new DragonHead(0x2234); if (head != null) { this.m_House.Addons.Add(head); head.MoveToWorld(this.m_Location, sender.Mobile.Map); this.m_Head.Delete(); } }
protected override void OnTarget(Mobile from, object targeted) { if (this.m_Head == null || this.m_Head.Deleted) return; if (this.m_Head.IsChildOf(from.Backpack)) { BaseHouse house = BaseHouse.FindHouseAt(from); if (house != null && house.IsOwner(from)) { IPoint3D p = targeted as IPoint3D; Map map = from.Map; if (p == null || map == null) return; Point3D p3d = new Point3D(p); ItemData id = TileData.ItemTable[this.m_ItemID & TileData.MaxItemValue]; if (map.CanFit(p3d, id.Height)) { house = BaseHouse.FindHouseAt(p3d, map, id.Height); if (house != null && house.IsOwner(from)) { bool north = BaseAddon.IsWall(p3d.X, p3d.Y - 1, p3d.Z, map); bool west = BaseAddon.IsWall(p3d.X - 1, p3d.Y, p3d.Z, map); if (north && west) { from.CloseGump(typeof(FacingGump)); from.SendGump(new FacingGump(this.m_Head, this.m_ItemID, p3d, house)); } else if (north || west) { DragonHead head = null; if (north) head = new DragonHead(0x2234); else if (west) head = new DragonHead(this.m_ItemID); house.Addons.Add(head); head.MoveToWorld(p3d, map); this.m_Head.Delete(); } else from.SendLocalizedMessage(1049781); // This decoration must be placed next to a wall. } else from.SendLocalizedMessage(1042036); // That location is not in your house. } else from.SendLocalizedMessage(500269); // You cannot build that there. } else from.SendLocalizedMessage(502092); // You must be in your house to do this. } else from.SendLocalizedMessage(1042038); // You must have the object in your backpack to use it. }