isBase() public method

public isBase ( ) : bool
return bool
コード例 #1
0
        public override void onUpdatePropertys(Property prop, MemoryStream stream)
        {
            switch (prop.properUtype)
            {
            case 40001:
                Vector3 oldval_direction = direction;
                direction = stream.readVector3();

                if (prop.isBase())
                {
                    if (inited)
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
                else
                {
                    if (inWorld)
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }

                break;

            case 40000:
                Vector3 oldval_position = position;
                position = stream.readVector3();

                if (prop.isBase())
                {
                    if (inited)
                    {
                        onPositionChanged(oldval_position);
                    }
                }
                else
                {
                    if (inWorld)
                    {
                        onPositionChanged(oldval_position);
                    }
                }

                break;

            case 40002:
                stream.readUint32();
                break;

            default:
                break;
            }
            ;
        }
コード例 #2
0
ファイル: OperationBase.cs プロジェクト: kyondi/ZMOBA
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Operation"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Int32    oldval_heroID = heroID;
            Property prop_heroID   = pdatas[4];

            if (prop_heroID.isBase())
            {
                if (owner.inited && !owner.inWorld)
                {
                    onHeroIDChanged(oldval_heroID);
                }
            }
            else
            {
                if (owner.inWorld)
                {
                    if (prop_heroID.isOwnerOnly() && !owner.isPlayer())
                    {
                    }
                    else
                    {
                        onHeroIDChanged(oldval_heroID);
                    }
                }
            }
        }
コード例 #3
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["FrameSyncReport"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            SByte    oldval_seatNo = seatNo;
            Property prop_seatNo   = pdatas[4];

            if (prop_seatNo.isBase())
            {
                if (owner.inited && !owner.inWorld)
                {
                    onSeatNoChanged(oldval_seatNo);
                }
            }
            else
            {
                if (owner.inWorld)
                {
                    if (prop_seatNo.isOwnerOnly() && !owner.isPlayer())
                    {
                    }
                    else
                    {
                        onSeatNoChanged(oldval_seatNo);
                    }
                }
            }
        }
コード例 #4
0
ファイル: ChatBase.cs プロジェクト: kyondi/ZMOBA
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Chat"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            FRIEND_LIST oldval_friends = friends;
            Property    prop_friends   = pdatas[4];

            if (prop_friends.isBase())
            {
                if (owner.inited && !owner.inWorld)
                {
                    onFriendsChanged(oldval_friends);
                }
            }
            else
            {
                if (owner.inWorld)
                {
                    if (prop_friends.isOwnerOnly() && !owner.isPlayer())
                    {
                    }
                    else
                    {
                        onFriendsChanged(oldval_friends);
                    }
                }
            }
        }
