قديم 2020-01-23, 01:51 AM
المشاركة 2
Rider
.:: نائب المدير ::.
الإجابات المقدمة: 706
  • غير متواجد
افتراضي رد: طلب التشي ايبك ف اليكس
بدل كلاس Chi.cs
ب ده

كود:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Concurrent;
using Project_Terror_v2.Game.MsgServer;

namespace 
Project_Terror_v2.Role.Instance
{

    public class 
ChiRank
    
{
        public const 
int File_Size 50;

        public 
Dictionary<uintChi.ChiPowerDragon;
        public 
Dictionary<uintChi.ChiPowerPhoenix;
        public 
Dictionary<uintChi.ChiPowerTurtle;
        public 
Dictionary<uintChi.ChiPowerTiger;

        public 
ChiRank()
        {
            
Dragon = new Dictionary<uintChi.ChiPower>(File_Size);
            
Phoenix = new Dictionary<uintChi.ChiPower>(File_Size);
            
Turtle = new Dictionary<uintChi.ChiPower>(File_Size);
            
Tiger = new Dictionary<uintChi.ChiPower>(File_Size);
        }
        public 
void Upadte(Dictionary<uintChi.ChiPowerpowerChi.ChiPower MyPower)
        {
            if (
power.Count File_Size)
            {
                
Calculate(powerMyPower);
            }
            else
            {
                var array = 
power.Values.ToArray();
                if (array[
49].Score <= MyPower.Score)
                {
                    
Calculate(powerMyPower);
                }
                else
                {
                    if (
power.ContainsKey(MyPower.UID))
                        
Calculate(powerMyPower);
                }
            }
        }
        public 
void Calculate(Dictionary<uintChi.ChiPowerpowerChi.ChiPower MyPower)
        {
            
lock (power)
            {
                if (
power.ContainsKey(MyPower.UID))
                    
power.Remove(MyPower.UID);
                
power.Add(MyPower.UIDMyPower);
                var 
clients power.Values.ToArray();
                var array = 
clients.OrderByDescending(=> p.Score).ToArray();
                
int Rank 1;
                
power.Clear();
                foreach (var 
user_power in array)
                {
                    
int OldRank user_power.Rank;
                    
user_power.Rank Rank;
                    if (
user_power.UID == MyPower.UID)
                        
MyPower.Rank Rank;
                    if (
Rank <= File_Size)
                    {
                        if (!
power.ContainsKey(user_power.UID))
                            
power.Add(user_power.UIDuser_power);
                    }
                    if (
OldRank != user_power.Rank)
                    {
                        
SendUpdate(user_power.UIDuser_power);
                    }
                    
Rank++;
                }
            }
        }
        public 
unsafe void SendUpdate(uint UIDChi.ChiPower MyPower)
        {
            
Client.GameClient user;
            if (
Database.Server.GamePoll.TryGetValue(UIDout user))
            {
                
using (var rec = new ServerSockets.RecycledPacket())
                {
                    var 
stream rec.GetStream();

                    
stream.GenericRankingCreate(MsgGenericRanking.Action.QueryCount, (Game.MsgServer.MsgGenericRanking.RankType)(60000000 + (byte)MyPower.Type), 001);
                    
stream.AddItemGenericRankingCreate((int)MyPower.Rank, (uint)MyPower.ScoreMyPower.UIDMyPower.Name);
                    
user.Send(stream.GenericRankingFinalize());
                }
                
user.Equipment.QueryEquipment(user.Equipment.Alternantefalse);
            }
        }
    }
    public class 
Chi IEnumerable<Chi.ChiPower>
    {
        [
Flags]
        public 
enum ChiAttributeFlags
        
{
            
None 0,

            
CriticalStrike << (ChiAttributeType.CriticalStrike 1),
            
SkillCriticalStrike << (ChiAttributeType.SkillCriticalStrike 1),
            
Immunity << (ChiAttributeType.Immunity 1),
            
Breakthrough << (ChiAttributeType.Breakthrough 1),
            
Counteraction << (ChiAttributeType.Counteraction 1),
            
MaxLife << (ChiAttributeType.MaxLife 1),
            
AddAttack << (ChiAttributeType.AddAttack 1),
            
AddMagicAttack << (ChiAttributeType.AddMagicAttack 1),
            
AddMagicDefense << (ChiAttributeType.AddMagicDefense 1),
            
FinalAttack << (ChiAttributeType.FinalAttack 1),
            
FinalMagicAttack << (ChiAttributeType.FinalMagicAttack 1),
            
FinalDefense << (ChiAttributeType.FinalDefense 1),
            
FinalMagicDefense << (ChiAttributeType.FinalMagicDefense 1)
        }
        
//public uint DragonTime = 0;
        //public uint PhoenixTime = 0;
        //public uint TurtleTime = 0;
        //public uint TigerTime = 0;
        //    public DateTime DragonTime;
        
public enum ChiAttributeType
        
{
            
None 0,
            
CriticalStrike,
            
SkillCriticalStrike,
            
Immunity,
            
Breakthrough,
            
Counteraction,
            
MaxLife,
            
AddAttack,
            
AddMagicAttack,
            
AddMagicDefense,
            
FinalAttack,
            
FinalMagicAttack,
            
FinalDefense,
            
FinalMagicDefense
        
}
        public class 
ChiPower
        
{
            public static 
readonly Extensions.RandomLite Rand = new Extensions.RandomLite();
            public 
Game.MsgServer.MsgChiInfo.ChiPowerType Type;
            public 
Tuple<ChiAttributeTypeint>[] Fields getset; }
            public 
uint Closed;
            public 
int Score get { return UnLocked this.Fields.Sum((x) => GetPonits(x.Item1x.Item2)) : 0; } }
            public 
int[] GetFieldsArray()
            {
                if (
UnLocked)
                {
                    
int[] array = new int[this.Fields.Length];
                    for (
int x 0this.Fields.Lengthx++)
                        array[
x] = this.Fields[x].Item2;
                    return array;
                }

                return new 
int[] { 000};
            }
            private 
ChiAttributeFlags attributeFlags;
            public 
bool UnLocked getset; }
            public 
