Esempio n. 1
0
 public Cost(int id, int count, string guid)
 {
     this.count = new DynamicInt();
     this.id    = id;
     this.count = count;
     this.guid  = guid;
 }
Esempio n. 2
0
 public WeihuaGames.ClientClass.Cost FromProtobuf(com.kodgames.corgi.protocol.Cost cost)
 {
     this.id    = cost.id;
     this.count = cost.count;
     this.guid  = cost.guid;
     return(this);
 }
Esempio n. 3
0
 public void FromProtobuf(com.kodgames.corgi.protocol.Avatar avatar)
 {
     this.breakthoughtLevel = avatar.breakthoughtLevel;
     this.guid       = avatar.guid;
     this.resourceId = avatar.resourceId;
     if (avatar.levelAttrib != null)
     {
         this.levelAttrib.FromProtobuf(avatar.levelAttrib);
     }
     this.meridianDatas.Clear();
     if (avatar.meridianData != null)
     {
         foreach (com.kodgames.corgi.protocol.MeridianData data in avatar.meridianData)
         {
             WeihuaGames.ClientClass.MeridianData item = new WeihuaGames.ClientClass.MeridianData();
             item.FromProtoBuf(data);
             this.meridianDatas.Add(item);
         }
     }
     if (avatar.domineerData != null)
     {
         this.domineer.FromProtoBuf(avatar.domineerData);
     }
     this.isAvatar  = avatar.isAvatar;
     this.traitType = avatar.traitType;
     this.name      = avatar.name;
 }
Esempio n. 4
0
 public WeihuaGames.ClientClass.Consumable FromProtobuf(com.kodgames.corgi.protocol.Consumable protocol)
 {
     this.id              = protocol.id;
     this.amount          = protocol.amount;
     this.addtionalAmount = protocol.additionalAmount;
     return(this);
 }
Esempio n. 5
0
 public WeihuaGames.ClientClass.Dan FromProtobuf(com.kodgames.corgi.protocol.Dan dan)
 {
     if (dan != null)
     {
         this.breakthoughtLevel = dan.breakthoughtLevel;
         this.guid       = dan.guid;
         this.resourceId = dan.resourceId;
         this.levelAttrib.FromProtobuf(dan.levelAttrib);
         this.type       = dan.type;
         this.locked     = dan.locked;
         this.createTime = dan.createTime;
         this.danPower   = dan.danPower;
         this.AttributeIds.Clear();
         if (dan.attributeIds != null)
         {
             foreach (int num in dan.attributeIds)
             {
                 this.AttributeIds.Add(num);
             }
         }
         this.danAttributeGroups.Clear();
         if (dan.danAttributeGroups != null)
         {
             foreach (com.kodgames.corgi.protocol.DanAttributeGroup group in dan.danAttributeGroups)
             {
                 WeihuaGames.ClientClass.DanAttributeGroup item = new WeihuaGames.ClientClass.DanAttributeGroup();
                 item.FromProtobuf(group);
                 this.danAttributeGroups.Add(item);
             }
         }
     }
     return(this);
 }
Esempio n. 6
0
 public static void compare(DynamicInt obj1, DynamicInt obj2)
 {
     for (int i = 0; i < obj1.list1.Count; i++)
     {
         //System.Console.Write("Ser = " + obj1.list1[i] + ", Deser = " + obj2.list1[i] + "\n");
         Assert.AreEqual(obj1.list1[i], obj2.list1[i]);
     }
 }
 public LinearBurstModifier(DynamicInt depth,
                            DynamicFloat deltaSpeed,
                            DynamicFloat deltaAngularSpeed)
 {
     this.depth             = depth;
     this.deltaSpeed        = deltaSpeed;
     this.deltaAngularSpeed = deltaAngularSpeed;
 }
