ScutGame / Scut

Scut is a free, open source, stable game server framework, which support C#/Python/Lua script, and support Unity3d, Cocos2dx, FlashAir client access.
1.33k stars 577 forks source link

fix casting exception #11

Closed kybird closed 2 years ago

kybird commented 8 years ago
public class UserRole : BaseEntity
 {
        [ProtoMember(1)]
        [EntityField(true)]
        public UInt64 RoleId 
        { 
            get; set; 
        }
        [ProtoMember(2)]
        [EntityField(true)]
        public int UserID 
        { 
            get; set; 
        }
        protected override int GetIdentityId()
        {
            return UserID.ToInt();
        }
}

// below command occur cast exception
var cacheSet = new PersonalCacheStruct<UserRole>();

I don't know why this happen now. because i write this long time. but today it happen problem. and i must change the abstractentity's CompareTo function. and i suspect the other kind need to be changed (ex. decimal, double, float in CompareTo function