コード例 #5
0
ファイル: ChatBase.cs プロジェクト: kyondi/ZMOBA
        public override void onUpdatePropertys(UInt16 propUtype, MemoryStream stream, int maxCount)
        {
            ScriptModule sm = EntityDef.moduledefs["Chat"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0 && maxCount-- != 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = propUtype;

                if (_t_child_utype == 0)
                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                prop = pdatas[_t_child_utype];

                switch (prop.properUtype)
                {
                case 16:
                    FRIEND_LIST oldval_friends = friends;
                    friends = ((DATATYPE_FRIEND_LIST)EntityDef.id2datatypes[23]).createFromStreamEx(stream);

                    if (prop.isBase())
                    {
                        if (owner.inited)
                        {
                            onFriendsChanged(oldval_friends);
                        }
                    }
                    else
                    {
                        if (owner.inWorld)
                        {
                            onFriendsChanged(oldval_friends);
                        }
                    }

                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #6
0
        public override void onUpdatePropertys(UInt16 propUtype, MemoryStream stream, int maxCount)
        {
            ScriptModule sm = EntityDef.moduledefs["FrameSyncReport"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0 && maxCount-- != 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = propUtype;

                if (_t_child_utype == 0)
                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                prop = pdatas[_t_child_utype];

                switch (prop.properUtype)
                {
                case 19:
                    SByte oldval_seatNo = seatNo;
                    seatNo = stream.readInt8();

                    if (prop.isBase())
                    {
                        if (owner.inited)
                        {
                            onSeatNoChanged(oldval_seatNo);
                        }
                    }
                    else
                    {
                        if (owner.inWorld)
                        {
                            onSeatNoChanged(oldval_seatNo);
                        }
                    }

                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #7
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Operation"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Int32    oldval_lossScore = lossScore;
            Property prop_lossScore   = pdatas[4];

            if (prop_lossScore.isBase())
            {
                if (owner.inited && !owner.inWorld)
                {
                    onLossScoreChanged(oldval_lossScore);
                }
            }
            else
            {
                if (owner.inWorld)
                {
                    if (prop_lossScore.isOwnerOnly() && !owner.isPlayer())
                    {
                    }
                    else
                    {
                        onLossScoreChanged(oldval_lossScore);
                    }
                }
            }

            Int32    oldval_winScore = winScore;
            Property prop_winScore   = pdatas[5];

            if (prop_winScore.isBase())
            {
                if (owner.inited && !owner.inWorld)
                {
                    onWinScoreChanged(oldval_winScore);
                }
            }
            else
            {
                if (owner.inWorld)
                {
                    if (prop_winScore.isOwnerOnly() && !owner.isPlayer())
                    {
                    }
                    else
                    {
                        onWinScoreChanged(oldval_winScore);
                    }
                }
            }
        }
コード例 #8
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["TestNoBase"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Int32    oldval_own = own;
            Property prop_own   = pdatas[4];

            if (prop_own.isBase())
            {
                if (owner.inited && !owner.inWorld)
                {
                    onOwnChanged(oldval_own);
                }
            }
            else
            {
                if (owner.inWorld)
                {
                    if (prop_own.isOwnerOnly() && !owner.isPlayer())
                    {
                    }
                    else
                    {
                        onOwnChanged(oldval_own);
                    }
                }
            }

            Int32    oldval_state = state;
            Property prop_state   = pdatas[5];

            if (prop_state.isBase())
            {
                if (owner.inited && !owner.inWorld)
                {
                    onStateChanged(oldval_state);
                }
            }
            else
            {
                if (owner.inWorld)
                {
                    if (prop_state.isOwnerOnly() && !owner.isPlayer())
                    {
                    }
                    else
                    {
                        onStateChanged(oldval_state);
                    }
                }
            }
        }
コード例 #9
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }
        }
コード例 #10
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Byte     oldval_RoomType = RoomType;
            Property prop_RoomType   = pdatas[4];

            if (prop_RoomType.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoomTypeChanged(oldval_RoomType);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_RoomType.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoomTypeChanged(oldval_RoomType);
                    }
                }
            }

            Byte     oldval_cur_turn = cur_turn;
            Property prop_cur_turn   = pdatas[5];

            if (prop_cur_turn.isBase())
            {
                if (inited && !inWorld)
                {
                    onCur_turnChanged(oldval_cur_turn);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_cur_turn.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onCur_turnChanged(oldval_cur_turn);
                    }
                }
            }

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Byte     oldval_numOfMJ = numOfMJ;
            Property prop_numOfMJ   = pdatas[6];

            if (prop_numOfMJ.isBase())
            {
                if (inited && !inWorld)
                {
                    onNumOfMJChanged(oldval_numOfMJ);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_numOfMJ.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onNumOfMJChanged(oldval_numOfMJ);
                    }
                }
            }

            Byte     oldval_playerMaxCount = playerMaxCount;
            Property prop_playerMaxCount   = pdatas[7];

            if (prop_playerMaxCount.isBase())
            {
                if (inited && !inWorld)
                {
                    onPlayerMaxCountChanged(oldval_playerMaxCount);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_playerMaxCount.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPlayerMaxCountChanged(oldval_playerMaxCount);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }

            ROOM_PUBLIC_INFO oldval_public_roomInfo = public_roomInfo;
            Property         prop_public_roomInfo   = pdatas[8];

            if (prop_public_roomInfo.isBase())
            {
                if (inited && !inWorld)
                {
                    onPublic_roomInfoChanged(oldval_public_roomInfo);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_public_roomInfo.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPublic_roomInfoChanged(oldval_public_roomInfo);
                    }
                }
            }

            UInt64   oldval_roomKey = roomKey;
            Property prop_roomKey   = pdatas[9];

            if (prop_roomKey.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoomKeyChanged(oldval_roomKey);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_roomKey.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoomKeyChanged(oldval_roomKey);
                    }
                }
            }
        }
コード例 #11
0
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 19:
                    Byte oldval_RoomType = RoomType;
                    RoomType = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onRoomTypeChanged(oldval_RoomType);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onRoomTypeChanged(oldval_RoomType);
                        }
                    }

                    break;

                case 24:
                    Byte oldval_cur_turn = cur_turn;
                    cur_turn = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onCur_turnChanged(oldval_cur_turn);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onCur_turnChanged(oldval_cur_turn);
                        }
                    }

                    break;

                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 22:
                    Byte oldval_numOfMJ = numOfMJ;
                    numOfMJ = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onNumOfMJChanged(oldval_numOfMJ);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onNumOfMJChanged(oldval_numOfMJ);
                        }
                    }

                    break;

                case 21:
                    Byte oldval_playerMaxCount = playerMaxCount;
                    playerMaxCount = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPlayerMaxCountChanged(oldval_playerMaxCount);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPlayerMaxCountChanged(oldval_playerMaxCount);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 23:
                    ROOM_PUBLIC_INFO oldval_public_roomInfo = public_roomInfo;
                    public_roomInfo = ((DATATYPE_ROOM_PUBLIC_INFO)EntityDef.id2datatypes[31]).createFromStreamEx(stream);

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPublic_roomInfoChanged(oldval_public_roomInfo);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPublic_roomInfoChanged(oldval_public_roomInfo);
                        }
                    }

                    break;

                case 18:
                    UInt64 oldval_roomKey = roomKey;
                    roomKey = stream.readUint64();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onRoomKeyChanged(oldval_roomKey);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onRoomKeyChanged(oldval_roomKey);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #12
0
ファイル: RoomBase.cs プロジェクト: Uouini/HappyPoker
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Int32    oldval_gameMupe = gameMupe;
            Property prop_gameMupe   = pdatas[4];

            if (prop_gameMupe.isBase())
            {
                if (inited && !inWorld)
                {
                    onGameMupeChanged(oldval_gameMupe);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_gameMupe.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onGameMupeChanged(oldval_gameMupe);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }

            Int64    oldval_roomId = roomId;
            Property prop_roomId   = pdatas[5];

            if (prop_roomId.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoomIdChanged(oldval_roomId);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_roomId.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoomIdChanged(oldval_roomId);
                    }
                }
            }

            Byte     oldval_roomType = roomType;
            Property prop_roomType   = pdatas[6];

            if (prop_roomType.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoomTypeChanged(oldval_roomType);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_roomType.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoomTypeChanged(oldval_roomType);
                    }
                }
            }
        }
