示例#1
0
 public NpcRecord(ushort id, string name, CSVDoubleArray messages, CSVDoubleArray replies, List <sbyte> actionTypes,
                  ContextActorLook look)
 {
     this.Id              = id;
     this.Name            = name;
     this.Messages        = messages;
     this.Replies         = replies;
     this.ActionTypes     = actionTypes;
     this.ActionTypesEnum = actionTypes.ConvertAll <NpcActionTypeEnum>(x => (NpcActionTypeEnum)x);
     this.Look            = look;
     this.Look.SetColors(ContextActorLook.GetConvertedColors(this.Look.Colors.ToArray()));
 }
示例#2
0
 public BreedRecord(sbyte id, string name, string malelook, string femalelook, List <int> malecolors, List <int> femalecolors,
                    CSVDoubleArray spforintelligence, CSVDoubleArray spforagility, CSVDoubleArray SPForStrength, CSVDoubleArray spforvitality,
                    CSVDoubleArray spforwisdom, CSVDoubleArray spforchance, short startlifepoints, short startprospecting)
 {
     this.Id                = id;
     this.Name              = name;
     this.MaleLook          = malelook;
     this.FemaleLook        = femalelook;
     this.MaleColors        = malecolors;
     this.FemaleColors      = femalecolors;
     this.StartLifePoints   = startlifepoints;
     this.StartProspecting  = startprospecting;
     this.SPForIntelligence = spforintelligence;
     this.SPForAgility      = spforagility;
     this.SPForStrength     = SPForStrength;
     this.SPForVitality     = spforvitality;
     this.SPForWisdom       = spforwisdom;
     this.SPForChance       = spforchance;
 }
示例#3
0
        public static void NpcReplyList(WorldClient client, string[] args)
        {
            if (args.Length < 2)
            {
                client.Character.Reply("Get NPC's available replies.");
                client.Character.Reply(".npc replies|r $NpcId");
                client.Character.Reply(" - $NpcId ⇒ ID of the NPC template (not spawn id).");

                return;
            }

            ushort npcTemplateId = ushort.Parse(args[1]);

            NpcRecord      npcRecord     = NpcRecord.GetNpc(npcTemplateId);
            CSVDoubleArray messagesArray = npcRecord.Replies;

            client.Character.Reply($"Replies for npc {npcRecord.Id} ({messagesArray.Values.Length}): ");

            foreach (uint[] tuple in messagesArray.Values)
            {
                uint msgId = tuple[0];
                client.Character.Reply($" - {msgId}");
            }
        }