コード例 #1
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            CommandInfo = string.Empty;
            CommandTime = DateTime.MinValue;

            base.AfterConstruction();
        }
コード例 #2
0
ファイル: Group.cs プロジェクト: andyhebear/HappyQ-WowServer
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Leader = new CharacterBase();
            MainTankGuid = 0;
            MainAssistantGuid = 0;
            LootMethod = 0;
            LooterGuid = 0;
            LootThreshold = 0;
            Icon1 = 0;
            Icon2 = 0;
            Icon3 = 0;
            Icon4 = 0;
            Icon5 = 0;
            Icon6 = 0;
            Icon7 = 0;
            Icon8 = 0;
            IsRaid = false;

            base.AfterConstruction();
        }
コード例 #3
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();

            base.AfterConstruction();
        }
コード例 #4
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            Item = new CharacterItem();
            Cooldown = DateTime.MinValue;

            base.AfterConstruction();
        }
コード例 #5
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            ItemGuid = 0;
            UseTypeFlag = 0;
            UseTime = DateTime.MinValue;

            base.AfterConstruction();
        }
コード例 #6
0
ファイル: Corpse.cs プロジェクト: andyhebear/HappyQ-WowServer
 /// <summary>
 /// 
 /// </summary>
 /// <param name="session"></param>
 public Corpse( Session session, CharacterBase owner )
     : base( session )
 {
     Owner = owner;
 }
コード例 #7
0
ファイル: Guild.cs プロジェクト: andyhebear/HappyQ-WowServer
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            GuildName = string.Empty;

            Leader = new CharacterBase();
            EmblemStyle = 0;
            EmblemColor = 0;
            BorderStyle = 0;
            BorderColor = 0;
            BackgroundColor = 0;
            GuildInfo = string.Empty;
            CreateDate = DateTime.Now;

            base.AfterConstruction();
        }
コード例 #8
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            ChatTypeFlag = 0;
            ChatMessage = string.Empty;
            ChatTime = DateTime.MinValue;

            base.AfterConstruction();
        }
コード例 #9
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            Tutorial0 = 0;
            Tutorial1 = 0;
            Tutorial2 = 0;
            Tutorial3 = 0;
            Tutorial4 = 0;
            Tutorial5 = 0;
            Tutorial6 = 0;
            Tutorial7 = 0;

            base.AfterConstruction();
        }
コード例 #10
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="session"></param>
 public Corpse(Session session, CharacterBase owner)
     : base(session)
 {
     Owner = owner;
 }
コード例 #11
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            FactionId = 0;
            Reputation = 0;
            Flag = 0;

            base.AfterConstruction();
        }
コード例 #12
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();

            MapId = 0;
            ZoneId = 0;
            PositionX = 0;
            PositionY = 0;
            PositionZ = 0;

            base.AfterConstruction();
        }
コード例 #13
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            Slot = 0;
            ActionId = 0;
            ActionType = 0;

            base.AfterConstruction();
        }
コード例 #14
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            SkillId = 0;
            Value = 0;

            base.AfterConstruction();
        }
コード例 #15
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Leader = new CharacterBase();
            MemberGuid = 0;
            AssistantGuid = 0;
            SubGroupGuid = 0;

            base.AfterConstruction();
        }
コード例 #16
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            CreatureTemplate = 0;
            Honor = 0;
            Date = 0;

            base.AfterConstruction();
        }
コード例 #17
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            SpellGuid = 0;
            EffectIndex = 0;
            RemainTime = TimeSpan.Zero;

            base.AfterConstruction();
        }
コード例 #18
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Guild = new Guild();
            Character = new CharacterBase();
            RankId = 0;
            EveryoneNote = string.Empty;
            OfficerNote = string.Empty;

            base.AfterConstruction();
        }
コード例 #19
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            ItemGuid = 0;
            Entry = 0;
            Flags = 0;

            base.AfterConstruction();
        }