コード例 #13
0
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Weapon"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 51003:
                    UInt16 oldval_CD = CD;
                    CD = stream.readUint16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onCDChanged(oldval_CD);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onCDChanged(oldval_CD);
                        }
                    }

                    break;

                case 51001:
                    UInt16 oldval_attackerID = attackerID;
                    attackerID = stream.readUint16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onAttackerIDChanged(oldval_attackerID);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onAttackerIDChanged(oldval_attackerID);
                        }
                    }

                    break;

                case 23:
                    UInt16 oldval_cruiseSpeed = cruiseSpeed;
                    cruiseSpeed = stream.readUint16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onCruiseSpeedChanged(oldval_cruiseSpeed);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onCruiseSpeedChanged(oldval_cruiseSpeed);
                        }
                    }

                    break;

                case 51004:
                    Vector3 oldval_destForward = destForward;
                    destForward = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDestForwardChanged(oldval_destForward);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDestForwardChanged(oldval_destForward);
                        }
                    }

                    break;

                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 42006:
                    UInt32 oldval_modelID = modelID;
                    modelID = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onModelIDChanged(oldval_modelID);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onModelIDChanged(oldval_modelID);
                        }
                    }

                    break;

                case 42007:
                    Byte oldval_modelScale = modelScale;
                    modelScale = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onModelScaleChanged(oldval_modelScale);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onModelScaleChanged(oldval_modelScale);
                        }
                    }

                    break;

                case 22:
                    UInt16 oldval_moveSpeed = moveSpeed;
                    moveSpeed = stream.readUint16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onMoveSpeedChanged(oldval_moveSpeed);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onMoveSpeedChanged(oldval_moveSpeed);
                        }
                    }

                    break;

                case 42003:
                    string oldval_name = name;
                    name = stream.readUnicode();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onNameChanged(oldval_name);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onNameChanged(oldval_name);
                        }
                    }

                    break;

                case 51002:
                    UInt16 oldval_ownerID = ownerID;
                    ownerID = stream.readUint16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onOwnerIDChanged(oldval_ownerID);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onOwnerIDChanged(oldval_ownerID);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                case 42008:
                    UInt32 oldval_spaceUType = spaceUType;
                    spaceUType = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onSpaceUTypeChanged(oldval_spaceUType);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onSpaceUTypeChanged(oldval_spaceUType);
                        }
                    }

                    break;

                case 44006:
                    SByte oldval_state = state;
                    state = stream.readInt8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onStateChanged(oldval_state);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onStateChanged(oldval_state);
                        }
                    }

                    break;

                case 42004:
                    UInt32 oldval_uid = uid;
                    uid = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onUidChanged(oldval_uid);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onUidChanged(oldval_uid);
                        }
                    }

                    break;

                case 42005:
                    UInt32 oldval_utype = utype;
                    utype = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onUtypeChanged(oldval_utype);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onUtypeChanged(oldval_utype);
                        }
                    }

                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #14
0
ファイル: AccountBase.cs プロジェクト: YaYunWang/ChessWarrior
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 5:
                    Int16 oldval_CampType = CampType;
                    CampType = stream.readInt16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onCampTypeChanged(oldval_CampType);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onCampTypeChanged(oldval_CampType);
                        }
                    }

                    break;

                case 3:
                    CHESS_INFO_LIST oldval_MineChess = MineChess;
                    MineChess = ((DATATYPE_CHESS_INFO_LIST)EntityDef.id2datatypes[23]).createFromStreamEx(stream);

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onMineChessChanged(oldval_MineChess);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onMineChessChanged(oldval_MineChess);
                        }
                    }

                    break;

                case 2:
                    string oldval_RoleName = RoleName;
                    RoleName = stream.readUnicode();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onRoleNameChanged(oldval_RoleName);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onRoleNameChanged(oldval_RoleName);
                        }
                    }

                    break;

                case 1:
                    Int16 oldval_RoleType = RoleType;
                    RoleType = stream.readInt16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onRoleTypeChanged(oldval_RoleType);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onRoleTypeChanged(oldval_RoleType);
                        }
                    }

                    break;

                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #15
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["SpaceDuplicate"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            UInt32   oldval_modelID = modelID;
            Property prop_modelID   = pdatas[4];

            if (prop_modelID.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelIDChanged(oldval_modelID);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelID.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelIDChanged(oldval_modelID);
                    }
                }
            }

            Byte     oldval_modelScale = modelScale;
            Property prop_modelScale   = pdatas[5];

            if (prop_modelScale.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelScaleChanged(oldval_modelScale);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelScale.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelScaleChanged(oldval_modelScale);
                    }
                }
            }

            string   oldval_name = name;
            Property prop_name   = pdatas[6];

            if (prop_name.isBase())
            {
                if (inited && !inWorld)
                {
                    onNameChanged(oldval_name);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_name.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onNameChanged(oldval_name);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }

            UInt32   oldval_uid = uid;
            Property prop_uid   = pdatas[7];

            if (prop_uid.isBase())
            {
                if (inited && !inWorld)
                {
                    onUidChanged(oldval_uid);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_uid.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onUidChanged(oldval_uid);
                    }
                }
            }

            UInt32   oldval_utype = utype;
            Property prop_utype   = pdatas[8];

            if (prop_utype.isBase())
            {
                if (inited && !inWorld)
                {
                    onUtypeChanged(oldval_utype);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_utype.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onUtypeChanged(oldval_utype);
                    }
                }
            }
        }