string Name "";
            public 
uint UID;
            public 
int Rank 0;
            public 
ChiPower(Game.MsgServer.MsgChiInfo.ChiPowerType _Type)
            {
                
this.Fields = new Tuple<ChiAttributeTypeint>[4];
                
this.Type _Type;
            }

            public List<
Tuple<ChiAttributeTypebyte>> GetAvaliableTypes()
            {
                List<
Tuple<ChiAttributeTypebyte>> values = new List<Tuple<ChiAttributeTypebyte>>();
                for (
byte x 114x++)
                {
                    
// if (x < 1 || x > 13)
                    //    continue;
                    
if (ContainsFlag((ChiAttributeType)x) == false)
                        
values.Add(Tuple.Create((ChiAttributeType)x, (byte)(10)));
                }
                return 
values;
            }
            public List<
Tuple<ChiAttributeTypebyte>> GetAvaliableTypes2()
            {
                List<
Tuple<ChiAttributeTypebyte>> values = new List<Tuple<ChiAttributeTypebyte>>();
                for (
byte x 114x++)
                {
                    
// if (x < 1 || x > 13)
                    //    continue;
                    
if (ContainsFlag((ChiAttributeType)x) == false)
                        
values.Add(Tuple.Create((ChiAttributeType)x, (byte)(30)));
                }
                return 
values;
            }

            public 
void RerollSelected(int indexChiAttributeType typebool superonly false)
            {
                
int x index 1;
                if (
Fields[x] != null)
                {
                    
this.attributeFlags &= ~AttributeToFlag(Fields[x].Item1);
                    
this.attributeFlags &= ~AttributeToFlag(type);
                }
                
ChiAttributeFlags flag;
                do
                {
                    
flag AttributeToFlag(type);
                }
                while ((
this.attributeFlags flag) != 0);
                
this.attributeFlags |= flag;
                if (!
superonly)
                {
                    
Fields[x] = Tuple.Create(typeStatsRand(typeTypeNametruefalse));
                }
                else
                {
                    
Fields[x] = Tuple.Create(typeStatsRand(typeTypeNamefalsetrue));
                }
            }

            public 
bool ContainsFlag(ChiAttributeType type)
            {
                
ChiAttributeFlags tempFlag this.attributeFlags;
                
tempFlag &= ~AttributeToFlag(type);
                return !(
tempFlag == this.attributeFlags);
            }

            public 