Esempio n. 8
0
 public void FromProtobuf(com.kodgames.corgi.protocol.SignData signData)
 {
     this.signDetails     = signData.signDetails;
     this.serverTime      = signData.serverTime;
     this.signCount       = signData.signCount;
     this.freeSignCount   = signData.freeSignCount;
     this.remedySignCount = signData.remedySignCount;
 }
Esempio n. 9
0
 public int Evaluate(DynamicInt target)
 {
     if (target.isDynamic)
     {
         return((int)this.GetProperty(target.dynamicKey));
     }
     return(target.fixedValue);
 }
Esempio n. 10
0
 public void CopyDungeon(WeihuaGames.ClientClass.Dungeon dungeon)
 {
     this.DungeonId              = dungeon.DungeonId;
     this.TodayCompleteTimes     = dungeon.TodayCompleteTimes;
     this.todayAlreadyResetTimes = dungeon.todayAlreadyResetTimes;
     this.BestRecord             = dungeon.BestRecord;
     this.DungeonStatus          = dungeon.DungeonStatus;
     this.DungeonDialogState     = dungeon.DungeonDialogState;
 }
 public CircularBurstModifier(DynamicFloat range,
                              DynamicInt count,
                              DynamicFloat deltaSpeed,
                              DynamicFloat deltaAngularSpeed)
 {
     this.range             = range;
     this.count             = count;
     this.deltaSpeed        = deltaSpeed;
     this.deltaAngularSpeed = deltaAngularSpeed;
 }
Esempio n. 12
0
 public PolygonSource(DynamicFloat size,
                      DynamicInt edgeCount,
                      DynamicInt pointsPerEdge,
                      RotationType type)
 {
     this.size          = size;
     this.edgeCount     = edgeCount;
     this.pointsPerEdge = pointsPerEdge;
     this.type          = type;
 }
Esempio n. 13
0
 public WeihuaGames.ClientClass.Equipment FromProtobuf(com.kodgames.corgi.protocol.Equipment equipment)
 {
     if (equipment != null)
     {
         this.breakthoughtLevel = equipment.breakthoughtLevel;
         this.guid       = equipment.guid;
         this.resourceId = equipment.resourceId;
         this.levelAttrib.FromProtobuf(equipment.levelAttrib);
     }
     return(this);
 }
Esempio n. 14
0
        public static void Main(String[] args)
        {
            System.Console.Write("Test Dynamic Int  \n");
            DynamicInt ser = buildObj();
            serialize(ser);
            byte[] res = deserialize();

            DynamicInt deser = new DynamicInt();
            deser.deserialize(new MemoryStream(res));

            compare(ser, deser);
        }
Esempio n. 15
0
 public WeihuaGames.ClientClass.Dungeon FromProtobuf(com.kodgames.corgi.protocol.Dungeon dungeon)
 {
     if (dungeon != null)
     {
         this.bestRecord             = dungeon.bestRecord;
         this.dungeonId              = dungeon.dungeonId;
         this.todayCompleteTimes     = dungeon.todayCompleteTimes;
         this.todayAlreadyResetTimes = dungeon.todayAlreadyResetTimes;
         this.dungeonStatus          = dungeon.dungeonStatus;
         this.dungeonDialogState     = dungeon.dialogState;
     }
     return(this);
 }
Esempio n. 16
0
 public static DynamicInt buildObj()
 {
     DynamicInt obj = new DynamicInt();
     obj.list1.Add(127);
     obj.list1.Add(16383);
     obj.list1.Add(2097151);
     obj.list1.Add(268435455);
     obj.list1.Add(34359738367);
     obj.list1.Add(4398046511103);
     obj.list1.Add(562949953421311);
     //obj.list1.Add(72057594037927935);
     //obj.list1.Add(9223372036854775807);
     return obj;
 }