コード例 #16
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Smash"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Byte     oldval_modelID = modelID;
            Property prop_modelID   = pdatas[4];

            if (prop_modelID.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelIDChanged(oldval_modelID);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelID.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelIDChanged(oldval_modelID);
                    }
                }
            }

            float    oldval_modelScale = modelScale;
            Property prop_modelScale   = pdatas[5];

            if (prop_modelScale.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelScaleChanged(oldval_modelScale);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelScale.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelScaleChanged(oldval_modelScale);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }
        }
コード例 #17
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs[className];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[1];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[0];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }

            string   oldval_roleName = roleName;
            Property prop_roleName   = pdatas[3];

            if (prop_roleName.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoleNameChanged(oldval_roleName);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_roleName.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoleNameChanged(oldval_roleName);
                    }
                }
            }

            UInt16   oldval_roleType = roleType;
            Property prop_roleType   = pdatas[4];

            if (prop_roleType.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoleTypeChanged(oldval_roleType);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_roleType.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoleTypeChanged(oldval_roleType);
                    }
                }
            }
        }
コード例 #18
0
        public override void onUpdatePropertys(UInt16 propUtype, MemoryStream stream, int maxCount)
        {
            ScriptModule sm = EntityDef.moduledefs["TestNoBase"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0 && maxCount-- != 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = propUtype;

                if (_t_child_utype == 0)
                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                prop = pdatas[_t_child_utype];

                switch (prop.properUtype)
                {
                case 24:
                    Int32 oldval_own = own;
                    own = stream.readInt32();

                    if (prop.isBase())
                    {
                        if (owner.inited)
                        {
                            onOwnChanged(oldval_own);
                        }
                    }
                    else
                    {
                        if (owner.inWorld)
                        {
                            onOwnChanged(oldval_own);
                        }
                    }

                    break;

                case 23:
                    Int32 oldval_state = state;
                    state = stream.readInt32();

                    if (prop.isBase())
                    {
                        if (owner.inited)
                        {
                            onStateChanged(oldval_state);
                        }
                    }
                    else
                    {
                        if (owner.inWorld)
                        {
                            onStateChanged(oldval_state);
                        }
                    }

                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #19
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Monster"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Int32    oldval_HP = HP;
            Property prop_HP   = pdatas[4];

            if (prop_HP.isBase())
            {
                if (inited && !inWorld)
                {
                    onHPChanged(oldval_HP);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_HP.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onHPChanged(oldval_HP);
                    }
                }
            }

            Int32    oldval_HP_Max = HP_Max;
            Property prop_HP_Max   = pdatas[5];

            if (prop_HP_Max.isBase())
            {
                if (inited && !inWorld)
                {
                    onHP_MaxChanged(oldval_HP_Max);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_HP_Max.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onHP_MaxChanged(oldval_HP_Max);
                    }
                }
            }

            Int32    oldval_MP = MP;
            Property prop_MP   = pdatas[6];

            if (prop_MP.isBase())
            {
                if (inited && !inWorld)
                {
                    onMPChanged(oldval_MP);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_MP.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onMPChanged(oldval_MP);
                    }
                }
            }

            Int32    oldval_MP_Max = MP_Max;
            Property prop_MP_Max   = pdatas[7];

            if (prop_MP_Max.isBase())
            {
                if (inited && !inWorld)
                {
                    onMP_MaxChanged(oldval_MP_Max);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_MP_Max.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onMP_MaxChanged(oldval_MP_Max);
                    }
                }
            }

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            UInt32   oldval_entityNO = entityNO;
            Property prop_entityNO   = pdatas[8];

            if (prop_entityNO.isBase())
            {
                if (inited && !inWorld)
                {
                    onEntityNOChanged(oldval_entityNO);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_entityNO.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onEntityNOChanged(oldval_entityNO);
                    }
                }
            }

            Int32    oldval_forbids = forbids;
            Property prop_forbids   = pdatas[9];

            if (prop_forbids.isBase())
            {
                if (inited && !inWorld)
                {
                    onForbidsChanged(oldval_forbids);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_forbids.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onForbidsChanged(oldval_forbids);
                    }
                }
            }

            UInt32   oldval_modelID = modelID;
            Property prop_modelID   = pdatas[10];

            if (prop_modelID.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelIDChanged(oldval_modelID);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelID.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelIDChanged(oldval_modelID);
                    }
                }
            }

            Byte     oldval_modelScale = modelScale;
            Property prop_modelScale   = pdatas[11];

            if (prop_modelScale.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelScaleChanged(oldval_modelScale);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelScale.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelScaleChanged(oldval_modelScale);
                    }
                }
            }

            Byte     oldval_moveSpeed = moveSpeed;
            Property prop_moveSpeed   = pdatas[12];

            if (prop_moveSpeed.isBase())
            {
                if (inited && !inWorld)
                {
                    onMoveSpeedChanged(oldval_moveSpeed);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_moveSpeed.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onMoveSpeedChanged(oldval_moveSpeed);
                    }
                }
            }

            string   oldval_name = name;
            Property prop_name   = pdatas[13];

            if (prop_name.isBase())
            {
                if (inited && !inWorld)
                {
                    onNameChanged(oldval_name);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_name.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onNameChanged(oldval_name);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }

            SByte    oldval_state = state;
            Property prop_state   = pdatas[14];

            if (prop_state.isBase())
            {
                if (inited && !inWorld)
                {
                    onStateChanged(oldval_state);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_state.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onStateChanged(oldval_state);
                    }
                }
            }

            Byte     oldval_subState = subState;
            Property prop_subState   = pdatas[15];

            if (prop_subState.isBase())
            {
                if (inited && !inWorld)
                {
                    onSubStateChanged(oldval_subState);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_subState.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onSubStateChanged(oldval_subState);
                    }
                }
            }

            UInt32   oldval_uid = uid;
            Property prop_uid   = pdatas[16];

            if (prop_uid.isBase())
            {
                if (inited && !inWorld)
                {
                    onUidChanged(oldval_uid);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_uid.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onUidChanged(oldval_uid);
                    }
                }
            }

            UInt32   oldval_utype = utype;
            Property prop_utype   = pdatas[17];

            if (prop_utype.isBase())
            {
                if (inited && !inWorld)
                {
                    onUtypeChanged(oldval_utype);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_utype.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onUtypeChanged(oldval_utype);
                    }
                }
            }
        }
