private static NpcModel CreateSkagryNpc() { var skagry = new NpcModel(Npc.SkagyName, Npc.SkagryGameUserId); var userDescription = skagry.NpcUser.GetDescription(); userDescription.Ru = "Ru Skagry user description"; userDescription.Es = "Es Skagry user description"; userDescription.En = "EN Skagry user description"; skagry.NpcUser.SetDescription(userDescription); var allianceDescription = skagry.NpcAlliance.GetDescription(); allianceDescription.Ru = "Ru Skagry Alliance description"; allianceDescription.Es = "Es Skagry Alliance description"; allianceDescription.En = "EN Skagry Alliance description"; skagry.NpcAlliance.SetDescription(allianceDescription); return(skagry); }
private static NpcModel ConfederationNpc() { var confederation = new NpcModel(Npc.ConfederationName, Npc.ConfederationGameUserId); var userDescription = confederation.NpcUser.GetDescription(); userDescription.Ru = "Ru confederation user description"; userDescription.Es = "Es confederation user description"; userDescription.En = "EN confederation user description"; confederation.NpcUser.SetDescription(userDescription); var allianceDescription = confederation.NpcAlliance.GetDescription(); allianceDescription.Ru = "Ru confederation Alliance description"; allianceDescription.Es = "Es confederation Alliance description"; allianceDescription.En = "EN confederation Alliance description"; confederation.NpcAlliance.SetDescription(allianceDescription); confederation.NpcAlliance.Tax = 20; return(confederation); }
private static void CreateReservedNpc(IDictionary <string, NpcModel> npcrepository, int count = 0) { var prefix = "TestNpcName"; var startId = npcrepository.Count; if (count == 0) { return; } for (var i = 1; i < count; i++) { var id = startId + i; var name = prefix + id; if (HasName(name)) { continue; } var item = new NpcModel(name, id); var userDescription = item.NpcUser.GetDescription(); userDescription.Ru = "Ru " + name + " user description"; userDescription.Es = "Es " + name + " user description"; userDescription.En = "EN " + name + " user description"; item.NpcUser.SetDescription(userDescription); var allianceDescription = item.NpcAlliance.GetDescription(); allianceDescription.Ru = "Ru " + name + " Alliance description"; allianceDescription.Es = "Es " + name + " Alliance description"; allianceDescription.En = "EN " + name + " Alliance description"; item.NpcAlliance.SetDescription(allianceDescription); // item.NpcAlliance.Disbandet = false; npcrepository.Add(name, item); } }
public static void UpdateNpc(string npcNativeName, NpcModel newNpcModel) { Npses.AddOrUpdateSimple(newNpcModel.NpcUser.Nickname, newNpcModel); }