void RerollGM(int GateChiAttributeType PowerTypeushort Value)
            {
                
lock (this.Fields)
                {
                    if (
Gate 1)
                    { return; }
                    
ChiAttributeFlags flag AttributeToFlag(PowerType);
                    if ((
this.attributeFlags flag) == 0)
                    {
                        
Gate -= 1;
                        
this.attributeFlags |= flag;
                        if ((
byte)PowerType 6)
                        {
                            
Value *= 2;
                        }
                        
this.Fields[Gate] = Tuple.Create(PowerType, (int)((uint)PowerType 10000 Value));
                    }
                }
            }
            public 
void Reroll(Game.MsgServer.MsgChiInfo.LockedFlags Lockedbool GMCommand false)
            {
                
lock (this.Fields)
                {
                    for (
int x 0this.Fields.Lengthx++)
                    {

                        if ((
Locked & (Game.MsgServer.MsgChiInfo.LockedFlags)(<< x)) != 0)
                            continue;

                        if (
this.Fields[x] != null)
                        {
                            
this.attributeFlags &= ~AttributeToFlag(Fields[x].Item1);
                        }
                        
int test 1000;
                        
ChiAttributeType attribute;
                        
ChiAttributeFlags flag;
                        do
                        {
                            
test--;
                            if (
test 0)
                            {
                                
Console.WriteLine("Problem chi");

                            }
                            
attribute RollRand();
                            
flag AttributeToFlag(attribute);
                        }
                        while ((
this.attributeFlags flag) != 0);
                        
this.attributeFlags |= flag;

                        
this.Fields[x] = Tuple.Create(attributeStatsRand(attributeTypeNamefalseGMCommand));
                    }
                }
            }
            private static 
ChiAttributeFlags AttributeToFlag(ChiAttributeType type)
            {
                return (
ChiAttributeFlags)(<< (int)(type 1));
            }
            public static 
ChiAttributeType RollRand()
            {
                
byte val = (byte)Rand.Next(1, (byte)Bounds.Length);
                return (
ChiAttributeType)Rand.Next(1val);
            }
            public static 
Extensions.Counter EpicAtribut = new Extensions.Counter(0);
            public static 
int StatsRand(ChiAttributeType typGame.MsgServer.MsgChiInfo.ChiPowerType StageTypestring Namebool epic falsebool GMCommand false)
            {
                
uint next EpicAtribut.Next;
                
uint dem 0;
                if ((
byte)typ 6)
                {
                    
dem++;
                    var 
data Bounds.First((x) => x.Item1 == typ);
                    if (
epic || dem >= 1)
                    {
                        
dem 0;
                        return (int)((
uint)data.Item1 10000 200);
                        
                    }
                    if (
GMCommand)
                    {
                        
int gmval Rand.Next(189199);
                        return (int)((
uint)data.Item1 10000 189);
                    }
                    
ushort val = (ushort)Rand.Next(1200);

                    
val += 30;
                    if (
val 200)
                        
val -= 30;
                    
ushort val1 = (ushort)Rand.Next(1val);
                    
uint ID = (uint)data.Item1;
                    if (
EpicAtribut.Count == 2000001)
                    {
                        
val1 200;
                        
EpicAtribut.Set(0);
                    }
                    
int role = (int)(ID 10000 val1);
                    if (
val1 190)//192
                    
{
                        
//create message
                        
using (var rec = new ServerSockets.RecycledPacket())
                        {
                            var 
stream rec.GetStream();

                            
stream.ChiMessageCreate(StageTyperoleName);
                            
Program.SendGlobalPackets.Enqueue(stream);
                        }
                    }
                    return 
role;
                }
                else
                {
                    
dem++;
                    var 
data Bounds.First((x) => x.Item1 == typ);
                    if (
epic || dem >= 1)
                    {
                        return (int)((
uint)data.Item1 10000 RollToValue(data.Item1100));
                    }
                    if (
GMCommand)
                    {
                        
int gmval Rand.Next(8999);
                        return (int)((
uint)data.Item1 10000 RollToValue(data.Item190));
                    }
                    
ushort val = (ushort)Rand.Next(1100);

                    
ushort val1 0;
                    if (
val 60)
                        
val1 = (ushort)Rand.Next(1val);



                    if (
EpicAtribut.Count == 2000001)
                    {
                        
val1 100;
                        
EpicAtribut.Set(0);
                    }
                    
uint val3 = (uint)RollToValue(data.Item1val1);
                    
uint ID = (uint)data.Item1;

                    
int role = (int)(ID 10000 val3);

                    if (
val1 90)//93
                    
{

                        
using (var rec = new ServerSockets.RecycledPacket())
                        {
                            var 
stream rec.GetStream();

                            
stream.ChiMessageCreate(StageTyperoleName);
                            
Program.SendGlobalPackets.Enqueue(stream);
                        }
                        
//create message

                    
}
                    return 
role;
                    
                }
            }
            public static 
