public static void AddToParty(FighterData fighter, Party party) { // TODO: party capacity get. if ((party.currentCost + fighter.cost) < GameData.instance.playerData.partyCapacity) { party.Add (fighter); } }
public void AddPokemon(int pokedexNumber, int level) { Party.Add(new Pokemon(Game, pokedexNumber, level, this)); }
public void AddPokemon(int pokedexNumber) { Party.Add(new Pokemon(Game, pokedexNumber, this)); }
public DataContext() { // 人物 List <List <String> > skills = new List <List <string> >() { new List <String> { "剣スキル", "ヤリスキル", "ブーメラン", "格闘スキル", "ゆうき" }, new List <String> { "オノスキル", "打撃スキル", "鎌スキル", "格闘スキル", "にんじょう" }, new List <String> { "短剣スキル", "ムチスキル", "杖スキル", "格闘スキル", "おいろけ" }, new List <String> { "剣スキル", "弓スキル", "杖スキル", "格闘スキル", "カリスマ" }, new List <String> { "扇スキル", "ムチスキル", "短剣スキル", "格闘スキル", "アウトロー" }, new List <String> { "爪スキル", "打撃スキル", "ブーメラン", "格闘スキル", "ねっけつ" }, }; foreach (var member in Info.Instance().Orders) { if (member.Value == 0xFF) { continue; } Charactor ch = new Charactor(0x11EC + member.Value * 64, 0xA10 + member.Value * 34, skills[(int)member.Value]); ch.Name = member.Name; Party.Add(ch); } // ルーラ foreach (var item in Info.Instance().Places) { Place zoom = new Place(item.Value); zoom.Name = item.Name; Places.Add(zoom); } // パーティ並び for (uint i = 0; i < 6; i++) { Orders.Add(new Order(0x11A0 + i)); } // 錬金釜 foreach (var recipe in Info.Instance().Recipes) { Recipes.Add(new Recipe(recipe.Value) { Name = recipe.Name }); } // モンスター図鑑 foreach (var monster in Info.Instance().Monsters) { Monsters.Add(new Monster(monster.Value) { Name = monster.Name }); } // アイテム図鑑 foreach (var item in Info.Instance().Items) { if (item.Value == 0) { continue; } Items.Add(new Item(item.Value) { Name = item.Name }); } // バトルロードモンスター for (uint i = 0; i < 24; i++) { BattleLoadMonsters.Add(new BattleMonster(0x13F0 + i * 8)); } String[] names = { "G", "F", "E", "D", "C", "B", "A", "S" }; for (uint i = 0; i < names.Length; i++) { Ranks.Add(new BattleMonsterRank(i) { Name = "ランク" + names[i] }); } }
public void RandomParty() { Party.Clear(); Artifacts.Clear(); for (var i = 0; i < 8; i++) { switch (Dice.Roll(1, 6)) { case 1: Party.Add(SlayerRecruit.Wizard()); break; case 2: Party.Add(SlayerRecruit.Warrior()); break; case 3: Party.Add(SlayerRecruit.Archer()); break; case 4: Party.Add(SlayerRecruit.MenAtArms()); Party.Add(SlayerRecruit.MenAtArms()); break; case 5: Artifacts.Add(SlayerArtifact.RandomArtifact()); break; case 6: if (!Party.Any(_ => _.Type == ERecruitType.MenAtArms)) { Party.Add(SlayerRecruit.MenAtArms()); Party.Add(SlayerRecruit.MenAtArms()); } else if (!Party.Any(_ => _.Type == ERecruitType.Warrior)) { Party.Add(SlayerRecruit.Warrior()); } else { switch (Dice.Roll(1, 3)) { case 1: Party.Add(SlayerRecruit.Wizard()); break; case 2: Party.Add(SlayerRecruit.Archer()); break; default: Artifacts.Add(SlayerArtifact.RandomArtifact()); break; } } break; } } }
public DataContext() { for (uint i = 0; i < 6; i++) { Charactors.Add(new Charactor(0x0C80 + i * 0x01EC)); } BagItem item = null; for (uint i = Util.BagItemCount - 1; (int)i >= 0; i--) { item = new BagItem(0x0544 + i * 2, 0x09D4 + i, item); item.PropertyChanged += Item_PropertyChanged; Bag.Insert(0, item); } foreach (var place in Info.Instance().Places) { Places.Add(new Place(place.Value) { Name = place.Name }); } foreach (var monster in Info.Instance().Monsters) { if (monster.ID != 0) { Monsters.Add(new MonsterBook(0x1854 + (monster.ID - 1) * 8) { Name = monster.Name }); } if (monster.Passing) { PassingSlateMonsters.Add(monster); } if (monster.Stamp) { StampMonsters.Add(monster); } } for (uint i = 0; i < Util.MonsterStampCount; i++) { MonsterStamps.Add(new MonsterStamp(0x2E06 + i * 2)); } foreach (var place in Info.Instance().ParkPlaces) { MonsterParkPlaces.Add(new MonsterParkPlace(0x00AC, place.Value) { Name = place.Name }); } for (uint i = 0; i < Util.MonsterParkDormitoryCount; i++) { MonsterParkDormitorys.Add(new MonsterParkDormitory(0x04BC + i * 4, 0x3180 + i)); } for (uint i = 0; i < Util.PartyMemberCount; i++) { Party.Add(new PartyMember(0x0510 + i * 4)); } for (uint i = 0; i < Util.PassingSlateCount; i++) { uint address = 0x32D0 + i * 44; if (SaveData.Instance().ReadNumber(address, 1) == 0) { break; } PassingSlates.Add(new PassingSlate(address)); } foreach (var monster in Info.Instance().TownMonsters) { TownMonsters.Add(new TownMonster(0x01E9, monster.Value) { Name = monster.Name }); } }
void CreateFormedParty() { try { //Get packet data PacketReader Reader = new PacketReader(PacketInformation.buffer); //First and second dword are static Reader.Int32(); Reader.Int32(); //First byte is our party type byte PartyType = Reader.Byte(); //Second byte is purpose information byte PartyPurpose = Reader.Byte(); //3rd byte is minimal level required to join byte PartyMinLevelReq = Reader.Byte(); //4th byte is max level to join byte PartyMaxLevelReq = Reader.Byte(); //5th is short, party name lenght //6th is party name string PartyName = Reader.Text3(); //Close our reader Reader.Close(); //Make sure the user isnt in a party yet. if (Character.Network.Party != null) { //If party is formed allready return if (Character.Network.Party.IsFormed) { return; } //If party is not formed else { //Get current party information party CurrentParty = Character.Network.Party; //Set formed state CurrentParty.IsFormed = true; //Party type CurrentParty.Type = PartyType; //Party purpose CurrentParty.ptpurpose = PartyPurpose; //Party minimal level CurrentParty.minlevel = PartyMinLevelReq; //Party maximum level CurrentParty.maxlevel = PartyMaxLevelReq; //Party name CurrentParty.partyname = PartyName; //Party owner CurrentParty.LeaderID = Character.Information.UniqueID; //Add party eu / ch information by model CurrentParty.Race = Character.Information.Model; //Send packet information to user client.Send(Packet.CreateFormedParty(CurrentParty)); //Add party to list Party.Add(CurrentParty); } } //If a new formed party is created from 0 else { //New party for details party newparty = new party(); //Set formed state newparty.IsFormed = true; //Party type newparty.Type = PartyType; //Party purpose newparty.ptpurpose = PartyPurpose; //Party minimal level newparty.minlevel = PartyMinLevelReq; //Party maximum level newparty.maxlevel = PartyMaxLevelReq; //Party name newparty.partyname = PartyName; //Party owner newparty.LeaderID = Character.Information.UniqueID; //Add party eu / ch information by model newparty.Race = Character.Information.Model; //Add our player to the member list newparty.Members.Add(Character.Information.UniqueID); //Add player client to party list information newparty.MembersClient.Add(client); //Party id , is current count of party's + 1 newparty.ptid = Party.Count + 1; //Add the new party list Party.Add(newparty); //Set party to player Character.Network.Party = newparty; //bool set player in party Character.Network.Party.InParty = true; //Send packet information to user client.Send(Packet.CreateFormedParty(newparty)); } } //Catch bad exception errors catch (Exception ex) { //Write information to the console Console.WriteLine("Create formed party error {0}", ex); //Write info to the debug log Systems.Debugger.Write(ex); } }