Exemple #1
0
        public CHESS_INFO_LIST createFromStreamEx(MemoryStream stream)
        {
            CHESS_INFO_LIST datas = new CHESS_INFO_LIST();

            datas.values = values_DataType.createFromStreamEx(stream);
            return(datas);
        }
        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);
                    }
                }
            }
        }
 public virtual void onMineChessChanged(CHESS_INFO_LIST oldValue)
 {
 }
        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;
                }
                ;
            }
        }
Exemple #5
0
 public void addToStreamEx(Bundle stream, CHESS_INFO_LIST v)
 {
     values_DataType.addToStreamEx(stream, v.values);
 }