private CataloguePage ProcessCataloguePageDataRow(DataRow dRow) { CataloguePage cp = new CataloguePage(); cp.PageId = (int)dRow["PageID"]; cp.PageName = dRow["PageName"].ToString(); cp.PageVisibleName = dRow["PageVisibleName"].ToString(); cp.PageOrder = (int)dRow["PageOrder"]; cp.PageLayout = dRow["PageLayout"].ToString(); cp.PageImageTitle = dRow["PageImageTitle"].ToString(); cp.PageSideImage = dRow["PageSideImage"].ToString(); cp.PageDescription = dRow["PageDescription"].ToString(); cp.PageLabel = dRow["PageLabel"].ToString(); cp.PageAdditional = dRow["PageAdditional"].ToString(); cp.StaffOnly = (bool)dRow["StaffOnly"]; return(cp); }
//102 - "GCAP": "Af" public void Listener102() { mMessage.Init(127); //A string pageName = mPacketBody.Split('/')[1]; CataloguePage page = InstanceManager.Game.Catalogue.GetPage(pageName); if (!page.StaffOnly || InstanceManager.Game.Roles.HasRight(mUserInfo.iRole, "fuse_staff_catalogue")) { //Page index mMessage.appendString("i:"); mMessage.appendString(page.PageName); mMessage.appendChar(13); //Page Public Name mMessage.appendString("n:"); mMessage.appendString(page.PageVisibleName); mMessage.appendChar(13); //Page Layout mMessage.appendString("l:"); mMessage.appendString(page.PageLayout); mMessage.appendChar(13); //Image Header if (page.PageImageTitle != "") { mMessage.appendString("g:"); mMessage.appendString(page.PageImageTitle); mMessage.appendChar(13); } //Side Image if (page.PageSideImage != "") { mMessage.appendString("e:"); mMessage.appendString(page.PageSideImage); mMessage.appendChar(13); } //Description if (page.PageDescription != "") { mMessage.appendString("h:"); mMessage.appendString(page.PageDescription); mMessage.appendChar(13); } //Page Label if (page.PageLabel != "") { mMessage.appendString("h:"); mMessage.appendString(page.PageLabel); mMessage.appendChar(13); } //Page Additional if (page.PageAdditional != "") { mMessage.appendString(page.PageAdditional.Replace('|', Convert.ToChar(13))); mMessage.appendChar(13); } List <CatalogueItemInfo> items = InstanceManager.Game.Catalogue.GetCatalogueItems(page.PageId); if (items.Count > 0) { foreach (CatalogueItemInfo item in items) { mMessage.appendString("p:"); mMessage.appendString(item.FurniName); mMessage.appendChar(9); mMessage.appendString(item.FurniDesc); mMessage.appendChar(9); mMessage.appendInt(item.ItemCost); mMessage.appendChar(9); mMessage.appendChar(9); mMessage.appendString(item.HandType.ToLower()); mMessage.appendChar(9); mMessage.appendString(item.FurniSprite); if (item.WallItem) { mMessage.appendString(" "); if (!item.Sticky) { mMessage.appendString(item.Col); } else { mMessage.appendInt(20); } mMessage.appendChar(9); mMessage.appendChar(9); mMessage.appendChar(9); } else { mMessage.appendChar(9); mMessage.appendInt(0); mMessage.appendChar(9); mMessage.appendInt(item.W); mMessage.appendString(","); mMessage.appendInt(item.L); mMessage.appendChar(9); } mMessage.appendString(item.PurchaseCode); mMessage.appendChar(9); if (!item.WallItem) { mMessage.appendString(item.Col); } mMessage.appendChar(13); } } SendMessage(mMessage); } }
private CataloguePage ProcessCataloguePageDataRow(DataRow dRow) { CataloguePage cp = new CataloguePage(); cp.PageId = (int)dRow["PageID"]; cp.PageName = dRow["PageName"].ToString(); cp.PageVisibleName = dRow["PageVisibleName"].ToString(); cp.PageOrder = (int)dRow["PageOrder"]; cp.PageLayout = dRow["PageLayout"].ToString(); cp.PageImageTitle = dRow["PageImageTitle"].ToString(); cp.PageSideImage = dRow["PageSideImage"].ToString(); cp.PageDescription = dRow["PageDescription"].ToString(); cp.PageLabel = dRow["PageLabel"].ToString(); cp.PageAdditional = dRow["PageAdditional"].ToString(); cp.StaffOnly = (bool) dRow["StaffOnly"]; return cp; }