double RollToValue(ChiAttributeType typeint roll)// thanks Hybrid
            
{
                
// value = (roll/100)*(max-min) + min
                
var data Bounds.First((x) => x.Item1 == type);
                return ((
roll 100.0) * (data.Item3 data.Item2) + data.Item2);
            }
            public static 
int GetPonits(ChiAttributeType typedouble roll)
            {
                var 
data Bounds.First((x) => x.Item1 == type);
                
uint value = (uint)(roll - (uint)((uint)data.Item1 10000));
                return 
ValueToRoll(data.Item1value);
            }
            public static 
int ValueToRoll(ChiAttributeType typedouble value)
            {
                
// 100*(value-min)/(max-min)
                
var data Bounds.First((x) => x.Item1 == type);
                if ((
byte)type 6)
                {
                    
double nextva = (double)value 10;
                    
value nextva;a
                    
if (value 1)
                        return 
0;
                }
                return (int)((
100 * (value data.Item2)) / (data.Item3 data.Item2));
            }
            public static 
ChiAttributeType GetType(int roll)
            {
                
int rollLevel roll 200;
                
roll -= rollLevel;
                return (
ChiAttributeType)(roll 10000);
            }
            public static 
uint GetDamage(ChiAttributeType typeint roll)
            {
                var 
data Bounds.First((x) => x.Item1 == type);
                
uint tt = (uint)data.Item1;
                
uint ava = (uint)(roll - (uint)(tt 10000));
                return 
ava;
            }
            public 
override string ToString()
            {
                return new 
Database.DBActions.WriteLine('/').Add(UnLocked 0)
                    .
Add((byte)Type).Add(GetFieldsArray()).Add(Closed).Close();
            }
            public 
void Load(string lineuint _UIDstring _Name)
            {
                
this.UID _UID;
                
this.Name _Name;
                
Database.DBActions.ReadLine reader = new Database.DBActions.ReadLine(line'/');
                
this.UnLocked reader.Read((byte)0) == 1;
                if (
this.UnLocked)
                {
                    
this.Type = (Game.MsgServer.MsgChiInfo.ChiPowerType)reader.Read((byte)0);
                    for (
int x 0Fields.Lengthx++)
                    {
                        
int role reader.Read((int)0);
                        
ChiAttributeType atr GetType(role);
                        
this.Fields[x] = Tuple.Create(atrrole);
                        
this.attributeFlags |= AttributeToFlag(atr);
                    }
                }
                
this.Closed reader.Read((uint)0);
            }
        }


        public static 
ConcurrentDictionary<uintChiChiPool = new ConcurrentDictionary<uintChi>();

        public 
int ChiPoints 0;

        public 
string Name "";
        public 
uint UID;
        public 
ChiPower GetChiPowerByMode(Project_Terror_v2.Game.MsgServer.MsgChiInfo.ChiPowerType Mode)
        {
            if (
Mode == MsgChiInfo.ChiPowerType.Dragon)
                return 
Dragon;
            if (
Mode == MsgChiInfo.ChiPowerType.Phoenix)
                return 
Phoenix;
            if (
Mode == MsgChiInfo.ChiPowerType.Turtle)
                return 
Turtle;
            if (
Mode == MsgChiInfo.ChiPowerType.Tiger)
                return 
Tiger;
            return 
null;
        }

        public 
ChiPower Dragon;
        public 
ChiPower Phoenix;
        public 
ChiPower Turtle;
        public 
ChiPower Tiger;

        public 
long DragonTime 0;
        public 
long PhoenixTime 0;
        public 
long TurtleTime 0;
        public 
long TigerTime 0;
        public 
Tuple<ChiAttributeTypeint>[] DragonPowers null;
        public 
Tuple<ChiAttributeTypeint>[] PhoenixPowers null;
        public 
Tuple<ChiAttributeTypeint>[] TurtlePowers null;
        public 
Tuple<ChiAttributeTypeint>[] TigerPowers null;

        public 
uint Locks
        
