Example #1
0
        public void InitFrom(Actor inShooter, JSkillData skillData)
        {
            mDamage   = inShooter.GetDamage(skillData.skillId, GameObjectClassId.Actor);
            mSiegeAtk = inShooter.GetDamage(skillData.skillId, GameObjectClassId.Prop);

            inShooter.LastBombNetworkId = GetNetworkId();
            LogHelper.LogInfo($"create enter {GetNetworkId()}, {inShooter.LastBombNetworkId}, skill_id:{skillData.skillId}, explosionID:{skillData.explosionID}");

            SetPlayerId(inShooter.GetPlayerId());
            mParentNetworkId = inShooter.GetNetworkId();

            Vector3 loc = inShooter.GetLocation();

            loc.y = inShooter.floor;
            SetLocation(loc);

            mDirection = inShooter.GetRotation();

            JExplosionData a_kExplosionData = ACDC.ExplosionData[skillData.explosionID];

            mExplodeTime = Timing.sInstance.GetFrameStartTime() + a_kExplosionData.time;
            mSkillId     = skillData.skillId;

            var player = World.Instance(WorldId).GameMode.GetEntry(inShooter.GetPlayerId());

            if (player != null)
            {
                mTeam = (byte)player.GetTeam();
            }
        }
Example #2
0
        public void InitFrom(Actor inShooter, ushort skillId, Vector3 bomedPos)
        {
            Vector3 loc = bomedPos;

            LogHelper.LogInfo($"Area bombed {bomedPos.y} Loc {loc.y}");
            SetLocation(loc);
            SkillId = skillId;
            SetPlayerId((int)inShooter.GetPlayerId());
            mParentNetworkId = inShooter.GetNetworkId();

            mSkillData       = ACDC.SkillData[skillId];
            m_kExplosionData = ACDC.ExplosionData[mSkillData.explosionID];
            mDamage          = inShooter.GetDamage(skillId, GameObjectClassId.Actor);
            mSiegeAtk        = inShooter.GetDamage(skillId, GameObjectClassId.Prop);
            mTeam            = (byte)inShooter.Team;
            // 주의 사항 ---- 같은 서브타입이 두개 이상 존재하면 마지막 것으로 초기화 됨
            if (mSkillData.spellId != null)
            {
                for (int i = 0; i < mSkillData.spellId.Length; ++i)
                {
                    var spell = ACDC.SpellData[mSkillData.spellId[i]];
                    if (spell == null)
                    {
                        continue;
                    }

                    if (spell.SpellSubType == (int)SpellSubType.FinishTime)
                    {
                        mFinishSpell = spell;
                    }
                    else if (spell.SpellSubType == (int)SpellSubType.MiddleTime)
                    {
                        mMiddleSpell = spell;
                    }
                }
            }

            mDirection     = inShooter.GetRotation();
            mDurationTime  = Timing.sInstance.GetFrameStartTime() + mSkillData.durationTime;
            mExplosionType = (eExplosionType)m_kExplosionData.type;
            SetCollisionRadius(m_kExplosionData.range[0]);
            if (m_kExplosionData.range.Count() > 1)
            {
                heightHalf = m_kExplosionData.range[1];
            }
            LogHelper.LogInfo($"InitFrom NID {GetNetworkId()} bomedPos {bomedPos.y} Pos {GetLocation().y} explosionType {mExplosionType}");
        }
Example #3
0
        //public void InitFrom(Trap inShooter, JSkillData skillData)
        public void InitFrom(Trap inShooter, JSkillData skillData)
        {
            mDamage          = (int)skillData.Damage;
            mParentNetworkId = inShooter.GetNetworkId();

            Vector3 loc = inShooter.GetLocation();

            loc.y = inShooter.GetLocation().y + 1;
            SetLocation(loc);
            // 맵에서 생성시 (int)ReservedPlayerId.Trap 로 사용
            mPlayerId   = (int)ReservedPlayerId.Trap;
            mapObjectId = inShooter.mapObjectId;

            mDirection = inShooter.GetRotation();

            JExplosionData a_kExplosionData = ACDC.ExplosionData[skillData.explosionID];

            mExplodeTime = Timing.sInstance.GetFrameStartTime() + a_kExplosionData.time;
        }