コード例 #20
0
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Monster"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 47001:
                    Int32 oldval_HP = HP;
                    HP = stream.readInt32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onHPChanged(oldval_HP);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onHPChanged(oldval_HP);
                        }
                    }

                    break;

                case 47002:
                    Int32 oldval_HP_Max = HP_Max;
                    HP_Max = stream.readInt32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onHP_MaxChanged(oldval_HP_Max);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onHP_MaxChanged(oldval_HP_Max);
                        }
                    }

                    break;

                case 47003:
                    Int32 oldval_MP = MP;
                    MP = stream.readInt32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onMPChanged(oldval_MP);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onMPChanged(oldval_MP);
                        }
                    }

                    break;

                case 47004:
                    Int32 oldval_MP_Max = MP_Max;
                    MP_Max = stream.readInt32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onMP_MaxChanged(oldval_MP_Max);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onMP_MaxChanged(oldval_MP_Max);
                        }
                    }

                    break;

                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 51007:
                    UInt32 oldval_entityNO = entityNO;
                    entityNO = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onEntityNOChanged(oldval_entityNO);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onEntityNOChanged(oldval_entityNO);
                        }
                    }

                    break;

                case 47005:
                    Int32 oldval_forbids = forbids;
                    forbids = stream.readInt32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onForbidsChanged(oldval_forbids);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onForbidsChanged(oldval_forbids);
                        }
                    }

                    break;

                case 41006:
                    UInt32 oldval_modelID = modelID;
                    modelID = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onModelIDChanged(oldval_modelID);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onModelIDChanged(oldval_modelID);
                        }
                    }

                    break;

                case 41007:
                    Byte oldval_modelScale = modelScale;
                    modelScale = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onModelScaleChanged(oldval_modelScale);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onModelScaleChanged(oldval_modelScale);
                        }
                    }

                    break;

                case 32:
                    Byte oldval_moveSpeed = moveSpeed;
                    moveSpeed = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onMoveSpeedChanged(oldval_moveSpeed);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onMoveSpeedChanged(oldval_moveSpeed);
                        }
                    }

                    break;

                case 41003:
                    string oldval_name = name;
                    name = stream.readUnicode();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onNameChanged(oldval_name);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onNameChanged(oldval_name);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                case 47006:
                    SByte oldval_state = state;
                    state = stream.readInt8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onStateChanged(oldval_state);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onStateChanged(oldval_state);
                        }
                    }

                    break;

                case 47007:
                    Byte oldval_subState = subState;
                    subState = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onSubStateChanged(oldval_subState);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onSubStateChanged(oldval_subState);
                        }
                    }

                    break;

                case 41004:
                    UInt32 oldval_uid = uid;
                    uid = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onUidChanged(oldval_uid);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onUidChanged(oldval_uid);
                        }
                    }

                    break;

                case 41005:
                    UInt32 oldval_utype = utype;
                    utype = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onUtypeChanged(oldval_utype);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onUtypeChanged(oldval_utype);
                        }
                    }

                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #21
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            UInt32   oldval_goldBase = goldBase;
            Property prop_goldBase   = pdatas[4];

            if (prop_goldBase.isBase())
            {
                if (inited && !inWorld)
                {
                    onGoldBaseChanged(oldval_goldBase);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_goldBase.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onGoldBaseChanged(oldval_goldBase);
                    }
                }
            }

            Byte     oldval_index = index;
            Property prop_index   = pdatas[5];

            if (prop_index.isBase())
            {
                if (inited && !inWorld)
                {
                    onIndexChanged(oldval_index);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_index.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onIndexChanged(oldval_index);
                    }
                }
            }

            Byte     oldval_isReady = isReady;
            Property prop_isReady   = pdatas[6];

            if (prop_isReady.isBase())
            {
                if (inited && !inWorld)
                {
                    onIsReadyChanged(oldval_isReady);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_isReady.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onIsReadyChanged(oldval_isReady);
                    }
                }
            }

            string   oldval_playernameBase = playernameBase;
            Property prop_playernameBase   = pdatas[7];

            if (prop_playernameBase.isBase())
            {
                if (inited && !inWorld)
                {
                    onPlayernameBaseChanged(oldval_playernameBase);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_playernameBase.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPlayernameBaseChanged(oldval_playernameBase);
                    }
                }
            }

            string   oldval_playernameCell = playernameCell;
            Property prop_playernameCell   = pdatas[8];

            if (prop_playernameCell.isBase())
            {
                if (inited && !inWorld)
                {
                    onPlayernameCellChanged(oldval_playernameCell);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_playernameCell.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPlayernameCellChanged(oldval_playernameCell);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }
        }