{
            
get
            
{
                
uint Value 0;
                if (
Dragon.UnLocked)
                    
Value |= Dragon.Closed;
                if (
Phoenix.UnLocked)
                    
Value |= Phoenix.Closed;
                if (
Turtle.UnLocked)
                    
Value |= Turtle.Closed;
                if (
Tiger.UnLocked)
                    
Value |= Tiger.Closed;
                return 
Value;
            }
        }
        public 
Chi(uint _UID)
        {
            
this.UID _UID;
            
this.ChiPoints 4000;
            
this.Dragon = new ChiPower(Game.MsgServer.MsgChiInfo.ChiPowerType.Dragon);
            
this.Phoenix = new ChiPower(Game.MsgServer.MsgChiInfo.ChiPowerType.Phoenix);
            
this.Turtle = new ChiPower(Game.MsgServer.MsgChiInfo.ChiPowerType.Turtle);
            
this.Tiger = new ChiPower(Game.MsgServer.MsgChiInfo.ChiPowerType.Tiger);
        }
        public 
uint TotalLock
        
{
            
get
            
{
                
uint interval 0;
                if (
Dragon != null)
                    
interval &= Dragon.Closed;
                if (
Phoenix != null)
                    
interval &= Phoenix.Closed;
                if (
Tiger != null)
                    
interval &= Tiger.Closed;
                if (
Turtle != null)
                    
interval &= Turtle.Closed;
                return 
interval;
            }
        }
        public 
uint AllScore()
        {
            
uint score 0;
            foreach (var 
power in this)
            {
                
score += (uint)power.Score;
            }
            return 
score;
        }
        public static 
int MaxPower(ChiAttributeType power)
        {
            if (
power == ChiAttributeType.CriticalStrike)
                return 
200;
            else if (
power == ChiAttributeType.SkillCriticalStrike)
                return 
200;
            else if (
power == ChiAttributeType.Immunity)
                return 
200;
            else if (
power == ChiAttributeType.Breakthrough)
                return 
200;
            else if (
power == ChiAttributeType.Counteraction)
                return 
200;
            else if (
power == ChiAttributeType.AddAttack)
                return 
2000;
            else if (
power == ChiAttributeType.MaxLife)
                return 
3500;
            else if (
power == ChiAttributeType.AddMagicAttack)
                return 
2500;
            else if (
power == ChiAttributeType.AddMagicDefense)
                return 
250;
            else if (
power == ChiAttributeType.FinalAttack)
                return 
500;
            else if (
power == ChiAttributeType.FinalMagicAttack)
                return 
300;
            else if (
power == ChiAttributeType.FinalDefense)
                return 
500;
            else
                return 
300;
        }
        public static 
Tuple<ChiAttributeTypeintint>[] Bounds =// thanks Hybrid
        
{
            
Tuple.Create(ChiAttributeType.CriticalStrike120),
            
Tuple.Create(ChiAttributeType.SkillCriticalStrike120),
            
Tuple.Create(ChiAttributeType.Immunity120),
            
Tuple.Create(ChiAttributeType.Breakthrough120),
            
Tuple.Create(ChiAttributeType.Counteraction120),
            
Tuple.Create(ChiAttributeType.MaxLife10003500),
            
Tuple.Create(ChiAttributeType.AddAttack5002000),
            
Tuple.Create(ChiAttributeType.AddMagicAttack5002500),
            
Tuple.Create(ChiAttributeType.AddMagicDefense50250),
            
Tuple.Create(ChiAttributeType.FinalAttack50500),
            
Tuple.Create(ChiAttributeType.FinalMagicAttack50300),            
            
Tuple.Create(ChiAttributeType.FinalDefense50500),
            
Tuple.Create(ChiAttributeType.FinalMagicDefense50300)
        };
        public 
IEnumerator<ChiPowerGetEnumerator()
        {
            yield return 
Dragon;
            yield return 
Phoenix;
            yield return 
Tiger;
            yield return 
Turtle;
        }
        
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            return 
this.GetEnumerator();
        }
        public 
unsafe void SendQueryUpdate(Client.GameClient userChi.ChiPower MyPowerServerSockets.Packet stream)
        {
            
stream.GenericRankingCreate(MsgGenericRanking.Action.QueryCount, (Game.MsgServer.MsgGenericRanking.RankType)(60000000 + (byte)MyPower.Type), 001);
            
stream.AddItemGenericRankingCreate(MyPower.Rank, (uint)MyPower.ScoreMyPower.UIDMyPower.Name);
            
user.Send(stream.GenericRankingFinalize());
        }
        