Esempio n. 17
0
        public int Evaluate(DynamicInt dynamicInt)
        {
            if (!dynamicInt.isDynamic)
            {
                return(dynamicInt.fixedValue);
            }
            if (!this._overrideMap.ContainsKey(dynamicInt.dynamicKey))
            {
                return((int)((float)this.config.AbilitySpecials[dynamicInt.dynamicKey]));
            }
            object obj2 = this._overrideMap[dynamicInt.dynamicKey];

            if (obj2 is SafeInt32)
            {
                return((int)((SafeInt32)obj2));
            }
            if (obj2 is SafeFloat)
            {
                return((int)((SafeFloat)obj2));
            }
            return((int)((float)obj2));
        }
Esempio n. 18
0
 public int UpdateValue(int value, long modifyTime)
 {
     this.value          = value;
     this.lastModifyTime = modifyTime;
     return((int)this.value);
 }
Esempio n. 19
0
 int IAttacker.Evaluate(DynamicInt target)
 {
     return(base.Evaluate(target));
 }
Esempio n. 20
0
 public CircleSource(DynamicFloat radius, DynamicInt count, bool normal = false)
 {
     this.radius = radius;
     this.count  = count;
     this.normal = normal;
 }
Esempio n. 21
0
 public TimerIncreaseValue(int value, long lastIncreaseTime)
 {
     this.value          = new DynamicInt();
     this.value          = value;
     this.lastModifyTime = lastIncreaseTime;
 }
Esempio n. 22
0
 public Cost()
 {
     this.count = new DynamicInt();
 }
Esempio n. 23
0
 public TimerIncreaseValue()
 {
     this.value = new DynamicInt();
 }
Esempio n. 24
0
 public int ModifyValue(int delta, long modifyTime)
 {
     this.value          = Math.Max(0, ((int)this.value) + delta);
     this.lastModifyTime = modifyTime;
     return((int)this.value);
 }