コード例 #20
0
        /// <summary>
        /// 
        /// </summary>
        internal bool SaveNewCreature()
        {
            XPQuery<CharacterBase> characters = new XPQuery<CharacterBase>( OneDatabase.Session );

            var characterList = from character in characters
                                where character.Oid == m_CharacterAccountGuid
                                select character;

            if ( characterList.Count() > WOW_MAX_CHARACTER_COUNT ) // 人物过多
                return false;

            CharacterBase newCharacter = new CharacterBase( OneDatabase.Session );
            this.Serial = newCharacter.Oid;
            newCharacter.CharacterName = this.Name;
            //newCharacter.Account = this.AccountGuid;
            newCharacter.Gender = (byte)this.Gender;
            newCharacter.Skin = (byte)this.Skin;
            newCharacter.Face = (byte)this.Face;
            newCharacter.HairStyle = (byte)this.HairColor;
            newCharacter.HairColor = (byte)this.HairColor;
            newCharacter.FacialHair = (byte)this.FacialHair;
            newCharacter.Race = (byte)this.Race;
            newCharacter.Class = (int)this.Class;
            newCharacter.Level = (int)this.Level;
            newCharacter.MapId = (int)this.MapId;
            newCharacter.ZoneId = (int)this.ZoneId;
            newCharacter.PositionX = this.X;
            newCharacter.PositionY = this.Y;
            newCharacter.PositionZ = this.Z;
            newCharacter.Orientation = this.O;
            newCharacter.Guild = null;
            // 人物的坐骑航线标记点 32位值|32位值|32位值|32位值
            // 00000000000000000000000000000000|...|...|...
            // 以位域标示 1~TaxiId~32| 32~TaxiId~64|65~TaxiId~96|96~TaxiId~128
            newCharacter.TaxiMask = this.TaxiMask;
            newCharacter.IsGhost = false;
            newCharacter.IsCinematic = false;
            newCharacter.IsNeedRename = false;
            newCharacter.TotalTime = 0;
            newCharacter.LevelTime = 0;
            newCharacter.LogoutTime = DateTime.Now;
            newCharacter.CreatingTime = DateTime.Now;
            newCharacter.IsBanned = false;
            newCharacter.IsDelete = false;
            newCharacter.DeleteTime = DateTime.Now;

            CharacterHomeBind newCharacterHomeBind = new CharacterHomeBind( OneDatabase.Session );
            //newCharacterHomeBind.Owner = newCharacter.Oid;
            newCharacterHomeBind.MapId = (int)this.BindMapId;
            newCharacterHomeBind.ZoneId = (int)this.BindZoneId;
            newCharacterHomeBind.PositionX = this.BindX;
            newCharacterHomeBind.PositionY = this.BindY;
            newCharacterHomeBind.PositionZ = this.BindZ;

            foreach ( BaseSkill baseSkill in SkillManager.ToArray() )
            {
                WowSkill wowSkill = baseSkill as WowSkill;
                if ( wowSkill == null )
                    continue;

                if ( wowSkill.Serial != 0 )
                    continue;

                WowSkillTemplate wowSkillTemplate = wowSkill.SkillTemplate as WowSkillTemplate;
                if ( wowSkillTemplate == null )
                    continue;

                CharacterSkill newCharactersSkill = new CharacterSkill( OneDatabase.Session );
                wowSkill.Serial = newCharactersSkill.Oid;

                //newCharactersSkill.Owner = newCharacter.Oid;
                newCharactersSkill.SkillId = wowSkillTemplate.Serial;
                newCharactersSkill.Value = wowSkill.Level;
            }

            foreach ( BaseSpell baseSpell in SpellManager.ToArray() )
            {
                WowSpell wowSpell = baseSpell as WowSpell;
                if ( wowSpell == null )
                    continue;

                if ( wowSpell.Serial != 0 )
                    continue;

                WowSpellTemplate wowSpellTemplate = baseSpell.SpellTemplate as WowSpellTemplate;
                if ( wowSpellTemplate == null )
                    continue;

                CharacterSpell newCharacterSpell = new CharacterSpell( OneDatabase.Session );
                wowSpell.Serial = newCharacterSpell.Oid;

                //newCharacterSpell.Owner = newCharacter.Oid;
                newCharacterSpell.SpellId = wowSpellTemplate.Serial;
                //newCharacterSpell.Slot = baseSpell.Slot;
            }

            foreach ( WowActionBar baseActionBar in ActionBarManager.ToArray() )
            {
                WowActionBar wowActionBar = baseActionBar as WowActionBar;
                if ( baseActionBar == null )
                    continue;

                if ( wowActionBar.Serial != 0 )
                    continue;

                CharacterActionBar newCharactersAction = new CharacterActionBar( OneDatabase.Session );
                wowActionBar.Serial = newCharactersAction.Oid;

                //newCharactersAction.Owner= newCharacter.Oid;
                newCharactersAction.Slot = wowActionBar.ActionBarSlotId;
                newCharactersAction.ActionId = wowActionBar.Action;
                newCharactersAction.ActionType = wowActionBar.Type;
            }

            foreach ( BaseItem baseItem in BagManager.EquipmentBag.SubItemsToArray() )
            {
                WowItem wowItem = baseItem as WowItem;
                if ( wowItem == null )
                    continue;

                if ( wowItem.Serial != 0 )
                    continue;

                WowItemTemplate wowItemTemplate = wowItem.ItemTemplate as WowItemTemplate;
                if ( wowItemTemplate == null )
                    continue;

                CharacterItem newCharactersItem = new CharacterItem( OneDatabase.Session );
                wowItem.Serial = newCharactersItem.Oid;

                //newCharactersItem.Owner = newCharacter.Oid;
                newCharactersItem.ItemTemplateGuid = (ulong)wowItemTemplate.Serial;
                newCharactersItem.Amount = (int)wowItem.Amount;
                newCharactersItem.BagId = (int)BagManager.EquipmentBag.Item.SlotId;
                newCharactersItem.SlotId = (int)wowItem.SlotId;
            }

            foreach ( WowReputation baseReputation in ReputationManager.ToArray() )
            {
                WowReputation wowReputation = baseReputation as WowReputation;
                if ( wowReputation == null )
                    continue;

                if ( wowReputation.Serial != 0 )
                    continue;

                CharacterReputation newCharacterReputation = new CharacterReputation( OneDatabase.Session );
                wowReputation.Serial = newCharacterReputation.Oid;

                //newCharacterReputation.Owner = newCharacter.Oid;
                newCharacterReputation.FactionId = wowReputation.FactionId;
                newCharacterReputation.Reputation = wowReputation.Reputation;
                newCharacterReputation.Flag = wowReputation.Flag;
            }

            return true;
        }
コード例 #21
0
        /// <summary>
        /// 防止违反索引唯一的规者
        /// </summary>
        public override void AfterConstruction()
        {
            Owner = new CharacterBase();
            ItemTemplateGuid = 0;
            Amount = 0;
            BagId = 0;
            SlotId = 0;

            base.AfterConstruction();
        }