uint test 0;

        public 
uint CriticalStrike
        
{
            
get
            
{
                return 
test;
            }
            
set
            
{
                
test value;
            }
        }
        public 
uint SkillCriticalStrike getset; }
        public 
uint Immunity getset; }
        public 
uint Breakthrough getset; }
        public 
uint Counteraction getset; }
        public 
uint MaxLife getset; }
        public 
uint AddAttack getset; }
        public 
uint AddMagicAttack getset; }
        public 
uint AddMagicDefense getset; }
        public 
uint FinalAttack getset; }
        public 
uint FinalMagicAttack getset; }
        public 
uint FinalDefense getset; }
        public 
uint FinalMagicDefense getset; }

        public static 
object SynRoot = new object();
        public static 
void ComputeStatus(Chi ClientChi)
        {
            
lock (SynRoot)
            {
                
ClientChi.CriticalStrike 0;
                
ClientChi.SkillCriticalStrike 0;
                
ClientChi.Immunity 0;
                
ClientChi.Breakthrough 0;
                
ClientChi.Counteraction 0;
                
ClientChi.MaxLife 0;
                
ClientChi.AddAttack 0;
                
ClientChi.AddMagicAttack 0;
                
ClientChi.AddMagicDefense 0;
                
ClientChi.FinalAttack 0;
                
ClientChi.FinalDefense 0;
                
ClientChi.FinalMagicAttack 0;
                
ClientChi.FinalMagicDefense 0;

                foreach (var 
power in ClientChi)
                {
                    if (!
power.UnLocked)
                        continue;

                    foreach (var 
field in power.Fields)
                    {
                        
int value field.Item2;
                        switch (
field.Item1)
                        {
                            case 
ChiAttributeType.AddAttackClientChi.AddAttack += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.AddMagicAttackClientChi.AddMagicAttack += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.AddMagicDefenseClientChi.AddMagicDefense += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.BreakthroughClientChi.Breakthrough += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.CounteractionClientChi.Counteraction += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.CriticalStrikeClientChi.CriticalStrike += ChiPower.GetDamage(field.Item1field.Item2) * 10; break;
                            case 
ChiAttributeType.FinalAttackClientChi.FinalAttack += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.FinalDefenseClientChi.FinalDefense += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.FinalMagicAttackClientChi.FinalMagicAttack += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.FinalMagicDefenseClientChi.FinalMagicDefense += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.ImmunityClientChi.Immunity += ChiPower.GetDamage(field.Item1field.Item2) * 10; break;
                            case 
ChiAttributeType.MaxLifeClientChi.MaxLife += ChiPower.GetDamage(field.Item1field.Item2); break;
                            case 
ChiAttributeType.SkillCriticalStrikeClientChi.SkillCriticalStrike += ChiPower.GetDamage(field.Item1field.Item2) * 10; break;
                        }
                    }
                    if (
power.Type == Game.MsgServer.MsgChiInfo.ChiPowerType.Dragon)
                    {
                        if (
power.Rank >= && power.Rank <= || power.Score == 400)
                        {
                            
ClientChi.MaxLife += 5000;
                            
ClientChi.FinalAttack += 1000;
                            
ClientChi.FinalMagicAttack += 300;
                            
ClientChi.FinalMagicDefense += 300;
                        }
                        else if (
power.Rank >= && power.Rank <= 20)
                        {
                            
ClientChi.MaxLife += (uint)(3000 - (uint)((power.Rank 4) * 62.5));
                            
ClientChi.FinalAttack += (uint)(600 - (uint)((power.Rank 4) * 12.5));
                            
ClientChi.FinalMagicAttack += (uint)(200 - (uint)((power.Rank 4) * 3));
                            
ClientChi.FinalMagicDefense += (uint)(200 - (uint)((power.Rank 4) * 3));
                        }
                        else if (
power.Rank >= 21 && power.Rank <= 50)
                        {
                            
ClientChi.MaxLife += 1500;
                            
ClientChi.FinalAttack += 300;
                            
ClientChi.FinalMagicAttack += 100;
                            
ClientChi.FinalMagicDefense += 100;
                        }
                    }
                    else if (
power.Type == Game.MsgServer.MsgChiInfo.ChiPowerType.Phoenix)
                    {
                        if (
power.Rank >= && power.Rank <= || power.Score == 400)
                        {
                            
ClientChi.AddAttack += 3000;
                            
ClientChi.AddMagicAttack += 3000;
                            
ClientChi.FinalAttack += 1000;
                            
ClientChi.FinalMagicAttack += 300;
                        }
                        else if (
power.Rank >= && power.Rank <= 20)
                        {
                            
ClientChi.AddAttack += (uint)(2000 - (uint)((power.Rank 4) * 31.5));
                            
ClientChi.AddMagicAttack += (uint)(2000 - (uint)((power.Rank 4) * 31.5));
                            
ClientChi.FinalAttack += (uint)(600 - (uint)((power.Rank 4) * 12.5));
                            
ClientChi.FinalMagicAttack += (uint)(200 - (uint)((power.Rank 4) * 3));
                        }
                        else if (
power.Rank >= 21 && power.Rank <= 50)
                        {
                            
ClientChi.AddAttack += 1000;
                            
ClientChi.AddMagicAttack += 2000;
                            
ClientChi.FinalAttack += 1000;
                            
ClientChi.FinalMagicAttack += 300;
                        }
                    }
                    else if (
power.Type == Game.MsgServer.MsgChiInfo.ChiPowerType.Tiger)
                    {
                        if (
power.Rank >= && power.Rank <= || power.Score == 400)
                        {
                            
ClientChi.CriticalStrike += 15 100;
                            
ClientChi.SkillCriticalStrike += 15 100;
                            
ClientChi.Immunity += 100;
                        }
                        else if (
power.Rank >= && power.Rank <= 20)
                        {
                            
ClientChi.CriticalStrike += (uint)(11 100 - (uint)((power.Rank 4) * 17));
                            
ClientChi.SkillCriticalStrike += (uint)(11 100 - (uint)((power.Rank 4) * 17));
                            
ClientChi.Immunity += (uint)(100 - (uint)((power.Rank 4) * 13));
                        }
                        else if (
power.Rank >= 21 && power.Rank <= 50)
                        {
                            
ClientChi.CriticalStrike += 100;
                            
ClientChi.SkillCriticalStrike += 100;
                            
ClientChi.Immunity += 100;
                        }
                    }
                    else if (
power.Type == Game.MsgServer.MsgChiInfo.ChiPowerType.Turtle)
                    {
                        if (
power.Rank >= && power.Rank <= || power.Score == 400)
                        {
                            
ClientChi.Breakthrough += 15 10;
                            
ClientChi.Counteraction += 15 10;
                            
ClientChi.Immunity += 100;
                        }
                        else if (
power.Rank >= && power.Rank <= 20)
                        {
                            
ClientChi.Breakthrough += (uint)((11 100 - (uint)((power.Rank 4) * 17)) / 10);
                            
ClientChi.Counteraction += (uint)((11 100 - (uint)((power.Rank 4) * 17)) / 10);
                            
ClientChi.Immunity += (uint)(100 - (uint)((power.Rank 4) * 13));
                        }
                        else if (
power.Rank >= 21 && power.Rank <= 50)
                        {
                            
ClientChi.Breakthrough += 10;
                            
ClientChi.Counteraction += 10;
                            
ClientChi.Immunity += 100;
                        }
                    }
                }

            }
        }

    }




العلامات المرجعية



الذين يشاهدون محتوى الموضوع الآن : 1 ( الأعضاء 0 والزوار 1)
 
أدوات الموضوع

الانتقال السريع

المواضيع المتشابهه للموضوع: طلب التشي ايبك ف اليكس
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
كل ما يخص التشى (Chi) Rayzo تطوير سيرفرات كونكر 16 2019-10-29 04:59 AM
مشكله بخصوص ايبك ال Taoist ابو مروان مشكلات السيرفيرات كونكر الشخصيه 1 2019-08-28 11:52 AM
التشي كامل بشفرة واحدة بس Mero تطوير سيرفرات كونكر 3 2019-06-25 05:35 PM
التعديل علي مستوي التشي Hazem تطوير سيرفرات كونكر 1 2019-06-11 10:52 PM
ظبط التشي والجانج بايتم مره وحده Hazem تطوير سيرفرات كونكر 0 2019-04-24 10:03 AM


الساعة الآن 01:08 AM

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.