كونكر عرب

كونكر عرب (https://conquer-arab.com/index.php)
-   مشكلات السيرفيرات كونكر الشخصيه (https://conquer-arab.com/forumdisplay.php?f=12)
-   -   مشكله في رنك البريفكشن سورس Immortals (https://conquer-arab.com/showthread.php?t=3065)

Adel Abd El Hay 2019-11-22 06:03 PM

مشكله في رنك البريفكشن سورس Immortals
 
بعد اذن الرجاله محتاج حل لمشكلة رنك البريفكشن في سورس Immortals
مفيش غير اكوت واحد بس اللي ظاهر والرنك برضو واحد بس اللي ظاهر
https://5.top4top.net/p_1421atst51.jpg
https://6.top4top.net/p_14214y2lb2.jpg

Rider 2019-11-22 06:31 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
اسحب برفكشن من رايزو اخر اصدار يا حب <3
https://code.vpscairo.com/showthread.php?p=22746

Adel Abd El Hay 2019-11-22 07:49 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
مهو المشكله اني مابعرفش اسحبوا من ملفات ايه بالظبط ياحبي دا غير ان سورس تكويد Msg
ورايزو تكويد عادي :D

Rider 2019-11-22 08:04 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
دور علي دول هيوصلوك للبرفكشن كامل
كود PHP:

 new MsgUserAbilityScore().GetRankingList();
                new 
MsgEquipRefineRank().UpdateRanking();
                new 
MsgRankMemberShow().UpdateBestPlayer(); 


Adel Abd El Hay 2019-11-22 08:37 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
تمام اسحبهم من سورس رايزو واحطهم ف نفس الاماكن ف سورسي ؟

Adel Abd El Hay 2019-11-22 08:45 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة rider (المشاركة 22788)
دور علي دول هيوصلوك للبرفكشن كامل
كود PHP:

 new msguserabilityscore().getrankinglist();
                new 
msgequiprefinerank().updateranking();
                new 
msgrankmembershow().updatebestplayer(); 


ال 3 اكواد دول كل واحد فيهم ليه كلاس اسحبو من سورس رايزو وابدلهم ب اللي ف سورسي ؟!
مش كدا ؟

Rider 2019-11-22 09:09 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة adel abd el hay (المشاركة 22791)
ال 3 اكواد دول كل واحد فيهم ليه كلاس اسحبو من سورس رايزو وابدلهم ب اللي ف سورسي ؟!
مش كدا ؟

اها بالظبط كده غالبا هتلاقيهم كلهم ف كلاس واحد

Adel Abd El Hay 2019-11-23 12:57 AM

رد: مشكله في رنك البريفكشن سورس Immortals
 
اقتباس:

المشاركة الأصلية كتبت بواسطة rider (المشاركة 22792)
اها بالظبط كده غالبا هتلاقيهم كلهم ف كلاس واحد

ايرور كتير بسبب ان السورسين مختلفين دا غير ان الكود الاخير مختلف تماما بين الاتنين

Adel Abd El Hay 2019-11-23 06:29 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
معلش ياحبي بس انا غلب مع المشكله دي ياريت تشوف السورس وتقولي ايه الحل ؟

Rider 2019-11-23 07:38 PM

رد: مشكله في رنك البريفكشن سورس Immortals
 
جرب ف Perfection.cs

ضيف
كود PHP:

  public unsafe class MsgRankMemberShow : Writer
    
{
        public 
MsgRankMemberShow() { }
        public 
MsgRankMemberShowProto Info;
        [
ProtoContract]
        public class 
MsgRankMemberShowProto
        
{
            [
ProtoMember(1, IsRequired = true)]
            public 
uint ActionId;
            [
ProtoMember(2, IsRequired = true)]
            public 
MsgRankMemberShowProtoSer proto;
        }
        [
ProtoContract]
        public class 
MsgRankMemberShowProtoSer
        
{
            [
ProtoMember(1, IsRequired = true)]
            public 
uint dwParam;
            [
ProtoMember(2, IsRequired = true)]
            public 
uint Count;
            [
ProtoMember(3, IsRequired = true)]
            public 
uint UID;
            [
ProtoMember(4, IsRequired = true)]
            public 
string Name = "";
            [
ProtoMember(5, IsRequired = true)]
            public 
string Guild = "";
            [
ProtoMember(6, IsRequired = true)]
            public 
uint Mesh;
            [
ProtoMember(7, IsRequired = true)]
            public 
uint HairStyle;
            [
ProtoMember(8, IsRequired = true)]
            public 
uint Hat;
            [
ProtoMember(9, IsRequired = true)]
            public 
uint Garment;
            [
ProtoMember(10, IsRequired = true)]
            public 
uint LeftWep;
            [
ProtoMember(11, IsRequired = true)]
            public 
uint LeftWepAcc;
            [
ProtoMember(12, IsRequired = true)]
            public 
uint RightWep;
            [
ProtoMember(13, IsRequired = true)]
            public 
uint RightWepAcc;
            [
ProtoMember(14, IsRequired = true)]
            public 
uint MountArmor;
            [
ProtoMember(15, IsRequired = true)]
            public 
uint Flag;
            [
ProtoMember(16, IsRequired = true)]
            public 
uint Wing;
            [
ProtoMember(17, IsRequired = true)]
            public 
uint WingLevel;
            [
ProtoMember(18, IsRequired = true)]
            public 
uint Title;
            [
ProtoMember(19, IsRequired = true)]
            public 
uint Flag2;
            [
ProtoMember(20, IsRequired = true)]
            public 
uint Flag3;
            [
ProtoMember(21, IsRequired = true)]
            public 
uint Flag4;
        }
        public 
void UpdateBestPlayer()
        {
            
Stuff = new Dictionary<string, uint>();
            
BestPlayer = Network.GamePackets.MsgUserAbilityScore.RankingList.OrderByDescending(i => i.Prestige).ThenByDescending(i => i.Level).ThenBy(i => i.UID).FirstOrDefault();
            if (
BestPlayer == null) return;
            
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID", BestPlayer.UID).And("Position", 0, true))
            
using (var reader = new MySqlReader(cmd))
            {
                while (
reader.Read())
                {
                    if (
reader.ReadByte("Position") == 5) Stuff.Add(GetPositionName(5), reader.ReadUInt32("ID"));
                    if (
reader.ReadByte("Position") == 9) if (!Stuff.ContainsKey(GetPositionName(9))) Stuff.Add(GetPositionName(9), reader.ReadUInt32("ID"));
                    if (
reader.ReadByte("Position") == 4) Stuff.Add(GetPositionName(4), reader.ReadUInt32("ID"));
                    if (
reader.ReadByte("Position") == 19)
                    {
                        
Stuff.Add(GetPositionName(19), reader.ReadUInt32("ID"));
                        
Stuff.Add(GetPositionName(255), reader.ReadByte("Plus"));
                    }
                }
                if (!
Stuff.Keys.Contains("MountArmor"))
                {
                    
using (var cmd2 = new MySqlCommand(MySqlCommandType.SELECT).Select("items").Where("EntityID", BestPlayer.UID).And("Position", 0, true))
                    
using (var reader2 = new MySqlReader(cmd2))
                    {
                        while (
reader2.Read())
                        {
                        }
                    }
                }
            }
        }
        public static 
string GetPositionName(byte Position)
        {
            if (
Position == 1) return "Hat";
            if (
Position == 3) return "Armor";
            if (
Position == 5) return "LeftWep";
            if (
Position == 9) return "Garment";
            if (
Position == 16) return "LeftWepAcc";
            if (
Position == 17) return "MountArmor";
            if (
Position == 4) return "RightWep";
            if (
Position == 15) return "RightWepAcc";
            if (
Position == 19) return "Wing";
            if (
Position == 255) return "WingLevel";
            return 
"Unknwon";
        }
        public static 
Dictionary<string, uint> Stuff = new Dictionary<string, uint>();
        public static 
Game.Player BestPlayer;
        public 
void Handle(Client.GameState client)
        {
            if (
BestPlayer == null) return;
            switch (
Info.ActionId)
            {
                case 
0:
                    {
                        var 
proto2 = new MsgRankMemberShowProto();
                        
proto2.ActionId = 0;
                        
proto2.proto = new MsgRankMemberShowProtoSer();
                        
proto2.proto.dwParam = 1;
                        
proto2.proto.Count = 1;
                        
proto2.proto.UID = BestPlayer.UID;
                        
//proto2.proto.HairStyle = BestPlayer.HairStyle;
                        
proto2.proto.Mesh = BestPlayer.Mesh;
                        
proto2.proto.Name = BestPlayer.Name;
                        if (
BestPlayer.GuildID != 0)
                            
proto2.proto.Guild = Kernel.Guilds[BestPlayer.GuildID].Name;
                        
proto2.proto.Hat = Stuff.Where(i => i.Key == "Hat").FirstOrDefault().Value;
                        
proto2.proto.LeftWep = Stuff.Where(i => i.Key == "LeftWep").FirstOrDefault().Value;
                        
proto2.proto.LeftWepAcc = Stuff.Where(i => i.Key == "LeftWepAcc").FirstOrDefault().Value;
                        
proto2.proto.MountArmor = Stuff.Where(i => i.Key == "MountArmor").FirstOrDefault().Value;
                        
proto2.proto.Garment = Stuff.Where(i => i.Key == "Garment").FirstOrDefault().Value;
                        
proto2.proto.RightWep = Stuff.Where(i => i.Key == "RightWep").FirstOrDefault().Value;
                        
proto2.proto.RightWepAcc = Stuff.Where(i => i.Key == "RightWepAcc").FirstOrDefault().Value;
                        
proto2.proto.WingLevel = Stuff.Where(i => i.Key == "WingLevel").FirstOrDefault().Value;
                        
using (var cmd = new MySqlCommand(MySqlCommandType.SELECT).Select("entities").Where("UID", BestPlayer.UID))
                        
using (var reader = new MySqlReader(cmd))
                        {
                            while (
reader.Read())
                            {
                                
proto2.proto.HairStyle = reader.ReadUInt32("HairStyle");
                                
//Console.WriteLine(proto2.proto.HairStyle + " and " + BestPlayer.HairStyle);
                                
proto2.proto.Wing = reader.ReadUInt32("WingID");
                                
proto2.proto.Title = reader.ReadUInt32("TitleID");

                            }
                        }
                        
//if (Kernel.GamePool.ContainsKey(BestPlayer.UID))
                        //{
                        //    proto2.proto.Flag = (uint)Kernel.GamePool[BestPlayer.UID].Entity.StatusFlag;
                        //    proto2.proto.Flag2 = (uint)Kernel.GamePool[BestPlayer.UID].Entity.StatusFlag2;
                        //    proto2.proto.Flag3 = (uint)Kernel.GamePool[BestPlayer.UID].Entity.StatusFlag3;
                        //    proto2.proto.Flag4 = (uint)Kernel.GamePool[BestPlayer.UID].Entity.StatusFlag4;
                        //}
                        
client.Send(Kernel.FinalizeProtoBuf(proto2, 3257));
                        break;
                    }
                case 
1:
                    {
                        if (
Kernel.GamePool.ContainsKey(Info.proto == null ? 0 : Info.proto.dwParam))
                        {
                            
PacketHandler.ObserveEquipment(new MsgActionProto() { ID = 117, UID = client.Entity.UID, dwParam = Info.proto == null ? 0 : Info.proto.dwParam }, client);
                        }
                        else
                        {
                            
client.Send(Kernel.FinalizeProtoBuf(Info, 3257));
                        }
                        break;
                    }
            }

        }
        public 
bool Read(byte[] packet)
        {
            var 
mypkt = new byte[packet.Length - 4];
            Array.
Copy(packet, 4, mypkt, 0, mypkt.Length);
            try
            {
                
using (var memoryStream = new MemoryStream(packet))
                {
                    
Info = Serializer.DeserializeWithLengthPrefix<MsgRankMemberShowProto>(memoryStream, PrefixStyle.Fixed32);
                }
            }
            catch (
Exception e)
            {
                
Console.WriteLine(e);
                return 
false;
            }
            return 
true;
        }
    } 

ف

player.cs
ضيف
كود PHP:

 public uint Prestige
        
{
            
get
            
{
                if (
Owner == null) return totalperfectionscore_;
                
uint points = 0;
                
points += Owner.Equipment.GetFullEquipmentEnumPoints;
                
points += Owner.Equipment.GetFullEquipmentSocketPoints;
                
points += Owner.Equipment.GetFullEquipmentGemPoints;
                
points += Owner.Equipment.GetFullEquipmentPlusPoints;
                
points += Owner.Equipment.GetFullEquipmentBlessPoints;
                
points += Owner.Equipment.GetFullEquipmentRefinePoints;
                
points += Owner.Equipment.GetFullEquipmentSoulPoints;
                
points += Owner.Equipment.GetFullEquipmentEnchantPoints;
                
points += Owner.Equipment.GetFullEquipmentPerfecetionLevelPoints;
                
points += Owner.Equipment.GetFullEquipmentLevelPoints;
                
points += (uint)MsgUserAbilityScore.CalculatePerfectionChiPoints(Owner);
                
points += (uint)MsgUserAbilityScore.CalculatePerfectionJiangPoints(Owner);
                
points += (uint)((Vitality + Spirit + Strength + Agility + Atributes) * 5);
                
points += (uint)(Level < 140 ? Level * 20 : Level * 25);
                if (
InnerPower != null) points += InnerPower.TotalScore * 2;
                
points += (uint)((uint)NobilityRank * 1000);
                
points += (uint)(Reborn * 1000);
                
points += (Database.StorageItem.PerfectionPoints(Owner, true));
                
points += (Database.StorageItem.PerfectionPoints(Owner, false));
                
points += (uint)(MsgUserAbilityScore.CalculateSubClassPoints(Owner));
                return 
points;
            }
            
set
            
{
                
totalperfectionscore_ = value;
            }
        } 

ف thread
سرش
كود PHP:

DateTime LastPerfectionSort = DateTime.Now; 

بدل تلاته الي تحت بعض ب دي
كود PHP:

new MsgUserAbilityScore().GetRankingList();
                new 
MsgEquipRefineRank().UpdateRanking();
                new 
MsgRankMemberShow().UpdateBestPlayer(); 

سيرش
كود PHP:

PrestigeRank.LoadRanking(); 

و حط مكنها
كود PHP:

MsgRankMemberShow().UpdateBestPlayer(); 



الساعة الآن 02:02 PM

مرحبا بكم في منتدي اكواد لتطوير الالعاب
new notificatio by 9adq_ala7sas