Пример #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();
            }
        }
Пример #2
0
        public void BuffRecovery(Actor actor, JSpellData data)
        {
            var entry = GetEntry(actor.GetPlayerId());

            if (entry == null)
            {
                LogHelper.LogError($"BuffRecovery find entry error {actor.GetPlayerId()}");
                return;
            }
            LogHelper.LogInfo($"BuffRecovery { World.Instance(actor.WorldId)?.castleList?.Count}, {entry.GetTeam()}");
            World.Instance(actor.WorldId).GetCastle(entry.GetTeam())?.BuffRecovery(data);
        }
Пример #3
0
 public override bool HandleCollisionWithActor(core.Actor inActor)
 {
     if (GetPlayerId() != inActor.GetPlayerId())
     {
         //RenderManager.sInstance.RemoveComponent(mSpriteComponent.get());
     }
     return(false);
 }
Пример #4
0
        public void InitFrom(Actor inShooter)
        {
            SetColor(inShooter.GetColor());
            SetPlayerId((int)inShooter.GetPlayerId());
            mParentNetworkId = inShooter.GetNetworkId();

            SetLocation(inShooter.GetLocation().Round());

            mDirection = inShooter.GetRotation();
        }
Пример #5
0
        public void InitFromShooter(Actor inShooter)
        {
            SetColor(inShooter.GetColor());
            SetPlayerId((int)inShooter.GetPlayerId());

            Vector3 forward = inShooter.GetForwardVector();

            SetVelocity(inShooter.GetVelocity() + forward * mMuzzleSpeed);
            SetLocation(inShooter.GetLocation());

            mDirection = inShooter.GetRotation();
        }
Пример #6
0
        public bool WriteState(NetOutgoingMessage inOutputStream, Actor actor)
        {
            if (actor.StateServerSide == ActorState.Ghost && actor.GetPlayerId() == lastKilledKingPlayerId)
            {
                inOutputStream.Write(true);

                inOutputStream.Write(actor.killPlayerId);
            }
            else
            {
                inOutputStream.Write(false);
            }
            return(true);
        }
Пример #7
0
        public void InitFromShooter(Actor inShooter)
        {
            SetPlayerId((int)inShooter.GetPlayerId());

            Vector3 forward = inShooter.GetForwardVector();

            SetVelocity(inShooter.mDirection + forward * mMuzzleSpeed);
            SetLocation(inShooter.GetLocation());

            mDirection     = inShooter.GetRotation();
            mStartLocation = inShooter.GetLocation();

            LogHelper.LogInfo($"start x{mStartLocation.x}, y{mStartLocation.y}, z{mStartLocation.z}");
        }
Пример #8
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}");
        }