CreateTypeId() public static method

public static CreateTypeId ( byte type ) : uint
type byte
return uint
Ejemplo n.º 1
0
        public MonsterObject(uint _id, int nAi_Id, short x, short y, bool isCreateTypeId = true)
        {
            mTarget      = null;
            id           = _id;
            type         = OBJECTTYPE.MONSTER;
            attr         = new GameStruct.MonterAttribute();
            mRebirthTime = 1000; //默认复活时间
            if (isCreateTypeId)
            {
                typeid = IDManager.CreateTypeId(type);
            }
            mInitPoint   = new GameStruct.Point();
            mInitPoint.x = x;
            mInitPoint.y = y;
            m_Ai         = CreateAi(nAi_Id);

            mnDieMagicTick = System.Environment.TickCount;
            mDieMagicInfo  = null;
            attr.life      = attr.life_max = 0;
            mAliveTime     = new GameBase.Core.TimeOut();
            mAliveTime.SetInterval(mRebirthTime);

            this.SetPoint(x, y);
            // ai = new AI.BaseAI(this);
            Alive();
        }
Ejemplo n.º 2
0
 public FightKnightObject(short x, short y, byte dir, uint _id, int nTime)
 {
     this.SetPoint(x, y);
     this.SetDir(dir);
     this.id        = _id;
     mnTime         = nTime * 1000;
     mnLastMoveTick = mnTick = System.Environment.TickCount;
     typeid         = IDManager.CreateTypeId(OBJECTTYPE.GUARDKNIGHT);
 }
Ejemplo n.º 3
0
        private PlayerObject mPlay; //宿主
        public GuardKnightObject(PlayerObject _play, short x, short y, byte dir, uint _id, int nAi_Id)
            : base(_id, nAi_Id, x, y, false)
        {
            type   = OBJECTTYPE.GUARDKNIGHT;
            typeid = IDManager.CreateTypeId(OBJECTTYPE.GUARDKNIGHT);;
            SetPoint(x, y);
            mRebirthTime   = 0;//不允许复活
            mnSurvivalTick = System.Environment.TickCount;
            mPlay          = _play;

            SetDir(dir);
        }
Ejemplo n.º 4
0
        public DiYuXieFu(PlayerObject _play, BaseObject _AttackTarget, short x, short y, byte dir, uint _id, int nAi_Id)
            : base(_id, nAi_Id, x, y, false)
        {
            type = GameBase.Config.OBJECTTYPE.CALLOBJECT;

            typeid = IDManager.CreateTypeId(GameBase.Config.OBJECTTYPE.GUARDKNIGHT);
            SetPoint(x, y);
            mRebirthTime = 0;//不允许复活
            mPlay        = _play;
            SetDir(dir);
            this.GetAi().SetAttackTarget(_AttackTarget);
        }
Ejemplo n.º 5
0
        public AnShaXieLongObject(PlayerObject _play, short x, short y, byte dir, uint _id, int nAi_Id)
            : base(_id, nAi_Id, x, y, false)
        {
            type   = OBJECTTYPE.CALLOBJECT;
            typeid = IDManager.CreateTypeId(OBJECTTYPE.GUARDKNIGHT);
            SetPoint(x, y);
            mRebirthTime = 0;//不允许复活

            mPlay = _play;
            SetDir(dir);
            mnRefreshTick = System.Environment.TickCount;
        }
Ejemplo n.º 6
0
 //参数说明
 //_play 创建该特效的宿主
 //nEffid 特效id
 //param 应该是面特效标记,比如是道具 地面特效等等 //标记 10 地面特效 12.清除地面特效
 //param1 未知  15.守护骑士 14.降灵咒雨
 //nTime 对象存活时间[秒]
 public EffectObject(PlayerObject _play, int nEffId, int nParam, int nParam1, int nTime, short nX, short nY)
 {
     mnEffID      = nEffId;
     mPlay        = _play;
     mnTime       = nTime * 1000;
     mnTick       = System.Environment.TickCount;
     mnParam      = nParam;
     mnParam1     = nParam1;
     type         = OBJECTTYPE.EFFECT;
     typeid       = IDManager.CreateTypeId(OBJECTTYPE.EFFECT);
     mnAttackTick = System.Environment.TickCount;
     this.SetPoint(nX, nY);
 }
Ejemplo n.º 7
0
        public WangNianWuLing(PlayerObject _play, short x, short y, byte dir, uint _id, int nAi_Id)
            : base(_id, nAi_Id, x, y, false)
        {
            type   = OBJECTTYPE.CALLOBJECT;
            typeid = IDManager.CreateTypeId(OBJECTTYPE.GUARDKNIGHT);
            SetPoint(x, y);
            mRebirthTime = 0;//不允许复活

            mPlay = _play;
            SetDir(dir);
            mnRefreshTick = System.Environment.TickCount;
            mAddHP_Time   = new TimeOut();
            mAddHP_Time.SetInterval(2);
        }
Ejemplo n.º 8
0
        public MingGuoShengNv(PlayerObject _play, short x, short y, byte dir, uint _id, int nAi_Id)
            : base(_id, nAi_Id, x, y, false)
        {
            type   = OBJECTTYPE.CALLOBJECT;
            typeid = IDManager.CreateTypeId(OBJECTTYPE.GUARDKNIGHT);
            SetPoint(x, y);
            mRebirthTime = 0;//不允许复活

            mPlay = _play;
            SetDir(dir);
            mnRefreshTick    = System.Environment.TickCount;
            mMagicAttackTime = new GameBase.Core.TimeOut();
            mMagicAttackTime.SetInterval(5);
        }
Ejemplo n.º 9
0
        public ShenYuanELing(PlayerObject _play, BaseObject _AttackTarget, short x, short y, byte dir, uint _id, int nAi_Id)
            : base(_id, nAi_Id, x, y, false)
        {
            type  = OBJECTTYPE.CALLOBJECT;
            mPlay = _play;
            //1.5倍的血量
            this.attr.life = this.attr.life_max = (int)(mPlay.GetBaseAttr().life * 1.5f);

            typeid = IDManager.CreateTypeId(OBJECTTYPE.GUARDKNIGHT);
            SetPoint(x, y);
            mRebirthTime = 0;//不允许复活

            SetDir(dir);
            this.GetAi().SetAttackTarget(_AttackTarget);
        }
Ejemplo n.º 10
0
 //private List<uint> mListPlay;
 public RobotObject()
 {
     type   = OBJECTTYPE.ROBOT;
     typeid = IDManager.CreateTypeId(OBJECTTYPE.PLAYER);
     // mListPlay = new List<uint>();
 }