コード例 #22
0
ファイル: AccountBase.cs プロジェクト: YaYunWang/ChessWarrior
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Int16    oldval_CampType = CampType;
            Property prop_CampType   = pdatas[4];

            if (prop_CampType.isBase())
            {
                if (inited && !inWorld)
                {
                    onCampTypeChanged(oldval_CampType);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_CampType.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onCampTypeChanged(oldval_CampType);
                    }
                }
            }

            CHESS_INFO_LIST oldval_MineChess = MineChess;
            Property        prop_MineChess   = pdatas[5];

            if (prop_MineChess.isBase())
            {
                if (inited && !inWorld)
                {
                    onMineChessChanged(oldval_MineChess);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_MineChess.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onMineChessChanged(oldval_MineChess);
                    }
                }
            }

            string   oldval_RoleName = RoleName;
            Property prop_RoleName   = pdatas[6];

            if (prop_RoleName.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoleNameChanged(oldval_RoleName);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_RoleName.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoleNameChanged(oldval_RoleName);
                    }
                }
            }

            Int16    oldval_RoleType = RoleType;
            Property prop_RoleType   = pdatas[7];

            if (prop_RoleType.isBase())
            {
                if (inited && !inWorld)
                {
                    onRoleTypeChanged(oldval_RoleType);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_RoleType.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onRoleTypeChanged(oldval_RoleType);
                    }
                }
            }

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }
        }
コード例 #23
0
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 2:
                    UInt64 oldval_lastSelCharacter = lastSelCharacter;
                    lastSelCharacter = stream.readUint64();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onLastSelCharacterChanged(oldval_lastSelCharacter);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onLastSelCharacterChanged(oldval_lastSelCharacter);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #24
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Avatar"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            component1.callPropertysSetMethods();

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Byte     oldval_modelID = modelID;
            Property prop_modelID   = pdatas[5];

            if (prop_modelID.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelIDChanged(oldval_modelID);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelID.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelIDChanged(oldval_modelID);
                    }
                }
            }

            string   oldval_name = name;
            Property prop_name   = pdatas[6];

            if (prop_name.isBase())
            {
                if (inited && !inWorld)
                {
                    onNameChanged(oldval_name);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_name.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onNameChanged(oldval_name);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }
        }
コード例 #25
0
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["SpaceDuplicate"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 41006:
                    UInt32 oldval_modelID = modelID;
                    modelID = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onModelIDChanged(oldval_modelID);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onModelIDChanged(oldval_modelID);
                        }
                    }

                    break;

                case 41007:
                    Byte oldval_modelScale = modelScale;
                    modelScale = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onModelScaleChanged(oldval_modelScale);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onModelScaleChanged(oldval_modelScale);
                        }
                    }

                    break;

                case 41003:
                    string oldval_name = name;
                    name = stream.readUnicode();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onNameChanged(oldval_name);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onNameChanged(oldval_name);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                case 41004:
                    UInt32 oldval_uid = uid;
                    uid = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onUidChanged(oldval_uid);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onUidChanged(oldval_uid);
                        }
                    }

                    break;

                case 41005:
                    UInt32 oldval_utype = utype;
                    utype = stream.readUint32();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onUtypeChanged(oldval_utype);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onUtypeChanged(oldval_utype);
                        }
                    }

                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #26
0
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 5:
                    Byte oldval_isNewPlayer = isNewPlayer;
                    isNewPlayer = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onIsNewPlayerChanged(oldval_isNewPlayer);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onIsNewPlayerChanged(oldval_isNewPlayer);
                        }
                    }

                    break;

                case 4:
                    UInt16 oldval_playerID = playerID;
                    playerID = stream.readUint16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPlayerIDChanged(oldval_playerID);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPlayerIDChanged(oldval_playerID);
                        }
                    }

                    break;

                case 2:
                    UInt16 oldval_playerID_base = playerID_base;
                    playerID_base = stream.readUint16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPlayerID_baseChanged(oldval_playerID_base);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPlayerID_baseChanged(oldval_playerID_base);
                        }
                    }

                    break;

                case 3:
                    string oldval_playerName = playerName;
                    playerName = stream.readUnicode();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPlayerNameChanged(oldval_playerName);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPlayerNameChanged(oldval_playerName);
                        }
                    }

                    break;

                case 1:
                    string oldval_playerName_base = playerName_base;
                    playerName_base = stream.readUnicode();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPlayerName_baseChanged(oldval_playerName_base);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPlayerName_baseChanged(oldval_playerName_base);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #27
