Ejemplo n.º 1
0
        public Player(IGamePlayer player, int id, BaseGame game, int team)
            : base(id, game, team, "", "", 1000, 0, 1)                   //TODO   lastPatemer    direction
        {
            m_rect   = new Rectangle(-15, -20, 30, 30);
            m_player = player;
            m_player.GamePlayerId = id;
            m_isActive            = true;
            m_canGetProp          = true;
            Grade = player.PlayerCharacter.Grade;

            TotalAllHurt           = 0;
            TotalAllHitTargetCount = 0;
            TotalAllShootCount     = 0;
            TotalAllKill           = 0;
            TotalAllExperience     = 0;
            TotalAllScore          = 0;
            TotalAllCure           = 0;
            m_weapon = m_player.MainWeapon;
            if (m_weapon != null)
            {
                var ballConfig = BallConfigMgr.FindBall(m_weapon.TemplateID);
                m_mainBallId = ballConfig.Common;
                m_spBallId   = ballConfig.Special;
                //m_mainBallId = m_weapon.Property1;
                //m_spBallId = m_weapon.Property2;
            }
            m_loadingProcess = 0;

            InitBuffer(m_player.EquipEffect);
            m_energy   = (m_player.PlayerCharacter.Agility / 30 + 240);
            m_maxBlood = (int)((950 + m_player.PlayerCharacter.Grade * 50 + LevelPlusBlood + m_player.PlayerCharacter.Defence / 10) * m_player.GetBaseBlood());
        }
Ejemplo n.º 2
0
        public void SetCurrentWeapon(ItemTemplateInfo item)
        {
            this.m_weapon = item;
            BallConfigInfo ballConfigInfo = BallConfigMgr.FindBall(this.m_weapon.TemplateID);

            this.m_mainBallId     = ballConfigInfo.Common;
            this.m_spBallId       = ballConfigInfo.Special;
            this.m_sp2BallId      = ballConfigInfo.SpecialII;
            this.m_AddWoundBallId = ballConfigInfo.CommonAddWound;
            this.m_MultiBallId    = ballConfigInfo.CommonMultiBall;
            this.SetBall(this.m_mainBallId);
        }
Ejemplo n.º 3
0
        public void SetCurrentWeapon(ItemTemplateInfo item)
        {
            m_weapon = item;
            //m_mainBallId = m_weapon.Property1;
            //m_spBallId = m_weapon.Property2;
            var ballConfig = BallConfigMgr.FindBall(m_weapon.TemplateID);

            m_mainBallId = ballConfig.Common;
            m_spBallId   = ballConfig.Special;

            SetBall(m_mainBallId);
        }
Ejemplo n.º 4
0
        public void SetCurrentWeapon(ItemTemplateInfo item)
        {
            m_weapon = item;
            var ballConfig = BallConfigMgr.FindBall(m_weapon.TemplateID);

            m_mainBallId     = ballConfig.Common;
            m_spBallId       = ballConfig.Special;
            m_sp2BallId      = ballConfig.SpecialII;
            m_AddWoundBallId = ballConfig.CommonAddWound;
            m_MultiBallId    = ballConfig.CommonMultiBall;
            SetBall(m_mainBallId);
        }
Ejemplo n.º 5
0
        public override void Reset()
        {
            m_maxBlood = (int)((950 + m_player.PlayerCharacter.Grade * 50 + LevelPlusBlood + m_player.PlayerCharacter.Defence / 10) * m_player.GetBaseBlood());
            if (m_game.RoomType == eRoomType.Treasure || m_game.RoomType == eRoomType.Boss)
            {
                m_game.Cards = new int[21];
            }
            else
            {
                m_game.Cards = new int[8];
            }

            Dander         = 0;
            m_energy       = (m_player.PlayerCharacter.Agility / 30 + 240);
            IsLiving       = true;
            FinishTakeCard = false;
            m_weapon       = m_player.MainWeapon;
            //m_mainBallId = m_weapon.Property1;
            //m_spBallId = m_weapon.Property2;
            var ballConfig = BallConfigMgr.FindBall(m_weapon.TemplateID);

            m_mainBallId = ballConfig.Common;
            m_spBallId   = ballConfig.Special;
            BaseDamage   = m_player.GetBaseAttack();
            BaseGuard    = m_player.GetBaseDefence();

            Attack  = m_player.PlayerCharacter.Attack;
            Defence = m_player.PlayerCharacter.Defence;
            Agility = m_player.PlayerCharacter.Agility;
            Lucky   = m_player.PlayerCharacter.Luck;

            m_currentBall = BallMgr.FindBall(m_mainBallId);
            m_shootCount  = 1;
            m_ballCount   = 1;

            CurrentIsHitTarget = false;

            TotalCure           = 0;
            TotalHitTargetCount = 0;
            TotalHurt           = 0;
            TotalKill           = 0;
            TotalShootCount     = 0;
            LockDirection       = false;
            GainGP    = 0;
            GainOffer = 0;
            Ready     = false;
            PlayerDetail.ClearTempBag();

            LoadingProcess = 0;

            base.Reset();
        }