Esempio n. 25
0
 public WeihuaGames.ClientClass.Player FromProtobuf(com.kodgames.corgi.protocol.Player player)
 {
     this.levelAttrib       = new WeihuaGames.ClientClass.LevelAttrib();
     this.skills            = new List <WeihuaGames.ClientClass.Skill>();
     this.equipments        = new List <WeihuaGames.ClientClass.Equipment>();
     this.consumables       = new List <WeihuaGames.ClientClass.Consumable>();
     this.avatars           = new List <WeihuaGames.ClientClass.Avatar>();
     this.SignData          = new WeihuaGames.ClientClass.SignData();
     this.playerId          = player.playerId;
     this.name              = player.name;
     this.gameMoney         = player.gameMoney;
     this.realMoney         = player.realMoney;
     this.iron              = player.iron;
     this.spirit            = player.spirit;
     this.medals            = player.medals;
     this.wineSoul          = player.wineSoul;
     this.zentia            = player.zentia;
     this.guildMoney        = player.guildMoney;
     this.guildBossCount    = player.guildBossCount;
     this.power             = player.power;
     this.stamina.Point     = new TimerIncreaseValue(player.stamina, player.staminaLastCalculateTime);
     this.lastChatResetTime = player.lastResetChatTime;
     this.currentChatCount  = player.currentChatCount;
     this.chatData.UnreadPrivateChatMsgCount = player.unreadPrivateMsgCount;
     this.chatData.UnreadGuildChatCount      = player.guildUnreadChatCount;
     this.timeZone                    = player.timeZone;
     this.newCombatEmailCount         = player.newCombatEmailCount;
     this.newFriendEmailCount         = player.newFriendEmailCount;
     this.newSystemEmailCount         = player.newSystemEmailCount;
     this.newGuildEmailCount          = player.newGuildEmailCount;
     this.energy.Point                = new TimerIncreaseValue(player.energy, player.energyLastCalculateTime);
     this.energyBuyCount              = player.energyBuyCount;
     this.energyBuyCountLastResetTime = player.energyBuyCountLastResetTime;
     this.vipLevel                    = player.vipLevel;
     this.totalCostRMB                = player.totalCostRMB;
     this.remainingCostRMB            = player.remainningCostRMB;
     this.badge     = player.badge;
     this.loginTime = player.loginTime;
     if (player.levelAttrib != null)
     {
         this.levelAttrib.FromProtobuf(player.levelAttrib);
     }
     this.soul = player.soul;
     this.currentPickedLevel = player.curentPickedLevel;
     if (player.signData != null)
     {
         this.SignData.FromProtobuf(player.signData);
     }
     foreach (com.kodgames.corgi.protocol.Avatar avatar in player.avatars)
     {
         WeihuaGames.ClientClass.Avatar item = new WeihuaGames.ClientClass.Avatar();
         item.FromProtobuf(avatar);
         this.avatars.Add(item);
     }
     foreach (com.kodgames.corgi.protocol.Equipment equipment in player.equipments)
     {
         WeihuaGames.ClientClass.Equipment equipment2 = new WeihuaGames.ClientClass.Equipment();
         equipment2.FromProtobuf(equipment);
         this.equipments.Add(equipment2);
     }
     foreach (com.kodgames.corgi.protocol.Consumable consumable in player.consumables)
     {
         WeihuaGames.ClientClass.Consumable consumable2 = new WeihuaGames.ClientClass.Consumable();
         consumable2.FromProtobuf(consumable);
         this.consumables.Add(consumable2);
     }
     foreach (com.kodgames.corgi.protocol.Skill skill in player.skills)
     {
         WeihuaGames.ClientClass.Skill skill2 = new WeihuaGames.ClientClass.Skill();
         skill2.FromProtobuf(skill);
         this.skills.Add(skill2);
     }
     this.didCharge = player.didCharge;
     if (player.unDoneTutorialIds != null)
     {
         this.unDoneTutorials = player.unDoneTutorialIds;
     }
     this.staminaBuyCount = player.staminaBuyCount;
     this.staminaBuyCountLastResetTime = player.staminaBuyCountLastResetTime;
     this.trialStamp = player.trialStamp;
     this.threeToken = player.threeToken;
     if (player.questQuick != null)
     {
         this.questData.QuestQuick = new WeihuaGames.ClientClass.QuestQuick().FromProtoBuffer(player.questQuick);
     }
     if (player.startServerRewardInfo != null)
     {
         this.startServerRewardInfo = new WeihuaGames.ClientClass.StartServerRewardInfo().FromProtoBuf(player.startServerRewardInfo);
     }
     this.hasEvaluate         = player.hasEvaluate;
     this.cancelEvaluateLevel = player.cancelEvaluateLevel;
     if (player.hireDinerData != null)
     {
         this.hireDinerData.FromProtoBuf(player.hireDinerData);
     }
     this.qinInfoAnswerCount.Point = new TimerIncreaseValue(player.qinInfoAnswerCount, player.qinInfoAnswerCountRecoverTime);
     this.positionData.FromProtobuf(player.positionData);
     foreach (int num in player.appleGoodIds)
     {
         this.appleGoodIds.Add(num);
     }
     this.illusionData = new com.kodgames.corgi.protocol.IllusionData();
     if (player.illusionData != null)
     {
         this.illusionData = player.illusionData;
     }
     foreach (com.kodgames.corgi.protocol.Dan dan in player.dans)
     {
         WeihuaGames.ClientClass.Dan dan2 = new WeihuaGames.ClientClass.Dan();
         dan2.FromProtobuf(dan);
         this.dans.Add(dan2);
     }
     foreach (com.kodgames.corgi.protocol.Beast beast in player.beasts)
     {
         WeihuaGames.ClientClass.Beast beast2 = new WeihuaGames.ClientClass.Beast();
         beast2.FromProtobuf(beast);
         this.beasts.Add(beast2);
     }
     return(this);
 }
Esempio n. 26
0
 public WeihuaGames.ClientClass.LevelAttrib FromProtobuf(com.kodgames.corgi.protocol.LevelAttrib protocol)
 {
     this.level      = protocol.level;
     this.experience = protocol.experience;
     return(this);
 }