0
ファイル: RoomBase.cs プロジェクト: chayao2015/ET-TenHalf
        public override void onUpdatePropertys(MemoryStream stream)
        {
            ScriptModule sm = EntityDef.moduledefs["Room"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            while (stream.length() > 0)
            {
                UInt16 _t_utype       = 0;
                UInt16 _t_child_utype = 0;

                {
                    if (sm.usePropertyDescrAlias)
                    {
                        _t_utype       = stream.readUint8();
                        _t_child_utype = stream.readUint8();
                    }
                    else
                    {
                        _t_utype       = stream.readUint16();
                        _t_child_utype = stream.readUint16();
                    }
                }

                Property prop = null;

                if (_t_utype == 0)
                {
                    prop = pdatas[_t_child_utype];
                }
                else
                {
                    Property pComponentPropertyDescription = pdatas[_t_utype];
                    switch (pComponentPropertyDescription.properUtype)
                    {
                    default:
                        break;
                    }

                    return;
                }

                switch (prop.properUtype)
                {
                case 40001:
                    Vector3 oldval_direction = direction;
                    direction = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onDirectionChanged(oldval_direction);
                        }
                    }

                    break;

                case 8:
                    Byte oldval_isPrivate = isPrivate;
                    isPrivate = stream.readUint8();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onIsPrivateChanged(oldval_isPrivate);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onIsPrivateChanged(oldval_isPrivate);
                        }
                    }

                    break;

                case 40000:
                    Vector3 oldval_position = position;
                    position = stream.readVector3();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onPositionChanged(oldval_position);
                        }
                    }

                    break;

                case 7:
                    UInt16 oldval_roomKey = roomKey;
                    roomKey = stream.readUint16();

                    if (prop.isBase())
                    {
                        if (inited)
                        {
                            onRoomKeyChanged(oldval_roomKey);
                        }
                    }
                    else
                    {
                        if (inWorld)
                        {
                            onRoomKeyChanged(oldval_roomKey);
                        }
                    }

                    break;

                case 40002:
                    stream.readUint32();
                    break;

                default:
                    break;
                }
                ;
            }
        }
コード例 #28
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Account"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            Byte     oldval_isNewPlayer = isNewPlayer;
            Property prop_isNewPlayer   = pdatas[4];

            if (prop_isNewPlayer.isBase())
            {
                if (inited && !inWorld)
                {
                    onIsNewPlayerChanged(oldval_isNewPlayer);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_isNewPlayer.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onIsNewPlayerChanged(oldval_isNewPlayer);
                    }
                }
            }

            UInt16   oldval_playerID = playerID;
            Property prop_playerID   = pdatas[5];

            if (prop_playerID.isBase())
            {
                if (inited && !inWorld)
                {
                    onPlayerIDChanged(oldval_playerID);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_playerID.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPlayerIDChanged(oldval_playerID);
                    }
                }
            }

            UInt16   oldval_playerID_base = playerID_base;
            Property prop_playerID_base   = pdatas[6];

            if (prop_playerID_base.isBase())
            {
                if (inited && !inWorld)
                {
                    onPlayerID_baseChanged(oldval_playerID_base);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_playerID_base.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPlayerID_baseChanged(oldval_playerID_base);
                    }
                }
            }

            string   oldval_playerName = playerName;
            Property prop_playerName   = pdatas[7];

            if (prop_playerName.isBase())
            {
                if (inited && !inWorld)
                {
                    onPlayerNameChanged(oldval_playerName);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_playerName.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPlayerNameChanged(oldval_playerName);
                    }
                }
            }

            string   oldval_playerName_base = playerName_base;
            Property prop_playerName_base   = pdatas[8];

            if (prop_playerName_base.isBase())
            {
                if (inited && !inWorld)
                {
                    onPlayerName_baseChanged(oldval_playerName_base);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_playerName_base.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPlayerName_baseChanged(oldval_playerName_base);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }
        }