Ejemplo n.º 6
0
        public override void Reset()
        {
            this.m_maxBlood = this.m_player.PlayerCharacter.hp;
            if (this.m_game.RoomType == eRoomType.Dungeon)
            {
                this.m_game.Cards = new int[21];
            }
            else
            {
                this.m_game.Cards = new int[9];
            }
            base.Dander         = 0;
            base.PetMP          = 10;
            base.psychic        = 40;
            this.m_energy       = this.m_player.PlayerCharacter.Agility / 30 + 240;
            base.IsLiving       = true;
            this.FinishTakeCard = false;
            this.m_DeputyWeapon = this.m_player.SecondWeapon;
            this.m_weapon       = this.m_player.MainWeapon;
            BallConfigInfo ballConfigInfo = BallConfigMgr.FindBall(this.m_weapon.TemplateID);

            this.m_mainBallId        = ballConfigInfo.Common;
            this.m_spBallId          = ballConfigInfo.Special;
            this.m_sp2BallId         = ballConfigInfo.SpecialII;
            this.m_AddWoundBallId    = ballConfigInfo.CommonAddWound;
            this.m_MultiBallId       = ballConfigInfo.CommonMultiBall;
            this.BaseDamage          = this.m_player.GetBaseAttack();
            this.BaseGuard           = this.m_player.GetBaseDefence();
            this.Attack              = (double)this.m_player.PlayerCharacter.Attack;
            this.Defence             = (double)this.m_player.PlayerCharacter.Defence;
            this.Agility             = (double)this.m_player.PlayerCharacter.Agility;
            this.Lucky               = (double)this.m_player.PlayerCharacter.Luck;
            this.m_currentBall       = BallMgr.FindBall(this.m_mainBallId);
            this.m_shootCount        = 1;
            this.m_ballCount         = 1;
            this.m_prop              = 0;
            this.CurrentIsHitTarget  = false;
            this.TotalCure           = 0;
            this.TotalHitTargetCount = 0;
            this.TotalHurt           = 0;
            this.TotalKill           = 0;
            this.TotalShootCount     = 0;
            this.LockDirection       = false;
            this.GainGP              = 0;
            this.GainOffer           = 0;
            this.Ready               = false;
            this.PlayerDetail.ClearTempBag();
            this.LoadingProcess = 0;
            this.skillcu        = 0;
            base.Reset();
        }
Ejemplo n.º 7
0
 public Player(IGamePlayer player, int id, BaseGame game, int team, int maxBlood) : base(id, game, team, "", "", maxBlood, 0, 1)
 {
     this.m_rect   = new Rectangle(-15, -20, 30, 30);
     this.m_player = player;
     this.m_player.GamePlayerId = id;
     this.m_isActive            = true;
     this.m_canGetProp          = true;
     this.Grade    = player.PlayerCharacter.Grade;
     base.vaneOpen = player.PlayerCharacter.IsWeakGuildFinish(9);
     this.m_pet    = player.Pet;
     if (this.m_pet != null)
     {
         base.isPet      = true;
         base.PetBaseAtt = this.GetPetBaseAtt();
     }
     this.TotalAllHurt           = 0;
     this.TotalAllHitTargetCount = 0;
     this.TotalAllShootCount     = 0;
     this.TotalAllKill           = 0;
     this.TotalAllExperience     = 0;
     this.TotalAllScore          = 0;
     this.TotalAllCure           = 0;
     this.m_DeputyWeapon         = this.m_player.SecondWeapon;
     if (this.m_DeputyWeapon != null)
     {
         this.deputyWeaponResCount = this.m_DeputyWeapon.StrengthenLevel + 1;
     }
     else
     {
         this.deputyWeaponResCount = 1;
     }
     this.m_weapon = this.m_player.MainWeapon;
     if (this.m_weapon != null)
     {
         BallConfigInfo ballConfigInfo = BallConfigMgr.FindBall(this.m_weapon.TemplateID);
         this.m_mainBallId     = ballConfigInfo.Common;
         this.m_spBallId       = ballConfigInfo.Special;
         this.m_sp2BallId      = ballConfigInfo.SpecialII;
         this.m_AddWoundBallId = ballConfigInfo.CommonAddWound;
         this.m_MultiBallId    = ballConfigInfo.CommonMultiBall;
     }
     this.m_loadingProcess = 0;
     this.m_prop           = 0;
     this.InitBuffer(this.m_player.EquipEffect);
     this.m_energy   = this.m_player.PlayerCharacter.Agility / 30 + 240;
     this.m_maxBlood = this.m_player.PlayerCharacter.hp;
     this.skillcu    = 0;
 }