public void Create()
        {
            SMSG_CHARACTERINFO spkt = new SMSG_CHARACTERINFO();
            spkt.race = 0;
            spkt.Gender = 1;
            spkt.Name = this.character.name;
            spkt.X = this.character.Position.x;
            spkt.Y = this.character.Position.y;
            spkt.Z = this.character.Position.z;
            spkt.ActorID = index;
            spkt.face = this.character.FaceDetails;
            spkt.AugeSkillID = 1000;
            spkt.yaw = 0;
            spkt.Job = 5;

            spkt.SetHeadTop(3493, 0);       //ALIEN HORNS
            spkt.SetHeadMiddle(900024, 0);  //FAKE KISS
            spkt.SetHeadBottom(950018, 3);  //MASK OF ROBBER
            spkt.SetShield(200058, 0);      //FAIRLY BUCKET
            spkt.SetBack(3410, 0);          //PORING BAG
            spkt.SetFeet(18775, 0);         //Beginner's Sandals
            spkt.SetGloves(300025, 0);      //PRACTIVE GLOVES
            spkt.SetPants(19173, 0);        //Adventurer's Breeches
            spkt.SetShirt(100167, 0);       //Beginners Effort Shirt
            spkt.SetWeapon(101);            //SET WEAPON

            spkt.SessionId = this.character.id;
            this.Send((byte[])spkt);
        }
예제 #2
0
        public static void GenerateCharacterInfo(Character character, out SMSG_CHARACTERINFO spkt)
        {
            //HELPER VARIABLES
            Rag2Item item;

            //STRUCTIRIZE GENERAL INFORMATION
            spkt = new SMSG_CHARACTERINFO();
            spkt.race = 0;
            spkt.Gender = character.gender;
            spkt.Name = character.Name;
            spkt.X = character.Position.x;
            spkt.Y = character.Position.y;
            spkt.Z = character.Position.z;
            spkt.ActorID = character.id;
            spkt.face = character.FaceDetails;
            spkt.AugeSkillID = character.ComputeAugeSkill();
            spkt.yaw = character.Yaw;
            spkt.Job = character.job;
            spkt.Stance = character.stance;

            //STRUCTURIZE EQUIPMENT INFORMATION
            item = character.Equipment[0];
            if (item != null && item.active > 0) spkt.SetHeadTop(item.info.item, item.dyecolor);

            item = character.Equipment[1];
            if (item != null && item.active > 0) spkt.SetHeadMiddle(item.info.item, item.dyecolor);

            item = character.Equipment[2];
            if (item != null && item.active > 0) spkt.SetHeadBottom(item.info.item, item.dyecolor);

            item = character.Equipment[14];
            if (item != null && item.active > 0) spkt.SetShield(item.info.item, item.dyecolor);

            item = character.Equipment[8];
            if (item != null && item.active > 0) spkt.SetBack(item.info.item, item.dyecolor);

            item = character.Equipment[3];
            if (item != null && item.active > 0) spkt.SetShirt(item.info.item, item.dyecolor);

            item = character.Equipment[4];
            if (item != null && item.active > 0) spkt.SetPants(item.info.item, item.dyecolor);

            item = character.Equipment[5];
            if (item != null && item.active > 0) spkt.SetGloves(item.info.item, item.dyecolor);

            item = character.Equipment[6];
            if (item != null && item.active > 0) spkt.SetFeet(item.info.item, item.dyecolor);

            foreach (AdditionState state in character._additions)
                spkt.SetWeapon(state.Addition, state.Lifetime);
        }
예제 #3
0
        public override void ShowObject(Character character)
        {
            //HELPER VARIABLES
            Rag2Item item;

            //STRUCTIRIZE GENERAL INFORMATION
            SMSG_CHARACTERINFO spkt = new SMSG_CHARACTERINFO();
            spkt.race = 0;
            spkt.Gender = this.gender;
            spkt.Name = this.Name;
            spkt.X = this.Position.x;
            spkt.Y = this.Position.y;
            spkt.Z = this.Position.z;
            spkt.ActorID = this.id;
            spkt.face = this.FaceDetails;
            spkt.AugeSkillID = this.ComputeAugeSkill();
            spkt.yaw = this.Yaw;
            spkt.Job = this.job;
            spkt.Stance = this.stance;

            //STRUCTURIZE EQUIPMENT INFORMATION
            item = this.Equipment[0];
            if (item != null && item.active > 0) spkt.SetHeadTop(item.info.item, item.dyecolor);

            item = this.Equipment[1];
            if (item != null && item.active > 0) spkt.SetHeadMiddle(item.info.item, item.dyecolor);

            item = this.Equipment[2];
            if (item != null && item.active > 0) spkt.SetHeadBottom(item.info.item, item.dyecolor);

            item = this.Equipment[14];
            if (item != null && item.active > 0) spkt.SetShield(item.info.item, item.dyecolor);

            item = this.Equipment[8];
            if (item != null && item.active > 0) spkt.SetBack(item.info.item, item.dyecolor);

            item = this.Equipment[3];
            if (item != null && item.active > 0) spkt.SetShirt(item.info.item, item.dyecolor);

            item = this.Equipment[4];
            if (item != null && item.active > 0) spkt.SetPants(item.info.item, item.dyecolor);

            item = this.Equipment[5];
            if (item != null && item.active > 0) spkt.SetGloves(item.info.item, item.dyecolor);

            item = this.Equipment[6];
            if (item != null && item.active > 0) spkt.SetFeet(item.info.item, item.dyecolor);

            foreach (AdditionState state in this._additions)
                spkt.SetWeapon(state.Addition, state.Lifetime);

            lock (character)
            {
                spkt.SessionId = character.id;
                character.client.Send((byte[])spkt);

                if (this._Event > 0)
                {
                    SMSG_SCENARIOEVENTBEGIN spkt2 = new SMSG_SCENARIOEVENTBEGIN();
                    spkt2.Event = this._Event;
                    spkt2.ActorId = this.id;
                    spkt2.SessionId = character.id;
                    character.client.Send((byte[])spkt2);
                }
            }
        }