コード例 #29
0
        public override void onUpdatePropertys(Property prop, MemoryStream stream)
        {
            switch (prop.properUtype)
            {
            case 40001:
                Vector3 oldval_direction = direction;
                direction = stream.readVector3();

                if (prop.isBase())
                {
                    if (inited)
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
                else
                {
                    if (inWorld)
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }

                break;

            case 40000:
                Vector3 oldval_position = position;
                position = stream.readVector3();

                if (prop.isBase())
                {
                    if (inited)
                    {
                        onPositionChanged(oldval_position);
                    }
                }
                else
                {
                    if (inWorld)
                    {
                        onPositionChanged(oldval_position);
                    }
                }

                break;

            case 4:
                string oldval_roleName = roleName;
                roleName = stream.readUnicode();

                if (prop.isBase())
                {
                    if (inited)
                    {
                        onRoleNameChanged(oldval_roleName);
                    }
                }
                else
                {
                    if (inWorld)
                    {
                        onRoleNameChanged(oldval_roleName);
                    }
                }

                break;

            case 5:
                UInt16 oldval_roleType = roleType;
                roleType = stream.readUint16();

                if (prop.isBase())
                {
                    if (inited)
                    {
                        onRoleTypeChanged(oldval_roleType);
                    }
                }
                else
                {
                    if (inWorld)
                    {
                        onRoleTypeChanged(oldval_roleType);
                    }
                }

                break;

            case 40002:
                UInt32 spaceID = stream.readUint32();
                spaceID = 0;
                break;

            default:
                break;
            }
            ;
        }
コード例 #30
0
        public override void callPropertysSetMethods()
        {
            ScriptModule sm = EntityDef.moduledefs["Weapon"];
            Dictionary <UInt16, Property> pdatas = sm.idpropertys;

            UInt16   oldval_CD = CD;
            Property prop_CD   = pdatas[4];

            if (prop_CD.isBase())
            {
                if (inited && !inWorld)
                {
                    onCDChanged(oldval_CD);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_CD.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onCDChanged(oldval_CD);
                    }
                }
            }

            UInt16   oldval_attackerID = attackerID;
            Property prop_attackerID   = pdatas[5];

            if (prop_attackerID.isBase())
            {
                if (inited && !inWorld)
                {
                    onAttackerIDChanged(oldval_attackerID);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_attackerID.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onAttackerIDChanged(oldval_attackerID);
                    }
                }
            }

            UInt16   oldval_cruiseSpeed = cruiseSpeed;
            Property prop_cruiseSpeed   = pdatas[6];

            if (prop_cruiseSpeed.isBase())
            {
                if (inited && !inWorld)
                {
                    onCruiseSpeedChanged(oldval_cruiseSpeed);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_cruiseSpeed.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onCruiseSpeedChanged(oldval_cruiseSpeed);
                    }
                }
            }

            Vector3  oldval_destForward = destForward;
            Property prop_destForward   = pdatas[7];

            if (prop_destForward.isBase())
            {
                if (inited && !inWorld)
                {
                    onDestForwardChanged(oldval_destForward);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_destForward.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDestForwardChanged(oldval_destForward);
                    }
                }
            }

            Vector3  oldval_direction = direction;
            Property prop_direction   = pdatas[2];

            if (prop_direction.isBase())
            {
                if (inited && !inWorld)
                {
                    onDirectionChanged(oldval_direction);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_direction.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onDirectionChanged(oldval_direction);
                    }
                }
            }

            UInt32   oldval_modelID = modelID;
            Property prop_modelID   = pdatas[8];

            if (prop_modelID.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelIDChanged(oldval_modelID);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelID.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelIDChanged(oldval_modelID);
                    }
                }
            }

            Byte     oldval_modelScale = modelScale;
            Property prop_modelScale   = pdatas[9];

            if (prop_modelScale.isBase())
            {
                if (inited && !inWorld)
                {
                    onModelScaleChanged(oldval_modelScale);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_modelScale.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onModelScaleChanged(oldval_modelScale);
                    }
                }
            }

            UInt16   oldval_moveSpeed = moveSpeed;
            Property prop_moveSpeed   = pdatas[10];

            if (prop_moveSpeed.isBase())
            {
                if (inited && !inWorld)
                {
                    onMoveSpeedChanged(oldval_moveSpeed);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_moveSpeed.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onMoveSpeedChanged(oldval_moveSpeed);
                    }
                }
            }

            string   oldval_name = name;
            Property prop_name   = pdatas[11];

            if (prop_name.isBase())
            {
                if (inited && !inWorld)
                {
                    onNameChanged(oldval_name);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_name.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onNameChanged(oldval_name);
                    }
                }
            }

            UInt16   oldval_ownerID = ownerID;
            Property prop_ownerID   = pdatas[12];

            if (prop_ownerID.isBase())
            {
                if (inited && !inWorld)
                {
                    onOwnerIDChanged(oldval_ownerID);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_ownerID.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onOwnerIDChanged(oldval_ownerID);
                    }
                }
            }

            Vector3  oldval_position = position;
            Property prop_position   = pdatas[1];

            if (prop_position.isBase())
            {
                if (inited && !inWorld)
                {
                    onPositionChanged(oldval_position);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_position.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onPositionChanged(oldval_position);
                    }
                }
            }

            UInt32   oldval_spaceUType = spaceUType;
            Property prop_spaceUType   = pdatas[13];

            if (prop_spaceUType.isBase())
            {
                if (inited && !inWorld)
                {
                    onSpaceUTypeChanged(oldval_spaceUType);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_spaceUType.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onSpaceUTypeChanged(oldval_spaceUType);
                    }
                }
            }

            SByte    oldval_state = state;
            Property prop_state   = pdatas[14];

            if (prop_state.isBase())
            {
                if (inited && !inWorld)
                {
                    onStateChanged(oldval_state);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_state.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onStateChanged(oldval_state);
                    }
                }
            }

            UInt32   oldval_uid = uid;
            Property prop_uid   = pdatas[15];

            if (prop_uid.isBase())
            {
                if (inited && !inWorld)
                {
                    onUidChanged(oldval_uid);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_uid.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onUidChanged(oldval_uid);
                    }
                }
            }

            UInt32   oldval_utype = utype;
            Property prop_utype   = pdatas[16];

            if (prop_utype.isBase())
            {
                if (inited && !inWorld)
                {
                    onUtypeChanged(oldval_utype);
                }
            }
            else
            {
                if (inWorld)
                {
                    if (prop_utype.isOwnerOnly() && !isPlayer())
                    {
                    }
                    else
                    {
                        onUtypeChanged(oldval_utype);
                    }
                }
            }
        }