/*------------------------------------------------------------------------- * ツールチップ用文字列を得る * ---------------------------------------------------------------------------*/ public string GetToolTipString(Point pos) { switch (m_spot_type) { case type.country_flags: // 国旗 case type.icons_0: // 看板娘 case type.icons_1: // 書庫 case type.icons_2: // 翻訳家 case type.icons_3: // 豪商 case type.tab_0: // 交易 case type.tab_1: // 道具 case type.tab_2: // 工房 case type.tab_3: // 人物 case type.tab_4: // 船大工 case type.tab_4_1: // 造船所親方 case type.tab_5: // 武器職人 case type.tab_6: // 製材職人 case type.tab_7: // 製帆職人 case type.tab_8: // 彫刻家 case type.tab_9: // 行商人 case type.city_name: // 街名 break; case type.has_item: // 指定したアイテムがある foreach (GvoWorldInfo.Info i in m_spots) { if (i.HitTest(pos)) { GvoWorldInfo.Info.Group.Data d = i.HasItem(m_find_string); if (d != null) { return(String.Format("{0}[{1}]", d.Name, d.Price)); } } } break; case type.language: // 言語 foreach (GvoWorldInfo.Info i in m_spots) { if (i.HitTest(pos)) { return(i.LearnPerson(m_find_string)); } } break; case type.cultural_sphere: // 文化圏 foreach (GvoWorldInfo.Info i in m_spots) { if (i.HitTest(pos)) { return(i.CulturalSphereStr); } } break; } return(null); }
/*------------------------------------------------------------------------- * ツールチップ용문자열を得る * ---------------------------------------------------------------------------*/ public string GetToolTipString(Point pos) { switch (m_spot_type) { case type.country_flags: // 국기 case type.icons_0: // 看판娘 case type.icons_1: // 서고 case type.icons_2: // 번역가 case type.icons_3: // 무역상인 case type.tab_0: // 교역 case type.tab_1: // 도구 case type.tab_2: // 공방 case type.tab_3: // 인물 case type.tab_4: // 조선공 case type.tab_4_1: // 조선소주인 case type.tab_5: // 무기장인 case type.tab_6: // 제재소장인 case type.tab_7: // 돛제작자 case type.tab_8: // 조각가 case type.tab_9: // 행상인 case type.city_name: // 도시명 break; case type.has_item: // 지정した아이템がある foreach (GvoWorldInfo.Info i in m_spots) { if (i.HitTest(pos)) { GvoWorldInfo.Info.Group.Data d = i.HasItem(m_find_string); if (d != null) { return(String.Format("{0}[{1}]", d.Name, d.Price)); } } } break; case type.language: // 언어 foreach (GvoWorldInfo.Info i in m_spots) { if (i.HitTest(pos)) { return(i.LearnPerson(m_find_string)); } } break; case type.cultural_sphere: // 문화권 foreach (GvoWorldInfo.Info i in m_spots) { if (i.HitTest(pos)) { return(i.CulturalSphereStr); } } break; } return(null); }
/*------------------------------------------------------------------------- * * ---------------------------------------------------------------------------*/ private Find() { this.m_type = FindType.InfoName; this.m_data = (GvoWorldInfo.Info.Group.Data)null; this.m_database = (ItemDatabase.Data)null; this.m_info_name = ""; this.m_lang = (string)null; this.m_cultural_sphere = GvoWorldInfo.CulturalSphere.Unknown; this.m_cultural_sphere_tool_tip = ""; }
public Find(FindType _type, string _info_name, GvoWorldInfo.Info.Group.Data _data) : this() { m_type = _type; m_data = _data; if (m_data != null) { m_database = m_data.ItemDb; } m_info_name = _info_name; }
/*------------------------------------------------------------------------- * スポットの種類を設定する * スポットをやめるには Type.none を渡す * ---------------------------------------------------------------------------*/ public void SetSpot(type _type, string find_str) { // 前回の内容をクリア m_spots.Clear(); m_spot_list.Clear(); m_find_string = find_str; m_spot_type = _type; switch (_type) { case type.country_flags: // 国旗 // 国一覧を作成する foreach (GvoWorldInfo.Info i in m_world.World) { if (i.InfoType == GvoWorldInfo.InfoType.City) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, i.CountryStr, i.AllianceTypeStr)); } } break; case type.icons_0: // 看板娘 case type.icons_1: // 書庫 case type.icons_2: // 翻訳家 case type.icons_3: // 豪商 foreach (GvoWorldInfo.Info i in m_world.World) { if ((i.Sakaba & (1 << (_type - type.icons_0))) != 0) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "", "")); } } break; case type.has_item: // 指定したアイテムがある foreach (GvoWorldInfo.Info i in m_world.World) { GvoWorldInfo.Info.Group.Data d = i.HasItem(find_str); if (d != null) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, find_str, d.Price)); } } break; case type.language: // 言語 foreach (GvoWorldInfo.Info i in m_world.World) { if ((i.Lang1 == find_str) || (i.Lang2 == find_str)) { // 使用言語 m_spots.Add(i); m_spot_list.Add(new spot_once(i, find_str, "")); } else { if (i.LearnPerson(find_str) != null) { // 言語取得 m_spots.Add(i); m_spot_list.Add(new spot_once(i, find_str, i.LearnPerson(find_str))); } } } break; case type.tab_0: // 交易 case type.tab_1: // 道具 case type.tab_2: // 工房 case type.tab_3: // 人物 case type.tab_4: // 造船所親方 case type.tab_4_1: // 船大工 case type.tab_5: // 武器職人 case type.tab_6: // 製材職人 case type.tab_7: // 製帆職人 case type.tab_8: // 彫刻家 case type.tab_9: // 行商人 int index = (int)(_type - type.tab_0); foreach (GvoWorldInfo.Info i in m_world.World) { if (i.GetCount(GvoWorldInfo.Info.GroupIndex._0 + index) > 0) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "", "")); } } break; case type.tab_10: // メモ foreach (GvoWorldInfo.Info i in m_world.World) { if (i.GetMemoLines() > 0) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "", "")); } } break; case type.city_name: // 街名 foreach (GvoWorldInfo.Info i in m_world.World) { if (i.Name == find_str) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "", "")); } } break; case type.cultural_sphere: // 文化圏 foreach (GvoWorldInfo.Info i in m_world.World) { if (i.CulturalSphereStr == find_str) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "文化圏", find_str)); } } break; default: break; } }
/*------------------------------------------------------------------------- * 장소の종류を설정する * 장소をやめるには Type.none を渡す * ---------------------------------------------------------------------------*/ public void SetSpot(type _type, string find_str) { // 前회の내용をクリア m_spots.Clear(); m_spot_list.Clear(); m_find_string = find_str; m_spot_type = _type; switch (_type) { case type.country_flags: // 국기 // 국목록を작성함 foreach (GvoWorldInfo.Info i in m_world.World) { if (i.InfoType == GvoWorldInfo.InfoType.City) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, i.CountryStr, i.AllianceTypeStr)); } } break; case type.icons_0: // 看판娘 case type.icons_1: // 서고 case type.icons_2: // 번역가 case type.icons_3: // 무역상인 foreach (GvoWorldInfo.Info i in m_world.World) { if ((i.Sakaba & (1 << (_type - type.icons_0))) != 0) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "", "")); } } break; case type.has_item: // 지정した아이템がある foreach (GvoWorldInfo.Info i in m_world.World) { GvoWorldInfo.Info.Group.Data d = i.HasItem(find_str); if (d != null) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, find_str, d.Price)); } } break; case type.language: // 언어 foreach (GvoWorldInfo.Info i in m_world.World) { if ((i.Lang1 == find_str) || (i.Lang2 == find_str)) { // 사용언어 m_spots.Add(i); m_spot_list.Add(new spot_once(i, find_str, "")); } else { if (i.LearnPerson(find_str) != null) { // 언어取得 m_spots.Add(i); m_spot_list.Add(new spot_once(i, find_str, i.LearnPerson(find_str))); } } } break; case type.tab_0: // 교역 case type.tab_1: // 도구 case type.tab_2: // 공방 case type.tab_3: // 인물 case type.tab_4: // 조선소주인 case type.tab_4_1: // 조선공 case type.tab_5: // 무기장인 case type.tab_6: // 제재소장인 case type.tab_7: // 돛제작자 case type.tab_8: // 조각가 case type.tab_9: // 행상인 int index = (int)(_type - type.tab_0); foreach (GvoWorldInfo.Info i in m_world.World) { if (i.GetCount(GvoWorldInfo.Info.GroupIndex._0 + index) > 0) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "", "")); } } break; case type.tab_10: // 메모 foreach (GvoWorldInfo.Info i in m_world.World) { if (i.GetMemoLines() > 0) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "", "")); } } break; case type.city_name: // 도시명 foreach (GvoWorldInfo.Info i in m_world.World) { if (i.Name == find_str) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "", "")); } } break; case type.cultural_sphere: // 문화권 foreach (GvoWorldInfo.Info i in m_world.World) { if (i.CulturalSphereStr == find_str) { m_spots.Add(i); m_spot_list.Add(new spot_once(i, "문화권", find_str)); } } break; default: break; } }